You are here: Home » bit literacy » Accurate, easy labeling for LaTeX references

Accurate, easy labeling for LaTeX references

by David M. Doolin, PhD on July 11, 2007

Consider the following:

\begin{figure}
   \begin{center}
      \includegraphics[width=4.5in]{figs/flight_setheight.pdf}
      \caption{Computational flow for computing stairs.  
                  This case represents the actions on 
                  creating a new flight of stairs.}
      \label{fig:flight_setheight}
   \end{center}
\end{figure}

Bit literate labels

The \label command is one key: it reflects the file name of the figure that will be displayed.

The other key is that the figure is named semantically. At the moment, this figure is displayed as “Figure 5,” which I am sure is going to change as I add figures to the document. With a semantically meaningful figure name, I can easily label and reference the figure without engaging in wasteful calisthentics of manual counting, grepping through the document, etc.

Tables, chapters, sections, etc.

I do it this way:

\label{tab:some_table}
\label{sec:some_section}
\label{chap:some_chapter}

You get the idea.

Share and Enjoy:
  • Digg
  • StumbleUpon
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • TwitThis

{ 1 trackback }

Writing For Readers --- Types of content for blog posts | Website In A Weekend
May 29, 2009 at 7:32 pm

{ 0 comments… add one now }

Leave a Comment

CommentLuv Enabled