Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ctexbeamer + sjtubeamer 无法显示 \mathbf{\Psi} #148

Closed
LogCreative opened this issue Aug 22, 2023 · 1 comment · Fixed by #158
Closed

ctexbeamer + sjtubeamer 无法显示 \mathbf{\Psi} #148

LogCreative opened this issue Aug 22, 2023 · 1 comment · Fixed by #158
Labels

Comments

@LogCreative
Copy link
Contributor

LogCreative commented Aug 22, 2023

粗体大写希腊字母在 ctexbeamer + sjtubeamer 下会消失:

\documentclass{ctexbeamer}
\usetheme{sjtubeamer}
\begin{document}
\begin{frame}
    $\mathbf{\Gamma} \mathbf{\Delta} \mathbf{\Theta} \mathbf{\Lambda}
    \mathbf{\Xi} \mathbf{\Pi} \mathbf{\Sigma} \mathbf{\Upsilon}
    \mathbf{\Phi} \mathbf{\Psi} \mathbf{\Omega}$
\end{frame}
\end{document}

而如果只使用 beamer 文档类时不会。

@LogCreative
Copy link
Contributor Author

LogCreative commented Aug 22, 2023

最简单的做法是在 ctexbeamer 文档类加载时添加 no-math 选项。

- \documentclass{ctexbeamer}
+ \documentclass[no-math]{ctexbeamer}
\usetheme{sjtubeamer}
\begin{document}
\begin{frame}
    $\mathbf{\Gamma} \mathbf{\Delta} \mathbf{\Theta} \mathbf{\Lambda}
    \mathbf{\Xi} \mathbf{\Pi} \mathbf{\Sigma} \mathbf{\Upsilon}
    \mathbf{\Phi} \mathbf{\Psi} \mathbf{\Omega}$
\end{frame}
\end{document}

原因:目前 sjtubeamer 的 font theme 主要只加载了 beamer 的 professionalfonts 主题让数学字体仍然是原始的衬线体:

\usefonttheme{professionalfonts}

例子可以简化为

\documentclass{ctexbeamer}        % compared with \documentclass{beamer}
\usefonttheme{professionalfonts}
\begin{document}
\begin{frame}
    $\mathbf{\Gamma} \mathbf{\Delta} \mathbf{\Theta} \mathbf{\Lambda}
    \mathbf{\Xi} \mathbf{\Pi} \mathbf{\Sigma} \mathbf{\Upsilon}
    \mathbf{\Phi} \mathbf{\Psi} \mathbf{\Omega}$
\end{frame}
\end{document}

将与只使用 beamer 文档类进行比较,后者是可以显示的。

日志比较 `test.ctex.log` 与 `test.log`
812,871c629
< ) (/usr/local/texlive/2023/texmf-dist/tex/latex/ctex/dictionary/translator-theorem-dictionary-ChineseUTF8.dict
< Dictionary: translator-theorem-dictionary, Language: ChineseUTF8 2022/07/14 v2.5.10 Chinese translation for theorem name (CTEX)
< )
< 
< Package fontspec Info: Adjusting the maths setup (use [no-math] to avoid
< (fontspec)             this).
< 
< \symlegacymaths=\mathgroup6
< LaTeX Font Info:    Overwriting symbol font `legacymaths' in version `bold'
< (Font)                  OT1/cmr/m/n --> OT1/cmr/bx/n on input line 3.
< LaTeX Font Info:    Redeclaring math accent \acute on input line 3.
< LaTeX Font Info:    Redeclaring math accent \grave on input line 3.
< LaTeX Font Info:    Redeclaring math accent \ddot on input line 3.
< LaTeX Font Info:    Redeclaring math accent \tilde on input line 3.
< LaTeX Font Info:    Redeclaring math accent \bar on input line 3.
< LaTeX Font Info:    Redeclaring math accent \breve on input line 3.
< LaTeX Font Info:    Redeclaring math accent \check on input line 3.
< LaTeX Font Info:    Redeclaring math accent \hat on input line 3.
< LaTeX Font Info:    Redeclaring math accent \dot on input line 3.
< LaTeX Font Info:    Redeclaring math accent \mathring on input line 3.
< LaTeX Font Info:    Redeclaring math symbol \Gamma on input line 3.
< LaTeX Font Info:    Redeclaring math symbol \Delta on input line 3.
< LaTeX Font Info:    Redeclaring math symbol \Theta on input line 3.
< LaTeX Font Info:    Redeclaring math symbol \Lambda on input line 3.
< LaTeX Font Info:    Redeclaring math symbol \Xi on input line 3.
< LaTeX Font Info:    Redeclaring math symbol \Pi on input line 3.
< LaTeX Font Info:    Redeclaring math symbol \Sigma on input line 3.
< LaTeX Font Info:    Redeclaring math symbol \Upsilon on input line 3.
< LaTeX Font Info:    Redeclaring math symbol \Phi on input line 3.
< LaTeX Font Info:    Redeclaring math symbol \Psi on input line 3.
< LaTeX Font Info:    Redeclaring math symbol \Omega on input line 3.
< LaTeX Font Info:    Redeclaring math symbol \mathdollar on input line 3.
< LaTeX Font Info:    Redeclaring symbol font `operators' on input line 3.
< LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
< (Font)              `operators' in the math version `normal' on input line 3.
< LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
< (Font)                  OT1/cmr/m/n --> TU/lmr/m/n on input line 3.
< LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
< (Font)              `operators' in the math version `bold' on input line 3.
< LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
< (Font)                  OT1/cmr/bx/n --> TU/lmr/m/n on input line 3.
< LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
< (Font)                  TU/lmr/m/n --> TU/lmr/m/n on input line 3.
< LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
< (Font)                  OT1/cmr/m/it --> TU/lmr/m/it on input line 3.
< LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
< (Font)                  OT1/cmr/bx/n --> TU/lmr/b/n on input line 3.
< LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
< (Font)                  OT1/cmss/m/n --> TU/lmss/m/n on input line 3.
< LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
< (Font)                  OT1/cmtt/m/n --> TU/lmtt/m/n on input line 3.
< LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
< (Font)                  TU/lmr/m/n --> TU/lmr/b/n on input line 3.
< LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
< (Font)                  OT1/cmr/bx/it --> TU/lmr/b/it on input line 3.
< LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
< (Font)                  OT1/cmss/bx/n --> TU/lmss/b/n on input line 3.
< LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
< (Font)                  OT1/cmtt/m/n --> TU/lmtt/b/n on input line 3.
<  (./test.nav)
---
> ) (./test.nav)
879,892c637
< )
< Missing character: There is no ^^@ (U+0000) in font [lmromandemi10-regular]:mapping=tex-text;!
< Missing character: There is no ^^A (U+0001) in font [lmromandemi10-regular]:mapping=tex-text;!
< Missing character: There is no ^^B (U+0002) in font [lmromandemi10-regular]:mapping=tex-text;!
< Missing character: There is no ^^C (U+0003) in font [lmromandemi10-regular]:mapping=tex-text;!
< Missing character: There is no ^^D (U+0004) in font [lmromandemi10-regular]:mapping=tex-text;!
< Missing character: There is no ^^E (U+0005) in font [lmromandemi10-regular]:mapping=tex-text;!
< Missing character: There is no ^^F (U+0006) in font [lmromandemi10-regular]:mapping=tex-text;!
< Missing character: There is no ^^G (U+0007) in font [lmromandemi10-regular]:mapping=tex-text;!
< Missing character: There is no ^^H (U+0008) in font [lmromandemi10-regular]:mapping=tex-text;!
< Missing character: There is no ^^I (U+0009) in font [lmromandemi10-regular]:mapping=tex-text;!
< Missing character: There is no 
<  (U+000A) in font [lmromandemi10-regular]:mapping=tex-text;!
< [1
---
> ) [1

日志显示 ctex 会加载 fontspec 包,在没有使用 no-math 选项时会更改字体定义。也就意味着对于未添加 no-math 选项的 fontspec 情况都是这样的,也就意味着对于加载了 ctex (没有额外选项)的情况也是这样的。

LogCreative added a commit that referenced this issue Dec 2, 2023
* docs: update copyright year

* docs: update demo basis

* docs: tip about removing max background (see #76)

* ci: format introduction.tex

* docs: update SJTUThesis related

* chore: remove built-in demo title figure

* docs: demo minor fix

* fix: demo listings highlight

* docs: rename thesis.bib to ref.bib

* docs: tip about no-math (#148) and English (#155)

* docs: remove unused packages

* docs: adjust demo comment

* docs: update link

* docs: add white bg to demo cover
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant