为什么我的数学方程式字体样式与正常不同?

为什么我的数学方程式字体样式与正常不同?

你好,我正在尝试用这行在括号内写一个简单的极限,

$(-\pi, \pi)$,

在此处输入图片描述

但我想要这样的造型,

在此处输入图片描述

我不确定我哪里犯了错误,或者我是否需要使用特殊的包。这是我的文档类,

\documentclass[11pt, paper=a4, english, ngerman, twoside]{scrbook}

%\documentclass[headsepline,footsepline,footinclude=false,twoside,fontsize=11pt,paper=a4,listof=totoc,bibliography=totoc,DIV=12]{scrbook}

\usepackage[left=1in,right=1in,top=1in,bottom=1in,%
footskip=.5in, bindingoffset=6mm]{geometry}
\usepackage[section]{placeins}
\addtokomafont{disposition}{\rmfamily}
% include all packages and define commands in setup.tex
\input{setup}
\newcommand{\ts}{\textsuperscript}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{.25mm} % header line width
\renewcommand{\footrulewidth}{.25mm}
\fancyhf{}
\fancyhfoffset[L]{0.10cm} % left extra length
\fancyhfoffset[R]{0.15cm} % right extra length
%\fancyfoot[C]{\thepage}
\fancyfoot[LE,RO]{\leftmark}
\fancyfoot[LE,RO]{\thepage}
%\fancyfoot[RE,LO]{\thepage}
\fancypagestyle{plain}{
    \fancyhf{}% remove all entries in header and footer
    \renewcommand{\footrulewidth}{.25mm}
    \fancyfoot[LE,RO]{\thepage}
%   \fancyfoot[RE,LO]{\thepage}% centred page numbers in footer
    %\fancyfoot[C]{\thepage}
    \renewcommand{\headrulewidth}{0pt}% no headsepline on plain pages

}


\begin{document}

     % no header and no page number
    % disable hyper links to remove warning "destination with same identifier"
    % this means within this section nothing can be referenced with a hyperlink
    \hypersetup{pageanchor=false}
    \include{chapters/0_0-titlepage}
    %\pagestyle{plain} % remove chapter name from top, page number at the bottom
    \frontmatter  % roman page numbers
    \include{chapters/0_1-declaration}
    \include{chapters/0_2-abstract}
    \include{chapters/0_3-acknowledgments}
    \microtypesetup{protrusion=false}
    \tableofcontents
    \microtypesetup{protrusion=true}
    \listoffigures
    \listoftables
    %    \listofalgorithms
    \hypersetup{pageanchor=true}  % re-enable hyperlinking

    \mainmatter  % Arabic page numbers
    \include{chapters/1-introduction}
    \include{chapters/2-literature_review}
    \include{chapters/3-chapter_1}
    \include{chapters/4-chapter_2}
    \include{chapters/5-chapter_3}
    \include{chapters/6-chapter_4}
    \include{chapters/7-conclusions}
    \include{chapters/8-appendix}




    % bibliography is not in the table of contents per default, add it manually
    \addcontentsline{toc}{chapter}{Bibliography}
    \rhead{\textit{Bibliography}}
    \bibliographystyle{ieeetr}
    \bibliography{bib/ref_tri}
    \newpage
    \mbox{}


\end{document}

这是我的 setup.tex 文件,其中包含大多数软件包,

%------------------------------------------------------------------------------
%       package includes
%------------------------------------------------------------------------------
    % font encoding is set up for pdflatex, for other environments see
    % http://tex.stackexchange.com/questions/44694/fontenc-vs-inputenc
    \usepackage[T1]{fontenc}  % 8-bit fonts, improves handling of hyphenations
    \usepackage[utf8x]{inputenc}
    % provides `old' commands for table of contents. Eases the ability to switch
    % between book and scrbook
    \usepackage{scrhack}
    \usepackage{lmodern}

    % ------------------- layout, default -------------------
    % adjust the style of float's captions, separated from text to improve readabilty
    \usepackage[labelfont=bf, labelsep=colon, format=hang, textfont=singlespacing]{caption}
    \usepackage{chngcntr}  % continuous numbering of figures/tables over chapters
    \counterwithout{equation}{chapter}
    \counterwithout{figure}{chapter}
    \counterwithout{table}{chapter}

    % Uncomment the following line if you switch from scrbook to book
    % and comment the setkomafont line
    %\usepackage{titlesec}  % remove "Chapter" from the chapter title
    %\titleformat{\chapter}[hang]{\bfseries\huge}{\thechapter}{2pc}{\huge}
    \setkomafont{chapter}{\normalfont\bfseries\huge}

    \usepackage{setspace}  % Line spacing
    \onehalfspacing
    % \doublespacing  % uncomment for double spacing, e.g. for annotations in correction

    % ------------------- functional, default-------------------
    \usepackage[dvipsnames]{xcolor}  % more colors
    \usepackage{array}  % custom format per column in table - needed on the title page
    \usepackage{graphicx}  % include graphics
    \usepackage{subfig}  % divide figure, e.g. 1(a), 1(b)...
    \usepackage{amsmath, latexsym, amssymb}  % |
    \usepackage{amsthm}   % | math, bmatrix etc
    %\usepackage{amsfonts} % |
    \usepackage{calc}  % calculate within LaTeX
%    \usepackage{caption, subcaption}
    \usepackage{multirow,enumitem, array}% Added
    \usepackage{booktabs}
    \usepackage{placeins}
    \usepackage{arevmath}
    \usepackage{xcolor}

    \usepackage[unicode=true,bookmarks=true,bookmarksnumbered=true,
                bookmarksopen=true,bookmarksopenlevel=1,breaklinks=false,
                pdfborder={0 0 0},backref=false,colorlinks=false]{hyperref}
    \graphicspath{{figures/}}
    \DeclareGraphicsExtensions{.pdf,.jpeg,.png}

    %==========================================
    % You might not need the following packages, I only included them as they
    % are needed for the example floats
    % ------------------- functional, custom -------------------
    \usepackage{algorithm,algpseudocode}
    \usepackage{bm}  % bold greek variables (boldmath)
    \usepackage{tikz}
    \usetikzlibrary{positioning}  % use: above left of, etc

    % Improves general appearance of the text
    \usepackage[protrusion=true,expansion=true, kerning]{microtype}

%------------------------------------------------------------------------------
%       (re)new commands / settings
%------------------------------------------------------------------------------
    % ----------------- referencing ----------------
    \newcommand{\secref}[1]{Section~\ref{#1}}
    \newcommand{\chapref}[1]{Chapter~\ref{#1}}
    \renewcommand{\eqref}[1]{Equation~(\ref{#1})}
    \newcommand{\figref}[1]{Figure~\ref{#1}}
    \newcommand{\tabref}[1]{Table~\ref{#1}}

    % ------------------- colors -------------------
    \definecolor{darkgreen}{rgb}{0.0, 0.5, 0.0}
    % Colors of the Albert Ludwigs University as in
    % https://www.zuv.uni-freiburg.de/service/cd/cd-manual/farbwelt
    \definecolor{UniBlue}{RGB}{0, 74, 153}
    \definecolor{UniRed}{RGB}{193, 0, 42}
    \definecolor{UniGrey}{RGB}{154, 155, 156}


    % ------------------- layout -------------------
    % prevents floating objects from being placed ahead of their section
    \let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}
    \let\mySubSection\subsection\renewcommand{\subsection}{\suppressfloats[t]\mySubSection}


    % ------------------- marker commands -------------------
    % ToDo command
    \newcommand{\todo}[1]{\textbf{\textcolor{red}{(TODO: #1)}}}
    \newcommand{\extend}[1]{\textbf{\textcolor{darkgreen}{(EXTEND: #1)}}}
    % Lighter color to note down quick drafts
    \newcommand{\draft}[1]{\textbf{\textcolor{NavyBlue}{(DRAFT: #1)}}}


    % ------------------- math formatting commands -------------------
    % define vectors to be bold instead of using an arrow
    \renewcommand{\vec}[1]{\mathbf{#1}}
    \newcommand{\mat}[1]{\mathbf{#1}}
    % tag equation with name
    \newcommand{\eqname}[1]{\tag*{#1}}


    % ------------------- pdf settings -------------------
    % ADAPT THIS
    \hypersetup{pdftitle={The great title!},
                pdfauthor={FirstName LastName},
                pdfsubject={Undergraduate thesis at the Albert Ludwig University of Freiburg},
                pdfkeywords={deep learning, awesome algorithm,  undergraduate thesis},
                pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false}


    %==========================================
    % You might not need the following commands, I only included them as they
    % are needed for the example floats

    % ------------------- Tikz styles -------------------
    \tikzset{>=latex}  % arrow style


    % ------------------- algorithm ---------------------
    % Command to align comments in algorithm
    \newcommand{\alignedComment}[1]{\Comment{\parbox[t]{.35\linewidth}{#1}}}
    % define a foreach command in algorithms
    \algnewcommand\algorithmicforeach{\textbf{foreach}}
    \algdef{S}[FOR]{ForEach}[1]{\algorithmicforeach\ #1\ \algorithmicdo}

答案1

你的例子不可用,更合理的例子应该是

\documentclass{article}

    \usepackage{arevmath}

\begin{document}

$(\pi,\pi)$

\end{document}

产生

在此处输入图片描述

如果您不想要这套字体,就不要使用该arevmath包。

相关内容