Projekt

Allgemein

Profil

Figures » Historie » Version 4

Maren Pufe, 12.01.2022 11:16

1 1 Martin Kraetke
h1. Figures
2
3
{{toc}}
4
5
h2. TeX Fundamentals
6
7
The following image formats are not supported by TeX and must be converted to PDF or PNG in a discrete image conversion.
8
9
* @.tif@, @.tiff@
10
* @.svg@
11
12
The image formats below are supported by TeX and should be used.
13
14
* @.jpg@, @.jpeg@
15
* @.pdf@
16
* @.png@
17
* @.eps@
18
19
h2. Images in transpect-tex framework ("transpect-floats.dtx":https://gitlab.le-tex.de/transpect-tex/transpect-tex/-/blob/master/src/transpect-floats.dtx)
20
21
h3. Individual images
22
23
h4. Single-column
24
25
<pre><code class="text">
26
\begin{tpFigure}[<options>]
27
  \tpCaption{<caption>}
28
  \tpSource{<source>}
29
  \tpLegend{<additional caption>}
30
  \tpNumber{<number override>}
31
  \tpFig{\includegraphics[<options>]{<path to image>}}
32
\end{tpFigure}
33
</code></pre>
34
35
* @<options>@ comma-separated list of key-value pairs. The syntax is @<attribute>=<value>@ or @<attribute>={<value>}@, if @<value>@ contains "@=@" or "@,@" (optional):
36
** @float-pos@
37
*** if the attribute is missing or @<value>@ is empty, the image is fixed to the location in the text (not floating)
38
*** t top
39
*** b bottom
40
*** h if image fits to the page, its placed non-floating otherwise top on the next page
41
*** p image is placed on a blank page
42
** @class@
43
*** layout class of the float object
44 4 Maren Pufe
** nolist
45
*** If "@nolist@" is set the figure will not appear in list of figures (\listoffigures)
46 1 Martin Kraetke
* @\tpCaption{}@ Caption
47
* @\tpSource{}@ Source 
48
* @\tpLegend{}@ Additional caption
49
* @\tpNumber{}@ Override for automatic numbering, should include prefix eg. "Fig. 10", "Figure 1.2" etc.
50
* @\tpFig{}@ Reference to the image file @\includegraphics[<options>]{<path>}@
51
52
h4. Two-column
53
54 2 Martin Kraetke
If a floating object should span over two columns in the two-column sentence, an asterisk @*@ is added to the end of the environment name. The @float-pos@ attribute must then also be specified (and must not be empty), since two-column objects always are float objects in TeX. 
55 1 Martin Kraetke
56 2 Martin Kraetke
An example for an image with page width
57
58 1 Martin Kraetke
<pre><code class="text">
59
\begin{tpFigure*}[<options>]
60
61
\end{tpFigure*}
62
</code></pre>
63
64 2 Martin Kraetke
Without the asterisk (@*@), the image would be placed in a single column. The other parameters are identical to one-column figures.
65
66 3 Martin Kraetke
h3. Complex Figures
67 1 Martin Kraetke
68 3 Martin Kraetke
h4. Multiple Figures with one caption
69 1 Martin Kraetke
70
<pre><code class="text">
71
\begin{tpFigure}
72
  \tpCaption{<caption>}
73 3 Martin Kraetke
  \tpLegend{<legend>}
74 1 Martin Kraetke
  \tpSource{<source>}
75 3 Martin Kraetke
  \tpNumber{<counter>}
76 1 Martin Kraetke
  \begin{tpSubFloat}
77 3 Martin Kraetke
    \tpFig{\includegraphics[<options>]{<path>}}
78 1 Martin Kraetke
  \end{tpSubFloat}
79
  \begin{tpSubFloat}
80 3 Martin Kraetke
    \tpFig{\includegraphics[<options>]{<path>}}
81 1 Martin Kraetke
  \end{tpSubFloat}
82
\end{tpFigure}
83
</code></pre>
84
85 3 Martin Kraetke
h4. Multiple figures with separate captions
86 1 Martin Kraetke
87
<pre><code class="text">
88
\begin{tpFigure}
89
  \begin{tpSubFloat}
90
    \tpCaption{<caption>}
91 3 Martin Kraetke
    \tpLegend{<legend>}
92 1 Martin Kraetke
    \tpSource{<source>}
93 3 Martin Kraetke
    \tpNumber{<counter>}
94
    \tpFig{\includegraphics[<optionen>]{<path>}}
95 1 Martin Kraetke
  \end{tpSubFloat}
96
  \begin{tpSubFloat}
97
    \tpCaption{<caption>}
98 3 Martin Kraetke
    \tpLegend{<legende>}
99 1 Martin Kraetke
    \tpSource{<source>}
100 3 Martin Kraetke
    \tpNumber{<counter>}
101 1 Martin Kraetke
    \tpFig{\includegraphics[<optionen>]{<pfad>}}
102
  \end{tpSubFloat}
103
\end{tpFigure}
104
</code></pre>