latex3 / latex2e

The LaTeX2e kernel
https://www.latex-project.org/
LaTeX Project Public License v1.3c
1.91k stars 264 forks source link

tracking external font package issues #299

Open u-fischer opened 4 years ago

u-fischer commented 4 years ago

The following issue tries to track packages which have issues with the new code (LaTeX2e <2020-02-02> patch level 5) to select series and shapes. It should be edited if issues are resolved or new issues appear. .

I (Frank) suggest we provide one thread entry per issue (done). This way we can "hide" resolved issues or otherwise mark them.

FrankMittelbach commented 4 years ago

ccfonts

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[boldsans]{ccfonts}
\begin{document}
  Normal --  \textbf{embolden}
\end{document}

image

Workaround

Reset default fontseries after loading the package:

\DeclareFontSeriesDefault[rm]{bf}{sbc}

image

Needed fix

The package should use the new code if the command is defined

\DeclareOption{boldsans}{%
 \@ifundefined{DeclareFontSeriesDefault}{%
  \renewcommand{\bfdefault}{sbc}}{%
  \DeclareFontSeriesDefault[rm]{bf}{sbc}}}
FrankMittelbach commented 4 years ago

helvet (phv family) II

\documentclass{article}
\usepackage{helvet}
\DeclareFontSeriesDefault[sf]{md}{c}
\DeclareFontSeriesDefault[sf]{bf}{bc}

\begin{document}
\sffamily
\textit{abc}
\end{document}
! No declaration for shape OT1/phv/mc/sl.

Workaround

Load the fd-file and overwrite the one declaration:

\makeatletter
\input{ot1phv.fd} %and/or t1phv
\DeclareFontShape{OT1}{phv}{c}{it}{<->ssub * phv/c/sl}{}
\makeatother

Fix

fd-files should use c instead of mc

FrankMittelbach commented 4 years ago

mathdesign

\documentclass{book}
\usepackage[bitstream-charter]{mathdesign}
\begin{document}
        foo
\end{document}
LaTeX Warning: Font shape declaration has incorrect series value `mc'.
               It should not contain an `m'! Please correct it.
               Found on input line 53.

Workaround

not needed

Fix

correct the font declarations., mc should be c. mb should probably be sb.

u-fischer commented 4 years ago

@FrankMittelbach how do I mark a comment as resolved? (the ccfonts problem)

FrankMittelbach commented 4 years ago

select the "..." in the top right corner of the comment, choose "hide" and give reason "resolved". That's the best I can think of if we have a summary issue like this. Otherwise you need an issue for each problem separately.

u-fischer commented 4 years ago

tgadventor

The tgadventor package contains

 \renewcommand\bfdefault{b}

This should be changed to

\@ifundefined{DeclareFontSeriesDefault}%
    {\renewcommand{\bfdefault}{b}}%
    {\DeclareFontSeriesDefault[sf]{bf}{b}}

to avoid that the definition affects all families.

FrankMittelbach commented 4 years ago

I wouldn't be surprised if that is similar for all TeX Gyre fonts, so there are probably several such font packages (I think all with the same mentainer(s))

flyingpurplepeopleeater commented 2 years ago

mathdesign

  • description: loading the package gives warnings
  • maintainer contacted? tried, but no answer yet
  • fixed: not yet
  • example
\documentclass{book}
\usepackage[bitstream-charter]{mathdesign}
\begin{document}
      foo
\end{document}
LaTeX Warning: Font shape declaration has incorrect series value `mc'.
               It should not contain an `m'! Please correct it.
               Found on input line 53.

Workaround

not needed

Fix

correct the font declarations., mc should be c. mb should probably be sb.

This warning existed on Overleaf in TeX Live 2021, but seems to no longer exist for TeX Live 2022 (both using XeLaTeX). I don't know much about this, but is this sufficient to mark it as resolved? Not sure what changed, but I've been following this one a while, glad it isn't causing -me- any problems anymore, anyway :)

FrankMittelbach commented 2 years ago

This warning existed on Overleaf in TeX Live 2021, but seems to no longer exist for TeX Live 2022 (both using XeLaTeX). I don't know much about this, but is this sufficient to mark it as resolved? Not sure what changed, but I've been following this one a while, glad it isn't causing -me- any problems anymore, anyway :)

it is not actually causing problems, but it is not resolved in TL2022 the fd files are still wrong and the warning is generated (not sure if Overleaf does something to supress it but I would be surprised if they have done somehting like that).

flyingpurplepeopleeater commented 2 years ago

This warning existed on Overleaf in TeX Live 2021, but seems to no longer exist for TeX Live 2022 (both using XeLaTeX). I don't know much about this, but is this sufficient to mark it as resolved? Not sure what changed, but I've been following this one a while, glad it isn't causing -me- any problems anymore, anyway :)

it is not actually causing problems, but it is not resolved in TL2022 the fd files are still wrong and the warning is generated (not sure if Overleaf does something to supress it but I would be surprised if they have done somehting like that).

Here is a MWE for pdfLaTeX. This gives a warning in Overleaf in pdfLaTeX and 2021 but no warning in pdfLaTeX and 2022. Is this warning getting generated in other compilers?

EDIT: i see this is the same MWE you have but with different document class. I just used your exact MWE and got the same thing: warning with 2021, no warning with 2022

\documentclass{article} \usepackage[bitstream-charter]{mathdesign} \begin{document} hello \end{document}

u-fischer commented 2 years ago

It gives a warning in texlive 2021

LaTeX Warning: Font shape ...

but only an info in texlive 2022

LaTeX Info: Font shape OT1

and overleaf seems to handle this differently.

both using XeLaTeX

you shouldn't use this package with xelatex, it will select the wrong font encoding for an unicode engine.

FrankMittelbach commented 2 years ago

both using XeLaTeX

you shouldn't use this package with xelatex, it will select the wrong font encoding for an unicode engine.

I believe you are mistaken here Ulrike. The package defines math alphabets if I remember correctly and if you don't use unicode-math then math alphabets are selected using traditional NFSS even in XeLaTeX.

Anyway, yes we changed the Warning to Info at some point in the past because for ordinary users it doesn't help to get a warning or this.

FrankMittelbach commented 2 years ago

I take it back ... just checked .. it also sets up text fonts ..., so yes not good for Unicode engines

u-fischer commented 2 years ago

I take it back ... just checked .. it also sets up text fonts ..., so yes not good for Unicode engines

Well with a following \usepackage{fontspec} + setup of the text fonts, it would work, so not completly useless.

samcarter commented 2 years ago

@flyingpurplepeopleeater FYI: I sent the author an email with a patch in March 2021, did not yet get a reply...

FrankMittelbach commented 2 years ago

Well with a following \usepackage{fontspec} + setup of the text fonts, it would work, so not completly useless.

yes, but if you want to set up only thee math then other packages are probably better, e.g., mathalphabets