Skip to content

Commit 39a7b17

Browse files
committed
Default to inline instead of floating placement for figures and tables
1 parent 2fc6c69 commit 39a7b17

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

jacow.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@
339339
show list: set list(indent: 1em)
340340

341341
// figures
342-
show figure: set figure(placement: auto)
342+
//set figure(placement: auto) // default to floating figures
343343
show figure.where(placement: none): it => {
344344
// add a little spacing for inline figures and tables
345345
v(0.5em)

template/paper.typ

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ Floating figures can be added and their placement can be controlled easily like
103103

104104
#figure(
105105
image("writer.svg"),
106-
placement: bottom, // top, bottom or auto
106+
placement: bottom, // `top`, `bottom` or `auto` for floating placement or `none` for inline placement
107107
caption: [Scientific writing (AI artwork).],
108108
) <fig:writer>
109109

110110
For JACoW style tables, the `jacow-table` function is provided.
111-
It takes the column alignment as first argument (here `lcrl` means left, center, right, left), followed by the table contents. With `placement: none`, @table:xydata is forced to appear exactly "here".
111+
It takes the column alignment as first argument (here `lcrl` means left, center, right, left), followed by the table contents.
112112
The optional `header` argument allows to adjust the appearance of the JACoW table style as shown in @table:specs.
113113

114114
#figure(
@@ -118,7 +118,7 @@ The optional `header` argument allows to adjust the appearance of the JACoW tabl
118118
[2], [2.5], qty(3, "dm"), [Medium],
119119
[3], [18], qty(1.5, "m"), [*Large*],
120120
),
121-
placement: none, // top, bottom, auto or none
121+
//placement: none, // `top`, `bottom` or `auto` for floating placement or `none` for inline placement
122122
caption: [Dimensions],
123123
) <table:xydata>
124124

@@ -131,7 +131,7 @@ The optional `header` argument allows to adjust the appearance of the JACoW tabl
131131
[Cells], [3], [5], [9],
132132
[Quality], [100], [500], num(1000),
133133
),
134-
placement: none, // top, bottom, auto or none
134+
//placement: none, // `top`, `bottom` or `auto` for floating placement or `none` for inline placement
135135
caption: [
136136
Imaginary specifications of a device for the three generations A, B and C
137137
]
@@ -145,7 +145,7 @@ These support top, bottom or automatic placement as well.
145145
#figure(
146146
box(fill: silver, width: 100%, height: 2cm),
147147
scope: "parent", // two column-figure
148-
placement: top, // top, bottom or auto
148+
placement: top, // `top`, `bottom` or `auto` for floating placement or `none` for inline placement
149149
caption: [A column spanning figure. #lorem(21)],
150150
) <fig:rect>
151151

@@ -202,7 +202,7 @@ With the *lilaq* package, plots can be create directly in the document, so you c
202202
xlabel: [Angle ~ $x$ / rad], xlim: (0, 10),
203203
ylabel: [$y$ / m], ylim: (-1.5, 2.5),
204204
),
205-
placement: auto,
205+
placement: auto, // `top`, `bottom` or `auto` for floating placement or `none` for inline placement
206206
caption: [A plot create with the Lilaq package directly inside the typst source code]
207207
) <fig:lilaq>
208208

tests/captions/test.typ

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,33 @@
1111

1212
#figure(
1313
box(fill: silver, width: 100%, height: 1cm),
14-
placement: none,
1514
caption: [Short caption centered],
1615
)
1716

1817
#figure(
1918
box(fill: silver, width: 100%, height: 1cm),
20-
placement: none,
2119
caption: [Medium caption with two lines, spanning the entire width and left aligned],
2220
)
2321

2422
#figure(
2523
box(fill: silver, width: 100%, height: 1cm),
26-
placement: none,
2724
caption: [Long caption #lorem(50)],
2825
)
2926

3027
#colbreak()
3128

3229
#figure(
3330
table(columns: (1fr, 1fr, 1fr))[S],
34-
placement: none,
3531
caption: [Short table caption],
3632
)
3733

3834
#figure(
3935
table(columns: (1fr, 1fr, 1fr))[M],
40-
placement: none,
4136
caption: [Medium caption with two lines, spanning the entire width and left aligned],
4237
)
4338

4439
#figure(
4540
table(columns: (1fr, 1fr, 1fr))[XL],
46-
placement: none,
4741
caption: [Long caption #lorem(50)],
4842
)
4943

0 commit comments

Comments
 (0)