Closed jfbu closed 10 months ago
Well as latexbug tells you:
! Package latexbug Error: Third-party file(s)
(latexbug)
(latexbug) This test file uses third-party file(s)
(latexbug)
(latexbug) ==============
(latexbug) txfonts.sty
(latexbug) clara.sty
(latexbug) t1clara-tlf.fd
(latexbug) ==============
(latexbug)
(latexbug) So you should contact the authors
(latexbug) of these files, not the LaTeX Team!
(latexbug) (Or remove the packages that load
(latexbug) them, if they are not necessary to
(latexbug) exhibit the problem).
The bug is in the clara package which uses non-standard font series names (regular
and bold
instead of m
and b
or bx
) and redefines \mdseries@rm
and \bfseries@rm
.
Thanks, to explain: it was not clear to me upfront that font packages would modify internals. I did check the fd file globally and noticed usage of regular
there, and I figured the LaTeX font system sort of automatically had switched from m
to regular
(as one of possible aliases to try?) and was then after the fact complaining as I reported, from having toggled perhaps to some other "internal state". Yes I was perhaps too quick to be happy to have found a likely culprit. As I thought these fd files are produced semi-automatically by the authors of pdflatex font support files working from an OpenType starting point, confirmed from seeing
%% Generated by autoinst on 2019/12/24
%%
at top of T1Clara-TLF.df
I did not imagine a problem existed inside of clara.sty
as it would then by force be a probably widespread one.
I doubt that Clara is a widespread font, but be it as it may, autoinst got through a lot of revisions and 2019 is rather old in that respect. In any case the way the font is set up is incorrect and if you switch fonts you end up with asking for others fonts using a series "regular" which they don't understand, hence the substitution kicks in and you get all the warnings. In other words the font (and the support package) by itself works but if you then switch to a different font (e.g. txss) then that one doesn't know what to make of the non-standard name "regular" or "bold". So it is not noisy, it shows that something is wrong and while the substituation txss/regular/n ends up with the right font txss/m/n by chance, txss/regular/it ends up withe the wrong font after substitution.
As we do not control or maintain external font support packages, I'm closing this one here.
I do not understand the reason why clara.sty
redefines \bfseries@rm
and \mdseries@rm
as its T1Clara-TLF.fd
does all the \DeclareFontShape
aliasing {b,bx}-->bold
and m-->regular
where bold
and regular
are used in the primary \DeclareFontShape
's. Anyway for people seeing this
\usepackage{clara}
\makeatletter
\def\bfseries@rm{bx}
\def\mdseries@rm{m}
\makeatother
is work-around for this non-LaTeX2e problem.
Brief outline of the bug
In my real life example I observed this after replacing the Roman family font to be provided by Clara (
\usepackage{clara}
withpdflatex
): (forgot to say line numbers fromgrep
of course)This is a bit noisy and distracting especially when one cares about Warnings (in some contexts in other programming languages people compile with a flag "treat warning as error" which is not realistic in LaTeX).
The triggering event seems to have been this:
MWE:
Minimal example showing the bug
Log file (required) and possibly PDF file
testclara.log