Skip to content

Commit bf7ee53

Browse files
committed
Avoid hyphenations and unwanted breaks in author listing and headings
1 parent 39a0b52 commit bf7ee53

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

jacow.typ

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
*/
137137

138138
set align(center)
139-
text(size: 14pt, weight: "bold", [
139+
text(size: 14pt, weight: "bold", hyphenate: false, [
140140
#allcaps(title)
141141
#if funding != none { titlefootnote(funding) }
142142
])
@@ -147,12 +147,12 @@
147147
* Author list
148148
*/
149149

150-
text(size: 12pt, {
150+
text(size: 12pt, hyphenate: false, {
151151
let also_at = ();
152152
for aff in authors.map(a => a.affiliation.at(0)).dedup() {
153153
for auth in authors.filter(a => a.affiliation.at(0) == aff) {
154154
// author name with superscripts
155-
auth.name
155+
auth.name.replace(" ", sym.space.nobreak)
156156
for aff2 in auth.affiliation.slice(1) {
157157
if aff2 not in also_at { also_at += (aff2,) }
158158
super(str(also_at.len()))
@@ -161,7 +161,10 @@
161161
", "
162162
}
163163
// primary affiliations
164+
{
165+
show regex(" "): sym.space.nobreak
164166
affiliations.at(aff) + "\n"
167+
}
165168
};
166169
// secondary affiliations
167170
for i in range(also_at.len()) {
@@ -196,7 +199,7 @@
196199
// SECTION HEADINGS
197200
show heading.where(level: 1): it => {
198201
set align(center)
199-
set text(size: 12pt, weight: "bold", style: "normal")
202+
set text(size: 12pt, weight: "bold", style: "normal", hyphenate: false)
200203
block(
201204
below: 2pt,
202205
allcaps(it.body)
@@ -207,7 +210,7 @@
207210
// Subsection Headings
208211
show heading.where(level: 2): it => {
209212
set align(left)
210-
set text(size: 12pt, weight: "regular", style: "italic")
213+
set text(size: 12pt, weight: "regular", style: "italic", hyphenate: false)
211214
block(
212215
below: 2pt,
213216
wordcaps(it.body)

0 commit comments

Comments
 (0)