mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-25 06:18:05 +02:00
added subfig package example
This commit is contained in:
parent
67feb2890d
commit
e11b547ee7
5 changed files with 47 additions and 0 deletions
9
images/side-by-side-subfig/Makefile
Normal file
9
images/side-by-side-subfig/Makefile
Normal 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
|
2
images/side-by-side-subfig/README.md
Normal file
2
images/side-by-side-subfig/README.md
Normal 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.
|
BIN
images/side-by-side-subfig/Ursus-arctos.jpg
Normal file
BIN
images/side-by-side-subfig/Ursus-arctos.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 112 KiB |
BIN
images/side-by-side-subfig/YourImage.jpg
Normal file
BIN
images/side-by-side-subfig/YourImage.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 658 KiB |
36
images/side-by-side-subfig/side-by-side-subfig.tex
Normal file
36
images/side-by-side-subfig/side-by-side-subfig.tex
Normal 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}
|
Loading…
Add table
Add a link
Reference in a new issue