2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-25 14:28:05 +02:00

added subfig package example

This commit is contained in:
Martin Thoma 2014-08-25 12:57:56 -04:00
parent 67feb2890d
commit e11b547ee7
5 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,9 @@
SOURCE = side-by-side-subfig
make:
pdflatex $(SOURCE).tex -output-format=pdf
pdflatex $(SOURCE).tex -output-format=pdf
make clean
clean:
rm -rf $(TARGET) *.class *.html *.log *.aux *.out *.ind *.idx *.ilg *.toc *.bbl *.blg *.pyg

View file

@ -0,0 +1,2 @@
The [`subfig`](http://www.ctan.org/pkg/subfig) package is the way to go
when you want to use multiple images side by side.

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 658 KiB

View file

@ -0,0 +1,36 @@
\documentclass[a4paper]{scrreprt}
\usepackage{graphicx}
\usepackage{subfig}
\begin{document}
\chapter{Your Chapter}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
erat, sed diam voluptua. At vero eos et accusam et justo duo dolores
et ea
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam
et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea
takimata sanctus est Lorem ipsum dolor sit amet.
\begin{figure}[ht]
\centering
\subfloat[South American coati]{
\includegraphics[width=0.45\textwidth]{YourImage.jpg}
\label{fig:nasua}
}%
\subfloat[Brown bear]{
\includegraphics[width=0.45\textwidth]{Ursus-arctos.jpg}
\label{fig:Ursus-arctos}
}
\label{fig:formen}
\caption{Bears}
\end{figure}
You can now see that a Nasua nasua in figure \ref{fig:nasua} and a Ursus-arctos
in figure \ref{fig:Ursus-arctos}. Note that you have to run LaTeX twice and
don't delete intermediate files when you want to use ref.
\end{document}