[{"data":1,"prerenderedAt":1432},["ShallowReactive",2],{"navigation_docs":3,"-cross-references-labels-and-cross-referencing":351,"-cross-references-labels-and-cross-referencing-surround":1427},[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":204,"body":353,"description":1421,"extension":1422,"links":1423,"meta":1424,"navigation":658,"path":205,"seo":1425,"stem":206,"__hash__":1426},"docs\u002F07.cross-references\u002F01.labels-and-cross-referencing.md",{"type":354,"value":355,"toc":1399},"minimark",[356,360,364,399,412,422,429,436,439,445,452,466,477,596,607,613,625,629,632,637,688,705,709,715,755,770,779,788,793,804,831,838,852,862,866,869,938,951,956,981,986,1000,1005,1026,1031,1043,1050,1065,1068,1083,1093,1098,1103,1138,1147,1150,1177,1182,1193,1196,1216,1219,1222,1226,1239,1259,1265,1288,1323,1326,1338,1365,1380,1384,1391,1395],[357,358,11],"h2",{"id":359},"introduction",[361,362,363],"p",{},"In LaTeX, you can easily reference almost anything that can be numbered, and have LaTeX automatically updating the numbering for you whenever necessary.  The objects which can be referenced include chapters, sections, subsections, footnotes, theorems, equations, figures and tables. The commands to be used do not depend on what you are referencing, and they are:",[365,366,367,383,391],"ul",{},[368,369,370,377,378,382],"li",{},[371,372,373],"strong",{},[374,375,376],"code",{},"\\label{*marker*}"," — Used to give the object you want to reference a ",[379,380,381],"em",{},"marker"," — a name which can be used to refer to that object later.",[368,384,385,390],{},[371,386,387],{},[374,388,389],{},"\\ref{*marker*}"," — Used to reference an object with the specified marker. This will print the number that was assigned to the object.",[368,392,393,398],{},[371,394,395],{},[374,396,397],{},"\\pageref{*marker*}"," — Used to print the page number where the object with the specified marker is found.",[361,400,401,402,404,405,408,409,411],{},"LaTeX will calculate the right numbering for the objects in the document; the ",[379,403,381],{}," you have used to label the object will not be shown anywhere in the document. Instead, LaTeX will replace the string ",[374,406,407],{},"\\ref{marker}"," with the right number that was assigned to the object. If you reference a ",[379,410,381],{}," that does not exist, the compilation of the document will be successful but LaTeX will return a warning:",[413,414,420],"pre",{"className":415,"code":417,"language":418,"meta":419},[416],"language-text","LaTeX Warning: There were undefined references.\n","text","",[374,421,417],{"__ignoreMap":419},[361,423,424,425,428],{},"and it will replace ",[374,426,427],{},"\\ref{unknown-marker}"," with \"??\" — so that it will be easier to find in the document.",[361,430,431,432,435],{},"As you may have noticed, this way of cross-referencing is a two-step process: first the compiler has to store the labels with the right number to be used for referencing, then it has to replace the ",[374,433,434],{},"\\ref"," with the right number.",[361,437,438],{},"Because of that, you would have to compile your document twice to see the output with the proper numbering. If you only compile it once, then LaTeX will use the older information collected in previous compilations (which might be outdated), and the compiler will inform you by printing the following message at the end of the compilation:",[413,440,443],{"className":441,"code":442,"language":418,"meta":419},[416],"LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.\n",[374,444,442],{"__ignoreMap":419},[361,446,447,448,451],{},"Using the command ",[374,449,450],{},"\\pageref{}"," you can help the reader to find the referenced object by providing also the page number where it can be found. You could write something like:",[413,453,457],{"className":454,"code":455,"language":456,"meta":419,"style":419},"language-latex shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","See figure~\\ref{fig:test} on page~\\pageref{fig:test}.\n","latex",[374,458,459],{"__ignoreMap":419},[460,461,464],"span",{"class":462,"line":463},"line",1,[460,465,455],{},[361,467,468,469,472,473,476],{},"Since you can use exactly the same commands to reference almost anything, you might get a bit confused after you have introduced a lot of references. It is common practice among LaTeX users to add a few letters to the label to describe ",[379,470,471],{},"what"," you are referencing. Some packages, such as ",[374,474,475],{},"fancyref",", rely on this meta information. Here is an example:",[478,479,480,493],"table",{},[481,482,483],"thead",{},[484,485,486,490],"tr",{},[487,488,489],"th",{},"Prefix",[487,491,492],{},"Used for",[494,495,496,507,517,527,537,546,556,566,576,586],"tbody",{},[484,497,498,504],{},[499,500,501],"td",{},[374,502,503],{},"ch:",[499,505,506],{},"chapter",[484,508,509,514],{},[499,510,511],{},[374,512,513],{},"sec:",[499,515,516],{},"section",[484,518,519,524],{},[499,520,521],{},[374,522,523],{},"subsec:",[499,525,526],{},"subsection",[484,528,529,534],{},[499,530,531],{},[374,532,533],{},"fig:",[499,535,536],{},"figure",[484,538,539,544],{},[499,540,541],{},[374,542,543],{},"tab:",[499,545,478],{},[484,547,548,553],{},[499,549,550],{},[374,551,552],{},"eq:",[499,554,555],{},"equation",[484,557,558,563],{},[499,559,560],{},[374,561,562],{},"lst:",[499,564,565],{},"code listing",[484,567,568,573],{},[499,569,570],{},[374,571,572],{},"itm:",[499,574,575],{},"enumerated list item",[484,577,578,583],{},[499,579,580],{},[374,581,582],{},"alg:",[499,584,585],{},"algorithm",[484,587,588,593],{},[499,589,590],{},[374,591,592],{},"app:",[499,594,595],{},"appendix subsection",[361,597,598,599,602,603,606],{},"Following this convention, the label of a figure will look like ",[374,600,601],{},"\\label{fig:*my_figure*}",", etc. You are not obligated to use these prefixes, and can in fact use any string as an argument of ",[374,604,605],{},"\\label{...}",", but these prefixes can become increasingly useful as your document grows in size.",[361,608,609,610,612],{},"Another suggestion: try to avoid using numbers within labels. You are better off describing ",[379,611,471],{}," the object is about. This way, if you change the order of the objects, you will not have to rename all your labels and their references.",[361,614,615,616,619,620,624],{},"If you want to be able to see the markers you are using in the output document as well, you can use the ",[374,617,618],{},"showkeys"," package; this can become very useful as you develop your document. For more information see the ",[621,622,623],"a",{"href":337},"Packages"," section.",[357,626,628],{"id":627},"examples","Examples",[361,630,631],{},"Here are some practical examples, but you will notice that they are all the same because they all use the same commands.",[633,634,636],"h3",{"id":635},"sections","Sections",[413,638,640],{"className":454,"code":639,"language":456,"meta":419,"style":419},"\\section{Greetings}\n\\label{sec:greetings}\n\nHello!\n\n\\section{Referencing}\n\nI greeted in section~\\ref{sec:greetings}.\n",[374,641,642,647,653,660,666,671,677,682],{"__ignoreMap":419},[460,643,644],{"class":462,"line":463},[460,645,646],{},"\\section{Greetings}\n",[460,648,650],{"class":462,"line":649},2,[460,651,652],{},"\\label{sec:greetings}\n",[460,654,656],{"class":462,"line":655},3,[460,657,659],{"emptyLinePlaceholder":658},true,"\n",[460,661,663],{"class":462,"line":662},4,[460,664,665],{},"Hello!\n",[460,667,669],{"class":462,"line":668},5,[460,670,659],{"emptyLinePlaceholder":658},[460,672,674],{"class":462,"line":673},6,[460,675,676],{},"\\section{Referencing}\n",[460,678,680],{"class":462,"line":679},7,[460,681,659],{"emptyLinePlaceholder":658},[460,683,685],{"class":462,"line":684},8,[460,686,687],{},"I greeted in section~\\ref{sec:greetings}.\n",[361,689,690,691,694,695,697,698,704],{},"You could place the label anywhere in the section; however, in order to avoid confusion, it is better to place it immediately after the ",[379,692,693],{},"beginning"," of the section. Note how the marker starts with ",[379,696,513],{},", as suggested before. The label is then referenced in a different section, where the tilde (~) indicates a ",[621,699,703],{"href":700,"rel":701},"https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FNon-breaking_space",[702],"nofollow","non-breaking space",".",[633,706,708],{"id":707},"pictures","Pictures",[361,710,711,712,714],{},"You can reference a picture by inserting it in the ",[374,713,536],{}," floating environment.",[413,716,718],{"className":454,"code":717,"language":456,"meta":419,"style":419},"\\begin{figure}\n  \\centering\n    \\includegraphics[width=0.5\\textwidth]{gull}\n  \\caption{Close-up of a gull}\n  \\label{fig:gull}\n\\end{figure}\nFigure~\\ref{fig:gull} shows a photograph of a gull.\n",[374,719,720,725,730,735,740,745,750],{"__ignoreMap":419},[460,721,722],{"class":462,"line":463},[460,723,724],{},"\\begin{figure}\n",[460,726,727],{"class":462,"line":649},[460,728,729],{},"  \\centering\n",[460,731,732],{"class":462,"line":655},[460,733,734],{},"    \\includegraphics[width=0.5\\textwidth]{gull}\n",[460,736,737],{"class":462,"line":662},[460,738,739],{},"  \\caption{Close-up of a gull}\n",[460,741,742],{"class":462,"line":668},[460,743,744],{},"  \\label{fig:gull}\n",[460,746,747],{"class":462,"line":673},[460,748,749],{},"\\end{figure}\n",[460,751,752],{"class":462,"line":679},[460,753,754],{},"Figure~\\ref{fig:gull} shows a photograph of a gull.\n",[361,756,757,758,761,762,765,766,769],{},"When a label is declared within a float environment, the ",[374,759,760],{},"\\ref{...}"," will return the respective figure\u002Ftable number, but it must occur ",[379,763,764],{},"after"," the caption. When declared outside, it will give the section number. To be completely safe, the label for any picture or table can go within the ",[374,767,768],{},"\\caption{}"," command, as follows:",[413,771,773],{"className":454,"code":772,"language":456,"meta":419,"style":419},"\\caption{Close-up of a gull\\label{fig:gull} }\n",[374,774,775],{"__ignoreMap":419},[460,776,777],{"class":462,"line":463},[460,778,772],{},[361,780,781,782,784,785,787],{},"For more, see the ",[621,783,120],{"href":121}," section about the ",[374,786,536],{}," and related environments.",[789,790,792],"h4",{"id":791},"fixing-wrong-labels","Fixing wrong labels",[361,794,795,796,799,800,803],{},"The command ",[374,797,798],{},"\\label"," must appear after (or inside) ",[374,801,802],{},"\\caption",". Otherwise, it will pick up the current section or the list number instead of what is intended.",[413,805,807],{"className":454,"code":806,"language":456,"meta":419,"style":419},"\\begin{figure}\n  \\centering\n  \\includegraphics[width=0.5\\textwidth]{gull}\n  \\caption{Close-up of a gull} \\label{fig:gull} \n\\end{figure}\n",[374,808,809,813,817,822,827],{"__ignoreMap":419},[460,810,811],{"class":462,"line":463},[460,812,724],{},[460,814,815],{"class":462,"line":649},[460,816,729],{},[460,818,819],{"class":462,"line":655},[460,820,821],{},"  \\includegraphics[width=0.5\\textwidth]{gull}\n",[460,823,824],{"class":462,"line":662},[460,825,826],{},"  \\caption{Close-up of a gull} \\label{fig:gull} \n",[460,828,829],{"class":462,"line":668},[460,830,749],{},[789,832,834,835],{"id":833},"issues-with-links-to-tables-and-figures-handled-by-hyperref","Issues with links to tables and figures handled by ",[621,836,837],{"href":209},"hyperref",[361,839,840,841,843,844,847,848,851],{},"In case you use the package ",[374,842,837],{}," to create a PDF, the link to a table or a figure will point to its caption instead, which is always below the table or the figure itself. As a result, the table or the figure will not be visible if it is above the pointer, which means that some scrolling-up would be required. If you want the link to point to the top of the image, you can give the option ",[374,845,846],{},"hypcap"," to the ",[374,849,850],{},"caption"," package:",[413,853,855],{"className":454,"code":854,"language":456,"meta":419,"style":419},"\\usepackage{caption} % hypcap is true by default so [hypcap=true] is optional in \\usepackage[hypcap=true]{caption} \n",[374,856,857],{"__ignoreMap":419},[460,858,859],{"class":462,"line":463},[460,860,861],{},"\\usepackage{caption} % hypcap is true by default so [hypcap=true] is optional in \\usepackage[hypcap=true]{caption}\n",[633,863,865],{"id":864},"formulae","Formulae",[361,867,868],{},"Here is an example showing how to reference formulae:",[413,870,872],{"className":454,"code":871,"language":456,"meta":419,"style":419},"\\begin{equation} \\label{eq:solve}\nx^2 - 5 x + 6 = 0\n\\end{equation}\n\n\\begin{equation}\nx_1 = \\frac{5 + \\sqrt{25 - 4 \\times 6}}{2} = 3\n\\end{equation}\n\n\\begin{equation}\nx_2 = \\frac{5 - \\sqrt{25 - 4 \\times 6}}{2} = 2\n\\end{equation}\n\nand so we have solved equation~\\eqref{eq:solve}\n",[374,873,874,879,884,889,893,898,903,907,911,916,922,927,932],{"__ignoreMap":419},[460,875,876],{"class":462,"line":463},[460,877,878],{},"\\begin{equation} \\label{eq:solve}\n",[460,880,881],{"class":462,"line":649},[460,882,883],{},"x^2 - 5 x + 6 = 0\n",[460,885,886],{"class":462,"line":655},[460,887,888],{},"\\end{equation}\n",[460,890,891],{"class":462,"line":662},[460,892,659],{"emptyLinePlaceholder":658},[460,894,895],{"class":462,"line":668},[460,896,897],{},"\\begin{equation}\n",[460,899,900],{"class":462,"line":673},[460,901,902],{},"x_1 = \\frac{5 + \\sqrt{25 - 4 \\times 6}}{2} = 3\n",[460,904,905],{"class":462,"line":679},[460,906,888],{},[460,908,909],{"class":462,"line":684},[460,910,659],{"emptyLinePlaceholder":658},[460,912,914],{"class":462,"line":913},9,[460,915,897],{},[460,917,919],{"class":462,"line":918},10,[460,920,921],{},"x_2 = \\frac{5 - \\sqrt{25 - 4 \\times 6}}{2} = 2\n",[460,923,925],{"class":462,"line":924},11,[460,926,888],{},[460,928,930],{"class":462,"line":929},12,[460,931,659],{"emptyLinePlaceholder":658},[460,933,935],{"class":462,"line":934},13,[460,936,937],{},"and so we have solved equation~\\eqref{eq:solve}\n",[361,939,940,941,943,944,946,947,950],{},"Here, notice the ",[379,942,552],{}," prefix in the label — and that the label is placed soon after the beginning of the math mode. To reference a formula, an environment with counter would have to be used. Most of the times, you will be using the ",[374,945,555],{}," environment, as that's usually the best choice for one-line formulae whether you are using ",[374,948,949],{},"amsmath"," or not.",[789,952,954],{"id":953},"eqref",[374,955,953],{},[361,957,958,959,961,962,965,966,969,970,973,974,977,978,980],{},"The ",[374,960,949],{}," package adds a new command for referencing formulae; it is ",[374,963,964],{},"\\eqref{}",". It works exactly like ",[374,967,968],{},"\\ref{}",", but adds parentheses so that instead of printing a plain number as ",[379,971,972],{},"5",", it will print ",[379,975,976],{},"(5)",". This can be useful to help the reader distinguish between formulae and other things, without the need to repeat the word \"formula\" before any reference. Its output can be changed as desired; for more information see the ",[374,979,949],{}," documentation.",[789,982,984],{"id":983},"tag",[374,985,983],{},[361,987,958,988,991,992,995,996,999],{},[374,989,990],{},"\\tag{*eqnno*}"," command is used to manually set equation numbers, where ",[379,993,994],{},"eqnno"," is the text string you want to display instead of the usual equation number.  It is normally better to use labels, but sometimes hard-coded equation numbers might offer a useful work-around — such as the case where you want to repeat an equation that has already been used before (e.g. ",[374,997,998],{},"\\tag{\\ref{eqn:before} }",").",[789,1001,1003],{"id":1002},"numberwithin",[374,1004,1002],{},[361,1006,958,1007,1009,1010,1013,1014,1017,1018,1021,1022,1025],{},[374,1008,949],{}," package adds the ",[374,1011,1012],{},"\\numberwithin{countera}{counterb}"," command, which replaces the simple ",[374,1015,1016],{},"countera"," with a more sophisticated\n",[374,1019,1020],{},"counterb.countera",".  For example, ",[374,1023,1024],{},"\\numberwithin{equation}{section}"," in the preamble will prepend the section number to all equation numbers.",[789,1027,1029],{"id":1028},"cases",[374,1030,1028],{},[361,1032,958,1033,1009,1035,1038,1039,1042],{},[374,1034,1028],{},[374,1036,1037],{},"\\numcases"," and the ",[374,1040,1041],{},"\\subnumcases"," commands, which produce multi-case equations with a separate equation number and a separate equation number plus a letter, respectively, for each case.",[357,1044,958,1046,1049],{"id":1045},"the-varioref-package",[374,1047,1048],{},"varioref"," package",[361,1051,958,1052,1054,1055,1058,1059,1061,1062,1064],{},[374,1053,1048],{}," package introduces a new command called ",[374,1056,1057],{},"\\vref{}",". This command is used exactly like the basic ",[374,1060,434],{},", but it has a different output according to the context. If the object to be referenced is in the same page, it works just like ",[374,1063,434],{},"; if the object is far away, it will print something like \"5 on page 25\", i.e. it adds the page number automatically. If the object is close, it can use more refined sentences such as \"on the next page\" or \"on the facing page\" automatically — according to the context and the document class.",[361,1066,1067],{},"This command has to be used very carefully. It outputs more than one word, so it may happen that its output falls on two different pages. In this case, the algorithm can get confused and cause a loop.",[361,1069,1070,1071,1074,1075,1078,1079,1082],{},"For example, you could label an object on page 23 and the ",[374,1072,1073],{},"\\vref"," output could happen to stay between page 23 and 24. If it were on page 23, it would print like the basic ",[374,1076,1077],{},"ref",", if it were on page 24, it would print \"on the previous page\", but it is on ",[379,1080,1081],{},"both",", and this may cause some strange errors at compiling time that could be very difficult to fix.",[361,1084,1085,1086,1088,1089,1092],{},"And while for small documents, these situations might happen very rarely, for long documents spanning hundreds of references, these situations are more likely to happen. One way to avoid these problems during document preparation is to use the standard ",[374,1087,1077],{}," all the way through at first, convert all to ",[374,1090,1091],{},"vref"," when the document is close to its final version — before making the adjustment to fix any possible problem.",[357,1094,958,1096,1049],{"id":1095},"the-hyperref-package",[374,1097,837],{},[633,1099,1101],{"id":1100},"autoref",[374,1102,1100],{},[361,1104,958,1105,1107,1108,1111,1112,1115,1116,1119,1120,1125,1126,1129,1130,1133,1134,1137],{},[621,1106,837],{"href":209}," package introduces another useful command; ",[374,1109,1110],{},"\\autoref{}",". This command creates a reference with additional text corresponding to the target's type, all of which will be a hyperlink.  For example, the command ",[374,1113,1114],{},"\\autoref{sec:intro}"," would create a hyperlink to the ",[374,1117,1118],{},"\\label{sec:intro}"," command, wherever it is. Assuming that this label is pointing to a section, the hyperlink would contain the text \"section 3.4\", or similar (the full list of default names can be found ",[621,1121,1124],{"href":1122,"rel":1123},"https:\u002F\u002Fmirrors.ctan.org\u002Fmacros\u002Flatex\u002Fcontrib\u002Fhyperref\u002Fdoc\u002Fhyperref-doc.html#TBL-28",[702],"here","). Note that, while there's an ",[374,1127,1128],{},"\\autoref*"," command that produces an unlinked prefix (useful if the label is on the same page as the reference), no alternative ",[374,1131,1132],{},"\\Autoref"," command is defined to produce capitalized versions (useful, for instance, when starting sentences); but since the capitalization of autoref names was chosen by the package author, you can customize the prefixed text by redefining ",[374,1135,1136],{},"\\*type*autorefname"," to the prefix you want, as in:",[413,1139,1141],{"className":454,"code":1140,"language":456,"meta":419,"style":419},"\\def\\sectionautorefname{Section}\n",[374,1142,1143],{"__ignoreMap":419},[460,1144,1145],{"class":462,"line":463},[460,1146,1140],{},[361,1148,1149],{},"This renaming trick can, of course, be used for other purposes as well.",[365,1151,1152,1165],{},[368,1153,1154,1155,1157,1158,1161,1162,1164],{},"If you would like to have a hyperlink reference without the predefined text ",[374,1156,1110],{}," provides, then you change this with a command such as ",[374,1159,1160],{},"\\hyperref[sec:intro]{Appendix~\\ref*{sec:intro} }",". Note that you can disable the creation of hyperlinks in ",[374,1163,837],{},", and just use these commands for automatic text.",[368,1166,1167,1168,1171,1172,1176],{},"Keep in mind that the \\label ",[379,1169,1170],{},"must"," be placed inside an environment with a counter, such as a table or a figure. Otherwise, not only will the number refer to the current section (as mentioned ",[621,1173,1175],{"href":1174},"#fixing-wrong-labels","above","), but the name might refer to the previous environment with a counter as well. For example, if you put a label after closing a figure, the label will still say \"figure n\", on which n is the current section number.",[633,1178,1180],{"id":1179},"nameref",[374,1181,1179],{},[361,1183,958,1184,1186,1187,1189,1190,1192],{},[374,1185,837],{}," package also automatically includes the ",[374,1188,1179],{}," package, and a similarly named command.  It is similar to ",[374,1191,1110],{},", but inserts text corresponding to the section name, for example.",[361,1194,1195],{},"Input:",[413,1197,1199],{"className":454,"code":1198,"language":456,"meta":419,"style":419},"\\section{MyFirstSection} \\label{sec:marker}\n\\section{MySecondSection}\nIn section~\\nameref{sec:marker} we defined...\n",[374,1200,1201,1206,1211],{"__ignoreMap":419},[460,1202,1203],{"class":462,"line":463},[460,1204,1205],{},"\\section{MyFirstSection} \\label{sec:marker}\n",[460,1207,1208],{"class":462,"line":649},[460,1209,1210],{},"\\section{MySecondSection}\n",[460,1212,1213],{"class":462,"line":655},[460,1214,1215],{},"In section~\\nameref{sec:marker} we defined...\n",[361,1217,1218],{},"Output:",[361,1220,1221],{},"In section MyFirstSection we defined...",[633,1223,1225],{"id":1224},"anchor-manual-positioning","Anchor manual positioning",[361,1227,1228,1229,1231,1232,1234,1235,1238],{},"When you define a ",[374,1230,798],{}," outside a figure, a table, or other floating objects, the label points to the current section. In some cases, this behavior is not what you'd like and you'd prefer the generated link to point to the line where the ",[374,1233,798],{}," is defined. This can be achieved with the command\n",[374,1236,1237],{},"\\phantomsection"," as in this example:",[413,1240,1242],{"className":454,"code":1241,"language":456,"meta":419,"style":419},"%The link location will be placed on the line below.\n\\phantomsection\n\\label{the_label}\n",[374,1243,1244,1249,1254],{"__ignoreMap":419},[460,1245,1246],{"class":462,"line":463},[460,1247,1248],{},"%The link location will be placed on the line below.\n",[460,1250,1251],{"class":462,"line":649},[460,1252,1253],{},"\\phantomsection\n",[460,1255,1256],{"class":462,"line":655},[460,1257,1258],{},"\\label{the_label}\n",[357,1260,958,1262,1049],{"id":1261},"the-cleveref-package",[374,1263,1264],{},"cleveref",[361,1266,958,1267,1269,1270,1273,1274,1276,1277,1280,1281,1283,1284,1287],{},[374,1268,1264],{}," package introduces the new command ",[374,1271,1272],{},"\\cref{}"," which includes the type of referenced object like ",[374,1275,1110],{}," does. The alternate ",[374,1278,1279],{},"\\labelcref{}"," command works more like standard ",[374,1282,968],{},". References to pages are handled by the ",[374,1285,1286],{},"\\cpageref{}"," command.",[365,1289,1290,1305,1314],{},[368,1291,1292,1293,1296,1297,1300,1301,1304],{},"Use  ",[374,1294,1295],{},"\\crefrange{}{}"," and ",[374,1298,1299],{},"\\cpagerefrange{}"," commands for start and end label in either order and to provide a natural language (",[374,1302,1303],{},"babel"," enabled) range.",[368,1306,1307,1308,1310,1311,704],{},"Use ",[374,1309,1272],{}," command for multiple or single references (on single line), it will sort them and group into ranges automatically in very convenient format like ",[374,1312,1313],{}," item 2 to 4 and 6 to 19.",[368,1315,1307,1316,1318,1319,1322],{},[374,1317,1279],{},"  where the numbers would be a references to the labels and ",[460,1320,1321],{},"sorted"," output as in previous paragraph",[361,1324,1325],{},"The format can be specified in the preamble.",[357,1327,1329,1330,1332,1333,1335,1336],{"id":1328},"interpackage-interactions-for-varioref-hyperref-and-cleveref","Interpackage interactions for ",[374,1331,1048],{}," , ",[374,1334,837],{}," , and ",[374,1337,1264],{},[361,1339,1340,1341,1343,1344,1346,1347,1349,1350,1353,1354,1343,1356,1358,1359,1361,1362,1364],{},"Because ",[374,1342,1048],{},",",[374,1345,837],{},", and ",[374,1348,1264],{}," redefine the same commands, they can produce unexpected results when their ",[374,1351,1352],{},"\\usepackage"," commands appear in the preamble in the wrong order.  For example, using ",[374,1355,837],{},[374,1357,1048],{},", then ",[374,1360,1264],{}," can cause ",[374,1363,1057],{}," to fail as though the marker were undefined.  The following order generally seems to work:",[1366,1367,1368,1372,1376],"ol",{},[368,1369,1370],{},[374,1371,1048],{},[368,1373,1374],{},[374,1375,837],{},[368,1377,1378],{},[374,1379,1264],{},[357,1381,1383],{"id":1382},"see-also","See also",[365,1385,1386],{},[368,1387,1388],{},[621,1389,1390],{"href":195},"LaTeX\u002FGlossary",[357,1392,1394],{"id":1393},"notes-and-references","Notes and References",[1396,1397,1398],"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);}",{"title":419,"searchDepth":649,"depth":649,"links":1400},[1401,1402,1407,1409,1415,1417,1419,1420],{"id":359,"depth":649,"text":11},{"id":627,"depth":649,"text":628,"children":1403},[1404,1405,1406],{"id":635,"depth":655,"text":636},{"id":707,"depth":655,"text":708},{"id":864,"depth":655,"text":865},{"id":1045,"depth":649,"text":1408},"The varioref package",{"id":1095,"depth":649,"text":1410,"children":1411},"The hyperref package",[1412,1413,1414],{"id":1100,"depth":655,"text":1100},{"id":1179,"depth":655,"text":1179},{"id":1224,"depth":655,"text":1225},{"id":1261,"depth":649,"text":1416},"The cleveref package",{"id":1328,"depth":649,"text":1418},"Interpackage interactions for varioref , hyperref , and cleveref",{"id":1382,"depth":649,"text":1383},{"id":1393,"depth":649,"text":1394},"Automatic cross-referencing of equations, sections, figures, and tables in LaTeX.","md",null,{},{"title":204,"description":1421},"Ujm8SBTKS3vUg7RhubIPLBEc-594xQgnGPqM65bZgK0",[1428,1430],{"title":194,"path":195,"stem":196,"description":1429,"children":-1},"How to create glossaries and manage acronyms in LaTeX documents using the glossaries package.",{"title":208,"path":209,"stem":210,"description":1431,"children":-1},"How to handle external hyperlinks, URLs, and PDF bookmarks in LaTeX using the hyperref package.",1785155510753]