[{"data":1,"prerenderedAt":2150},["ShallowReactive",2],{"navigation_docs":3,"-page-design-page-layout":351,"-page-design-page-layout-surround":2145},[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":90,"body":353,"description":2139,"extension":2140,"links":2141,"meta":2142,"navigation":1384,"path":91,"seo":2143,"stem":92,"__hash__":2144},"docs\u002F04.page-design\u002F01.page-layout.md",{"type":354,"value":355,"toc":2107},"minimark",[356,360,367,372,384,431,434,438,450,464,468,475,487,573,588,591,603,612,623,639,646,659,668,677,719,732,741,744,768,771,775,778,876,883,897,912,915,946,968,972,975,979,982,994,997,1009,1018,1028,1037,1070,1079,1085,1094,1101,1121,1130,1145,1160,1164,1167,1182,1185,1195,1210,1219,1224,1228,1240,1260,1267,1271,1274,1278,1288,1297,1307,1316,1319,1328,1332,1335,1351,1365,1430,1440,1444,1454,1458,1464,1569,1572,1576,1579,1587,1688,1695,1703,1741,1745,1753,1763,1770,1813,1820,1831,1851,1866,1878,1892,1899,1903,1906,1971,1975,1978,1981,1996,1999,2002,2011,2022,2057,2061,2064,2073,2076,2096,2099,2103],[357,358,359],"p",{},"LaTeX and the document class will normally take care of page layout issues for you. For submission to an academic publication, this entire topic will be out of your hands, as the publishers want to control the presentation. However, for your own documents, there are some obvious settings that you may wish to change: margins, page orientation and columns, to name but three. The purpose of this tutorial is to show you how to configure your pages.",[357,361,362,363,366],{},"We will often have to deal with TeX lengths in this chapter. You should have a look at ",[364,365,310],"a",{"href":311}," for comprehensive details on the topic.",[368,369,371],"h2",{"id":370},"tagged-pdf-modern-latex","Tagged PDF (Modern LaTeX)",[357,373,374,375,379,380,383],{},"Since 2022, LaTeX supports tagged PDF output for accessibility. Add ",[376,377,378],"code",{},"\\DocumentMetadata"," before ",[376,381,382],{},"\\documentclass",":",[385,386,391],"pre",{"className":387,"code":388,"language":389,"meta":390,"style":390},"language-latex shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\\DocumentMetadata{\n  lang=en,\n  pdfstandard=\"ua-2\",\n  pdfversion=2.0,\n}\n\\documentclass{article}\n","latex","",[376,392,393,401,407,413,419,425],{"__ignoreMap":390},[394,395,398],"span",{"class":396,"line":397},"line",1,[394,399,400],{},"\\DocumentMetadata{\n",[394,402,404],{"class":396,"line":403},2,[394,405,406],{},"  lang=en,\n",[394,408,410],{"class":396,"line":409},3,[394,411,412],{},"  pdfstandard=\"ua-2\",\n",[394,414,416],{"class":396,"line":415},4,[394,417,418],{},"  pdfversion=2.0,\n",[394,420,422],{"class":396,"line":421},5,[394,423,424],{},"}\n",[394,426,428],{"class":396,"line":427},6,[394,429,430],{},"\\documentclass{article}\n",[357,432,433],{},"This produces PDF\u002FUA-2 compliant documents with proper structure tags for screen readers.",[368,435,437],{"id":436},"two-sided-documents","Two-sided documents",[357,439,440,441,445,446,449],{},"Documents can be either one- or two-sided. Articles are by default one-sided, books are two-sided. Two-sided documents differentiate the left (even) and right (odd) pages, whereas one-sided do not. The most notable effect can be seen in page margins. If you want to make the ",[442,443,444],"em",{},"article class two-sided",", use ",[376,447,448],{},"\\documentclass[twoside]{article}",".",[357,451,452,453,456,457,460,461,463],{},"Many commands and variables in LaTeX take this concept into account. They are referred to as ",[442,454,455],{},"even"," and ",[442,458,459],{},"odd",".\nFor one-sided document, only the ",[442,462,459],{}," commands and variables will be in effect.",[368,465,467],{"id":466},"page-dimensions","Page dimensions",[357,469,470,471,474],{},"A page in LaTeX is defined by many internal parameters. Each parameter corresponds to the length of an element of the page, for example, ",[376,472,473],{},"\\paperheight"," is the physical height of the page. All sizes are given in TeX points (pt); there are 72.27pt in an inch, or 1pt ≈ 0.3515mm.",[357,476,477,478,481,482,486],{},"The key page dimension parameters are (values below are for the ",[376,479,480],{},"a4paper"," class option — the unconfigured default is US Letter, see ",[364,483,485],{"href":484},"#page-size","Page size","):",[488,489,490,497,503,509,515,521,527,533,539,545,551,557,562,568],"ul",{},[491,492,493,496],"li",{},[376,494,495],{},"\\oddsidemargin"," = 31pt",[491,498,499,502],{},[376,500,501],{},"\\topmargin"," = 20pt",[491,504,505,508],{},[376,506,507],{},"\\headheight"," = 12pt",[491,510,511,514],{},[376,512,513],{},"\\headsep"," = 25pt",[491,516,517,520],{},[376,518,519],{},"\\textheight"," = 592pt",[491,522,523,526],{},[376,524,525],{},"\\textwidth"," = 390pt",[491,528,529,532],{},[376,530,531],{},"\\marginparsep"," = 10pt",[491,534,535,538],{},[376,536,537],{},"\\marginparwidth"," = 35pt",[491,540,541,544],{},[376,542,543],{},"\\footskip"," = 30pt",[491,546,547,550],{},[376,548,549],{},"\\marginparpush"," = 7pt (not shown)",[491,552,553,556],{},[376,554,555],{},"\\hoffset"," = 0pt",[491,558,559,556],{},[376,560,561],{},"\\voffset",[491,563,564,567],{},[376,565,566],{},"\\paperwidth"," = 597pt",[491,569,570,572],{},[376,571,473],{}," = 845pt",[357,574,575,576,579,580,583,584,587],{},"The current details plus the layout shape can be printed from a LaTeX document itself. Use the ",[442,577,578],{},"layout"," package and the command of the same name: ",[376,581,582],{},"\\usepackage{layout} ... \\layout{}",".  To render a frame marking the margins of a document you are currently working on, add ",[376,585,586],{},"\\usepackage{showframe}"," to the document.",[368,589,485],{"id":590},"page-size",[357,592,593,594,597,598,602],{},"It will not have been immediately obvious - because it doesn't really cause any serious problems - that the default page size for all standard document classes is ",[442,595,596],{},"US letter",". This is shorter by 18 mm (about 3\u002F4 inch), and slightly wider by 8 mm (about 1\u002F4 inch), compared to A4 (which is the standard in almost all the rest of the world). While this is not a serious issue (most printers will print the document without any problems), it is possible to specify alternative sizes as ",[364,599,601],{"href":600},"\u002Fdocument-fundamentals\u002Fdocument-structure#document-classes","class option",". For A4 format:",[385,604,606],{"className":387,"code":605,"language":389,"meta":390,"style":390},"\\documentclass[a4paper]{article}\n",[376,607,608],{"__ignoreMap":390},[394,609,610],{"class":396,"line":397},[394,611,605],{},[357,613,614,618,619,622],{},[615,616,617],"strong",{},"Note:"," Note that the standard LaTeX classes use ",[442,620,621],{},"US Letter"," by default regardless of your TeX distribution configuration. If you have TeX Live configured to use A4 paper, it will be the default only for plainTeX and classes not specifying the paper dimension.",[624,625,626],"blockquote",{},[357,627,628,630,631,634,635,638],{},[615,629,617],{}," The a4paper option with the article document class by itself has no effect. It will only affect the page size in connection with some appropriate package, like the ",[376,632,633],{},"geometry"," package or the ",[376,636,637],{},"hyperref"," package.",[640,641,643,644],"h3",{"id":642},"more-size-options-with-geometry","More size options with ",[442,645,633],{},[357,647,648,649,651,652,658],{},"One of the most versatile packages for page layout is the ",[376,650,633],{}," ",[364,653,657],{"href":654,"rel":655},"https:\u002F\u002Fctan.org\u002Fpkg\u002Fgeometry?lang=en",[656],"nofollow","package",". The immediate advantage of this package is that it lets you customize the page size even with classes that do not support the options. For instance, to set the page size, add the following to your preamble:",[385,660,662],{"className":387,"code":661,"language":389,"meta":390,"style":390},"\\usepackage[a4paper]{geometry}\n",[376,663,664],{"__ignoreMap":390},[394,665,666],{"class":396,"line":397},[394,667,661],{},[357,669,670,671,673,674,676],{},"The ",[376,672,633],{}," package has many pre-defined page sizes, like ",[376,675,480],{},", built in.  Others include:",[488,678,679,693,704,709,714],{},[491,680,681,684,685,688,689,692],{},[376,682,683],{},"a0paper",", ",[376,686,687],{},"a1paper",", ..., ",[376,690,691],{},"a6paper",",",[491,694,695,684,698,688,701,692],{},[376,696,697],{},"b0paper",[376,699,700],{},"b1paper",[376,702,703],{},"b6paper",[491,705,706,692],{},[376,707,708],{},"letterpaper",[491,710,711,692],{},[376,712,713],{},"legalpaper",[491,715,716,449],{},[376,717,718],{},"executivepaper",[357,720,721,722,724,725,456,728,731],{},"To explicitly change the paper dimensions using the ",[376,723,633],{}," package, the ",[376,726,727],{},"paperwidth",[376,729,730],{},"paperheight"," options can be used. For example:",[385,733,735],{"className":387,"code":734,"language":389,"meta":390,"style":390},"\\usepackage[paperwidth=5.5in, paperheight=8.5in]{geometry}\n",[376,736,737],{"__ignoreMap":390},[394,738,739],{"class":396,"line":397},[394,740,734],{},[357,742,743],{},"Package provides many flexibility on setting the page layout, including specifying specific layout of each page using the:",[385,745,747],{"className":387,"code":746,"language":389,"meta":390,"style":390},"\\newgeometry{\n    key=val % package options\n}\n\\restoregeometry\n",[376,748,749,754,759,763],{"__ignoreMap":390},[394,750,751],{"class":396,"line":397},[394,752,753],{},"\\newgeometry{\n",[394,755,756],{"class":396,"line":403},[394,757,758],{},"    key=val % package options\n",[394,760,761],{"class":396,"line":409},[394,762,424],{},[394,764,765],{"class":396,"line":415},[394,766,767],{},"\\restoregeometry\n",[357,769,770],{},"While very flexible, this package also comes with limitations. For instance, page size cannot be provided to individual pages, which requires different approaches for the workaround.",[640,772,774],{"id":773},"page-size-issues","Page size issues",[357,776,777],{},"If you intend to get a PDF in the end, there are basically three ways:",[488,779,780,804,831],{},[491,781,782,783],{},"TeX → PDF\n",[385,784,788],{"className":785,"code":786,"language":787,"meta":390,"style":390},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pdflatex myfile               # TeX → PDF\n","bash",[376,789,790],{"__ignoreMap":390},[394,791,792,796,800],{"class":396,"line":397},[394,793,795],{"class":794},"sBMFI","pdflatex",[394,797,799],{"class":798},"sfazB"," myfile",[394,801,803],{"class":802},"sHwdD","               # TeX → PDF\n",[491,805,806,807],{},"TeX → DVI → PDF\n",[385,808,810],{"className":785,"code":809,"language":787,"meta":390,"style":390},"latex myfile                  # TeX → DVI\ndvipdf myfile                 # DVI → PDF\n",[376,811,812,821],{"__ignoreMap":390},[394,813,814,816,818],{"class":396,"line":397},[394,815,389],{"class":794},[394,817,799],{"class":798},[394,819,820],{"class":802},"                  # TeX → DVI\n",[394,822,823,826,828],{"class":396,"line":403},[394,824,825],{"class":794},"dvipdf",[394,827,799],{"class":798},[394,829,830],{"class":802},"                 # DVI → PDF\n",[491,832,833,834],{},"TeX → DVI → PS → PDF\n",[385,835,837],{"className":785,"code":836,"language":787,"meta":390,"style":390},"latex myfile                  # TeX → DVI\ndvips myfile -o myfile.ps     # DVI → PS\nps2pdf myfile.ps myfile.pdf   # PS  → PDF\n",[376,838,839,847,863],{"__ignoreMap":390},[394,840,841,843,845],{"class":396,"line":397},[394,842,389],{"class":794},[394,844,799],{"class":798},[394,846,820],{"class":802},[394,848,849,852,854,857,860],{"class":396,"line":403},[394,850,851],{"class":794},"dvips",[394,853,799],{"class":798},[394,855,856],{"class":798}," -o",[394,858,859],{"class":798}," myfile.ps",[394,861,862],{"class":802},"     # DVI → PS\n",[394,864,865,868,870,873],{"class":396,"line":409},[394,866,867],{"class":794},"ps2pdf",[394,869,859],{"class":798},[394,871,872],{"class":798}," myfile.pdf",[394,874,875],{"class":802},"   # PS  → PDF\n",[357,877,878,879,882],{},"Sadly the PDF output page size may not be completely respectful of your settings. Some of these tools do not have the same interpretation of the DVI, PS and PDF specifications, and you may end up with a PDF which has not exactly the right size. Thankfully there is a solution to that: the ",[376,880,881],{},"\\special"," command lets the user pass PostScript or PDF parameters, which can be used here to set the page size appropriately.",[488,884,885,894],{},[491,886,887,888,890,891,893],{},"For ",[376,889,795],{}," to work fine, using the package ",[376,892,633],{}," usually works.",[491,895,896],{},"For the DVI and PS ways, the safest way to always get the right paper size in the end is to add",[385,898,900],{"className":387,"code":899,"language":389,"meta":390,"style":390},"\\documentclass[...,a4paper,...]{...}\n\\special{papersize=210mm,297mm}\n",[376,901,902,907],{"__ignoreMap":390},[394,903,904],{"class":396,"line":397},[394,905,906],{},"\\documentclass[...,a4paper,...]{...}\n",[394,908,909],{"class":396,"line":403},[394,910,911],{},"\\special{papersize=210mm,297mm}\n",[357,913,914],{},"to the tex file, and to append the appropriate parameters to the processors used during output generation:",[385,916,918],{"className":785,"code":917,"language":787,"meta":390,"style":390},"dvips -t a4 ...\nps2pdf -sPAPERSIZE=a4 ... # On Windows: ps2pdf -sPAPERSIZE#a4 ...\n",[376,919,920,933],{"__ignoreMap":390},[394,921,922,924,927,930],{"class":396,"line":397},[394,923,851],{"class":794},[394,925,926],{"class":798}," -t",[394,928,929],{"class":798}," a4",[394,931,932],{"class":798}," ...\n",[394,934,935,937,940,943],{"class":396,"line":403},[394,936,867],{"class":794},[394,938,939],{"class":798}," -sPAPERSIZE=a4",[394,941,942],{"class":798}," ...",[394,944,945],{"class":802}," # On Windows: ps2pdf -sPAPERSIZE#a4 ...\n",[357,947,948,949,952,953,456,956,952,958,961,962,952,965,967],{},"If you want US Letter instead, replace ",[376,950,951],{},"210mm,297mm"," by ",[376,954,955],{},"8.5in,11in",[376,957,480],{},[376,959,960],{},"letter",". Also replace ",[376,963,964],{},"a4",[376,966,960],{}," in command-line parameters.",[640,969,971],{"id":970},"page-size-for-tablets","Page size for tablets",[357,973,974],{},"Those who want to read on tablets or other handheld digital devices need to create documents without the extra whitespace. In order to create PDF documents with optimal handheld viewing, not only must the text field and margins be adjusted, so must the page size. If you are looking for a sensible dimension, consider following the paper size used by the Supreme Court of the United States, 441pt by 666pt (or 6.125 inches by 9.25 inches), which looks great on tablets. You could also use the Supreme Court's text field size of 297 pt by 513 pt, but this is too wide for fonts other than Century Schoolbook, the font required by the Supreme Court.",[368,976,978],{"id":977},"margins","Margins",[357,980,981],{},"Readers used to perusing typical physical literature are probably wondering why there is so much white space surrounding the text. For example, on A4 paper a document will typically have 44 mm margin widths on the left and right of the page, leaving about 60% of the page width for text. The reason is improved readability. Studies have shown that it's easier to read text when there are 60–70 characters per line—and it would seem that 66 is the optimal number. Therefore, the page margins are set to ensure optimal readability, and excessive margin white space is tolerated as a consequence. Sometimes, this white space is left in the inner margin with the assumption that the document will be bound.",[357,983,984,985,989,990,993],{},"If you wish to avoid excessive white space, rather than changing the margins, consider instead using a ",[364,986,988],{"href":987},"#multi-column-pages","two-column (or more) layout",". This approach is the one usually taken by print magazines because it provides both readable line lengths and good use of the page. Another option for reducing the amount of whitespace on the page without changing the margins is to increase the font size using the ",[376,991,992],{},"12pt"," option to the document class.",[357,995,996],{},"If you wish to change the margins of your document, there are many ways to do so:",[488,998,999],{},[491,1000,1001,1002,1005,1006,1008],{},"One older approach is to use the ",[376,1003,1004],{},"fullpage"," package for somewhat standardized smaller margins (around an inch), but it creates lines of more than 100 characters per line with the 10pt default font size (and about 90 if the ",[376,1007,992],{}," documentclass option is used):",[385,1010,1012],{"className":387,"code":1011,"language":389,"meta":390,"style":390},"\\usepackage{fullpage}\n",[376,1013,1014],{"__ignoreMap":390},[394,1015,1016],{"class":396,"line":397},[394,1017,1011],{},[357,1019,1020,1021,1023,1024,1027],{},"For even narrower margins, the ",[376,1022,1004],{}," package has a ",[376,1025,1026],{},"cm"," option (around 1.5cm), which results in about 120 characters per line at the 10pt default font size, about double what is considered readable:",[385,1029,1031],{"className":387,"code":1030,"language":389,"meta":390,"style":390},"\\usepackage[cm]{fullpage}\n",[376,1032,1033],{"__ignoreMap":390},[394,1034,1035],{"class":396,"line":397},[394,1036,1030],{},[488,1038,1039],{},[491,1040,1041,1042,1044,1045,1047,1048,1051,1052,1055,1056,1059,1060,1062,1063,1066,1067,1069],{},"A more modern and flexible approach is to use the ",[376,1043,633],{}," package.  This package allows you to specify the 4 margins without needing to remember the particular page dimensions commands.  You can enter the measures in centimeters and inches as well. Use ",[376,1046,1026],{}," for centimeters and ",[376,1049,1050],{},"in"," for inches after each value (",[442,1053,1054],{},"e.g."," 1.0in or 2.54cm). Note that by default (",[442,1057,1058],{},"i.e."," without any options) this package already reduces the margins, so for a 'standard layout' you may not need to specify anything. These values are relative to the edge of paper (0in) and go inward. For example, this command provides more conventional margins, better using the vertical space of the page, without creating the dramatically long lines of the ",[376,1061,1004],{}," package (if the ",[376,1064,1065],{},"11pt"," documentclass option is used, the line lengths are about 88 characters for letter-sized paper and slightly less when using ",[376,1068,480],{},").",[385,1071,1073],{"className":387,"code":1072,"language":389,"meta":390,"style":390},"\\usepackage[top=1in, bottom=1.25in, left=1.25in, right=1.25in]{geometry}\n",[376,1074,1075],{"__ignoreMap":390},[394,1076,1077],{"class":396,"line":397},[394,1078,1072],{},[357,1080,1081,1082,1084],{},"It can also recreate the behavior of the ",[376,1083,1004],{}," package using",[385,1086,1088],{"className":387,"code":1087,"language":389,"meta":390,"style":390},"\\usepackage[margin=1in]{geometry}\n",[376,1089,1090],{"__ignoreMap":390},[394,1091,1092],{"class":396,"line":397},[394,1093,1087],{},[357,1095,1096,1097,449],{},"You can combine the margin options with the page size options seen in ",[364,1098,1100],{"href":1099},"#more-size-options-with-geometry","this paragraph",[488,1102,1103,1114],{},[491,1104,1105,1106,1109,1110,1113],{},"If the page size is A4, you can use the ",[376,1107,1108],{},"layaureo"," package. The ",[376,1111,1112],{},"big"," option further narrows the margins.",[491,1115,1116,1117,1120],{},"You should not use the ",[376,1118,1119],{},"a4wide"," package for a page with A4 document size with smaller margins. It is obsolete and buggy. Use geometry package instead like this:",[385,1122,1124],{"className":387,"code":1123,"language":389,"meta":390,"style":390},"\\usepackage[a4paper,includeheadfoot,margin=2.54cm]{geometry}\n",[376,1125,1126],{"__ignoreMap":390},[394,1127,1128],{"class":396,"line":397},[394,1129,1123],{},[488,1131,1132],{},[491,1133,1134,1135,456,1138,1141,1142,1144],{},"Edit individual page dimension variables described above, using the ",[376,1136,1137],{},"\\addtolength",[376,1139,1140],{},"\\setlength"," commands. See the ",[364,1143,310],{"href":311}," chapter. For instance,",[385,1146,1148],{"className":387,"code":1147,"language":389,"meta":390,"style":390},"\\setlength{\\textwidth}{6.5in}\n\\addtolength{\\voffset}{-5pt}\n",[376,1149,1150,1155],{"__ignoreMap":390},[394,1151,1152],{"class":396,"line":397},[394,1153,1154],{},"\\setlength{\\textwidth}{6.5in}\n",[394,1156,1157],{"class":396,"line":403},[394,1158,1159],{},"\\addtolength{\\voffset}{-5pt}\n",[640,1161,1163],{"id":1162},"odd-and-even-margins","Odd and even margins",[357,1165,1166],{},"Using the geometry package, the options left and right are used for the inside and outside margins respectively. They also have aliases inner and outer. Thus, the easiest way to handle different margins for odd and even pages is to give the twoside option in the document class command and specify the margins as usually.",[385,1168,1170],{"className":387,"code":1169,"language":389,"meta":390,"style":390},"\\documentclass[twoside]{report}\n\\usepackage[inner=4cm,outer=2cm]{geometry} %left=4cm,right=2cm would be equivalent\n",[376,1171,1172,1177],{"__ignoreMap":390},[394,1173,1174],{"class":396,"line":397},[394,1175,1176],{},"\\documentclass[twoside]{report}\n",[394,1178,1179],{"class":396,"line":403},[394,1180,1181],{},"\\usepackage[inner=4cm,outer=2cm]{geometry} %left=4cm,right=2cm would be equivalent\n",[357,1183,1184],{},"This will result in a value of 4cm on all inner margins (left margin for odd number pages and right margin for even pages) and 2cm margin on outer margins.",[357,1186,1187,1188,456,1191,1194],{},"Setting the same value for the inner and outer for geometry will remove the difference between the margins. Another quick way to eliminate the difference in position between even and odd numbered pages would be setting the values to ",[615,1189,1190],{},"evensidemargin",[615,1192,1193],{},"oddsidemargin"," to the half of odd's default:",[385,1196,1198],{"className":387,"code":1197,"language":389,"meta":390,"style":390},"\\setlength{\\oddsidemargin}{15.5pt} \n\\setlength{\\evensidemargin}{15.5pt}\n",[376,1199,1200,1205],{"__ignoreMap":390},[394,1201,1202],{"class":396,"line":397},[394,1203,1204],{},"\\setlength{\\oddsidemargin}{15.5pt} \n",[394,1206,1207],{"class":396,"line":403},[394,1208,1209],{},"\\setlength{\\evensidemargin}{15.5pt}\n",[357,1211,1212,1213,1215,1216,1218],{},"By default, the value of ",[615,1214,1190],{}," is larger than ",[615,1217,1193],{}," in the two-sided layout, as one could wish to write notes on the side of the page. The side for the large margin is chosen opposite to the side where pages are joined together.",[357,1220,1221,1222,449],{},"See the ",[364,1223,310],{"href":311},[640,1225,1227],{"id":1226},"top-margin-above-chapter","Top margin above Chapter",[357,1229,1230,1231,1234,1235],{},"The top margin above a chapter can be changed using the ",[376,1232,1233],{},"titlesec"," package. Example: ",[364,1236,1239],{"href":1237,"rel":1238},"http:\u002F\u002Fwww.ctex.org\u002Fdocuments\u002Fpackages\u002Flayout\u002Ftitlesec.pdf",[656],"titlesec documentation",[385,1241,1243],{"className":387,"code":1242,"language":389,"meta":390,"style":390},"\\usepackage{titlesec}\n\\titlespacing*{\\chapter}{0pt}{-50pt}{20pt}\n\\titleformat{\\chapter}[display]{\\normalfont\\huge\\bfseries}{\\chaptertitlename\\ \\thechapter}{20pt}{\\Huge}\n",[376,1244,1245,1250,1255],{"__ignoreMap":390},[394,1246,1247],{"class":396,"line":397},[394,1248,1249],{},"\\usepackage{titlesec}\n",[394,1251,1252],{"class":396,"line":403},[394,1253,1254],{},"\\titlespacing*{\\chapter}{0pt}{-50pt}{20pt}\n",[394,1256,1257],{"class":396,"line":409},[394,1258,1259],{},"\\titleformat{\\chapter}[display]{\\normalfont\\huge\\bfseries}{\\chaptertitlename\\ \\thechapter}{20pt}{\\Huge}\n",[357,1261,1262,1263,1266],{},"The command ",[376,1264,1265],{},"\\titleformat"," must be used when the spacing of a chapter is changed. In case of a section this command can be omitted.",[368,1268,1270],{"id":1269},"page-orientation","Page orientation",[357,1272,1273],{},"When you talk about changing page orientation, it usually means changing to landscape mode, since portrait is the default. We shall introduce two slightly different styles of changing orientation.",[640,1275,1277],{"id":1276},"change-orientation-of-the-whole-document","Change orientation of the whole document",[357,1279,1280,1281,1283,1284,1287],{},"The first is for when you want all of your document to be in landscape from the very beginning. There are various packages available to achieve this, but the one we prefer is the ",[376,1282,633],{}," package. All you need to do is call the package, with ",[442,1285,1286],{},"landscape"," as an option:",[385,1289,1291],{"className":387,"code":1290,"language":389,"meta":390,"style":390},"\\usepackage[landscape]{geometry}\n",[376,1292,1293],{"__ignoreMap":390},[394,1294,1295],{"class":396,"line":397},[394,1296,1290],{},[357,1298,1299,1300,1302,1303,1306],{},"Although, if you intend to use ",[376,1301,633],{}," to set your paper size, don't add the ",[376,1304,1305],{},"\\usepackage"," commands twice, simply string all the options together, separating with a comma:",[385,1308,1310],{"className":387,"code":1309,"language":389,"meta":390,"style":390},"\\usepackage[a4paper,landscape]{geometry}\n",[376,1311,1312],{"__ignoreMap":390},[394,1313,1314],{"class":396,"line":397},[394,1315,1309],{},[357,1317,1318],{},"Using standard LaTeX classes, you can use the same class options:",[385,1320,1322],{"className":387,"code":1321,"language":389,"meta":390,"style":390},"\\documentclass[a4paper,landscape]{article}\n",[376,1323,1324],{"__ignoreMap":390},[394,1325,1326],{"class":396,"line":397},[394,1327,1321],{},[640,1329,1331],{"id":1330},"change-orientation-of-specific-part","Change orientation of specific part",[357,1333,1334],{},"The second method is for when you are writing a document in portrait, but you have some contents, like a large diagram or table that would be displayed better on a landscape page. However, you still want the consistency of your headers and footers appearing the same place as the other pages.",[357,1336,670,1337,1340,1341,1343,1344,1347,1348,1350],{},[376,1338,1339],{},"lscape"," package is for this very purpose. It supplies a ",[376,1342,1286],{}," environment, and anything inside is basically rotated. No actual page dimensions are changed. This approach is more applicable to books or reports than to typical academic publications.  Using ",[376,1345,1346],{},"pdflscape"," instead of ",[376,1349,1339],{}," when generating a PDF document will make the page appear right side up when viewed: the single page that is in landscape format will be rotated, while the rest will be left in portrait orientation.",[357,1352,1353,1354,1357,1358,1361,1362,1364],{},"Also, to get a table to appear correctly centered on a landscaped page, one must place the ",[376,1355,1356],{},"tabular"," environment inside a ",[376,1359,1360],{},"table"," environment, which is itself inside the ",[376,1363,1286],{}," environment. For instance it should look like this:",[385,1366,1368],{"className":387,"code":1367,"language":389,"meta":390,"style":390},"\\usepackage{pdflscape}\n% ...\n\n\\begin{landscape}\n\\begin{table}\n\\centering     % optional, probably makes it look better to have it centered on the page\n\\begin{tabular}{....}\n% ...\n\\end{tabular}\n\\end{table}\n\\end{landscape}\n",[376,1369,1370,1375,1380,1386,1391,1396,1401,1407,1412,1418,1424],{"__ignoreMap":390},[394,1371,1372],{"class":396,"line":397},[394,1373,1374],{},"\\usepackage{pdflscape}\n",[394,1376,1377],{"class":396,"line":403},[394,1378,1379],{},"% ...\n",[394,1381,1382],{"class":396,"line":409},[394,1383,1385],{"emptyLinePlaceholder":1384},true,"\n",[394,1387,1388],{"class":396,"line":415},[394,1389,1390],{},"\\begin{landscape}\n",[394,1392,1393],{"class":396,"line":421},[394,1394,1395],{},"\\begin{table}\n",[394,1397,1398],{"class":396,"line":427},[394,1399,1400],{},"\\centering     % optional, probably makes it look better to have it centered on the page\n",[394,1402,1404],{"class":396,"line":1403},7,[394,1405,1406],{},"\\begin{tabular}{....}\n",[394,1408,1410],{"class":396,"line":1409},8,[394,1411,1379],{},[394,1413,1415],{"class":396,"line":1414},9,[394,1416,1417],{},"\\end{tabular}\n",[394,1419,1421],{"class":396,"line":1420},10,[394,1422,1423],{},"\\end{table}\n",[394,1425,1427],{"class":396,"line":1426},11,[394,1428,1429],{},"\\end{landscape}\n",[357,1431,1432,1433,1436,1437,1439],{},"For books (and in general documents using the ",[376,1434,1435],{},"twoside"," option), the ",[376,1438,1286],{},"-environment unfortunately does not pay attention to the different layout of even and odd pages. The macro can be fixed using a few lines of extra code in the preamble.",[640,1441,1443],{"id":1442},"change-orientation-of-floating-environment","Change orientation of floating environment",[357,1445,1446,1447,1450,1451,1453],{},"If you use the above code, you will see that the table is inserted where it is in the code. It will not be floated! To fix this you need the package ",[376,1448,1449],{},"rotating",". See the ",[364,1452,106],{"href":107}," chapter.",[368,1455,1457],{"id":1456},"margins-page-size-and-rotation-of-a-specific-page","Margins, page size and rotation of a specific page",[357,1459,1460,1461,1463],{},"If you need to rotate the page so that the figure fits, the chances are good that you need to scale the margins and the font size too. Again, the ",[376,1462,633],{}," package comes in handy for specifying new margins for a single page only.",[385,1465,1467],{"className":387,"code":1466,"language":389,"meta":390,"style":390},"\\usepackage{geometry}\n\\usepackage{pdflscape}\n% ...\n\n\\newgeometry{margin=1cm}\n\\begin{landscape}\n\\thispagestyle{empty} %% Remove header and footer.\n\n\\begin{table}\n\\begin{center}\n\\footnotesize %% Smaller font size.\n\n\\begin{tabular}{....}\n% ...\n\\end{tabular}\n\n\\end{center}\n\\end{table}\n\n\\end{landscape}\n\\restoregeometry\n",[376,1468,1469,1474,1478,1482,1486,1491,1495,1500,1504,1508,1513,1518,1523,1528,1533,1538,1543,1549,1554,1559,1564],{"__ignoreMap":390},[394,1470,1471],{"class":396,"line":397},[394,1472,1473],{},"\\usepackage{geometry}\n",[394,1475,1476],{"class":396,"line":403},[394,1477,1374],{},[394,1479,1480],{"class":396,"line":409},[394,1481,1379],{},[394,1483,1484],{"class":396,"line":415},[394,1485,1385],{"emptyLinePlaceholder":1384},[394,1487,1488],{"class":396,"line":421},[394,1489,1490],{},"\\newgeometry{margin=1cm}\n",[394,1492,1493],{"class":396,"line":427},[394,1494,1390],{},[394,1496,1497],{"class":396,"line":1403},[394,1498,1499],{},"\\thispagestyle{empty} %% Remove header and footer.\n",[394,1501,1502],{"class":396,"line":1409},[394,1503,1385],{"emptyLinePlaceholder":1384},[394,1505,1506],{"class":396,"line":1414},[394,1507,1395],{},[394,1509,1510],{"class":396,"line":1420},[394,1511,1512],{},"\\begin{center}\n",[394,1514,1515],{"class":396,"line":1426},[394,1516,1517],{},"\\footnotesize %% Smaller font size.\n",[394,1519,1521],{"class":396,"line":1520},12,[394,1522,1385],{"emptyLinePlaceholder":1384},[394,1524,1526],{"class":396,"line":1525},13,[394,1527,1406],{},[394,1529,1531],{"class":396,"line":1530},14,[394,1532,1379],{},[394,1534,1536],{"class":396,"line":1535},15,[394,1537,1417],{},[394,1539,1541],{"class":396,"line":1540},16,[394,1542,1385],{"emptyLinePlaceholder":1384},[394,1544,1546],{"class":396,"line":1545},17,[394,1547,1548],{},"\\end{center}\n",[394,1550,1552],{"class":396,"line":1551},18,[394,1553,1423],{},[394,1555,1557],{"class":396,"line":1556},19,[394,1558,1385],{"emptyLinePlaceholder":1384},[394,1560,1562],{"class":396,"line":1561},20,[394,1563,1429],{},[394,1565,1567],{"class":396,"line":1566},21,[394,1568,767],{},[357,1570,1571],{},"Note that order matters!",[368,1573,1575],{"id":1574},"page-background","Page background",[357,1577,1578],{},"There are many ways on implementing background for a page. Below is most common packages used:",[488,1580,1581],{},[491,1582,1583,1586],{},[376,1584,1585],{},"eso-pic"," package will let you print content in the background of every page or individual pages.",[385,1588,1590],{"className":387,"code":1589,"language":389,"meta":390,"style":390},"\\usepackage{tikz} % for \\gradientbox below.\n\\usepackage{eso-pic}\n\n\\newcommand{\\gradientbox}[3]{%\n  \\begin{tikzpicture}\n    \\node[left color=#1,right color=#2] {#3};\n  \\end{tikzpicture}%\n}\n\n\\AddToShipoutPicture*{%\n  \\AtPageLowerLeft{%\n    \\rotatebox{90}{\n      \\gradientbox{blue!20}{white}{%\n        \\begin{minipage}{\\paperheight}%\n          \\hspace*{ \\stretch{1} }\\textcopyright~2013 \\makeatletter\\@author\\makeatother.\\hspace*{ \\stretch{1} }\n        \\end{minipage}%\n      }\n    }%\n  }%\n}\n",[376,1591,1592,1597,1602,1606,1611,1616,1621,1626,1630,1634,1639,1644,1649,1654,1659,1664,1669,1674,1679,1684],{"__ignoreMap":390},[394,1593,1594],{"class":396,"line":397},[394,1595,1596],{},"\\usepackage{tikz} % for \\gradientbox below.\n",[394,1598,1599],{"class":396,"line":403},[394,1600,1601],{},"\\usepackage{eso-pic}\n",[394,1603,1604],{"class":396,"line":409},[394,1605,1385],{"emptyLinePlaceholder":1384},[394,1607,1608],{"class":396,"line":415},[394,1609,1610],{},"\\newcommand{\\gradientbox}[3]{%\n",[394,1612,1613],{"class":396,"line":421},[394,1614,1615],{},"  \\begin{tikzpicture}\n",[394,1617,1618],{"class":396,"line":427},[394,1619,1620],{},"    \\node[left color=#1,right color=#2] {#3};\n",[394,1622,1623],{"class":396,"line":1403},[394,1624,1625],{},"  \\end{tikzpicture}%\n",[394,1627,1628],{"class":396,"line":1409},[394,1629,424],{},[394,1631,1632],{"class":396,"line":1414},[394,1633,1385],{"emptyLinePlaceholder":1384},[394,1635,1636],{"class":396,"line":1420},[394,1637,1638],{},"\\AddToShipoutPicture*{%\n",[394,1640,1641],{"class":396,"line":1426},[394,1642,1643],{},"  \\AtPageLowerLeft{%\n",[394,1645,1646],{"class":396,"line":1520},[394,1647,1648],{},"    \\rotatebox{90}{\n",[394,1650,1651],{"class":396,"line":1525},[394,1652,1653],{},"      \\gradientbox{blue!20}{white}{%\n",[394,1655,1656],{"class":396,"line":1530},[394,1657,1658],{},"        \\begin{minipage}{\\paperheight}%\n",[394,1660,1661],{"class":396,"line":1535},[394,1662,1663],{},"          \\hspace*{ \\stretch{1} }\\textcopyright~2013 \\makeatletter\\@author\\makeatother.\\hspace*{ \\stretch{1} }\n",[394,1665,1666],{"class":396,"line":1540},[394,1667,1668],{},"        \\end{minipage}%\n",[394,1670,1671],{"class":396,"line":1545},[394,1672,1673],{},"      }\n",[394,1675,1676],{"class":396,"line":1551},[394,1677,1678],{},"    }%\n",[394,1680,1681],{"class":396,"line":1556},[394,1682,1683],{},"  }%\n",[394,1685,1686],{"class":396,"line":1561},[394,1687,424],{},[357,1689,1690,1691,1694],{},"The starred-version of the ",[376,1692,1693],{},"\\AddToShipoutPicture"," command applies to the current page only.",[488,1696,1697],{},[491,1698,1699,1702],{},[376,1700,1701],{},"background"," package lets users include watermarks and pictures in the background.",[385,1704,1706],{"className":387,"code":1705,"language":389,"meta":390,"style":390},"\\usepackage{background}\n\n\\backgroundsetup{\n  opacity = 0.5,\n  angle = 0,\n  contents = {\\includegraphics{example.pdf}}\n}\n",[376,1707,1708,1713,1717,1722,1727,1732,1737],{"__ignoreMap":390},[394,1709,1710],{"class":396,"line":397},[394,1711,1712],{},"\\usepackage{background}\n",[394,1714,1715],{"class":396,"line":403},[394,1716,1385],{"emptyLinePlaceholder":1384},[394,1718,1719],{"class":396,"line":409},[394,1720,1721],{},"\\backgroundsetup{\n",[394,1723,1724],{"class":396,"line":415},[394,1725,1726],{},"  opacity = 0.5,\n",[394,1728,1729],{"class":396,"line":421},[394,1730,1731],{},"  angle = 0,\n",[394,1733,1734],{"class":396,"line":427},[394,1735,1736],{},"  contents = {\\includegraphics{example.pdf}}\n",[394,1738,1739],{"class":396,"line":1403},[394,1740,424],{},[368,1742,1744],{"id":1743},"multi-column-pages","Multi-column pages",[640,1746,1748,1749,1752],{"id":1747},"using-the-twocolumn-optional-class-argument","Using the ",[442,1750,1751],{},"twocolumn"," optional class argument",[357,1754,1755,1756,1758,1759,1762],{},"Using a standard Latex document class, like article, you can simply pass the optional argument ",[442,1757,1751],{}," to the document class: ",[376,1760,1761],{},"\\documentclass[twocolumn]{article}"," which will give the desired effect.",[357,1764,1765,1766,1769],{},"While this approach is useful, it has limitations. The ",[376,1767,1768],{},"multicol"," package provides the following advantages:",[488,1771,1772,1775,1782,1788,1797,1807,1810],{},[491,1773,1774],{},"Can support up to ten columns.",[491,1776,1777,1778,1781],{},"Implements a ",[442,1779,1780],{},"multicols"," environment, therefore, it is possible to mix the number of columns within a document.",[491,1783,1784,1785,449],{},"Additionally, the environment can be nested inside other environments, such as ",[376,1786,1787],{},"figure",[491,1789,1790,1792,1793,1796],{},[376,1791,1768],{}," outputs ",[442,1794,1795],{},"balanced"," columns, whereby the columns on the final page will be of roughly equal length.",[491,1798,1799,1800,1802,1803,1806],{},"Use ",[442,1801,1780],{},"* environment for ",[442,1804,1805],{},"unbalanced"," columns, whereby each column is completely filled before starting with the next column.",[491,1808,1809],{},"Vertical rules between columns can be customised.",[491,1811,1812],{},"Column environments can be easily customised locally or globally.",[640,1814,1816,1817,1819],{"id":1815},"using-multicol-package","Using ",[376,1818,1768],{}," package",[357,1821,670,1822,1824,1825,1827,1828,1830],{},[376,1823,1768],{}," package overcomes some of the shortcomings of ",[442,1826,1751],{}," and provides the ",[376,1829,1768],{}," environment. To create a typical two-column layout:",[385,1832,1834],{"className":387,"code":1833,"language":389,"meta":390,"style":390},"\\begin{multicols}{2}\n  lots of text\n\\end{multicols}\n",[376,1835,1836,1841,1846],{"__ignoreMap":390},[394,1837,1838],{"class":396,"line":397},[394,1839,1840],{},"\\begin{multicols}{2}\n",[394,1842,1843],{"class":396,"line":403},[394,1844,1845],{},"  lots of text\n",[394,1847,1848],{"class":396,"line":409},[394,1849,1850],{},"\\end{multicols}\n",[357,1852,1853,1856,1857,1860,1861,1865],{},[442,1854,1855],{},"Floats are not fully supported by this environment",". It can only cope if you use the starred forms of the float commands (e.g., ",[376,1858,1859],{},"\\begin{figure*}"," ) which makes the float span all columns. This is not hugely problematic, since floats of the same width as a column may be too small, and you would probably want to span them anyway. See ",[364,1862,1864],{"href":1863},"\u002Ftables-and-graphics\u002Ffloats-figures-and-captions#wide-figures-in-two-column-documents","this section"," for a more detailed discussion.",[357,1867,670,1868,1870,1871,1875,1876,383],{},[376,1869,1768],{}," package has two important parameters which can be ",[364,1872,1874],{"href":1873},"\u002Freference\u002Flengths#length-manipulation","set"," using ",[376,1877,1140],{},[488,1879,1880,1886],{},[491,1881,1882,1885],{},[376,1883,1884],{},"\\columnseprule",", sets the width of the vertical rule between columns and defaults to 0pt",[491,1887,1888,1891],{},[376,1889,1890],{},"\\columnsep",", sets the horizontal space between columns and the defaults to 10pt, which is quite narrow",[357,1893,1894,1895,1898],{},"To force a break in a column, the command ",[376,1896,1897],{},"\\columnbreak"," is used.",[368,1900,1902],{"id":1901},"manual-page-formatting","Manual page formatting",[357,1904,1905],{},"There may be instances, especially in very long documents, such as books, that LaTeX will not get all page breaks looking as good as it could. It may, therefore, be necessary to manually tweak the page formatting. Of course, you should only do this at the very final stage of producing your document, once all the content is complete. LaTeX offers the following:",[1360,1907,1908,1921],{},[1909,1910,1911],"thead",{},[1912,1913,1914,1918],"tr",{},[1915,1916,1917],"th",{},"Command",[1915,1919,1920],{},"Description",[1922,1923,1924,1935,1949,1961],"tbody",{},[1912,1925,1926,1932],{},[1927,1928,1929],"td",{},[376,1930,1931],{},"\\newpage",[1927,1933,1934],{},"Ends the current page and starts a new one.",[1912,1936,1937,1942],{},[1927,1938,1939],{},[376,1940,1941],{},"\\pagebreak[number]",[1927,1943,1944,1945,1948],{},"Breaks the current page. Optional ",[376,1946,1947],{},"number"," sets priority (0-4).",[1912,1950,1951,1956],{},[1927,1952,1953],{},[376,1954,1955],{},"\\nopagebreak[number]",[1927,1957,1958,1959,1948],{},"Prevents page break at this point. Optional ",[376,1960,1947],{},[1912,1962,1963,1968],{},[1927,1964,1965],{},[376,1966,1967],{},"\\clearpage",[1927,1969,1970],{},"Ends current page and prints all pending floats.",[368,1972,1974],{"id":1973},"widows-and-orphans","Widows and orphans",[357,1976,1977],{},"In professional books, it's not desirable to have single lines at the beginning or end of a page. In typesetting such situations are called 'widows' and 'orphans'. Normally it is possible that widows and orphans appear in LaTeX documents. You can try to deal with them using manual page formatting, but there's also an automatic solution.",[357,1979,1980],{},"LaTeX has a parameter for 'penalty' for widows and orphans ('club lines' in LaTeX terminology). With the greater penalty LaTeX will try more to avoid widows and orphans. You can try to increase these penalties by putting following commands in your document preamble:",[385,1982,1984],{"className":387,"code":1983,"language":389,"meta":390,"style":390},"\\widowpenalty=300\n\\clubpenalty=300\n",[376,1985,1986,1991],{"__ignoreMap":390},[394,1987,1988],{"class":396,"line":397},[394,1989,1990],{},"\\widowpenalty=300\n",[394,1992,1993],{"class":396,"line":403},[394,1994,1995],{},"\\clubpenalty=300\n",[357,1997,1998],{},"If this does not help, you can try increasing these values even more, to a maximum of 10000. However, it is not recommended to set this value too high, as setting it to 10000 forbids LaTeX from doing this altogether, which might result in strange behavior.",[357,2000,2001],{},"It also helps to have rubber band values for the space between paragraphs:",[385,2003,2005],{"className":387,"code":2004,"language":389,"meta":390,"style":390},"\\setlength{\\parskip}{3ex plus 2ex minus 2ex}\n",[376,2006,2007],{"__ignoreMap":390},[394,2008,2009],{"class":396,"line":397},[394,2010,2004],{},[357,2012,2013,2014,2017,2018,2021],{},"Alternatively, you can use the ",[376,2015,2016],{},"needspace"," package to ",[442,2019,2020],{},"reserve"," some lines and thus to prevent page breaking for those lines.",[385,2023,2025],{"className":387,"code":2024,"language":389,"meta":390,"style":390},"\\needspace{5\\baselineskip}\nSome\ntext\non\n5\nlines.\n",[376,2026,2027,2032,2037,2042,2047,2052],{"__ignoreMap":390},[394,2028,2029],{"class":396,"line":397},[394,2030,2031],{},"\\needspace{5\\baselineskip}\n",[394,2033,2034],{"class":396,"line":403},[394,2035,2036],{},"Some\n",[394,2038,2039],{"class":396,"line":409},[394,2040,2041],{},"text\n",[394,2043,2044],{"class":396,"line":415},[394,2045,2046],{},"on\n",[394,2048,2049],{"class":396,"line":421},[394,2050,2051],{},"5\n",[394,2053,2054],{"class":396,"line":427},[394,2055,2056],{},"lines.\n",[368,2058,2060],{"id":2059},"troubleshooting-debugging","Troubleshooting \u002F Debugging",[357,2062,2063],{},"A very useful troubleshooting and designing technique is to turn on the showframe option in the geometry package (which has the same effect\nas the showframe package described above).  It draws bounding boxes around the major page elements, which can be helpful because the boundaries of various regions are usually invisible, and complicated by padding whitespace.",[385,2065,2067],{"className":387,"code":2066,"language":389,"meta":390,"style":390},"\\usepackage[showframe]{geometry}\n",[376,2068,2069],{"__ignoreMap":390},[394,2070,2071],{"class":396,"line":397},[394,2072,2066],{},[357,2074,2075],{},"Examining the log of tex could be helpful as well - it should provide many useful information.\nIn addition, following packages can help on visual debugging layout:",[385,2077,2079],{"className":387,"code":2078,"language":389,"meta":390,"style":390},"%\\usepackage{layout}\n%\\usepackage{showframe}\n% \\layout % - place it inside \"document\" section to see the layout where you need it more conveniently\n",[376,2080,2081,2086,2091],{"__ignoreMap":390},[394,2082,2083],{"class":396,"line":397},[394,2084,2085],{},"%\\usepackage{layout}\n",[394,2087,2088],{"class":396,"line":403},[394,2089,2090],{},"%\\usepackage{showframe}\n",[394,2092,2093],{"class":396,"line":409},[394,2094,2095],{},"% \\layout % - place it inside \"document\" section to see the layout where you need it more conveniently\n",[357,2097,2098],{},"Which will print layout and frames. The statements could be on top of the source file and uncommented when required.",[368,2100,2102],{"id":2101},"notes-and-references","Notes and References",[2104,2105,2106],"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}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":390,"searchDepth":403,"depth":403,"links":2108},[2109,2110,2111,2112,2118,2122,2127,2128,2129,2135,2136,2137,2138],{"id":370,"depth":403,"text":371},{"id":436,"depth":403,"text":437},{"id":466,"depth":403,"text":467},{"id":590,"depth":403,"text":485,"children":2113},[2114,2116,2117],{"id":642,"depth":409,"text":2115},"More size options with geometry",{"id":773,"depth":409,"text":774},{"id":970,"depth":409,"text":971},{"id":977,"depth":403,"text":978,"children":2119},[2120,2121],{"id":1162,"depth":409,"text":1163},{"id":1226,"depth":409,"text":1227},{"id":1269,"depth":403,"text":1270,"children":2123},[2124,2125,2126],{"id":1276,"depth":409,"text":1277},{"id":1330,"depth":409,"text":1331},{"id":1442,"depth":409,"text":1443},{"id":1456,"depth":403,"text":1457},{"id":1574,"depth":403,"text":1575},{"id":1743,"depth":403,"text":1744,"children":2130},[2131,2133],{"id":1747,"depth":409,"text":2132},"Using the twocolumn optional class argument",{"id":1815,"depth":409,"text":2134},"Using multicol package",{"id":1901,"depth":403,"text":1902},{"id":1973,"depth":403,"text":1974},{"id":2059,"depth":403,"text":2060},{"id":2101,"depth":403,"text":2102},"Understand page geometry, margins, paper size, and page breaks in LaTeX documents.","md",null,{},{"title":90,"description":2139},"mMDZnVHtUkhFkGLZDW2GRIJmgcBv0lLOB9B9hj09J_g",[2146,2148],{"title":80,"path":81,"stem":82,"description":2147,"children":-1},"Learn how to typeset documents in languages other than English using Babel and Polyglossia in LaTeX.",{"title":94,"path":95,"stem":96,"description":2149,"children":-1},"How to customize headers, footers, page numbering styles, and layout elements in LaTeX.",1785155501448]