= 根本不会渲染,而 \neq 会渲染为 /

= 根本不会渲染,而 \neq 会渲染为 /

简单代码

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

好像:

在此处输入图片描述

我已经找到建议尝试 mathtools(同样的问题)并保证使用 pdflatex 而不是 latex。

有人为模板创建了一个非常大的标题,其中包含许多选项。我尝试删除尽可能多的内容,但错误却没有消失。我发现如果禁用 lmodern 包,它就会起作用。但它会改变字体,对吗?

最小工作示例:



\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}

答案1

从上到下:

  1. 一般来说,压制警告不是一个好主意;
  2. 在特定情况下,classicthesis不再真正与兼容scrrprt,请改用book
  3. adrianstyle据我所知,没有classicthesis
  4. \usepackage[utf8]{inputenc}不再需要;
  5. 我一点也不喜欢这个\PassOptionsToPackage策略;
  6. \textrm是你的公式中的错误工具。

最后,真正的问题在于选择

  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

然后,

\usepackage{lmodern}

如果愿意的话lmodern,删除这些选项即可classicthesis

重新整形后的文档,内容如下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}

在此处输入图片描述

答案2

正如 @WillieWong 在评论中解释的那样,首先加载 Palatino、Beramono、eulermath,然后使用lmodern切换这些字体是没有意义的。如果您想使用 Latin Modern 字体,则不应加载其他字体,因此请更改 的选项classicthesis。我还删除了与问题无关的所有包,并将设置选项到包和加载包的奇怪拆分替换为仅使用选项加载包:

\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}

现在你得到: 在此处输入图片描述

顺便说一句:现在关于不推荐的包和类的组合的警告不再隐藏,因此您可以在日志文件中找到classicthesis使用 KOMA-Script 类时不推荐的一些事情。

顺便说一句:编码包inputenc不应该需要utf8。如果你需要它,你应该更新你的 LaTeX 安装,因为它已经超过五年了,因此支持将越来越困难。

相关内容