[{"data":1,"prerenderedAt":2489},["ShallowReactive",2],{"navigation_docs":3,"-programming-macros":351,"-programming-macros-surround":2484},[4,31,45,83,109,147,197,215,253,291,329],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":30},"Getting Started","i-lucide-play","\u002Fgetting-started","01.getting-started",[10,14,18,22,26],{"title":11,"path":12,"stem":13},"Introduction","\u002Fgetting-started\u002Fintroduction","01.getting-started\u002F01.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fgetting-started\u002Finstallation","01.getting-started\u002F02.installation",{"title":19,"path":20,"stem":21},"Installing Extra Packages","\u002Fgetting-started\u002Finstalling-extra-packages","01.getting-started\u002F03.installing-extra-packages",{"title":23,"path":24,"stem":25},"Basics","\u002Fgetting-started\u002Fbasics","01.getting-started\u002F04.basics",{"title":27,"path":28,"stem":29},"How to Get Help","\u002Fgetting-started\u002Fhow-to-get-help","01.getting-started\u002F05.how-to-get-help",false,{"title":32,"icon":33,"path":34,"stem":35,"children":36,"page":30},"AI Integration","i-lucide-bot","\u002Fai-integration","02.ai-integration",[37,41],{"title":38,"path":39,"stem":40},"Model Context Protocol (MCP)","\u002Fai-integration\u002Fmcp","02.ai-integration\u002F01.mcp",{"title":42,"path":43,"stem":44},"Agent Skills","\u002Fai-integration\u002Fskills","02.ai-integration\u002F02.skills",{"title":46,"icon":47,"path":48,"stem":49,"children":50,"page":30},"Document Fundamentals","i-lucide-file-text","\u002Fdocument-fundamentals","03.document-fundamentals",[51,55,59,63,67,71,75,79],{"title":52,"path":53,"stem":54},"Document Structure","\u002Fdocument-fundamentals\u002Fdocument-structure","03.document-fundamentals\u002F01.document-structure",{"title":56,"path":57,"stem":58},"Text Formatting","\u002Fdocument-fundamentals\u002Ftext-formatting","03.document-fundamentals\u002F02.text-formatting",{"title":60,"path":61,"stem":62},"Paragraph Formatting","\u002Fdocument-fundamentals\u002Fparagraph-formatting","03.document-fundamentals\u002F03.paragraph-formatting",{"title":64,"path":65,"stem":66},"Fonts","\u002Fdocument-fundamentals\u002Ffonts","03.document-fundamentals\u002F04.fonts",{"title":68,"path":69,"stem":70},"Colors","\u002Fdocument-fundamentals\u002Fcolors","03.document-fundamentals\u002F05.colors",{"title":72,"path":73,"stem":74},"List Structures","\u002Fdocument-fundamentals\u002Flist-structures","03.document-fundamentals\u002F06.list-structures",{"title":76,"path":77,"stem":78},"Special Characters","\u002Fdocument-fundamentals\u002Fspecial-characters","03.document-fundamentals\u002F07.special-characters",{"title":80,"path":81,"stem":82},"Internationalization","\u002Fdocument-fundamentals\u002Finternationalization","03.document-fundamentals\u002F08.internationalization",{"title":84,"icon":85,"path":86,"stem":87,"children":88,"page":30},"Page Design","i-lucide-layout","\u002Fpage-design","04.page-design",[89,93,97,101,105],{"title":90,"path":91,"stem":92},"Page Layout","\u002Fpage-design\u002Fpage-layout","04.page-design\u002F01.page-layout",{"title":94,"path":95,"stem":96},"Page Headers and Footers","\u002Fpage-design\u002Fcustomizing-page-headers-and-footers","04.page-design\u002F02.customizing-page-headers-and-footers",{"title":98,"path":99,"stem":100},"Title Creation","\u002Fpage-design\u002Ftitle-creation","04.page-design\u002F03.title-creation",{"title":102,"path":103,"stem":104},"Footnotes and Margin Notes","\u002Fpage-design\u002Ffootnotes-and-margin-notes","04.page-design\u002F04.footnotes-and-margin-notes",{"title":106,"path":107,"stem":108},"Rotations","\u002Fpage-design\u002Frotations","04.page-design\u002F05.rotations",{"title":110,"icon":111,"path":112,"stem":113,"children":114,"page":30},"Tables and Graphics","i-lucide-table","\u002Ftables-and-graphics","05.tables-and-graphics",[115,119,123,127,131,135,139,143],{"title":116,"path":117,"stem":118},"Tables","\u002Ftables-and-graphics\u002Ftables","05.tables-and-graphics\u002F01.tables",{"title":120,"path":121,"stem":122},"Floats, Figures and Captions","\u002Ftables-and-graphics\u002Ffloats-figures-and-captions","05.tables-and-graphics\u002F02.floats-figures-and-captions",{"title":124,"path":125,"stem":126},"Importing Graphics","\u002Ftables-and-graphics\u002Fimporting-graphics","05.tables-and-graphics\u002F03.importing-graphics",{"title":128,"path":129,"stem":130},"Introducing Procedural Graphics","\u002Ftables-and-graphics\u002Fintroducing-procedural-graphics","05.tables-and-graphics\u002F04.introducing-procedural-graphics",{"title":132,"path":133,"stem":134},"PGF\u002FTikZ","\u002Ftables-and-graphics\u002Fpgf-tikz","05.tables-and-graphics\u002F05.pgf-tikz",{"title":136,"path":137,"stem":138},"PSTricks","\u002Ftables-and-graphics\u002Fpstricks","05.tables-and-graphics\u002F06.pstricks",{"title":140,"path":141,"stem":142},"MetaPost","\u002Ftables-and-graphics\u002Fmetapost","05.tables-and-graphics\u002F07.metapost",{"title":144,"path":145,"stem":146},"Picture","\u002Ftables-and-graphics\u002Fpicture","05.tables-and-graphics\u002F08.picture",{"title":148,"icon":149,"path":150,"stem":151,"children":152,"page":30},"Technical Writing","i-lucide-flask-conical","\u002Ftechnical-writing","06.technical-writing",[153,157,161,165,169,173,177,181,185,189,193],{"title":154,"path":155,"stem":156},"Mathematics","\u002Ftechnical-writing\u002Fmathematics","06.technical-writing\u002F01.mathematics",{"title":158,"path":159,"stem":160},"Advanced Mathematics","\u002Ftechnical-writing\u002Fadvanced-mathematics","06.technical-writing\u002F02.advanced-mathematics",{"title":162,"path":163,"stem":164},"Theorems","\u002Ftechnical-writing\u002Ftheorems","06.technical-writing\u002F03.theorems",{"title":166,"path":167,"stem":168},"Algorithms","\u002Ftechnical-writing\u002Falgorithms","06.technical-writing\u002F04.algorithms",{"title":170,"path":171,"stem":172},"Source Code Listings","\u002Ftechnical-writing\u002Fsource-code-listings","06.technical-writing\u002F05.source-code-listings",{"title":174,"path":175,"stem":176},"Chemical Graphics","\u002Ftechnical-writing\u002Fchemical-graphics","06.technical-writing\u002F06.chemical-graphics",{"title":178,"path":179,"stem":180},"Linguistics","\u002Ftechnical-writing\u002Flinguistics","06.technical-writing\u002F07.linguistics",{"title":182,"path":183,"stem":184},"Bibliography Management","\u002Ftechnical-writing\u002Fbibliography-management","06.technical-writing\u002F08.bibliography-management",{"title":186,"path":187,"stem":188},"More Bibliographies","\u002Ftechnical-writing\u002Fmore-bibliographies","06.technical-writing\u002F09.more-bibliographies",{"title":190,"path":191,"stem":192},"Indexing","\u002Ftechnical-writing\u002Findices","06.technical-writing\u002F10.indices",{"title":194,"path":195,"stem":196},"Glossary","\u002Ftechnical-writing\u002Fglossary","06.technical-writing\u002F11.glossary",{"title":198,"icon":199,"path":200,"stem":201,"children":202,"page":30},"Cross-References and Links","i-lucide-link","\u002Fcross-references","07.cross-references",[203,207,211],{"title":204,"path":205,"stem":206},"Labels and Cross Referencing","\u002Fcross-references\u002Flabels-and-cross-referencing","07.cross-references\u002F01.labels-and-cross-referencing",{"title":208,"path":209,"stem":210},"Hyperlinks","\u002Fcross-references\u002Fhyperlinks","07.cross-references\u002F02.hyperlinks",{"title":212,"path":213,"stem":214},"Initials","\u002Fcross-references\u002Finitials","07.cross-references\u002F03.initials",{"title":216,"icon":217,"path":218,"stem":219,"children":220,"page":30},"Specialized Documents","i-lucide-file-badge","\u002Fspecialized-documents","08.specialized-documents",[221,225,229,233,237,241,245,249],{"title":222,"path":223,"stem":224},"Scientific Reports","\u002Fspecialized-documents\u002Fscientific-reports","08.specialized-documents\u002F01.scientific-reports",{"title":226,"path":227,"stem":228},"Letters","\u002Fspecialized-documents\u002Fletters","08.specialized-documents\u002F02.letters",{"title":230,"path":231,"stem":232},"Presentations","\u002Fspecialized-documents\u002Fpresentations","08.specialized-documents\u002F03.presentations",{"title":234,"path":235,"stem":236},"Teacher's Corner","\u002Fspecialized-documents\u002Fteachers-corner","08.specialized-documents\u002F04.teachers-corner",{"title":238,"path":239,"stem":240},"Curriculum Vitae","\u002Fspecialized-documents\u002Fcurriculum-vitae","08.specialized-documents\u002F05.curriculum-vitae",{"title":242,"path":243,"stem":244},"Academic Journals","\u002Fspecialized-documents\u002Facademic-journals","08.specialized-documents\u002F06.academic-journals",{"title":246,"path":247,"stem":248},"Xy-pic","\u002Fspecialized-documents\u002Fxy-pic","08.specialized-documents\u002F07.xy-pic",{"title":250,"path":251,"stem":252},"Creating 3D Graphics","\u002Fspecialized-documents\u002Fcreating-3d-graphics","08.specialized-documents\u002F08.creating-3d-graphics",{"title":254,"icon":255,"path":256,"stem":257,"children":258,"page":30},"Programming LaTeX","i-lucide-code","\u002Fprogramming","09.programming",[259,263,267,271,275,279,283,287],{"title":260,"path":261,"stem":262},"Macros","\u002Fprogramming\u002Fmacros","09.programming\u002F01.macros",{"title":264,"path":265,"stem":266},"Plain TeX","\u002Fprogramming\u002Fplain-tex","09.programming\u002F02.plain-tex",{"title":268,"path":269,"stem":270},"Creating Packages","\u002Fprogramming\u002Fcreating-packages","09.programming\u002F03.creating-packages",{"title":272,"path":273,"stem":274},"Creating Package Documentation","\u002Fprogramming\u002Fcreating-package-documentation","09.programming\u002F04.creating-package-documentation",{"title":276,"path":277,"stem":278},"Themes","\u002Fprogramming\u002Fthemes","09.programming\u002F05.themes",{"title":280,"path":281,"stem":282},"Modular Documents","\u002Fprogramming\u002Fmodular-documents","09.programming\u002F06.modular-documents",{"title":284,"path":285,"stem":286},"Collaborative Writing of LaTeX Documents","\u002Fprogramming\u002Fcollaborative-writing","09.programming\u002F07.collaborative-writing",{"title":288,"path":289,"stem":290},"Export To Other Formats","\u002Fprogramming\u002Fexport-to-other-formats","09.programming\u002F08.export-to-other-formats",{"title":292,"icon":293,"path":294,"stem":295,"children":296,"page":30},"Reference and Help","i-lucide-book-open","\u002Freference","10.reference",[297,301,305,309,313,317,321,325],{"title":298,"path":299,"stem":300},"FAQ","\u002Freference\u002Ffaq","10.reference\u002F01.faq",{"title":302,"path":303,"stem":304},"Tips and Tricks","\u002Freference\u002Ftips-and-tricks","10.reference\u002F02.tips-and-tricks",{"title":306,"path":307,"stem":308},"Errors and Warnings","\u002Freference\u002Ferrors-and-warnings","10.reference\u002F03.errors-and-warnings",{"title":310,"path":311,"stem":312},"Lengths","\u002Freference\u002Flengths","10.reference\u002F04.lengths",{"title":314,"path":315,"stem":316},"Counters","\u002Freference\u002Fcounters","10.reference\u002F05.counters",{"title":318,"path":319,"stem":320},"Boxes","\u002Freference\u002Fboxes","10.reference\u002F06.boxes",{"title":322,"path":323,"stem":324},"Rules and Struts","\u002Freference\u002Frules-and-struts","10.reference\u002F07.rules-and-struts",{"title":326,"path":327,"stem":328},"Command Glossary","\u002Freference\u002Fcommand-glossary","10.reference\u002F08.command-glossary",{"title":330,"icon":331,"path":332,"stem":333,"children":334,"page":30},"Appendices","i-lucide-bookmark","\u002Fappendices","11.appendices",[335,339,343,347],{"title":336,"path":337,"stem":338},"Package Reference","\u002Fappendices\u002Fpackage-reference","11.appendices\u002F01.package-reference",{"title":340,"path":341,"stem":342},"Sample LaTeX Documents","\u002Fappendices\u002Fsample-latex-documents","11.appendices\u002F02.sample-latex-documents",{"title":344,"path":345,"stem":346},"Links","\u002Fappendices\u002Flinks","11.appendices\u002F03.links",{"title":348,"path":349,"stem":350},"Authors","\u002Fappendices\u002Fauthors","11.appendices\u002F04.authors",{"id":352,"title":260,"body":353,"description":2478,"extension":2479,"links":2480,"meta":2481,"navigation":1295,"path":261,"seo":2482,"stem":262,"__hash__":2483},"docs\u002F09.programming\u002F01.macros.md",{"type":354,"value":355,"toc":2456},"minimark",[356,360,363,368,371,388,407,414,423,434,510,528,539,549,552,561,574,615,626,630,640,660,665,750,754,783,787,821,825,893,1123,1132,1142,1146,1161,1166,1173,1182,1189,1192,1195,1198,1201,1216,1220,1230,1239,1253,1265,1271,1312,1316,1330,1374,1422,1429,1438,1441,1460,1464,1467,1508,1515,1523,1527,1561,1606,1610,1613,1622,1625,1628,1800,1804,1807,1810,1839,1842,1985,1989,1992,2034,2037,2040,2147,2151,2157,2188,2198,2201,2205,2208,2230,2233,2274,2278,2281,2303,2306,2309,2347,2350,2354,2357,2416,2419,2442,2452],[357,358,359],"p",{},"Documents produced with the commands you have learned up to this point will look acceptable to a large audience. While they are not fancy-looking, they obey all the established rules of good typesetting, which will make them easy to read and pleasant to look at. However, there are situations where LaTeX does not provide a command or environment that matches your needs, or the output produced by some existing command may not meet your requirements.",[357,361,362],{},"In this chapter, we will try to give some hints on how to teach LaTeX new tricks and how to make it produce output that looks different from what is provided by default.",[364,365,367],"h2",{"id":366},"new-commands","New commands",[357,369,370],{},"To add your own commands, use the",[372,373,378],"pre",{"className":374,"code":375,"language":376,"meta":377,"style":377},"language-latex shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\\newcommand{\\name}[num]{definition}\n","latex","",[379,380,381],"code",{"__ignoreMap":377},[382,383,386],"span",{"class":384,"line":385},"line",1,[382,387,375],{},[357,389,390,391,395,396,399,400,402,403,406],{},"command. Basically, the command requires two arguments: the ",[392,393,394],"em",{},"name"," of the command you want to create (preceded by a backslash), and the ",[392,397,398],{},"definition"," of the command. Note that the command ",[392,401,394],{}," can but need not be enclosed in braces, as you like. The ",[392,404,405],{},"num"," argument in square brackets is optional and specifies the number of arguments the new command takes (up to 9 are possible). If missing it defaults to 0, i.e. no argument allowed.",[357,408,409,410,413],{},"The following two examples should help you to get the idea. The first example defines a new command called ",[379,411,412],{},"\\wbal"," that will print \"The Wikibook about LaTeX\". Such a command could come in handy if you had to write the title of this book over and over again.",[372,415,417],{"className":374,"code":416,"language":376,"meta":377,"style":377},"\\newcommand{\\wbal}{The Wikibook about \\LaTeX}\n",[379,418,419],{"__ignoreMap":377},[382,420,421],{"class":384,"line":385},[382,422,416],{},[357,424,425,426,429,430,433],{},"The next example illustrates how to define a new command that takes one argument. The ",[379,427,428],{},"#1"," tag gets replaced by the argument you specify. If you wanted to use more than one argument, use ",[379,431,432],{},"#2"," and so on, these arguments are added in an extra set of brackets.",[372,435,437],{"className":374,"code":436,"language":376,"meta":377,"style":377},"\\newcommand{\\wbalsup}[1] {\n  This is the Wikibook about LaTeX \n  supported by #1}\n\\newcommand{\\wbalTwo}[2] {\n  This is the Wikibook about LaTeX\n  supported by #1 and #2}\n% in the document body:\n\\begin{itemize}\n\\item \\wbalsup{Wikimedia}\n\\item \\wbalsup{lots of users!}\n\\item \\wbalTwo{John Doe}{Anthea Smith}\n\\end{itemize}\n",[379,438,439,444,450,456,462,468,474,480,486,492,498,504],{"__ignoreMap":377},[382,440,441],{"class":384,"line":385},[382,442,443],{},"\\newcommand{\\wbalsup}[1] {\n",[382,445,447],{"class":384,"line":446},2,[382,448,449],{},"  This is the Wikibook about LaTeX \n",[382,451,453],{"class":384,"line":452},3,[382,454,455],{},"  supported by #1}\n",[382,457,459],{"class":384,"line":458},4,[382,460,461],{},"\\newcommand{\\wbalTwo}[2] {\n",[382,463,465],{"class":384,"line":464},5,[382,466,467],{},"  This is the Wikibook about LaTeX\n",[382,469,471],{"class":384,"line":470},6,[382,472,473],{},"  supported by #1 and #2}\n",[382,475,477],{"class":384,"line":476},7,[382,478,479],{},"% in the document body:\n",[382,481,483],{"class":384,"line":482},8,[382,484,485],{},"\\begin{itemize}\n",[382,487,489],{"class":384,"line":488},9,[382,490,491],{},"\\item \\wbalsup{Wikimedia}\n",[382,493,495],{"class":384,"line":494},10,[382,496,497],{},"\\item \\wbalsup{lots of users!}\n",[382,499,501],{"class":384,"line":500},11,[382,502,503],{},"\\item \\wbalTwo{John Doe}{Anthea Smith}\n",[382,505,507],{"class":384,"line":506},12,[382,508,509],{},"\\end{itemize}\n",[511,512,513],"blockquote",{},[357,514,515,519,520,523,524,527],{},[516,517,518],"strong",{},"Note:"," Name your new command ",[379,521,522],{},"\\wbalTwo"," and not ",[379,525,526],{},"\\wbal2"," as digits cannot be used to name macros — invalid characters will error out at compile-time.",[357,529,530,531,534,535,538],{},"LaTeX will not allow you to create a new command that would overwrite an existing one. But there is a special command in case you explicitly want this: ",[379,532,533],{},"\\renewcommand",". It uses the same syntax as the ",[379,536,537],{},"\\newcommand"," command.",[357,540,541,542,545,546,548],{},"In certain cases you might also want to use the ",[379,543,544],{},"\\providecommand"," command. It works like ",[379,547,537],{},", but if the command is already defined, LaTeX will silently ignore the new command.",[357,550,551],{},"With LaTeX2e, it is also possible to add a default parameter to a command with the following syntax:",[372,553,555],{"className":374,"code":554,"language":376,"meta":377,"style":377},"\\newcommand{name}[num][default]{definition}\n",[379,556,557],{"__ignoreMap":377},[382,558,559],{"class":384,"line":385},[382,560,554],{},[357,562,563,564,566,567,569,570,573],{},"If the default parameter of ",[379,565,537],{}," is present, then the first of the number of arguments specified by ",[379,568,405],{}," is optional with a default value of ",[379,571,572],{},"default","; if absent, then all of the arguments are required.",[372,575,577],{"className":374,"code":576,"language":376,"meta":377,"style":377},"\\newcommand{\\wbalTwo}[2][Wikimedia]{\n  This is the Wikibook about LaTeX\n  supported by {#1} and {#2}!}\n% in the document body:\n\\begin{itemize}\n\\item \\wbalTwo{John Doe}\n\\item \\wbalTwo[lots of users]{John Doe}\n\\end{itemize}\n",[379,578,579,584,588,593,597,601,606,611],{"__ignoreMap":377},[382,580,581],{"class":384,"line":385},[382,582,583],{},"\\newcommand{\\wbalTwo}[2][Wikimedia]{\n",[382,585,586],{"class":384,"line":446},[382,587,467],{},[382,589,590],{"class":384,"line":452},[382,591,592],{},"  supported by {#1} and {#2}!}\n",[382,594,595],{"class":384,"line":458},[382,596,479],{},[382,598,599],{"class":384,"line":464},[382,600,485],{},[382,602,603],{"class":384,"line":470},[382,604,605],{},"\\item \\wbalTwo{John Doe}\n",[382,607,608],{"class":384,"line":476},[382,609,610],{},"\\item \\wbalTwo[lots of users]{John Doe}\n",[382,612,613],{"class":384,"line":482},[382,614,509],{},[511,616,617],{},[357,618,619,621,622,625],{},[516,620,518],{}," When the command is used with an explicit first parameter it is given enclosed with brackets (here \"",[382,623,624],{},"lots of users","\").",[364,627,629],{"id":628},"modern-command-creation-xparse","Modern Command Creation (xparse)",[357,631,632,633,636,637,639],{},"Since 2020, the ",[379,634,635],{},"xparse"," package is integrated into the LaTeX kernel. It provides more powerful command creation than ",[379,638,537],{},":",[372,641,643],{"className":374,"code":642,"language":376,"meta":377,"style":377},"\\NewDocumentCommand{\\mycmd}{O{default} m m}{%\n  Optional: #1, Required: #2, Required: #3%\n}\n",[379,644,645,650,655],{"__ignoreMap":377},[382,646,647],{"class":384,"line":385},[382,648,649],{},"\\NewDocumentCommand{\\mycmd}{O{default} m m}{%\n",[382,651,652],{"class":384,"line":446},[382,653,654],{},"  Optional: #1, Required: #2, Required: #3%\n",[382,656,657],{"class":384,"line":452},[382,658,659],{},"}\n",[661,662,664],"h3",{"id":663},"xparse-argument-types","xparse Argument Types",[666,667,668,681],"table",{},[669,670,671],"thead",{},[672,673,674,678],"tr",{},[675,676,677],"th",{},"Symbol",[675,679,680],{},"Argument Type",[682,683,684,698,716,726,740],"tbody",{},[672,685,686,692],{},[687,688,689],"td",{},[379,690,691],{},"m",[687,693,694,695],{},"Mandatory argument ",[379,696,697],{},"{...}",[672,699,700,705],{},[687,701,702],{},[379,703,704],{},"o",[687,706,707,708,711,712,715],{},"Optional argument ",[379,709,710],{},"[...]"," (returns ",[379,713,714],{},"\\NoValue"," if absent)",[672,717,718,723],{},[687,719,720],{},[379,721,722],{},"O{default}",[687,724,725],{},"Optional argument with default value",[672,727,728,733],{},[687,729,730],{},[379,731,732],{},"s",[687,734,735,736,739],{},"Star form (",[379,737,738],{},"*",")",[672,741,742,747],{},[687,743,744],{},[379,745,746],{},"t",[687,748,749],{},"Token list argument",[661,751,753],{"id":752},"example-command-with-star-form","Example: Command with Star Form",[372,755,757],{"className":374,"code":756,"language":376,"meta":377,"style":377},"\\NewDocumentCommand{\\emphr}{s m}{%\n  \\IfBooleanTF{#1}{\\textbf{#2}}{\\textit{#2}}%\n}\n% \\emphr{text} → italic\n% \\emphr*{text} → bold\n",[379,758,759,764,769,773,778],{"__ignoreMap":377},[382,760,761],{"class":384,"line":385},[382,762,763],{},"\\NewDocumentCommand{\\emphr}{s m}{%\n",[382,765,766],{"class":384,"line":446},[382,767,768],{},"  \\IfBooleanTF{#1}{\\textbf{#2}}{\\textit{#2}}%\n",[382,770,771],{"class":384,"line":452},[382,772,659],{},[382,774,775],{"class":384,"line":458},[382,776,777],{},"% \\emphr{text} → italic\n",[382,779,780],{"class":384,"line":464},[382,781,782],{},"% \\emphr*{text} → bold\n",[661,784,786],{"id":785},"creating-environments","Creating Environments",[372,788,790],{"className":374,"code":789,"language":376,"meta":377,"style":377},"\\NewDocumentEnvironment{myenv}{O{default} m}{%\n  % begin code\n  \\textbf{#1: #2}\\par%\n}{%\n  % end code\n}\n",[379,791,792,797,802,807,812,817],{"__ignoreMap":377},[382,793,794],{"class":384,"line":385},[382,795,796],{},"\\NewDocumentEnvironment{myenv}{O{default} m}{%\n",[382,798,799],{"class":384,"line":446},[382,800,801],{},"  % begin code\n",[382,803,804],{"class":384,"line":452},[382,805,806],{},"  \\textbf{#1: #2}\\par%\n",[382,808,809],{"class":384,"line":458},[382,810,811],{},"}{%\n",[382,813,814],{"class":384,"line":464},[382,815,816],{},"  % end code\n",[382,818,819],{"class":384,"line":470},[382,820,659],{},[661,822,824],{"id":823},"comparison-newcommand-vs-newdocumentcommand","Comparison: \\newcommand vs \\NewDocumentCommand",[666,826,827,843],{},[669,828,829],{},[672,830,831,834,838],{},[675,832,833],{},"Feature",[675,835,836],{},[379,837,537],{},[675,839,840],{},[379,841,842],{},"\\NewDocumentCommand",[682,844,845,856,873,883],{},[672,846,847,850,853],{},[687,848,849],{},"Optional args",[687,851,852],{},"Only first arg",[687,854,855],{},"Any position",[672,857,858,861,867],{},[687,859,860],{},"Star form",[687,862,863,864],{},"Manual ",[379,865,866],{},"\\@ifstar",[687,868,869,870,872],{},"Built-in ",[379,871,732],{}," type",[672,874,875,878,881],{},[687,876,877],{},"Error on redef",[687,879,880],{},"Yes",[687,882,880],{},[672,884,885,888,890],{},[687,886,887],{},"Kernel-integrated",[687,889,880],{},[687,891,892],{},"Yes (since 2020)",[357,894,895,896,899,900,1004,1005,1089,1090,1122],{},"Here is a common example: if you are writing a book about Mathematics and you have to use vectors, you have to decide how they will look. There are several different standards, used in many books. If ",[392,897,898],{},"a"," is a vector, some people like to add an arrow over it (",[382,901,904,934],{"className":902},[903],"katex",[382,905,908],{"className":906},[907],"katex-mathml",[909,910,912],"math",{"xmlns":911},"http:\u002F\u002Fwww.w3.org\u002F1998\u002FMath\u002FMathML",[913,914,915,929],"semantics",{},[916,917,918],"mrow",{},[919,920,922,925],"mover",{"accent":921},"true",[923,924,898],"mi",{},[926,927,928],"mo",{},"⃗",[930,931,933],"annotation",{"encoding":932},"application\u002Fx-tex","\\vec{a}",[382,935,938],{"className":936,"ariaHidden":921},[937],"katex-html",[382,939,942,947],{"className":940},[941],"base",[382,943],{"className":944,"style":946},[945],"strut","height:0.714em;",[382,948,952],{"className":949},[950,951],"mord","accent",[382,953,956],{"className":954},[955],"vlist-t",[382,957,960],{"className":958},[959],"vlist-r",[382,961,964,976],{"className":962,"style":946},[963],"vlist",[382,965,967,972],{"style":966},"top:-3em;",[382,968],{"className":969,"style":971},[970],"pstrut","height:3em;",[382,973,898],{"className":974},[950,975],"mathnormal",[382,977,978,981],{"style":966},[382,979],{"className":980,"style":971},[970],[382,982,986],{"className":983,"style":985},[984],"accent-body","left:-0.2355em;",[382,987,991],{"className":988,"style":990},[989],"overlay","height:0.714em;width:0.471em;",[992,993,1000],"svg",{"xmlns":994,"width":995,"height":996,"style":997,"viewBox":998,"preserveAspectRatio":999},"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","0.471em","0.714em","width:0.471em","0 0 471 714","xMinYMin",[1001,1002],"path",{"d":1003},"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z","), other people write it underlined (",[382,1006,1008,1028],{"className":1007},[903],[382,1009,1011],{"className":1010},[907],[909,1012,1013],{"xmlns":911},[913,1014,1015,1025],{},[916,1016,1017],{},[1018,1019,1020,1022],"munder",{"accentunder":921},[923,1021,898],{},[926,1023,1024],{"stretchy":921},"‾",[930,1026,1027],{"encoding":932},"\\underline{a}",[382,1029,1031],{"className":1030,"ariaHidden":921},[937],[382,1032,1034,1038],{"className":1033},[941],[382,1035],{"className":1036,"style":1037},[945],"height:0.6306em;vertical-align:-0.2em;",[382,1039,1042],{"className":1040},[950,1041],"underline",[382,1043,1046,1080],{"className":1044},[955,1045],"vlist-t2",[382,1047,1049,1075],{"className":1048},[959],[382,1050,1053,1064],{"className":1051,"style":1052},[963],"height:0.4306em;",[382,1054,1056,1059],{"style":1055},"top:-2.84em;",[382,1057],{"className":1058,"style":971},[970],[382,1060],{"className":1061,"style":1063},[1062],"underline-line","border-bottom-width:0.04em;",[382,1065,1066,1069],{"style":966},[382,1067],{"className":1068,"style":971},[970],[382,1070,1072],{"className":1071},[950],[382,1073,898],{"className":1074},[950,975],[382,1076,1079],{"className":1077},[1078],"vlist-s","​",[382,1081,1083],{"className":1082},[959],[382,1084,1087],{"className":1085,"style":1086},[963],"height:0.2em;",[382,1088],{},"); another common version is to write it bold (",[382,1091,1093,1108],{"className":1092},[903],[382,1094,1096],{"className":1095},[907],[909,1097,1098],{"xmlns":911},[913,1099,1100,1105],{},[916,1101,1102],{},[923,1103,898],{"mathvariant":1104},"bold",[930,1106,1107],{"encoding":932},"\\mathbf{a}",[382,1109,1111],{"className":1110,"ariaHidden":921},[937],[382,1112,1114,1118],{"className":1113},[941],[382,1115],{"className":1116,"style":1117},[945],"height:0.4444em;",[382,1119,898],{"className":1120},[950,1121],"mathbf","). Let us assume you want to write your vectors with an arrow over them; then add the following line in your mystyle.sty.",[372,1124,1126],{"className":374,"code":1125,"language":376,"meta":377,"style":377},"\\newcommand{\\myvec}[1]{\\vec{#1} }\n",[379,1127,1128],{"__ignoreMap":377},[382,1129,1130],{"class":384,"line":385},[382,1131,1125],{},[357,1133,1134,1135,1138,1139,1141],{},"and write your vectors inside the new ",[379,1136,1137],{},"\\myvec{...}"," command. You can call it as you wish, but you'd better choose a short name because you will probably write it very often. Then, if you change your mind and you want your vectors to look differently you just have to change the definition of your ",[379,1140,1137],{},". Use this approach whenever you can: this will save you a lot of time and increase the consistency of your document.",[661,1143,1145],{"id":1144},"declarerobustcommand","DeclareRobustCommand",[357,1147,1148,1149,1152,1153,1156,1157,1160],{},"Some commands are ",[392,1150,1151],{},"fragile",", that is they fail in some environments. If a macro works in body text but not in (for example) a figure caption, it's worth trying to replace the ",[379,1154,1155],{},"\\newcommand{\\MyCommand}..."," declaration with ",[379,1158,1159],{},"\\DeclareRobustCommand{\\MyCommand}..."," in the preamble. This is especially true for macros which, when expanded, produce text that is written to a .aux file.",[357,1162,1163],{},[516,1164,1165],{},"New command to work in both paragraph and math mode",[357,1167,1168,1169,1172],{},"Suppose you want to declare some variable which you want to use in paragraph as well as in math mode. It can be achieved with the help of ",[379,1170,1171],{},"\\ensuremath"," command in LaTeX2e as follows",[372,1174,1176],{"className":374,"code":1175,"language":376,"meta":377,"style":377},"\\newcommand{\\mysym}{\\ensuremath{a^{2}+y^{2} }}\n",[379,1177,1178],{"__ignoreMap":377},[382,1179,1180],{"class":384,"line":385},[382,1181,1175],{},[357,1183,1184],{},[516,1185,1186,1187],{},"Space after the ",[379,1188,537],{},[357,1190,1191],{},"It is a common problem having nonconforming spacing after a newly defined command.",[357,1193,1194],{},"Consider: \"The momentum is calculated using p=mv.\" Note there is no space after the formula.",[357,1196,1197],{},"On the other hand \"The formula p=mv calculates the momentum.\", has space after the formula.",[357,1199,1200],{},"For this spacing problem one may use xspace package which will automatically decide if there should be any space after it or not.",[372,1202,1204],{"className":374,"code":1203,"language":376,"meta":377,"style":377},"\\usepackage{xspace}  \n\\newcommand{\\restenergy}{\\ensuremath{mv}\\xspace}\n",[379,1205,1206,1211],{"__ignoreMap":377},[382,1207,1208],{"class":384,"line":385},[382,1209,1210],{},"\\usepackage{xspace}  \n",[382,1212,1213],{"class":384,"line":446},[382,1214,1215],{},"\\newcommand{\\restenergy}{\\ensuremath{mv}\\xspace}\n",[364,1217,1219],{"id":1218},"new-environments","New environments",[357,1221,1222,1223,1225,1226,1229],{},"Just as with the ",[379,1224,537],{}," command, there is a command to create your own environments. The ",[379,1227,1228],{},"\\newenvironment"," command uses the following syntax:",[372,1231,1233],{"className":374,"code":1232,"language":376,"meta":377,"style":377},"\\newenvironment{name}[num][default]{before}{after}\n",[379,1234,1235],{"__ignoreMap":377},[382,1236,1237],{"class":384,"line":385},[382,1238,1232],{},[357,1240,1241,1242,1244,1245,1248,1249,1252],{},"Again ",[379,1243,1228],{}," can have an optional argument. When the ",[379,1246,1247],{},"\\begin{name}"," command (which starts the environment) is encountered, the material specified in the before argument is processed before the text in the environment gets processed. The material in the after argument gets processed when the ",[379,1250,1251],{},"\\end{name}"," command (which ends the environment) is encountered.",[357,1254,1255,1256,1258,1259,1262,1263,538],{},"The optional num and default arguments are used the same way as in the ",[379,1257,537],{}," command. LaTeX makes sure that you do not define an environment that already exists. If you ever want to change an existing environment, you can use the ",[379,1260,1261],{},"\\renewenvironment"," command. It uses the same syntax as the ",[379,1264,1228],{},[357,1266,1267,1268,1270],{},"The example below illustrates the usage of the ",[379,1269,1228],{}," command:",[372,1272,1274],{"className":374,"code":1273,"language":376,"meta":377,"style":377},"\\newenvironment{king}\n{ \\rule{1ex}{1ex}\\hspace{\\stretch{1} } }\n{ \\hspace{\\stretch{1} }\\rule{1ex}{1ex} }\n\n\\begin{king}\nMy humble subjects \\ldots\n\\end{king}\n",[379,1275,1276,1281,1286,1291,1297,1302,1307],{"__ignoreMap":377},[382,1277,1278],{"class":384,"line":385},[382,1279,1280],{},"\\newenvironment{king}\n",[382,1282,1283],{"class":384,"line":446},[382,1284,1285],{},"{ \\rule{1ex}{1ex}\\hspace{\\stretch{1} } }\n",[382,1287,1288],{"class":384,"line":452},[382,1289,1290],{},"{ \\hspace{\\stretch{1} }\\rule{1ex}{1ex} }\n",[382,1292,1293],{"class":384,"line":458},[382,1294,1296],{"emptyLinePlaceholder":1295},true,"\n",[382,1298,1299],{"class":384,"line":464},[382,1300,1301],{},"\\begin{king}\n",[382,1303,1304],{"class":384,"line":470},[382,1305,1306],{},"My humble subjects \\ldots\n",[382,1308,1309],{"class":384,"line":476},[382,1310,1311],{},"\\end{king}\n",[661,1313,1315],{"id":1314},"extra-space","Extra space",[357,1317,1318,1319,1322,1323,1326,1327,1329],{},"When creating a new environment you may easily get bitten by extra spaces creeping in, which can potentially have fatal effects. One example is when you want to create a title environment which suppresses its own indentation as well as the one on the following paragraph. The ",[379,1320,1321],{},"\\ignorespaces"," command in the begin block of the environment will make it ignore any space after executing the begin block. The end block is a bit more tricky as special processing occurs at the end of an environment. With the ",[379,1324,1325],{},"\\ignorespacesafterend"," LaTeX will issue an ",[379,1328,1321],{}," after the special 'end' processing has occurred.",[372,1331,1333],{"className":374,"code":1332,"language":376,"meta":377,"style":377},"\\newenvironment{simple}%\n{\\noindent}%\n{\\par\\noindent}\n\n\\begin{simple}\nSee the space\\\\to the left.\n\\end{simple}\nSame\\\\here.\n",[379,1334,1335,1340,1345,1350,1354,1359,1364,1369],{"__ignoreMap":377},[382,1336,1337],{"class":384,"line":385},[382,1338,1339],{},"\\newenvironment{simple}%\n",[382,1341,1342],{"class":384,"line":446},[382,1343,1344],{},"{\\noindent}%\n",[382,1346,1347],{"class":384,"line":452},[382,1348,1349],{},"{\\par\\noindent}\n",[382,1351,1352],{"class":384,"line":458},[382,1353,1296],{"emptyLinePlaceholder":1295},[382,1355,1356],{"class":384,"line":464},[382,1357,1358],{},"\\begin{simple}\n",[382,1360,1361],{"class":384,"line":470},[382,1362,1363],{},"See the space\\\\to the left.\n",[382,1365,1366],{"class":384,"line":476},[382,1367,1368],{},"\\end{simple}\n",[382,1370,1371],{"class":384,"line":482},[382,1372,1373],{},"Same\\\\here.\n",[372,1375,1377],{"className":374,"code":1376,"language":376,"meta":377,"style":377},"\\newenvironment{correct}%\n{\\noindent\\ignorespaces}%\n{\\par\\noindent%\n\\ignorespacesafterend}\n\n\\begin{correct}\nNo space\\\\to the left.\n\\end{correct}\nSame\\\\here.\n",[379,1378,1379,1384,1389,1394,1399,1403,1408,1413,1418],{"__ignoreMap":377},[382,1380,1381],{"class":384,"line":385},[382,1382,1383],{},"\\newenvironment{correct}%\n",[382,1385,1386],{"class":384,"line":446},[382,1387,1388],{},"{\\noindent\\ignorespaces}%\n",[382,1390,1391],{"class":384,"line":452},[382,1392,1393],{},"{\\par\\noindent%\n",[382,1395,1396],{"class":384,"line":458},[382,1397,1398],{},"\\ignorespacesafterend}\n",[382,1400,1401],{"class":384,"line":464},[382,1402,1296],{"emptyLinePlaceholder":1295},[382,1404,1405],{"class":384,"line":470},[382,1406,1407],{},"\\begin{correct}\n",[382,1409,1410],{"class":384,"line":476},[382,1411,1412],{},"No space\\\\to the left.\n",[382,1414,1415],{"class":384,"line":482},[382,1416,1417],{},"\\end{correct}\n",[382,1419,1420],{"class":384,"line":488},[382,1421,1373],{},[357,1423,1424,1425,1428],{},"Also, if you're still having problems with extra space being appended at the end of your environment when using the ",[379,1426,1427],{},"\\input"," for external source, make sure there is no space between the beginning, sourcing, and end of the environment, such as:",[372,1430,1432],{"className":374,"code":1431,"language":376,"meta":377,"style":377},"\\begin{correct}\\input{somefile.tex}\\end{correct}\n",[379,1433,1434],{"__ignoreMap":377},[382,1435,1436],{"class":384,"line":385},[382,1437,1431],{},[357,1439,1440],{},"or",[372,1442,1444],{"className":374,"code":1443,"language":376,"meta":377,"style":377},"\\begin{correct}%\n\\input{somefile.tex}%\n\\end{correct}\n",[379,1445,1446,1451,1456],{"__ignoreMap":377},[382,1447,1448],{"class":384,"line":385},[382,1449,1450],{},"\\begin{correct}%\n",[382,1452,1453],{"class":384,"line":446},[382,1454,1455],{},"\\input{somefile.tex}%\n",[382,1457,1458],{"class":384,"line":452},[382,1459,1417],{},[661,1461,1463],{"id":1462},"declare-commands-within-new-environment","Declare commands within new environment",[357,1465,1466],{},"New commands can be declared within newenvironment. Commands declared within the newenvironment refer to their arguments by doubling the # character. In the following example, a new environment is declared along with a nested command:",[372,1468,1470],{"className":374,"code":1469,"language":376,"meta":377,"style":377},"\\newenvironment{topics}{\n\\newcommand{\\topic}[2]{ \\item{##1 \u002F ##2} }\nTopics:\n\\begin{itemize}\n}\n{\n\\end{itemize}\n}\n",[379,1471,1472,1477,1482,1487,1491,1495,1500,1504],{"__ignoreMap":377},[382,1473,1474],{"class":384,"line":385},[382,1475,1476],{},"\\newenvironment{topics}{\n",[382,1478,1479],{"class":384,"line":446},[382,1480,1481],{},"\\newcommand{\\topic}[2]{ \\item{##1 \u002F ##2} }\n",[382,1483,1484],{"class":384,"line":452},[382,1485,1486],{},"Topics:\n",[382,1488,1489],{"class":384,"line":458},[382,1490,485],{},[382,1492,1493],{"class":384,"line":464},[382,1494,659],{},[382,1496,1497],{"class":384,"line":470},[382,1498,1499],{},"{\n",[382,1501,1502],{"class":384,"line":476},[382,1503,509],{},[382,1505,1506],{"class":384,"line":482},[382,1507,659],{},[357,1509,1510,1511,1514],{},"If, by mistake, the arguments passed to the ",[379,1512,1513],{},"\\topics"," macro are defined with a single # character, the following error message will be thrown:",[372,1516,1521],{"className":1517,"code":1519,"language":1520,"meta":377},[1518],"language-text","! Illegal parameter number in definition of \\topics.\n","text",[379,1522,1519],{"__ignoreMap":377},[661,1524,1526],{"id":1525},"environment-contents-as-a-macro-argument","Environment contents as a macro argument",[357,1528,1529,1530,1533,1534,1537,1538,1541,1542,1545,1546,1548,1549,1552,1553,1556,1557,1560],{},"Some commands (for example, ",[379,1531,1532],{},"\\verb",", ",[379,1535,1536],{},"\\textbf",", and ",[379,1539,1540],{},"\\fcolorbox",") expect the text to be modified to be passed as an argument, and thus cannot be placed in the \"header\" or \"footer\" of an environment definition. In some cases, a workaround is a corresponding environment, such as ",[379,1543,1544],{},"\\begin{verbatim}...\\end{verbatim}"," for ",[379,1547,1532],{},". When no corresponding environment exists, an alternative is the ",[379,1550,1551],{},"environ"," package, which places the environment contents inside the local macro ",[379,1554,1555],{},"\\BODY",". In the following example, the ",[379,1558,1559],{},"makebold"," environment bolds its contents:",[372,1562,1564],{"className":374,"code":1563,"language":376,"meta":377,"style":377},"\\documentclass{article}\n\\usepackage{environ}\n\\NewEnviron{makebold}{\\textbf{\\BODY} }\n\\begin{document}\n\\begin{makebold}\n  Some bold text.\n\\end{makebold}\n\\end{document}\n",[379,1565,1566,1571,1576,1581,1586,1591,1596,1601],{"__ignoreMap":377},[382,1567,1568],{"class":384,"line":385},[382,1569,1570],{},"\\documentclass{article}\n",[382,1572,1573],{"class":384,"line":446},[382,1574,1575],{},"\\usepackage{environ}\n",[382,1577,1578],{"class":384,"line":452},[382,1579,1580],{},"\\NewEnviron{makebold}{\\textbf{\\BODY} }\n",[382,1582,1583],{"class":384,"line":458},[382,1584,1585],{},"\\begin{document}\n",[382,1587,1588],{"class":384,"line":464},[382,1589,1590],{},"\\begin{makebold}\n",[382,1592,1593],{"class":384,"line":470},[382,1594,1595],{},"  Some bold text.\n",[382,1597,1598],{"class":384,"line":476},[382,1599,1600],{},"\\end{makebold}\n",[382,1602,1603],{"class":384,"line":482},[382,1604,1605],{},"\\end{document}\n",[364,1607,1609],{"id":1608},"extending-the-number-of-arguments","Extending the number of arguments",[357,1611,1612],{},"The xkeyval packages will let you define key\u002Fvalue options for commands.",[372,1614,1616],{"className":374,"code":1615,"language":376,"meta":377,"style":377},"\\mycommand[key1=value1, key3=value3]{some text}\n",[379,1617,1618],{"__ignoreMap":377},[382,1619,1620],{"class":384,"line":385},[382,1621,1615],{},[357,1623,1624],{},"The package is quite complete and documentation is exhaustive. We recommend that package developers read it.",[357,1626,1627],{},"Let's provide a simple example:",[372,1629,1631],{"className":374,"code":1630,"language":376,"meta":377,"style":377},"\\usepackage{xkeyval}\n% ...\n\n\\makeatletter\n\\def\\my@emphstyle#1{\\csname my@style@#1\\endcsname}\n%% Predefined styles\n\\providecommand\\my@style@default{\\em}\n\\providecommand\\my@style@bold{\\bfseries}\n\n\\define@key{myemph}{code}{%\n  \\def\\my@emphstyle{#1}\n}\n\\define@key{myemph}{style}{%\n  \\def\\my@emphstyle{\\csname my@style@#1\\endcsname}\n}\n\\newcommand\\setemph[1]{%\n  \\setkeys{myemph}{#1}\n}\n\n\\renewcommand\\emph[1]{%\n  {\\my@emphstyle #1}\n}\n\n\\makeatother\n\nSomething \\emph{important}\n\n\\setemph{style=bold}\nSomething \\emph{important}\n\n\\setemph{code=\\Large\\sffamily}\nSomething \\emph{important}\n",[379,1632,1633,1638,1643,1647,1652,1657,1662,1667,1672,1676,1681,1686,1690,1696,1702,1707,1713,1719,1724,1729,1735,1741,1746,1751,1757,1762,1768,1773,1779,1784,1789,1795],{"__ignoreMap":377},[382,1634,1635],{"class":384,"line":385},[382,1636,1637],{},"\\usepackage{xkeyval}\n",[382,1639,1640],{"class":384,"line":446},[382,1641,1642],{},"% ...\n",[382,1644,1645],{"class":384,"line":452},[382,1646,1296],{"emptyLinePlaceholder":1295},[382,1648,1649],{"class":384,"line":458},[382,1650,1651],{},"\\makeatletter\n",[382,1653,1654],{"class":384,"line":464},[382,1655,1656],{},"\\def\\my@emphstyle#1{\\csname my@style@#1\\endcsname}\n",[382,1658,1659],{"class":384,"line":470},[382,1660,1661],{},"%% Predefined styles\n",[382,1663,1664],{"class":384,"line":476},[382,1665,1666],{},"\\providecommand\\my@style@default{\\em}\n",[382,1668,1669],{"class":384,"line":482},[382,1670,1671],{},"\\providecommand\\my@style@bold{\\bfseries}\n",[382,1673,1674],{"class":384,"line":488},[382,1675,1296],{"emptyLinePlaceholder":1295},[382,1677,1678],{"class":384,"line":494},[382,1679,1680],{},"\\define@key{myemph}{code}{%\n",[382,1682,1683],{"class":384,"line":500},[382,1684,1685],{},"  \\def\\my@emphstyle{#1}\n",[382,1687,1688],{"class":384,"line":506},[382,1689,659],{},[382,1691,1693],{"class":384,"line":1692},13,[382,1694,1695],{},"\\define@key{myemph}{style}{%\n",[382,1697,1699],{"class":384,"line":1698},14,[382,1700,1701],{},"  \\def\\my@emphstyle{\\csname my@style@#1\\endcsname}\n",[382,1703,1705],{"class":384,"line":1704},15,[382,1706,659],{},[382,1708,1710],{"class":384,"line":1709},16,[382,1711,1712],{},"\\newcommand\\setemph[1]{%\n",[382,1714,1716],{"class":384,"line":1715},17,[382,1717,1718],{},"  \\setkeys{myemph}{#1}\n",[382,1720,1722],{"class":384,"line":1721},18,[382,1723,659],{},[382,1725,1727],{"class":384,"line":1726},19,[382,1728,1296],{"emptyLinePlaceholder":1295},[382,1730,1732],{"class":384,"line":1731},20,[382,1733,1734],{},"\\renewcommand\\emph[1]{%\n",[382,1736,1738],{"class":384,"line":1737},21,[382,1739,1740],{},"  {\\my@emphstyle #1}\n",[382,1742,1744],{"class":384,"line":1743},22,[382,1745,659],{},[382,1747,1749],{"class":384,"line":1748},23,[382,1750,1296],{"emptyLinePlaceholder":1295},[382,1752,1754],{"class":384,"line":1753},24,[382,1755,1756],{},"\\makeatother\n",[382,1758,1760],{"class":384,"line":1759},25,[382,1761,1296],{"emptyLinePlaceholder":1295},[382,1763,1765],{"class":384,"line":1764},26,[382,1766,1767],{},"Something \\emph{important}\n",[382,1769,1771],{"class":384,"line":1770},27,[382,1772,1296],{"emptyLinePlaceholder":1295},[382,1774,1776],{"class":384,"line":1775},28,[382,1777,1778],{},"\\setemph{style=bold}\n",[382,1780,1782],{"class":384,"line":1781},29,[382,1783,1767],{},[382,1785,1787],{"class":384,"line":1786},30,[382,1788,1296],{"emptyLinePlaceholder":1295},[382,1790,1792],{"class":384,"line":1791},31,[382,1793,1794],{},"\\setemph{code=\\Large\\sffamily}\n",[382,1796,1798],{"class":384,"line":1797},32,[382,1799,1767],{},[364,1801,1803],{"id":1802},"arithmetic","Arithmetic",[357,1805,1806],{},"LaTeX can manipulate numbers.",[357,1808,1809],{},"The calc package provides the common infix notation.",[372,1811,1813],{"className":374,"code":1812,"language":376,"meta":377,"style":377},"\\usepackage{calc}\n% ...\n\\newcounter{mine}\n\\setcounter{mine}{2*17}\n\\themine\n",[379,1814,1815,1820,1824,1829,1834],{"__ignoreMap":377},[382,1816,1817],{"class":384,"line":385},[382,1818,1819],{},"\\usepackage{calc}\n",[382,1821,1822],{"class":384,"line":446},[382,1823,1642],{},[382,1825,1826],{"class":384,"line":452},[382,1827,1828],{},"\\newcounter{mine}\n",[382,1830,1831],{"class":384,"line":458},[382,1832,1833],{},"\\setcounter{mine}{2*17}\n",[382,1835,1836],{"class":384,"line":464},[382,1837,1838],{},"\\themine\n",[357,1840,1841],{},"For high-precision computations, you can use the fp package.",[372,1843,1845],{"className":374,"code":1844,"language":376,"meta":377,"style":377},"\\usepackage{fp}\n\n% Clip\n\\[\n\\FPmul\\result{2}{7}\n\\FPclip\\result\\result\n2*7 = \\result\n\\]\n\n% Infix\n\\[\n\\newcommand\\result{11}\n\\sqrt{\\sin(2+\\result)} \\approx\n\\FPeval\\result{round(root(2,sin(result + 2.5)),2)}\n\\result\n\\]\n\n% Postfix\n\\[\n\\FPupn\\result{17 2.5 + 17.5 swap - 2 1 + * 2 swap \u002F}\n\\FPclip\\result\\result\n(17+2.5 - 17.5) * (2+1) \u002F 2  = \\result\n\\]\n\n% High precision\n\\[\n\\FPdiv\\result{17}{7}\n\\frac{17}{7} \\approx \\FPtrunc\\result\\result{3}\n\\result\n\\]\n",[379,1846,1847,1852,1856,1861,1866,1871,1876,1881,1886,1890,1895,1899,1904,1909,1914,1919,1923,1927,1932,1936,1941,1945,1950,1954,1958,1963,1967,1972,1977,1981],{"__ignoreMap":377},[382,1848,1849],{"class":384,"line":385},[382,1850,1851],{},"\\usepackage{fp}\n",[382,1853,1854],{"class":384,"line":446},[382,1855,1296],{"emptyLinePlaceholder":1295},[382,1857,1858],{"class":384,"line":452},[382,1859,1860],{},"% Clip\n",[382,1862,1863],{"class":384,"line":458},[382,1864,1865],{},"\\[\n",[382,1867,1868],{"class":384,"line":464},[382,1869,1870],{},"\\FPmul\\result{2}{7}\n",[382,1872,1873],{"class":384,"line":470},[382,1874,1875],{},"\\FPclip\\result\\result\n",[382,1877,1878],{"class":384,"line":476},[382,1879,1880],{},"2*7 = \\result\n",[382,1882,1883],{"class":384,"line":482},[382,1884,1885],{},"\\]\n",[382,1887,1888],{"class":384,"line":488},[382,1889,1296],{"emptyLinePlaceholder":1295},[382,1891,1892],{"class":384,"line":494},[382,1893,1894],{},"% Infix\n",[382,1896,1897],{"class":384,"line":500},[382,1898,1865],{},[382,1900,1901],{"class":384,"line":506},[382,1902,1903],{},"\\newcommand\\result{11}\n",[382,1905,1906],{"class":384,"line":1692},[382,1907,1908],{},"\\sqrt{\\sin(2+\\result)} \\approx\n",[382,1910,1911],{"class":384,"line":1698},[382,1912,1913],{},"\\FPeval\\result{round(root(2,sin(result + 2.5)),2)}\n",[382,1915,1916],{"class":384,"line":1704},[382,1917,1918],{},"\\result\n",[382,1920,1921],{"class":384,"line":1709},[382,1922,1885],{},[382,1924,1925],{"class":384,"line":1715},[382,1926,1296],{"emptyLinePlaceholder":1295},[382,1928,1929],{"class":384,"line":1721},[382,1930,1931],{},"% Postfix\n",[382,1933,1934],{"class":384,"line":1726},[382,1935,1865],{},[382,1937,1938],{"class":384,"line":1731},[382,1939,1940],{},"\\FPupn\\result{17 2.5 + 17.5 swap - 2 1 + * 2 swap \u002F}\n",[382,1942,1943],{"class":384,"line":1737},[382,1944,1875],{},[382,1946,1947],{"class":384,"line":1743},[382,1948,1949],{},"(17+2.5 - 17.5) * (2+1) \u002F 2  = \\result\n",[382,1951,1952],{"class":384,"line":1748},[382,1953,1885],{},[382,1955,1956],{"class":384,"line":1753},[382,1957,1296],{"emptyLinePlaceholder":1295},[382,1959,1960],{"class":384,"line":1759},[382,1961,1962],{},"% High precision\n",[382,1964,1965],{"class":384,"line":1764},[382,1966,1865],{},[382,1968,1969],{"class":384,"line":1770},[382,1970,1971],{},"\\FPdiv\\result{17}{7}\n",[382,1973,1974],{"class":384,"line":1775},[382,1975,1976],{},"\\frac{17}{7} \\approx \\FPtrunc\\result\\result{3}\n",[382,1978,1979],{"class":384,"line":1781},[382,1980,1918],{},[382,1982,1983],{"class":384,"line":1786},[382,1984,1885],{},[364,1986,1988],{"id":1987},"conditionals","Conditionals",[357,1990,1991],{},"LaTeX can use conditionals thanks to the ifthen package.",[372,1993,1995],{"className":374,"code":1994,"language":376,"meta":377,"style":377},"\\usepackage{ifthen}\n% ...\n\n\\ifthenelse{ \\equal{\\myvar}{true} }{\n  This is true.\n}{\n  This is false.\n}\n",[379,1996,1997,2002,2006,2010,2015,2020,2025,2030],{"__ignoreMap":377},[382,1998,1999],{"class":384,"line":385},[382,2000,2001],{},"\\usepackage{ifthen}\n",[382,2003,2004],{"class":384,"line":446},[382,2005,1642],{},[382,2007,2008],{"class":384,"line":452},[382,2009,1296],{"emptyLinePlaceholder":1295},[382,2011,2012],{"class":384,"line":458},[382,2013,2014],{},"\\ifthenelse{ \\equal{\\myvar}{true} }{\n",[382,2016,2017],{"class":384,"line":464},[382,2018,2019],{},"  This is true.\n",[382,2021,2022],{"class":384,"line":470},[382,2023,2024],{},"}{\n",[382,2026,2027],{"class":384,"line":476},[382,2028,2029],{},"  This is false.\n",[382,2031,2032],{"class":384,"line":482},[382,2033,659],{},[357,2035,2036],{},"For newer projects e-TeX is recommended, available in LaTeX from etoolbox. See section 3.6 of their manual.",[357,2038,2039],{},"Following a short example, a bool that switches its state every time it is used.",[372,2041,2043],{"className":374,"code":2042,"language":376,"meta":377,"style":377},"\\documentclass{article}\n\\usepackage{etoolbox}\n\\usepackage{parskip}\n\\usepackage{tikz}\n\\newbool{volt}\n\\newcommand{\\onoff}{%\n    \\ifbool{volt}{%\n\\boolfalse{volt}\\candleOn\\space ON}{%\n    \\booltrue{volt}\\candleOff\\space OFF}%\n}\n\\newcommand{\\candleOff}{\\tikz \\draw (0,0) rectangle\n(.2,.8);}\n\\newcommand{\\candleOn}{\\begin{tikzpicture}\\draw (0,0) rectangle\n(.2,.8);\\draw [fill=orange] (.1,.9) circle\n[radius=.1];\\end{tikzpicture}\n}\n\\begin{document}\n\\onoff\\par\n\\onoff\\par\n\\onoff\\par\n\\onoff\\par\n\\end{document}\n",[379,2044,2045,2049,2054,2059,2064,2069,2074,2079,2084,2089,2093,2098,2103,2108,2113,2118,2122,2126,2131,2135,2139,2143],{"__ignoreMap":377},[382,2046,2047],{"class":384,"line":385},[382,2048,1570],{},[382,2050,2051],{"class":384,"line":446},[382,2052,2053],{},"\\usepackage{etoolbox}\n",[382,2055,2056],{"class":384,"line":452},[382,2057,2058],{},"\\usepackage{parskip}\n",[382,2060,2061],{"class":384,"line":458},[382,2062,2063],{},"\\usepackage{tikz}\n",[382,2065,2066],{"class":384,"line":464},[382,2067,2068],{},"\\newbool{volt}\n",[382,2070,2071],{"class":384,"line":470},[382,2072,2073],{},"\\newcommand{\\onoff}{%\n",[382,2075,2076],{"class":384,"line":476},[382,2077,2078],{},"    \\ifbool{volt}{%\n",[382,2080,2081],{"class":384,"line":482},[382,2082,2083],{},"\\boolfalse{volt}\\candleOn\\space ON}{%\n",[382,2085,2086],{"class":384,"line":488},[382,2087,2088],{},"    \\booltrue{volt}\\candleOff\\space OFF}%\n",[382,2090,2091],{"class":384,"line":494},[382,2092,659],{},[382,2094,2095],{"class":384,"line":500},[382,2096,2097],{},"\\newcommand{\\candleOff}{\\tikz \\draw (0,0) rectangle\n",[382,2099,2100],{"class":384,"line":506},[382,2101,2102],{},"(.2,.8);}\n",[382,2104,2105],{"class":384,"line":1692},[382,2106,2107],{},"\\newcommand{\\candleOn}{\\begin{tikzpicture}\\draw (0,0) rectangle\n",[382,2109,2110],{"class":384,"line":1698},[382,2111,2112],{},"(.2,.8);\\draw [fill=orange] (.1,.9) circle\n",[382,2114,2115],{"class":384,"line":1704},[382,2116,2117],{},"[radius=.1];\\end{tikzpicture}\n",[382,2119,2120],{"class":384,"line":1709},[382,2121,659],{},[382,2123,2124],{"class":384,"line":1715},[382,2125,1585],{},[382,2127,2128],{"class":384,"line":1721},[382,2129,2130],{},"\\onoff\\par\n",[382,2132,2133],{"class":384,"line":1726},[382,2134,2130],{},[382,2136,2137],{"class":384,"line":1731},[382,2138,2130],{},[382,2140,2141],{"class":384,"line":1737},[382,2142,2130],{},[382,2144,2145],{"class":384,"line":1743},[382,2146,1605],{},[364,2148,2150],{"id":2149},"loops","Loops",[357,2152,2153,2154,538],{},"The PGF\u002FTikZ extension provides the ",[379,2155,2156],{},"\\foreach",[372,2158,2160],{"className":374,"code":2159,"language":376,"meta":377,"style":377},"\\usepackage{tikz}\n% ...\n\n\\foreach \\i\u002F\\q in {wheat\u002F50g, water\u002F1L, yeast\u002F2g}{\n  \\noindent\\i\\dotfill\\q\\\\\n}\n",[379,2161,2162,2166,2170,2174,2179,2184],{"__ignoreMap":377},[382,2163,2164],{"class":384,"line":385},[382,2165,2063],{},[382,2167,2168],{"class":384,"line":446},[382,2169,1642],{},[382,2171,2172],{"class":384,"line":452},[382,2173,1296],{"emptyLinePlaceholder":1295},[382,2175,2176],{"class":384,"line":458},[382,2177,2178],{},"\\foreach \\i\u002F\\q in {wheat\u002F50g, water\u002F1L, yeast\u002F2g}{\n",[382,2180,2181],{"class":384,"line":464},[382,2182,2183],{},"  \\noindent\\i\\dotfill\\q\\\\\n",[382,2185,2186],{"class":384,"line":470},[382,2187,659],{},[357,2189,2190,2191,2193,2194,2197],{},"If you are only using ",[379,2192,2156],{}," and not drawing graphics, you may instead use the ",[379,2195,2196],{},"pgffor"," package directly.",[357,2199,2200],{},"Alternatively you can check out the multido package.",[364,2202,2204],{"id":2203},"strings","Strings",[357,2206,2207],{},"xstring provides a lot of features. From CTAN:",[2209,2210,2211,2215,2218,2221,2224,2227],"ul",{},[2212,2213,2214],"li",{},"testing a string's contents",[2212,2216,2217],{},"extracting substrings",[2212,2219,2220],{},"substitution of substrings",[2212,2222,2223],{},"string length",[2212,2225,2226],{},"position of a substring",[2212,2228,2229],{},"number of recurrences of a substring",[357,2231,2232],{},"Examples:",[372,2234,2236],{"className":374,"code":2235,"language":376,"meta":377,"style":377},"\\usepackage{xstring}\n% ...\n\n\\newcommand\\mystr{Hello World!}\n\nThe string ``\\mystr'' has \\StrLen{\\mystr}{} characters.\n\nPredicate ``\\mystr{} contains the word Hello'' is \\IfSubStr{\\mystr}{Hello}{true}{false}.\n",[379,2237,2238,2243,2247,2251,2256,2260,2265,2269],{"__ignoreMap":377},[382,2239,2240],{"class":384,"line":385},[382,2241,2242],{},"\\usepackage{xstring}\n",[382,2244,2245],{"class":384,"line":446},[382,2246,1642],{},[382,2248,2249],{"class":384,"line":452},[382,2250,1296],{"emptyLinePlaceholder":1295},[382,2252,2253],{"class":384,"line":458},[382,2254,2255],{},"\\newcommand\\mystr{Hello World!}\n",[382,2257,2258],{"class":384,"line":464},[382,2259,1296],{"emptyLinePlaceholder":1295},[382,2261,2262],{"class":384,"line":470},[382,2263,2264],{},"The string ``\\mystr'' has \\StrLen{\\mystr}{} characters.\n",[382,2266,2267],{"class":384,"line":476},[382,2268,1296],{"emptyLinePlaceholder":1295},[382,2270,2271],{"class":384,"line":482},[382,2272,2273],{},"Predicate ``\\mystr{} contains the word Hello'' is \\IfSubStr{\\mystr}{Hello}{true}{false}.\n",[364,2275,2277],{"id":2276},"latex-hooks","LaTeX Hooks",[357,2279,2280],{},"LaTeX provides two hooks:",[2209,2282,2283,2293],{},[2212,2284,2285,2288,2289,2292],{},[379,2286,2287],{},"\\AtBeginDocument"," will let you specify a set of commands that will be executed when ",[379,2290,2291],{},"\\begin{document}"," is met.",[2212,2294,2295,2298,2299,2302],{},[379,2296,2297],{},"\\AtEndDocument"," does the same for ",[379,2300,2301],{},"\\end{document}",".",[357,2304,2305],{},"This gives you some more flexibility for macros. It can be useful to override settings that get executed after the preamble. These hooks can be called several times. The commands will be executed in the order they were set.",[357,2307,2308],{},"For instance, let's replace the page numbers with oldstylenums:",[372,2310,2312],{"className":374,"code":2311,"language":376,"meta":377,"style":377},"\\usepackage{textcomp}\n\n\\AtBeginDocument{%\n  % Make the page numbers in text figures\n  \\let\\myThePage\\thepage\n  \\renewcommand{\\thepage}{ \\oldstylenums{\\myThePage} }\n}\n",[379,2313,2314,2319,2323,2328,2333,2338,2343],{"__ignoreMap":377},[382,2315,2316],{"class":384,"line":385},[382,2317,2318],{},"\\usepackage{textcomp}\n",[382,2320,2321],{"class":384,"line":446},[382,2322,1296],{"emptyLinePlaceholder":1295},[382,2324,2325],{"class":384,"line":452},[382,2326,2327],{},"\\AtBeginDocument{%\n",[382,2329,2330],{"class":384,"line":458},[382,2331,2332],{},"  % Make the page numbers in text figures\n",[382,2334,2335],{"class":384,"line":464},[382,2336,2337],{},"  \\let\\myThePage\\thepage\n",[382,2339,2340],{"class":384,"line":470},[382,2341,2342],{},"  \\renewcommand{\\thepage}{ \\oldstylenums{\\myThePage} }\n",[382,2344,2345],{"class":384,"line":476},[382,2346,659],{},[357,2348,2349],{},"There are also hooks for classes and packages. See Creating Packages.",[364,2351,2353],{"id":2352},"command-line-latex","Command-line LaTeX",[357,2355,2356],{},"If you work on a Unix-like OS, you might be using Makefiles or any kind of script to build your LaTeX projects. In that connection it might be interesting to produce different versions of the same document by calling LaTeX with command-line parameters. If you add the following structure to your document:",[372,2358,2360],{"className":374,"code":2359,"language":376,"meta":377,"style":377},"\\usepackage{ifthen}\n%...\n\n% default value.\n\\providecommand\\blackandwhite{false}\n%...\n\n\\ifthenelse{ \\equal{\\blackandwhite}{true} }{\n% \"black and white\" mode; do something..\n}{\n% \"color\" mode; do something different..\n}\n",[379,2361,2362,2366,2371,2375,2380,2385,2389,2393,2398,2403,2407,2412],{"__ignoreMap":377},[382,2363,2364],{"class":384,"line":385},[382,2365,2001],{},[382,2367,2368],{"class":384,"line":446},[382,2369,2370],{},"%...\n",[382,2372,2373],{"class":384,"line":452},[382,2374,1296],{"emptyLinePlaceholder":1295},[382,2376,2377],{"class":384,"line":458},[382,2378,2379],{},"% default value.\n",[382,2381,2382],{"class":384,"line":464},[382,2383,2384],{},"\\providecommand\\blackandwhite{false}\n",[382,2386,2387],{"class":384,"line":470},[382,2388,2370],{},[382,2390,2391],{"class":384,"line":476},[382,2392,1296],{"emptyLinePlaceholder":1295},[382,2394,2395],{"class":384,"line":482},[382,2396,2397],{},"\\ifthenelse{ \\equal{\\blackandwhite}{true} }{\n",[382,2399,2400],{"class":384,"line":488},[382,2401,2402],{},"% \"black and white\" mode; do something..\n",[382,2404,2405],{"class":384,"line":494},[382,2406,2024],{},[382,2408,2409],{"class":384,"line":500},[382,2410,2411],{},"% \"color\" mode; do something different..\n",[382,2413,2414],{"class":384,"line":506},[382,2415,659],{},[357,2417,2418],{},"Now you can call LaTeX like this:",[372,2420,2424],{"className":2421,"code":2422,"language":2423,"meta":377,"style":377},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","latex '\\providecommand{\\blackandwhite}{true}\\input{test.tex}'\n","bash",[379,2425,2426],{"__ignoreMap":377},[382,2427,2428,2431,2435,2439],{"class":384,"line":385},[382,2429,376],{"class":2430},"sBMFI",[382,2432,2434],{"class":2433},"sMK4o"," '",[382,2436,2438],{"class":2437},"sfazB","\\providecommand{\\blackandwhite}{true}\\input{test.tex}",[382,2440,2441],{"class":2433},"'\n",[357,2443,2444,2445,2448,2449,2451],{},"First the command ",[379,2446,2447],{},"\\blackandwhite"," gets defined and then the actual file is read with input. By setting ",[379,2450,2447],{}," to false the color version of the document would be produced.",[2453,2454,2455],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}",{"title":377,"searchDepth":446,"depth":446,"links":2457},[2458,2459,2466,2471,2472,2473,2474,2475,2476,2477],{"id":366,"depth":446,"text":367},{"id":628,"depth":446,"text":629,"children":2460},[2461,2462,2463,2464,2465],{"id":663,"depth":452,"text":664},{"id":752,"depth":452,"text":753},{"id":785,"depth":452,"text":786},{"id":823,"depth":452,"text":824},{"id":1144,"depth":452,"text":1145},{"id":1218,"depth":446,"text":1219,"children":2467},[2468,2469,2470],{"id":1314,"depth":452,"text":1315},{"id":1462,"depth":452,"text":1463},{"id":1525,"depth":452,"text":1526},{"id":1608,"depth":446,"text":1609},{"id":1802,"depth":446,"text":1803},{"id":1987,"depth":446,"text":1988},{"id":2149,"depth":446,"text":2150},{"id":2203,"depth":446,"text":2204},{"id":2276,"depth":446,"text":2277},{"id":2352,"depth":446,"text":2353},"Learn how to create new commands and environments in LaTeX, use conditionals, loops, and other programming features.","md",null,{},{"title":260,"description":2478},"LA6_BTaBI67y7siky-L2aiEKBq5p8zOKmEUYHVYhtuI",[2485,2487],{"title":250,"path":251,"stem":252,"description":2486,"children":-1},"Learn how to create three-dimensional graphics in LaTeX documents using TikZ, pst-solides3d, and Asymptote.",{"title":264,"path":265,"stem":266,"description":2488,"children":-1},"Learn the Plain TeX programming language, including catcodes, macros, registers, conditionals, and loops.",1785155501448]