[{"data":1,"prerenderedAt":974},["ShallowReactive",2],{"navigation_docs":3,"-tables-and-graphics-metapost":351,"-tables-and-graphics-metapost-surround":969},[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":140,"body":353,"description":963,"extension":964,"links":965,"meta":966,"navigation":777,"path":141,"seo":967,"stem":142,"__hash__":968},"docs\u002F05.tables-and-graphics\u002F07.metapost.md",{"type":354,"value":355,"toc":950},"minimark",[356,360,365,368,422,425,442,461,465,470,530,534,590,594,627,631,634,667,671,745,749,756,794,808,855,859,919,923,946],[357,358,359],"p",{},"MetaPost is a vector graphics language related to METAFONT, designed by Donald Knuth. While METAFONT generates bitmap fonts, MetaPost produces encapsulated PostScript (EPS) files that can be imported into LaTeX documents. It excels at creating technical illustrations requiring mathematical precision.",[361,362,364],"h2",{"id":363},"basic-syntax","Basic Syntax",[357,366,367],{},"A MetaPost program consists of assignments and drawing commands. The basic structure:",[369,370,375],"pre",{"className":371,"code":372,"language":373,"meta":374,"style":374},"language-metapost shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","beginfig(1);\n  pair A, B;\n  A := (0,0);\n  B := (100,50);\n  draw A -- B;\nendfig;\nend\n","metapost","",[376,377,378,386,392,398,404,410,416],"code",{"__ignoreMap":374},[379,380,383],"span",{"class":381,"line":382},"line",1,[379,384,385],{},"beginfig(1);\n",[379,387,389],{"class":381,"line":388},2,[379,390,391],{},"  pair A, B;\n",[379,393,395],{"class":381,"line":394},3,[379,396,397],{},"  A := (0,0);\n",[379,399,401],{"class":381,"line":400},4,[379,402,403],{},"  B := (100,50);\n",[379,405,407],{"class":381,"line":406},5,[379,408,409],{},"  draw A -- B;\n",[379,411,413],{"class":381,"line":412},6,[379,414,415],{},"endfig;\n",[379,417,419],{"class":381,"line":418},7,[379,420,421],{},"end\n",[357,423,424],{},"Compile with:",[369,426,430],{"className":427,"code":428,"language":429,"meta":374,"style":374},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","mpost filename.mp\n","bash",[376,431,432],{"__ignoreMap":374},[379,433,434,438],{"class":381,"line":382},[379,435,437],{"class":436},"sBMFI","mpost",[379,439,441],{"class":440},"sfazB"," filename.mp\n",[357,443,444,445,448,449,452,453,456,457,460],{},"This produces ",[376,446,447],{},"filename.1",", ",[376,450,451],{},"filename.2",", etc. (one file per ",[376,454,455],{},"beginfig","\u002F",[376,458,459],{},"endfig"," block).",[361,462,464],{"id":463},"drawing-primitives","Drawing Primitives",[466,467,469],"h3",{"id":468},"lines-and-curves","Lines and Curves",[369,471,473],{"className":371,"code":472,"language":373,"meta":374,"style":374},"beginfig(1);\n  % Straight lines\n  draw (0,0) -- (100,0);\n  \n  % Bezier curves\n  draw (0,0) .. controls (30,50) and (70,50) .. (100,0);\n  \n  % Quick curve shorthand\n  draw (0,0) {up} .. {right} (50,50);\nendfig;\nend\n",[376,474,475,479,484,489,494,499,504,508,514,520,525],{"__ignoreMap":374},[379,476,477],{"class":381,"line":382},[379,478,385],{},[379,480,481],{"class":381,"line":388},[379,482,483],{},"  % Straight lines\n",[379,485,486],{"class":381,"line":394},[379,487,488],{},"  draw (0,0) -- (100,0);\n",[379,490,491],{"class":381,"line":400},[379,492,493],{},"  \n",[379,495,496],{"class":381,"line":406},[379,497,498],{},"  % Bezier curves\n",[379,500,501],{"class":381,"line":412},[379,502,503],{},"  draw (0,0) .. controls (30,50) and (70,50) .. (100,0);\n",[379,505,506],{"class":381,"line":418},[379,507,493],{},[379,509,511],{"class":381,"line":510},8,[379,512,513],{},"  % Quick curve shorthand\n",[379,515,517],{"class":381,"line":516},9,[379,518,519],{},"  draw (0,0) {up} .. {right} (50,50);\n",[379,521,523],{"class":381,"line":522},10,[379,524,415],{},[379,526,528],{"class":381,"line":527},11,[379,529,421],{},[466,531,533],{"id":532},"filled-shapes","Filled Shapes",[369,535,537],{"className":371,"code":536,"language":373,"meta":374,"style":374},"beginfig(2);\n  % Filled rectangle\n  fill (0,0) -- (100,0) -- (100,50) -- (0,50) -- cycle;\n  \n  % Filled circle\n  fill fullcircle scaled 40 shifted (50,25);\n  \n  % Filled elliptical shape\n  fill fullcircle xscaled 80 yscaled 40 shifted (50,25);\nendfig;\nend\n",[376,538,539,544,549,554,558,563,568,572,577,582,586],{"__ignoreMap":374},[379,540,541],{"class":381,"line":382},[379,542,543],{},"beginfig(2);\n",[379,545,546],{"class":381,"line":388},[379,547,548],{},"  % Filled rectangle\n",[379,550,551],{"class":381,"line":394},[379,552,553],{},"  fill (0,0) -- (100,0) -- (100,50) -- (0,50) -- cycle;\n",[379,555,556],{"class":381,"line":400},[379,557,493],{},[379,559,560],{"class":381,"line":406},[379,561,562],{},"  % Filled circle\n",[379,564,565],{"class":381,"line":412},[379,566,567],{},"  fill fullcircle scaled 40 shifted (50,25);\n",[379,569,570],{"class":381,"line":418},[379,571,493],{},[379,573,574],{"class":381,"line":510},[379,575,576],{},"  % Filled elliptical shape\n",[379,578,579],{"class":381,"line":516},[379,580,581],{},"  fill fullcircle xscaled 80 yscaled 40 shifted (50,25);\n",[379,583,584],{"class":381,"line":522},[379,585,415],{},[379,587,588],{"class":381,"line":527},[379,589,421],{},[466,591,593],{"id":592},"arrows","Arrows",[369,595,597],{"className":371,"code":596,"language":373,"meta":374,"style":374},"beginfig(3);\n  drawarrow (0,0) -- (100,0);\n  drawarrow (0,20) .. controls (50,40) .. (100,20);\n  drawdblarrow (0,40) -- (100,40);\nendfig;\nend\n",[376,598,599,604,609,614,619,623],{"__ignoreMap":374},[379,600,601],{"class":381,"line":382},[379,602,603],{},"beginfig(3);\n",[379,605,606],{"class":381,"line":388},[379,607,608],{},"  drawarrow (0,0) -- (100,0);\n",[379,610,611],{"class":381,"line":394},[379,612,613],{},"  drawarrow (0,20) .. controls (50,40) .. (100,20);\n",[379,615,616],{"class":381,"line":400},[379,617,618],{},"  drawdblarrow (0,40) -- (100,40);\n",[379,620,621],{"class":381,"line":406},[379,622,415],{},[379,624,625],{"class":381,"line":412},[379,626,421],{},[361,628,630],{"id":629},"text-in-metapost","Text in MetaPost",[357,632,633],{},"MetaPost can typeset text using TeX:",[369,635,637],{"className":371,"code":636,"language":373,"meta":374,"style":374},"beginfig(4);\n  label(btex Hello World etex, (50,25));\n  label.top(btex Top-aligned etex, (50,50));\n  label.bot(btex Bottom-aligned etex, (50,0));\nendfig;\nend\n",[376,638,639,644,649,654,659,663],{"__ignoreMap":374},[379,640,641],{"class":381,"line":382},[379,642,643],{},"beginfig(4);\n",[379,645,646],{"class":381,"line":388},[379,647,648],{},"  label(btex Hello World etex, (50,25));\n",[379,650,651],{"class":381,"line":394},[379,652,653],{},"  label.top(btex Top-aligned etex, (50,50));\n",[379,655,656],{"class":381,"line":400},[379,657,658],{},"  label.bot(btex Bottom-aligned etex, (50,0));\n",[379,660,661],{"class":381,"line":406},[379,662,415],{},[379,664,665],{"class":381,"line":412},[379,666,421],{},[361,668,670],{"id":669},"variables-and-expressions","Variables and Expressions",[369,672,674],{"className":371,"code":673,"language":373,"meta":374,"style":374},"beginfig(5);\n  % Numeric variables\n  numeric angle, radius;\n  angle := 45;\n  radius := 30;\n  \n  % Pair variables\n  pair center;\n  center := (50,25);\n  \n  % Subpath and time-based drawing\n  draw subpath(0,2) of fullcircle scaled 40 shifted center;\nendfig;\nend\n",[376,675,676,681,686,691,696,701,705,710,715,720,724,729,735,740],{"__ignoreMap":374},[379,677,678],{"class":381,"line":382},[379,679,680],{},"beginfig(5);\n",[379,682,683],{"class":381,"line":388},[379,684,685],{},"  % Numeric variables\n",[379,687,688],{"class":381,"line":394},[379,689,690],{},"  numeric angle, radius;\n",[379,692,693],{"class":381,"line":400},[379,694,695],{},"  angle := 45;\n",[379,697,698],{"class":381,"line":406},[379,699,700],{},"  radius := 30;\n",[379,702,703],{"class":381,"line":412},[379,704,493],{},[379,706,707],{"class":381,"line":418},[379,708,709],{},"  % Pair variables\n",[379,711,712],{"class":381,"line":510},[379,713,714],{},"  pair center;\n",[379,716,717],{"class":381,"line":516},[379,718,719],{},"  center := (50,25);\n",[379,721,722],{"class":381,"line":522},[379,723,493],{},[379,725,726],{"class":381,"line":527},[379,727,728],{},"  % Subpath and time-based drawing\n",[379,730,732],{"class":381,"line":731},12,[379,733,734],{},"  draw subpath(0,2) of fullcircle scaled 40 shifted center;\n",[379,736,738],{"class":381,"line":737},13,[379,739,415],{},[379,741,743],{"class":381,"line":742},14,[379,744,421],{},[361,746,748],{"id":747},"importing-metapost-into-latex","Importing MetaPost into LaTeX",[357,750,751,752,755],{},"Use the ",[376,753,754],{},"graphicx"," package to include MetaPost output:",[369,757,761],{"className":758,"code":759,"language":760,"meta":374,"style":374},"language-latex shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\\documentclass{article}\n\\usepackage{graphicx}\n\n\\begin{document}\n\\includegraphics{filename.1}\n\\end{document}\n","latex",[376,762,763,768,773,779,784,789],{"__ignoreMap":374},[379,764,765],{"class":381,"line":382},[379,766,767],{},"\\documentclass{article}\n",[379,769,770],{"class":381,"line":388},[379,771,772],{},"\\usepackage{graphicx}\n",[379,774,775],{"class":381,"line":394},[379,776,778],{"emptyLinePlaceholder":777},true,"\n",[379,780,781],{"class":381,"line":400},[379,782,783],{},"\\begin{document}\n",[379,785,786],{"class":381,"line":406},[379,787,788],{},"\\includegraphics{filename.1}\n",[379,790,791],{"class":381,"line":412},[379,792,793],{},"\\end{document}\n",[357,795,796,797,800,801,803,804,807],{},"Or use the ",[376,798,799],{},"luamplib"," package (LuaLaTeX only) for inline MetaPost, which compiles the code directly at build time with no separate ",[376,802,437],{}," run or ",[376,805,806],{},"\\includegraphics"," step needed:",[369,809,811],{"className":758,"code":810,"language":760,"meta":374,"style":374},"\\documentclass{article}\n\\usepackage{luamplib}\n\\begin{document}\n\\begin{mplibcode}\n  beginfig(1);\n    draw (0,0) -- (100,0) -- (50,50) -- cycle;\n  endfig;\n\\end{mplibcode}\n\\end{document}\n",[376,812,813,817,822,826,831,836,841,846,851],{"__ignoreMap":374},[379,814,815],{"class":381,"line":382},[379,816,767],{},[379,818,819],{"class":381,"line":388},[379,820,821],{},"\\usepackage{luamplib}\n",[379,823,824],{"class":381,"line":394},[379,825,783],{},[379,827,828],{"class":381,"line":400},[379,829,830],{},"\\begin{mplibcode}\n",[379,832,833],{"class":381,"line":406},[379,834,835],{},"  beginfig(1);\n",[379,837,838],{"class":381,"line":412},[379,839,840],{},"    draw (0,0) -- (100,0) -- (50,50) -- cycle;\n",[379,842,843],{"class":381,"line":418},[379,844,845],{},"  endfig;\n",[379,847,848],{"class":381,"line":510},[379,849,850],{},"\\end{mplibcode}\n",[379,852,853],{"class":381,"line":516},[379,854,793],{},[361,856,858],{"id":857},"when-to-use-metapost","When to Use MetaPost",[860,861,862,875],"table",{},[863,864,865],"thead",{},[866,867,868,872],"tr",{},[869,870,871],"th",{},"Use Case",[869,873,874],{},"Recommendation",[876,877,878,887,895,903,911],"tbody",{},[866,879,880,884],{},[881,882,883],"td",{},"Mathematical diagrams",[881,885,886],{},"MetaPost excels here",[866,888,889,892],{},[881,890,891],{},"Flowcharts",[881,893,894],{},"Consider TikZ for easier syntax",[866,896,897,900],{},[881,898,899],{},"Simple shapes",[881,901,902],{},"TikZ is simpler",[866,904,905,908],{},[881,906,907],{},"Custom fonts",[881,909,910],{},"METAFONT (MetaPost's sibling)",[866,912,913,916],{},[881,914,915],{},"Complex parametric curves",[881,917,918],{},"MetaPost is ideal",[361,920,922],{"id":921},"further-reading","Further Reading",[924,925,926,934,937],"ul",{},[927,928,929,933],"li",{},[930,931,932],"em",{},"A User's Manual for MetaPost"," (included with TeX distributions)",[927,935,936],{},"The MetaPost manual by John Hobby",[927,938,939,940],{},"CTAN: ",[941,942,373],"a",{"href":943,"rel":944},"https:\u002F\u002Fctan.org\u002Fpkg\u002Fmetapost",[945],"nofollow",[947,948,949],"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 .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}",{"title":374,"searchDepth":388,"depth":388,"links":951},[952,953,958,959,960,961,962],{"id":363,"depth":388,"text":364},{"id":463,"depth":388,"text":464,"children":954},[955,956,957],{"id":468,"depth":394,"text":469},{"id":532,"depth":394,"text":533},{"id":592,"depth":394,"text":593},{"id":629,"depth":388,"text":630},{"id":669,"depth":388,"text":670},{"id":747,"depth":388,"text":748},{"id":857,"depth":388,"text":858},{"id":921,"depth":388,"text":922},"Learn how to use MetaPost for creating mathematical and technical vector graphics in LaTeX documents.","md",null,{},{"title":140,"description":963},"LA8goFc9prooSZWED24tjqNh_Q-4KmZ_ZDkRVu942HY",[970,972],{"title":136,"path":137,"stem":138,"description":971,"children":-1},"Learn to create PostScript-based graphics with PSTricks and choose a compatible modern LaTeX build workflow.",{"title":144,"path":145,"stem":146,"description":973,"children":-1},"Learn how to use the picture environment for creating graphics directly in LaTeX",1785155508879]