{"id":1479,"date":"2010-12-15T15:45:12","date_gmt":"2010-12-15T15:45:12","guid":{"rendered":"http:\/\/jodischneider.com\/blog\/?p=1479"},"modified":"2010-12-15T15:45:12","modified_gmt":"2010-12-15T15:45:12","slug":"for-latex-referencing-glitches-check-the-label-location","status":"publish","type":"post","link":"https:\/\/jodischneider.com\/blog\/2010\/12\/15\/for-latex-referencing-glitches-check-the-label-location\/","title":{"rendered":"For LaTeX referencing glitches, check the \\label location"},"content":{"rendered":"<p>Problem: LaTeX gives the section number instead of the figure number in a text reference.<br \/>\nSolution: Be sure that the figure&#8217;s label is AFTER its caption.<\/p>\n<p>Correct:<br \/>\n<code><br \/>\n\\begin{figure}<br \/>\n\\includegraphics{.\/images\/myimage.png}<br \/>\n\\caption{A beautiful, wonderful image.}<br \/>\n\\label{fig:myimage}<br \/>\n\\end{figure}<br \/>\n<\/code><\/p>\n<p>Wrong:<br \/>\n<code><br \/>\n\\begin{figure}<br \/>\n\\includegraphics{.\/images\/myimage.png}<br \/>\n\\label{fig:myimage}<br \/>\n\\caption{A beautiful, wonderful image.}<br \/>\n\\end{figure}<br \/>\n<\/code><\/p>\n<p>LaTeX requires \\label to follow \\caption. That is, a \\label preceding a \\caption is ignored.<br \/>\nIf you&#8217;re getting section numbers instead of figure numbers as the response to a \\ref, check where the \\label is specified.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem: LaTeX gives the section number instead of the figure number in a text reference. Solution: Be sure that the figure&#8217;s label is AFTER its caption. Correct: \\begin{figure} \\includegraphics{.\/images\/myimage.png} \\caption{A beautiful, wonderful image.} \\label{fig:myimage} \\end{figure} Wrong: \\begin{figure} \\includegraphics{.\/images\/myimage.png} \\label{fig:myimage} \\caption{A beautiful, wonderful image.} \\end{figure} LaTeX requires \\label to follow \\caption. That is, a \\label preceding [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[174,96],"tags":[322,321,320,314,317,313,323,319,315,316],"class_list":["post-1479","post","type-post","status-publish","format-standard","hentry","category-phd-diary","category-random-thoughts","tag-caption","tag-label","tag-ref","tag-figures","tag-labels","tag-latex","tag-latex-ref","tag-latex-errors","tag-latex-figure-labelling","tag-latex-figures-with-section-names-as-labels"],"_links":{"self":[{"href":"https:\/\/jodischneider.com\/blog\/wp-json\/wp\/v2\/posts\/1479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jodischneider.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jodischneider.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jodischneider.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jodischneider.com\/blog\/wp-json\/wp\/v2\/comments?post=1479"}],"version-history":[{"count":7,"href":"https:\/\/jodischneider.com\/blog\/wp-json\/wp\/v2\/posts\/1479\/revisions"}],"predecessor-version":[{"id":1486,"href":"https:\/\/jodischneider.com\/blog\/wp-json\/wp\/v2\/posts\/1479\/revisions\/1486"}],"wp:attachment":[{"href":"https:\/\/jodischneider.com\/blog\/wp-json\/wp\/v2\/media?parent=1479"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jodischneider.com\/blog\/wp-json\/wp\/v2\/categories?post=1479"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jodischneider.com\/blog\/wp-json\/wp\/v2\/tags?post=1479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}