BITNP/BIThesis

[Bug]: 编译时有字体警告

YDX-2147483647 opened this issue · 3 comments

发生了什么?

硕博模板从 #4180609af7https://github.com/BITNP/BIThesis/releases/tag/v3.7.0 发布)开始,本科模板从 #335e316c41https://github.com/BITNP/BIThesis/releases/tag/v3.6.0-beta-8 发布)开始,编译时会有字体警告,不过结果似乎正常。

这个问题已有好几人独立遇到。

你期望的结果

修复或抑制这些警告。

问题复现的步骤

编译任意模板。

最小可复现用例或者截图

硕博:
HF5Q{HPT 22FNVPD)061 7L
U NJP6$05B ZK8W EFG%51T

本科:
1 Q024I{XT`~}A675ATFQ I

操作系统或平台

Windows, Overleaf

LaTeX 发行版以及发行年份

TeX Live 2023/2024

相关信息

感觉可以忽略 https://tex.stackexchange.com/questions/106714/stmaryrd-and-boldsymbol-avoid-warnings

看起来是个告诉你你设的字号被什么别的设置覆盖了的warning

报错的地方字号对的话应该不用管

How to decypher font shape warnings? - TeX - LaTeX Stack Exchange

Font typefaces - Overleaf, 在线LaTeX编辑器

本科模板字体警告

make clean cls copy
z +
latexmk -c && latexmk && bat .\main.log | rg Warn -A 2
z -
git restore .
$ git bisect log
# bad: [1a09d478eb3716f7ee4770b6e876eae7c3da9f5c] Merge pull request #429 from BITNP/release-3.7.1
# good: [1e3e780f99d0de9d004fd5bd0553aad02db82790] feat: add interface for secret info.
git bisect start 'main' 'v3.6.0-alpha-1'
# good: [3a19d34d7507d79ebe90346343968569745d9499] Merge pull request #316 from BITNP/312-release-tracker-v354
git bisect good 3a19d34d7507d79ebe90346343968569745d9499
# good: [3a19d34d7507d79ebe90346343968569745d9499] Merge pull request #316 from BITNP/312-release-tracker-v354
git bisect good 3a19d34d7507d79ebe90346343968569745d9499
# bad: [6e72dad989ccd85c5be6cfe3ccf2ebf7c7fee8c2] Merge pull request #370 from BITNP/fix-english-alignment
git bisect bad 6e72dad989ccd85c5be6cfe3ccf2ebf7c7fee8c2
# good: [8fed2db192d646a126685e52d8eae91bd484944f] Merge pull request #348 from BITNP/add-chinese-abstract-in-UTE
git bisect good 8fed2db192d646a126685e52d8eae91bd484944f
# bad: [e3f1fb486046c4fc7e866a63cc54b3b4bcf63807] Merge pull request #366 from BITNP/354-help-comments-for-biblatex-configurations
git bisect bad e3f1fb486046c4fc7e866a63cc54b3b4bcf63807
# bad: [b4802b6b95d26dc885f4f2b9b742720ea16b5d05] Merge pull request #353 from BITNP/dev-fky
git bisect bad b4802b6b95d26dc885f4f2b9b742720ea16b5d05
# bad: [124cc25b452672bde9052e155828abeaf121b02b] Merge pull request #335 from BITNP/windows-auto-fake-bold
git bisect bad 124cc25b452672bde9052e155828abeaf121b02b
# bad: [8ad8bf8e261e3b03f138acbbdb39adb4a472d789] refactor: move docs into separate file.
git bisect bad 8ad8bf8e261e3b03f138acbbdb39adb4a472d789
# bad: [e316c41267af91948624effbc96ff4d8b042e556] fix: more of tabular.
git bisect bad e316c41267af91948624effbc96ff4d8b042e556
# good: [554871d6258ce0f85c49eb335718324bef5d104d] feat: default fake bold SimSun on Windows.
git bisect good 554871d6258ce0f85c49eb335718324bef5d104d
# first bad commit: [e316c41267af91948624effbc96ff4d8b042e556] fix: more of tabular.

TeX Live 2024 还有如下警告,已知是虚警。

Package biblatex Warning: Macro 'byeditor+others' already defined.
(biblatex)                Using \renewbibmacro.

hushidong/biblatex-gb7714-2015#193

2024年4月8日更新:上游已修复,等待发布即可。

1a09d47

本科模版单独问题

字体效果表格:宋体一行的 Bold Italic 实际是 Bold Slant
\textbf{\textit{楷书粗斜体}}
📒 ./chapters/1_chapter1.tex
LaTeX Font Warning: Font shape `TU/SimSun(0)/b/it' undefined
(Font)              using `TU/SimSun(0)/b/n' instead on input line 94.
  • Undefined: Unicode, 宋体, bold, italic
  • Using instead: …, …, …, upright

图片

字体效果表格:Typewriter 一行的 Bold Italic 实际是 Bold Slant
\textbf{\textit{\texttt{Bold}}}
📒 ./chapters/1_chapter1.tex
LaTeX Font Warning: Font shape `TU/lmtt/bx/it' in size <10.53937> not available

(Font)              Font shape `TU/lmtt/b/sl' tried instead on input line 99.
  • Not available: Unicode, Latin Modern Sans Typewriter, bold extended, italic.
  • Tried instead: …, …, bold, slant.

图片

所有模板共同问题:St Mary's Road(Fixed by #436

📒 ./chapters/1_chapter1.tex
LaTeX Font Warning: Font shape `U/stmry/m/n' in size <10.53937> not available
(Font)              size <10.95> substituted on input line 51.

📒 ./misc/4_appendix.tex
LaTeX Font Warning: Font shape `U/stmry/m/n' in size <7.52812> not available
(Font)              size <8> substituted on input line 28.

始于 0609af7 ,它引入了 St Mary's Road,目前只用到了这个宏包的\boxempty

\RequirePackage{stmaryrd}

\RequirePackage{stmaryrd}[only,boxempty]  % 这样也正常(make test 通过且硕博模板生成的PDF无变化)

能产生这一错误的MWE如下。

\documentclass{ctexart}

\usepackage{stmaryrd}

\begin{document}

\begin{table}
  \zihao{5}
  \caption{Whatever}
  \begin{tabular}
  % 👆这里警告:
  % LaTeX Font: Font shape `U/stmry/m/n' in size <10.53937> not available
  % (Font)	size <10.95> substituted.
  {c}
  \end{tabular}
\end{table}

\end{document}

另:Unicode专门有 ballot box: 等。

#436 之后所有模板的所有问题

Full log
$ make test
…
$ rg 'warn.+font' (fd -e log --no-ignore-vcs) -A 2 --ignore-case

bithesis.log
1799:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1800-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 1
1801-98.
--
1804:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1805-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 1
1806-98.
--
1809:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1810-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 1
1811-98.
--
1814:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1815-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 1
1816-98.
--
1819:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1820-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 1
1821-98.
--
1825:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1826-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 2
1827-38.
--
1830:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1831-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 2
1832-38.
--
1835:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1836-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 2
1837-38.
--
1840:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1841-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 2
1842-38.
--
1845:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1846-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 2
1847-38.
--
1860:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1861-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 2
1862-84.
--
1865:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1866-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 2
1867-84.
--
1870:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1871-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 2
1872-84.
--
1875:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1876-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 2
1877-84.
--
1880:LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
1881-(Font)              using `TU/texgyrepagella(0)/m/scit' instead on input line 2
1882-84.
--
1955:LaTeX Font Warning: Font shape `TU/FangSong(0)/m/it' undefined
1956-(Font)              using `TU/FangSong(0)/m/n' instead on input line 423.
1957-
--
1967:LaTeX Font Warning: Font shape `TU/FangSong(0)/b/n' undefined
1968-(Font)              using `TU/FangSong(0)/m/n' instead on input line 873.
1969-
--
1997:LaTeX Font Warning: Font shape `TU/FangSong(0)/m/sl' undefined
1998-(Font)              using `TU/FangSong(0)/m/n' instead on input line 1738.
1999-
--
2017:LaTeX Font Warning: Some font shapes were not available, defaults substituted.
2018-
2019-

templates\undergraduate-thesis\main.log
1549:LaTeX Font Warning: Font shape `TU/SimSun(0)/b/it' undefined
1550-(Font)              using `TU/SimSun(0)/b/n' instead on input line 94.
1551-
--
1560:LaTeX Font Warning: Font shape `TU/lmtt/bx/it' in size <10.53937> not available
1561-
1562-(Font)              Font shape `TU/lmtt/b/sl' tried instead on input line 99.
--
1596:LaTeX Font Warning: Some font shapes were not available, defaults substituted.
1597-
1598-Package rerunfilecheck Info: File `main.out' has not changed.

templates\reading-report\main.log
1528:LaTeX Font Warning: Font shape `TU/SimSun(0)/b/it' undefined
1529-(Font)              using `TU/SimSun(0)/b/n' instead on input line 94.
1530-
--
1539:LaTeX Font Warning: Font shape `TU/lmtt/bx/it' in size <10.53937> not available
1540-
1541-(Font)              Font shape `TU/lmtt/b/sl' tried instead on input line 99.
--
1570:LaTeX Font Warning: Some font shapes were not available, defaults substituted.
1571-
1572-Package rerunfilecheck Info: File `main.out' has not changed.
$ rg 'warn.+font' (fd -e log --no-ignore-vcs) --ignore-case --no-filename | sort | uniq
LaTeX Font Warning: Font shape `TU/FangSong(0)/b/n' undefined
LaTeX Font Warning: Font shape `TU/FangSong(0)/m/it' undefined
LaTeX Font Warning: Font shape `TU/FangSong(0)/m/sl' undefined
LaTeX Font Warning: Font shape `TU/lmtt/bx/it' in size <10.53937> not available
LaTeX Font Warning: Font shape `TU/SimSun(0)/b/it' undefined
LaTeX Font Warning: Font shape `TU/texgyrepagella(0)/m/scsl' undefined
LaTeX Font Warning: Some font shapes were not available, defaults substituted.