Skip to content

Commit 39c07b2

Browse files
committed
Fix incorrect spacing of \eqref with mathtools
1 parent 4440283 commit 39c07b2

7 files changed

Lines changed: 387 additions & 82 deletions

File tree

.github/tl_packages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ xits
6464
#
6565
# Dependencies for extra packages
6666
booktabs
67+
mathtools
6768
threeparttable
6869
siunitx
6970
#

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Fixed
1515

1616
- 修正 arXiv 预印本的 URL 错误([#490](https://github.com/ustctug/ustcthesis/issues/490))。
17+
- 修正了调用 `mathtools``\eqref` 与前文间距的问题([tuna/thuthesis#1043](https://github.com/tuna/thuthesis/discussions/1043))。
1718

1819
### Removed
1920

test/testfiles-crossref/equation-parentheses.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
\input{regression-test}
22
\documentclass[degree=doctor,fontset=fandol]{ustcthesis}
33

4+
\pagestyle{empty}
45
\setlength{\parindent}{0pt}
56

67
\begin{document}
@@ -43,5 +44,4 @@
4344
\end{equation}
4445

4546
\OMIT
46-
4747
\end{document}

test/testfiles-crossref/equation-parentheses.tlg

Lines changed: 9 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -13,48 +13,14 @@ TEST 3: English equation parentheses
1313
============================================================
1414
============================================================
1515
Completed box being shipped out [1]
16-
\vbox(722.98453+4.11038)x435.04271
16+
\vbox(722.98453+0.0)x435.04271
1717
.\glue -29.59128
18-
.\vbox(752.5758+4.11038)x417.11752, shifted 17.92519
19-
..\vbox(13.942+0.0)x417.11752, glue set 0.24084fil
18+
.\vbox(752.5758+0.0)x417.11752, shifted 17.92519
19+
..\vbox(13.942+0.0)x417.11752, glue set 13.942fil
2020
...\glue 0.0 plus 1.0fil
21-
...\hbox(13.70116+0.0)x417.11752
21+
...\hbox(0.0+0.0)x417.11752
2222
....\special{color push Black}
23-
....\hbox(13.70116+0.0)x417.11752
24-
.....\hbox(13.70116+0.0)x417.11752
25-
......\vbox(13.70116+0.0)x417.11752
26-
.......\hbox(9.59077+4.11038)x417.11752
27-
........\hbox(0.0+0.0)x0.0, glue set - 417.11752fil
28-
.........\vbox(0.0+0.0)x417.11752
29-
..........\hbox(0.0+0.0)x417.11752, glue set 208.55876fil
30-
...........\hbox(0.0+0.0)x0.0
31-
...........\penalty 10000
32-
...........\glue(\parfillskip) 0.0 plus 1.0fil
33-
...........\glue(\rightskip) 0.0 plus 1.0fil
34-
.........\glue 0.0 plus 1.0fil minus 1.0fil
35-
........\glue 0.0 plus 1.0fill
36-
........\vbox(9.59077+4.11038)x417.11752
37-
.........\hbox(9.59077+4.11038)x417.11752, glue set 208.55876fil
38-
..........\glue(\leftskip) 0.0 plus 1.0fil
39-
..........\hbox(0.0+0.0)x0.0
40-
..........\rule(9.59077+4.11038)x0.0
41-
..........\penalty 10000
42-
..........\glue(\parfillskip) 0.0
43-
..........\glue(\rightskip) 0.0 plus 1.0fil
44-
........\glue 0.0 plus 1.0fill
45-
........\hbox(0.0+0.0)x0.0, glue set - 417.11752fil
46-
.........\glue 0.0 plus 1.0fil minus 1.0fil
47-
.........\vbox(0.0+0.0)x417.11752
48-
..........\hbox(0.0+0.0)x417.11752, glue set 417.11752fil
49-
...........\glue(\leftskip) 0.0 plus 1.0fil
50-
...........\hbox(0.0+0.0)x0.0
51-
...........\penalty 10000
52-
...........\glue(\parfillskip) 0.0
53-
...........\glue(\rightskip) 0.0
54-
.......\glue 0.0
55-
.......\rule(0.7528+0.0)x417.11752
56-
.......\glue -0.7528
57-
.....\glue 0.0 plus 1.0fil minus 1.0fil
23+
....\hbox(0.0+0.0)x417.11752
5824
....\special{color pop}
5925
..\glue 15.6491
6026
..\glue(\lineskip) 0.0
@@ -122,6 +88,7 @@ Completed box being shipped out [1]
12288
...\hbox(9.636+2.40898)x417.11752, glue set 365.92628fil
12389
....\hbox(0.0+0.0)x0.0
12490
....\TU/FandolSong(0)/m/n/12.045 式
91+
....\kern 0.0
12592
....\kern -0.00018
12693
....\kern 0.00018
12794
....\hbox(9.636+2.40898)x39.14624
@@ -309,46 +276,10 @@ Completed box being shipped out [1]
309276
...\glue 0.0 plus 1.0fil
310277
...\glue 0.0
311278
...\glue 0.0 plus 0.0001fil
312-
..\glue(\baselineskip) 6.86415
313-
..\hbox(15.61333+4.11038)x417.11752
279+
..\glue(\baselineskip) 22.47748
280+
..\hbox(0.0+0.0)x417.11752
314281
...\special{color push Black}
315-
...\hbox(15.61333+4.11038)x417.11752
316-
....\hbox(15.61333+4.11038)x417.11752
317-
.....\vbox(15.61333+4.11038)x417.11752
318-
......\rule(0.0+0.0)x417.11752
319-
......\glue 6.02255
320-
......\hbox(9.59077+4.11038)x417.11752
321-
.......\hbox(0.0+0.0)x0.0, glue set - 417.11752fil
322-
........\vbox(0.0+0.0)x417.11752
323-
.........\hbox(0.0+0.0)x417.11752, glue set 208.55876fil
324-
..........\hbox(0.0+0.0)x0.0
325-
..........\penalty 10000
326-
..........\glue(\parfillskip) 0.0 plus 1.0fil
327-
..........\glue(\rightskip) 0.0 plus 1.0fil
328-
........\glue 0.0 plus 1.0fil minus 1.0fil
329-
.......\glue 0.0 plus 1.0fill
330-
.......\vbox(9.59077+4.11038)x417.11752
331-
........\hbox(9.59077+4.11038)x417.11752, glue set 205.92392fil
332-
.........\glue(\leftskip) 0.0 plus 1.0fil
333-
.........\hbox(0.0+0.0)x0.0
334-
.........\TU/texgyretermes(0)/m/n/10.53937 1
335-
.........\kern -0.0002
336-
.........\kern 0.0002
337-
.........\rule(9.59077+4.11038)x0.0
338-
.........\penalty 10000
339-
.........\glue(\parfillskip) 0.0
340-
.........\glue(\rightskip) 0.0 plus 1.0fil
341-
.......\glue 0.0 plus 1.0fill
342-
.......\hbox(0.0+0.0)x0.0, glue set - 417.11752fil
343-
........\glue 0.0 plus 1.0fil minus 1.0fil
344-
........\vbox(0.0+0.0)x417.11752
345-
.........\hbox(0.0+0.0)x417.11752, glue set 417.11752fil
346-
..........\glue(\leftskip) 0.0 plus 1.0fil
347-
..........\hbox(0.0+0.0)x0.0
348-
..........\penalty 10000
349-
..........\glue(\parfillskip) 0.0
350-
..........\glue(\rightskip) 0.0
351-
....\glue 0.0 plus 1.0fil minus 1.0fil
282+
...\hbox(0.0+0.0)x417.11752
352283
...\special{color pop}
353284
LaTeX Font Info: Font shape `TU/XITSMath-Regular(1)/m/n' will be
354285
(Font) scaled to size 9.03375pt on input line ....
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
% <https://github.com/tuna/thuthesis/issues/1043>
2+
3+
\input{regression-test}
4+
\documentclass[degree=doctor,fontset=fandol]{ustcthesis}
5+
6+
\usepackage{mathtools}
7+
\mathtoolsset{showonlyrefs}
8+
9+
\pagestyle{empty}
10+
\setlength{\parindent}{0pt}
11+
12+
\begin{document}
13+
\START
14+
\showoutput
15+
16+
式(3.1)\par
17+
18+
\setcounter{chapter}{3}
19+
20+
\TEST{Chinese fullwidth equation parentheses}{
21+
式~\eqref{eq:example}\par
22+
\eqref{eq:example}\par
23+
\eqref{eq:example}\par
24+
}
25+
26+
\ustcsetup{eqn-paren-style = half}
27+
28+
\TEST{Chinese halfwidth equation parentheses}{
29+
式~\eqref{eq:example}\par
30+
\eqref{eq:example}\par
31+
\eqref{eq:example}\par
32+
}
33+
34+
\ustcsetup{eqn-paren-style = full}
35+
36+
\ustcsetup{language = english}
37+
38+
\TEST{English equation parentheses}{
39+
equation~\eqref{eq:example}\par
40+
equation \eqref{eq:example}\par
41+
equation\eqref{eq:example}\par
42+
}
43+
44+
\clearpage
45+
46+
\begin{equation}
47+
y = f(x)
48+
\label{eq:example}
49+
\end{equation}
50+
51+
\OMIT
52+
\end{document}

0 commit comments

Comments
 (0)