Generalfigures, content and referencing

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
omkardpd
Posts: 86
Joined: Sun Feb 24, 2008 7:23 am

figures, content and referencing

Post by omkardpd »

Hi,

I want to import a figure from a pdf file. The picture is in the landscape format in the original file, but it is getting inserted as a portrait. How do I code for landscape figure?

I want to label the figure and use it in referencing in the document. But \ref{figure name} command is not working.

I want to make a content list. Is it the case that content list is created automatically based on section, subsection, figure, table titles/captions etc? Or do I have to go through my document and type the titles and captions for making content list?

Thank you,

Omkar

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

figures, content and referencing

Post by localghost »

omkardpd wrote:[...] I want to import a figure from a pdf file. The picture is in the landscape format in the original file, but it is getting inserted as a portrait. How do I code for landscape figure? [...]
Landscape figure formats are provided by the rotating package. Some useful hints are given in epslatex. If all that doesn't help, provide your previous efforts in the sense of a minimal working example (MWE) and put the related graphics file in the attachment if necessary.
omkardpd wrote:[...] I want to label the figure and use it in referencing in the document. But \ref{figure name} command is not working. [...]
Labelling figures only works correctly when using a caption right in front of the label command.

Code: Select all

\begin{figure}[!ht]
  \centering
  \rule{6.4cm}{3.6cm}
  \caption{A dummy Figure}\label{fig:dummy}
\end{figure}
The \caption command creates some kind of anchor for the \label command like other commands do (mostly structuring commands like \chapter, \section, ...). If you don't get it work, again a MWE will help us to see what's going wrong.
omkardpd wrote:[...] I want to make a content list. Is it the case that content list is created automatically based on section, subsection, figure, table titles/captions etc? Or do I have to go through my document and type the titles and captions for making content list? [...]
Just use the \tableofcontents command where you want the output in your document. Note that you need at least two runs to get the correct Table of Contents (ToC). The compiler generates a .toc file in the first run and reads its contents in the second run to create the ToC. The same processes are needed for the List of Figures (LoF, command \listoffigures) and the List of Tables (LoT, command \listoftables).


Best regards
Thorsten
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

figures, content and referencing

Post by Stefan Kottwitz »

Hi Omkar,
omkardpd wrote:I want to import a figure from a pdf file. The picture is in the landscape format in the original file, but it is getting inserted as a portrait. How do I code for landscape figure?
I want to mention an alternative to Thorstens advice. You could use the pdflscape package and its landscape environment, for example:

Code: Select all

\usepackage{pdflscape}
...
\begin{landscape}
\begin{figure}[!ht]
  \centering
  \includegraphics{landscapepicture}
  \caption{test figure}\label{fig:test}
\end{figure}
\end{landscape}
Stefan
LaTeX.org admin
Post Reply