Projekt

Allgemein

Profil

Figures » Historie » Version 3

Martin Kraetke, 22.12.2021 16:36

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
* @\tpCaption{}@ Caption
45
* @\tpSource{}@ Source 
46
* @\tpLegend{}@ Additional caption
47
* @\tpNumber{}@ Override for automatic numbering, should include prefix eg. "Fig. 10", "Figure 1.2" etc.
48
* @\tpFig{}@ Reference to the image file @\includegraphics[<options>]{<path>}@
49
50
h4. Two-column
51
52 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. 
53 1 Martin Kraetke
54 2 Martin Kraetke
An example for an image with page width
55
56 1 Martin Kraetke
<pre><code class="text">
57
\begin{tpFigure*}[<options>]
58
59
\end{tpFigure*}
60
</code></pre>
61
62 2 Martin Kraetke
Without the asterisk (@*@), the image would be placed in a single column. The other parameters are identical to one-column figures.
63
64 3 Martin Kraetke
h3. Complex Figures
65 1 Martin Kraetke
66 3 Martin Kraetke
h4. Multiple Figures with one caption
67 1 Martin Kraetke
68
<pre><code class="text">
69
\begin{tpFigure}
70
  \tpCaption{<caption>}
71 3 Martin Kraetke
  \tpLegend{<legend>}
72 1 Martin Kraetke
  \tpSource{<source>}
73 3 Martin Kraetke
  \tpNumber{<counter>}
74 1 Martin Kraetke
  \begin{tpSubFloat}
75 3 Martin Kraetke
    \tpFig{\includegraphics[<options>]{<path>}}
76 1 Martin Kraetke
  \end{tpSubFloat}
77
  \begin{tpSubFloat}
78 3 Martin Kraetke
    \tpFig{\includegraphics[<options>]{<path>}}
79 1 Martin Kraetke
  \end{tpSubFloat}
80
\end{tpFigure}
81
</code></pre>
82
83 3 Martin Kraetke
h4. Multiple figures with separate captions
84 1 Martin Kraetke
85
<pre><code class="text">
86
\begin{tpFigure}
87
  \begin{tpSubFloat}
88
    \tpCaption{<caption>}
89 3 Martin Kraetke
    \tpLegend{<legend>}
90 1 Martin Kraetke
    \tpSource{<source>}
91 3 Martin Kraetke
    \tpNumber{<counter>}
92
    \tpFig{\includegraphics[<optionen>]{<path>}}
93 1 Martin Kraetke
  \end{tpSubFloat}
94
  \begin{tpSubFloat}
95
    \tpCaption{<caption>}
96 3 Martin Kraetke
    \tpLegend{<legende>}
97 1 Martin Kraetke
    \tpSource{<source>}
98 3 Martin Kraetke
    \tpNumber{<counter>}
99 1 Martin Kraetke
    \tpFig{\includegraphics[<optionen>]{<pfad>}}
100
  \end{tpSubFloat}
101
\end{tpFigure}
102
</code></pre>