3

Here is the text in the .tex file:

by learning multiple functions $\{f_\rho^{\mathfrak{0}}, f_\rho^{\mathfrak{1}}, \cdots, f_\rho^{\mathfrak{K}} \}$

Here is the strange output in the pdf file: enter image description here

Here are the environment used in the tex file:


\documentclass{sokendai_thesis} % https://github.com/koikezlemma/phd_thesis_template/blob/master/sokendai_thesis.cls

\begin{document}

by learning multiple functions ${f_\rho^{\mathfrak{0}}, f_\rho^{\mathfrak{1}}, \cdots, f_\rho^{\mathfrak{K}} }$ \

$\forall{\mathfrak{k}}\in{\mathfrak{0},\cdots, \mathfrak{K}}$.

\end{document}

Does anyone know a possible reason for such strange output? Thanks!

David Carlisle
  • 757,742
zlin
  • 75
  • 4
  • 2
    Welcome! You've given us a fragment of code but that's not terribly useful for diagnosis. Can you edit your question and provide a complete minimal document we can compile to reproduce the output you show? This should begin \documentclass... and end \end{document} for LaTeX. In that sense, you've not provided enough; but you've also given too much. Likely you don't need all of those packages to reproduce the problem, so you should also remove the ones you don't need before posting your edited example here. – cfr Nov 04 '23 at 00:46
  • 1
    Try adding the instruction \usepackage{amssymb} to the preamble. – Mico Nov 04 '23 at 00:51
  • @Mico Thanks. But then I got the conflict error: LaTeX Error: Command `\Bbbk' already defined. I also tried 'amsmath' and 'amsfonts', but doesn't help. – zlin Nov 04 '23 at 01:07
  • Where in the preamble did you insert the instruction \usepackage{amssymb}? Toward the beginning, or toward the end? Incidentally, the amssymb package loads the amsfonts package automatically. By the way, would you mind revealing which document class you employ? (It's the main argument of the \documentclass instruction.) – Mico Nov 04 '23 at 01:43
  • 1
    Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – dexteritas Nov 04 '23 at 12:52
  • Well, the "K" is a "K", writtten as some kind of so called fractura. This is one of the handwriting monchs, and other people, usedd during the middle-ages, and which was used in the first printed versions of and after Gutenberg. BTW, the print was perceived as being less good (inferior) than the handwriting at that time ... – MS-SPO Nov 04 '23 at 17:15
  • Hi @Mico, Thanks for reply! I tried inserting amssymb towards the beginning (as did in the line 30 of sokendai_thesis.cls). and the document class I am using is from https://github.com/koikezlemma/phd_thesis_template/blob/master/sokendai_thesis.cls – zlin Nov 04 '23 at 19:00
  • I edited your example to be more reasonable, it produces the same output. Note it gives an underfull hbox message see https://tex.stackexchange.com/questions/334246/what-does-the-phrase-underfull-hbox-badness-10000-in-paragraph-actually-mea/334249#334249 – David Carlisle Nov 04 '23 at 20:07
  • What should \mathfrak{0} or \mathfrak{1} even look like? Fraktur style in math mode is typically only used for letters, not so much for numbers, at least to my knowledge. (Also, numbers in Fraktur do not look much differently from numbers in Antiqua, so it might not be the best choice if disambiguation is important.) – Jasper Habicht Nov 04 '23 at 22:56

2 Answers2

4

If you copy the packages used in the class to the preamble and then delete any that you can delete while still showing the problem you end up with


\documentclass{article}

\usepackage{libertine} \usepackage[libertine]{newtxmath}

\begin{document}

by learning multiple functions ${f_\rho^{\mathfrak{0}}, f_\rho^{\mathfrak{1}}, \cdots, f_\rho^{\mathfrak{K}} }$

$\forall{\mathfrak{k}}\in{\mathfrak{0},\cdots, \mathfrak{K}}$.

\end{document}

enter image description here

Simplest is to add \mathfrak back from amsfonts

enter image description here


\documentclass{article}

\usepackage{libertine} \usepackage[libertine]{newtxmath}

\let\mathfrak\relax \usepackage{eufrak}

\begin{document}

by learning multiple functions ${f_\rho^{\mathfrak{0}}, f_\rho^{\mathfrak{1}}, \cdots, f_\rho^{\mathfrak{K}} }$

$\forall{\mathfrak{k}}\in{\mathfrak{0},\cdots, \mathfrak{K}}$.

\end{document}

so it looks like an error in newtx

David Carlisle
  • 757,742
2

The AMS Fraktur font has glyphs for digits, the font newtxmath uses with the libertine option hasn't them and has blackboard bold digits instead (but not in the standard places, because \mathbb works differently than in amsfonts).

Here's the Fraktur font used by libertine:

enter image description here

Here's the AMS Euler Fraktur:

enter image description here

They're not really alike, so you may want to keep the libertine ones and just replace the digits. In order to blend with the heaviness of the libertine fonts I use the bold version.

\documentclass{sokendai_thesis} % https://github.com/koikezlemma/phd_thesis_template/blob/master/sokendai_thesis.cls

\AtBeginDocument{% \NewCommandCopy\TXmathfrak\mathfrak \RenewCommandCopy\mathfrak\ZLINmathfrak } \ExplSyntaxOn \NewDocumentCommand{\ZLINmathfrak}{m} { \tl_map_function:nN { #1 } \zlin_mathfrak:n } \cs_new_protected:Nn \zlin_mathfrak:n { \str_case:nnF { #1 } { {0}{__zlin_mathfrak_digit:n { 0 }} {1}{__zlin_mathfrak_digit:n { 1 }} {2}{__zlin_mathfrak_digit:n { 2 }} {3}{__zlin_mathfrak_digit:n { 3 }} {4}{__zlin_mathfrak_digit:n { 4 }} {5}{__zlin_mathfrak_digit:n { 5 }} {6}{__zlin_mathfrak_digit:n { 6 }} {7}{__zlin_mathfrak_digit:n { 7 }} {8}{__zlin_mathfrak_digit:n { 8 }} {9}{__zlin_mathfrak_digit:n { 9 }} } { \TXmathfrak{#1} } } \cs_new_protected:Nn __zlin_mathfrak_digit:n { \text{\usefont{U}{euf}{b}{n}#1} } \ExplSyntaxOff

\begin{document}

${f_\rho^{\mathfrak{0}}, f_\rho^{\mathfrak{1}}, \cdots, f_\rho^{\mathfrak{K}} }$

$\forall{\mathfrak{k}}\in{\mathfrak{0},\cdots, \mathfrak{K}}$.

$\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}$

$\mathfrak{0123456789}$

\end{document}

enter image description here

Alternatively, use the AMS Euler Fraktur:

\documentclass{sokendai_thesis} % https://github.com/koikezlemma/phd_thesis_template/blob/master/sokendai_thesis.cls

\DeclareMathAlphabet{\mathfrak}{U}{euf}{m}{n}

\begin{document}

${f_\rho^{\mathfrak{0}}, f_\rho^{\mathfrak{1}}, \cdots, f_\rho^{\mathfrak{K}} }$

$\forall{\mathfrak{k}}\in{\mathfrak{0},\cdots, \mathfrak{K}}$.

$\mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}$

$\mathfrak{0123456789}$

\end{document}

enter image description here

egreg
  • 1,121,712