2

The simple code

\[  \text{CIR} \left[ t  \right] = \left(g_\text{loc} * s\right) \left[ t \right] \]

looks like:

enter image description here

I already found suggestions to try mathtools (same problem) instead and assure to use pdflatex instead of latex.

Somebody created a really huge header with lots of options for the template. I tried to delete as much as possible without making the error disappear. I found if disable lmodern package, than it works. But it alters the font, right?

Minimal working example:



\RequirePackage{silence} % :-\
\WarningFilter{scrreprt}{Usage of package `titlesec'}
%\WarningFilter{scrreprt}{Activating an ugly workaround}
\WarningFilter{titlesec}{Non standard sectioning command detected}
\documentclass[ twoside,openright,titlepage,numbers=noenddot,%1headlines,
headinclude,footinclude,cleardoublepage=empty,abstract=on,
BCOR=5mm,paper=a4,fontsize=11pt
]{scrreprt}

%********************************************************************
% PDF/A for TUbama
%*******************************************************
\PassOptionsToPackage{dvipsnames}{xcolor}
\usepackage[a-1b]{pdfx}

%********************************************************************
% Note: Make all your adjustments in here
%*******************************************************
\usepackage{etoolbox}
\newtoggle{adrianstyle}
%\toggletrue{adrianstyle} % uncomment this line to have smaller margins
\PassOptionsToPackage{adrianstyle=\iftoggle{adrianstyle}{true}{false}}{classicthesis}
\newtoggle{parts}
%\toggletrue{parts} % uncomment to use parts (for long theses only!)
\newtoggle{phd}
%\toggletrue{phd} % uncomment to write a full-blown PhD thesis (with parts, author references, etc.)
\iftoggle{phd}{\toggletrue{parts}}{}

% !TeX root = ./Thesis.tex

\PassOptionsToPackage{utf8}{inputenc}
\usepackage{inputenc}

\PassOptionsToPackage{T1}{fontenc} % T2A for cyrillics
\usepackage{fontenc}

\PassOptionsToPackage{
    drafting=false,    % print version information on the bottom of the pages
    tocaligned=false, % the left column of the toc will be aligned (no indentation)
    dottedtoc=true,  % page numbers in ToC flushed right
    eulerchapternumbers=true, % use AMS Euler for chapter font (otherwise Palatino)
    linedheaders=false,       % chaper headers will have line above and beneath
    floatperchapter=false,     % numbering per chapter for all floats (i.e., Figure 1.1)
    eulermath=true,  % use awesome Euler fonts for mathematical formulae (only with pdfLaTeX)
    beramono=true,    % toggle a nice monospaced font (w/ bold)
    palatino=true,    % deactivate standard font for loading another one, see the last section at the end of this file for suggestions
    style=classicthesis % classicthesis, arsclassica
}{classicthesis}

\providecommand{\mLyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}

\PassOptionsToPackage{ngerman,american}{babel} % change this to your language(s), main language last
\usepackage{babel}

\PassOptionsToPackage{autostyle=true}{csquotes}
\usepackage{csquotes}
\PassOptionsToPackage{%
    backend=biber,bibencoding=utf8, 
    language=auto,%
    style=numeric-comp,%
    sorting=nyt, % name, year, title
    maxbibnames=10, % default: 3, et al.
    %backref=true,%
    defernumbers=true, % enable so split references (author's publications) have continuous numbers
    natbib=true % natbib compatibility mode (\citep and \citet still work)
}{biblatex}
\usepackage{biblatex}
\usepackage{classicthesis}
\usepackage{lmodern} %TODO delete later
\begin{document}

    \[ \textrm{CIR} [ t ] = (g_{\textrm{loc}} * s) [ t ] \] 

    \end{document}
7
  • 3
    First of do not use \text for this, it does not do what you think (making things upright). Secondly, assuming _\text{loc} will always work is dangerous, here use _{\mathrm{loc}} instead. Thirdly, those \left ... \right does nothing but make your code look more complicated.
    – daleif
    Commented Sep 14, 2023 at 11:07
  • 7
    Fourth: please always provide a full but minimal example that gives the output you show. My guess is that you load incompatible font packages. But as you give no information, who knows.
    – daleif
    Commented Sep 14, 2023 at 11:08
  • 3
    Please tell us whether compiling \documentclass{article} \begin{document} \[ \textrm{CIR} [ t ] = (g_{\textrm{loc}} * s) [ t ] \] \end{document} creates any surprises on your system.¨
    – Mico
    Commented Sep 14, 2023 at 11:29
  • 5
    you presumably are using mdsymbol or similar package with non standard encoding, but as you have provided no example, it is hard to help Commented Sep 14, 2023 at 12:29
  • 4
    The problem is that you are loading classicthesis with eulermath and then also loading lmodern after you loaded classicthesis. Now, removing lmodern will "change the font", but you are already specifying palatino and eulermath when loading classicthesis, so you've placed yourself in a position where there will be font conflicts no matter what. Commented Sep 15, 2023 at 8:49

2 Answers 2

1

Going top-to-bottom:

  1. it's a bad idea to silence warnings, in general;
  2. in the particular case, classicthesis is no longer really compatible with scrrprt, use book instead;
  3. there is no adrianstyle in classicthesis, AFAIK;
  4. \usepackage[utf8]{inputenc} is no longer needed;
  5. I don't like at all the \PassOptionsToPackage strategy;
  6. \textrm is the wrong tool in your formula.

Finally, the real problem, which is in the options

  eulermath=true,  % use awesome Euler fonts for mathematical formulae (only with pdfLaTeX)
  palatino=true,    % deactivate standard font for loading another one, see the last section at the end of this file for suggestions

and, later,

\usepackage{lmodern}

If you want lmodern, remove those options to classicthesis.

Reshaped document, with lmodern:

\documentclass[a4paper,11pt]{book}

%********************************************************************
% PDF/A for TUbama
%*******************************************************
\PassOptionsToPackage{dvipsnames}{xcolor}
\usepackage[a-1b]{pdfx}

%********************************************************************
% Note: Make all your adjustments in here
%*******************************************************
\usepackage{etoolbox}
%\newtoggle{adrianstyle}
%\toggletrue{adrianstyle} % uncomment this line to have smaller margins
%\PassOptionsToPackage{adrianstyle=\iftoggle{adrianstyle}{true}{false}}{classicthesis}
%\newtoggle{parts}
%\toggletrue{parts} % uncomment to use parts (for long theses only!)
%\newtoggle{phd}
%\toggletrue{phd} % uncomment to write a full-blown PhD thesis (with parts, author references, etc.)
%\iftoggle{phd}{\toggletrue{parts}}{}

% !TeX root = ./Thesis.tex

%\usepackage[utf8]{inputenc}

\usepackage[T1]{fontenc}

\usepackage[
  drafting=false,    % print version information on the bottom of the pages
  tocaligned=false, % the left column of the toc will be aligned (no indentation)
  dottedtoc=true,  % page numbers in ToC flushed right
  eulerchapternumbers=true, % use AMS Euler for chapter font (otherwise Palatino)
  linedheaders=false,       % chaper headers will have line above and beneath
  floatperchapter=false,     % numbering per chapter for all floats (i.e., Figure 1.1)
%  eulermath=true,  % use awesome Euler fonts for mathematical formulae (only with pdfLaTeX)
  beramono=true,    % toggle a nice monospaced font (w/ bold)
%  palatino=true,    % deactivate standard font for loading another one, see the last section at the end of this file for suggestions
  style=classicthesis % classicthesis, arsclassica
]{classicthesis}

\usepackage{amsmath} % added
\usepackage{lmodern}
\usepackage{fixcmex}

\usepackage[ngerman,american]{babel} % change this to your language(s), main language last

\usepackage[autostyle=true]{csquotes}
\usepackage[
  backend=biber,bibencoding=utf8, 
  language=auto,
  style=numeric-comp,
  sorting=nyt, % name, year, title
  maxbibnames=10, % default: 3, et al.
  %backref=true,
  defernumbers=true, % enable so split references (author's publications) have continuous numbers
  natbib=true % natbib compatibility mode (\citep and \citet still work)
]{biblatex}

\DeclareMathOperator{\CIR}{CIR}

\begin{document}

\[
\CIR[t] = (g_{\mathrm{loc}} * s) [ t ] \neq x
\]

\end{document}

enter image description here

1

As @WillieWong explained in a comment, it does not make sense to first load Palatino, Beramono, eulermath and than use lmodern to switch from these fonts. If you want to use the Latin Modern fonts, you should not load the other fonts and therefore change the options of classicthesis. I've also removed all packages not related to the problem and also replaced the strange splitting of setting options to a package and loading the package by just loading the package with options:

\documentclass[twoside,openright,
titlepage,% option is default and therefore not needed here
numbers=noenddot,
% 1headlines,% option 1headlines would be depracated, see the manual for option headlines
headinclude,footinclude,
cleardoublepage=empty,% option is default (as long as not using deprecated options) and therefore not needed here
abstract=on,
BCOR=5mm,
paper=a4,fontsize=11pt% both options are default and therefore not needed here
]{scrreprt}

\usepackage[T1]{fontenc}

\usepackage[
    drafting=false,    % print version information on the bottom of the pages
    tocaligned=false, % the left column of the toc will be aligned (no indentation)
    dottedtoc=true,  % page numbers in ToC flushed right
    linedheaders=false,       % chaper headers will have line above and beneath
    floatperchapter=false,     % numbering per chapter for all floats (i.e.,
    % Figure 1.1)
    % CHANGED: Because loading fonts makes not sense, if you want lmodern:
    eulerchapternumbers=false,
    eulermath=false,% this one is the absolutely needed option to use lmodern math fonts
    beramono=false,
    palatino=false, 
    style=classicthesis % classicthesis, arsclassica
]{classicthesis}

\providecommand{\mLyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}

\usepackage[ngerman,american]{babel}

\usepackage{lmodern} % if you delete this one, you can switch back to eulermath, palatino etc.
\begin{document}

    \[ \textrm{CIR} [ t ] = (g_{\textrm{loc}} * s) [ t ] \] 

\end{document}

Now you get: enter image description here

BTW: Now the warnings about not recommended combinations of packages and classes are not hidden any longer, so you can find in the log file some of the not recommended things classicthesis does when using a KOMA-Script class.

BTW: Package inputenc should not be needed with utf8 encoding. If you need it, you should update your LaTeX installation, because it is older than five years and therefore support will be more and more difficult.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .