字体自动以斜体显示定义和备注

字体自动以斜体显示定义和备注

我正在使用以下论文模板来撰写我的论文。

\documentclass[11pt, a4paper, twoside]{book}
\usepackage{graphicx}
%\usepackage{a4wide}% obsolete: geometry does a better job
\usepackage{fancyhdr}
%\usepackage{pdfpages}
%\usepackage[dvips]{epsfig} obsolete: graphicx does the job
\usepackage{palatino,float,multicol,fancybox,amsfonts,appendix,amsthm}%shadow
%subfigure is deprecated. Use subcaption instead
%\usepackage{chapterbib}
\usepackage{amssymb}
\usepackage{stmaryrd}
\usepackage{mathrsfs}
\usepackage[nottoc]{tocbibind}
\usepackage{makeidx}
\usepackage{relsize}
%\usepackage[emindex]{apacite}
%\usepackage{authorindex}
%\usepackage{multicol}
\pagestyle{fancy} \makeindex %\authorindex

\renewcommand{\headrulewidth}{.1pt}
%\renewcommand{\topmargin}{0.01cm}
\fancyhead[LE,RO]{{\thepage}}
\fancyhead[RE]{\nouppercase{{\leftmark}}}
\fancyhead[LO]{\nouppercase{{\rightmark}}} \fancyfoot{}
\def\baselinestretch{1.1}

\pagenumbering{roman}
\date{\today}
\clubpenalty=10000 \widowpenalty=10000

\newcommand*\chancery{\fontfamily{pzc}\selectfont}
%-----------------------------------------------------------------------------
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
%\usepackage{graphics} useless: graphicx is loaded
\usepackage{xcolor}
\usepackage{upgreek}
%\usepackage[utf8]{inputenc} useless. utf8 is the default nowadays, unless otherwise specified
\usepackage{alltt}
\usepackage{tikz-cd}
\usepackage{aliascnt}
\usepackage{tikz}
\usepackage{mathtools}
\usepackage{multicol}
\usepackage{charter}
\usepackage{relsize}
\usepackage{amssymb,amsthm,graphicx,amsxtra, setspace}
\usepackage{graphicx, type1cm, eso-pic}
\allowdisplaybreaks
\usepackage{scalerel, stackengine}
\stackMath

\newcommand\reallywidehat[1]{%
    \savestack{\tmpbox}{\stretchto{%
            \scaleto{%
                \scalerel*[\widthof{\ensuremath{#1}}]{\kern-.6pt\bigwedge\kern-.6pt}%
                {\rule[-\textheight/2]{1ex}{\textheight}}%WIDTH-LIMITED BIG WEDGE
            }{\textheight}%
        }{0.5ex}}%
    \stackon[1pt]{#1}{\tmpbox}%
}
\parskip 1ex
\usepackage{hyperref}
%\allowdisplaybreaks

% THEOREM Environments ---------------------------------------------------
%\setlength{\textheight}{19.5 cm} \setlength{\textwidth}{12.5 cm}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{assumption}[theorem]{Assumption}
\newtheorem{corollary}[theorem]{Corollary}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{hypothesis}[theorem]{Hypothesis}
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}
\newcommand{\mainidx}[1]{{\it #1}}
\newcommand{\boldidx}[1]{{\bf #1}}

\DeclareMathOperator*{\esssup}{ess\,sup}
\DeclareMathOperator{\tr}{Tr}

\makeatletter
\newcommand{\doublewidetilde}[1]{{%
        \mathpalette\double@widetilde{#1}%
}}
\newcommand{\double@widetilde}[2]{%
    \sbox\z@{$\m@th#1\widetilde{#2}$}%
    \ht\z@=.9\ht\z@
    \widetilde{\box\z@}%
}
\makeatother

\newcommand{\mc}{\mathcal}
\newcommand{\mf}{\mathfrak}
\newcommand{\mb}{\mathbb}
\newcommand{\xra}{\xrightarrow}
\newcommand{\ra}{\rightarrow}
\newcommand{\rra}{\rightrightarrows}

\renewcommand{\d}{\/\mathrm{d}\/}
\renewcommand{\thefootnote}{\arabic{footnote}}

% ----------------------------------------------------------------

% Macro for 'List of Symbols', 'List of Notations' etc...
\def\listofsymbols{\input{symbols} \cleardoublepage}
\def\addsymbol #1: #2#3{$#1$ \> \parbox{5in}{#2 \dotfill \pageref{#3}}\\}
\def\newnot#1{\label{#1}}

\hypersetup{
    %bookmarks=true, % show bookmarks bar?
    unicode=false, % non-Latin characters in Acrobat�s bookmarks
    pdftoolbar=true, % show Acrobat�s toolbar?
    pdfmenubar=true, % show Acrobat�s menu?
    pdffitwindow=false, % window fit to page when opened
    pdfstartview={FitH}, % fits the width of the page to the window
    pdftitle={My title}, % title
    pdfauthor={Author}, % author
    pdfsubject={Subject}, % subject of the document
    pdfcreator={Creator}, % creator of the document
    pdfproducer={Producer}, % producer of the document
    pdfkeywords={keywords}, % list of keywords
    pdfnewwindow=true, % links in new window
    colorlinks=true, % false: boxed links; true: colored links
    linkcolor=blue, % color of internal links
    citecolor=blue, % color of links to bibliography
    filecolor=magenta, % color of file links
    urlcolor=green % color of external links
}

%---------------------------------------------------------------------------
\newcommand {\apgt} {\ {\raise-.5ex\hbox{$\buildrel>\over\sim$}}\ }
\newcommand {\aplt} {\ {\raise-.5ex\hbox{$\buildrel<\over\sim$}}\ }

\makeatletter
\def\myfnt{\ifx\protect\@typeset@protect\expandafter\footnote\else\expandafter\@gobble\fi}
\makeatother


\begin{document}
%\maketitle
%\tableofcontents
%\listoffigures
%\newpage
\doublespace\include{Title} \pagenumbering{arabic}
\setcounter{page}1
\newpage
\thispagestyle{empty} \cleardoublepage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%TOC

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{secnumdepth}{3} % organisational level that receives a numbers
%\setcounter{tocdepth}{3}    % print table of contents for level 3
\tableofcontents
% levels are: 0 - chapter, 1 - section, 2 - subsection, 3 - subsection
%-----------------------------------------------------------------------------------
%\listoffigures %\listoftables

\newpage
%\doublespace\chapter*{List of Symbols\hfill} \markboth{List of
%Symbols}{List of Symbols} \addcontentsline{toc}{chapter}{List of
%Symbols} \listofsymbols \cleardoublepage
%-----------------------------------------------------------------------------------
%\addcontentsline{toc}{chapter}{\numberline{}\listoffigures,\listoftables}
%------------------------------------------------------------------------------
\newpage
\thispagestyle{empty} \doublespace
\include{Preliminaries}
\include{chapter2}
\include{chapter3}
\include{chapter4}
\include{chapter5}
\include{chapter6}
%\include{chapter6a}
%\include{chapter6b}
%\include{chaptercon}
%\begin{appendices}
%\input{AppendixA}
%\input{AppendixB}
%\end{appendices}

%\def\Appendix{\input{Appendix_1} \cleardoublepage}
%\chapter*{Appendix\hfill} \markboth{Appendix}{Appendix} \addcontentsline{toc}{chapter}{Appendix}
%\Appendix \cleardoublepage
%\include{Appendix_1}
%\include{bibit}

 %The style you want to use for references.
%\bibliography{mr,refs}
\newpage
\thispagestyle{plain}\chapter*{Publications arising out of the PhD thesis\hfill} \addcontentsline{toc}{chapter}{Publications arising
out of the PhD thesis}
%\begin{center}\textbf{\Large Publications arising out of the PhD thesis}\end{center}{\huge \par}
%\bigskip{}
\begin{enumerate}
\item [{[1]}]  qq
\end{enumerate}
\clearpage
\newpage
\thispagestyle{empty}
\bigskip{}
\vspace{1cm} \cleardoublepage


%\printindex %Make an index AUTOMATICALLY

\bibliography{references}
\bibliographystyle{plain}


\singlespace
\printindex %\printauthorindex
\end{document}

当我写定义或者备注的时候,字体显示为斜体。

我该如何改变这种情况?

顺便问一下,上面的模板中是否有不必要的命令?我不太懂技术,我只知道如何用 latex 编写。所以我从别人那里复制了模板。如果其中有任何命令是不必要的,或者这个模板可以做得更好,请告诉我。

使用 Bernard 提到的模板后,请参阅所附照片以查看错误。

在此处输入图片描述

答案1

这是斜体问题的解决方案。我只是为这些定理结构分别添加了定理样式definitionremark

我还清理了重复的加载,并对过时或弃用的包添加了评论。

\documentclass[11pt, a4paper, twoside]{book}
\usepackage{graphicx}
%\usepackage{a4wide}% obsolete: geometry does a better job
\usepackage{fancyhdr}
%\usepackage{pdfpages}
%\usepackage[dvips]{epsfig} obsolete: graphicx does the job
\usepackage{palatino,float,multicol,fancybox,amsfonts,appendix,amsthm}%shadow
%subfigure is deprecated. Use subcaption instead
%\usepackage{chapterbib}
\usepackage{amssymb}
\usepackage{stmaryrd}
\usepackage{mathrsfs}
\usepackage[nottoc]{tocbibind}
\usepackage{makeidx}
\usepackage{relsize}
%\usepackage[emindex]{apacite}
%\usepackage{authorindex}
%\usepackage{multicol}
\pagestyle{fancy} \makeindex %\authorindex

\renewcommand{\headrulewidth}{.1pt}
%\renewcommand{\topmargin}{0.01cm}
\fancyhead[LE,RO]{{\thepage}}
\fancyhead[RE]{\nouppercase{{\leftmark}}}
\fancyhead[LO]{\nouppercase{{\rightmark}}} \fancyfoot{}
\def\baselinestretch{1.1}

\pagenumbering{roman}
\date{\today}
\clubpenalty=10000 \widowpenalty=10000

\newcommand*\chancery{\fontfamily{pzc}\selectfont}
%-----------------------------------------------------------------------------
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
%\usepackage{graphics} useless: graphicx is loaded
\usepackage{xcolor}
\usepackage{upgreek}
%\usepackage[utf8]{inputenc} useless. utf8 is the default nowadays, unless otherwise specified
\usepackage{alltt}
\usepackage{tikz-cd}
\usepackage{aliascnt}
\usepackage{tikz}
\usepackage{mathtools}
\usepackage{multicol}
\usepackage{charter}
\usepackage{relsize}
\usepackage{amssymb,amsthm,graphicx,amsxtra, setspace}
\usepackage{graphicx, type1cm, eso-pic}
\allowdisplaybreaks
\usepackage{scalerel, stackengine}
\stackMath

\newcommand\reallywidehat[1]{%
    \savestack{\tmpbox}{\stretchto{%
            \scaleto{%
                \scalerel*[\widthof{\ensuremath{#1}}]{\kern-.6pt\bigwedge\kern-.6pt}%
                {\rule[-\textheight/2]{1ex}{\textheight}}%WIDTH-LIMITED BIG WEDGE
            }{\textheight}%
        }{0.5ex}}%
    \stackon[1pt]{#1}{\tmpbox}%
}
\parskip 1ex
\usepackage{hyperref}
%\allowdisplaybreaks

% THEOREM Environments ---------------------------------------------------
%\setlength{\textheight}{19.5 cm} \setlength{\textwidth}{12.5 cm}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{assumption}[theorem]{Assumption}
\newtheorem{corollary}[theorem]{Corollary}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{hypothesis}[theorem]{Hypothesis}
\renewcommand{\theequation}{\arabic{section}.\arabic{equation}}
\newcommand{\mainidx}[1]{{\it #1}}
  \newcommand{\boldidx}[1]{{\bf #1}}

\DeclareMathOperator*{\esssup}{ess\,sup}
\DeclareMathOperator{\tr}{Tr}

\makeatletter
\newcommand{\doublewidetilde}[1]{{%
        \mathpalette\double@widetilde{#1}%
}}
\newcommand{\double@widetilde}[2]{%
    \sbox\z@{$\m@th#1\widetilde{#2}$}%
    \ht\z@=.9\ht\z@
    \widetilde{\box\z@}%
}
\makeatother

\newcommand{\mc}{\mathcal}
\newcommand{\mf}{\mathfrak}
\newcommand{\mb}{\mathbb}
\newcommand{\xra}{\xrightarrow}
\newcommand{\ra}{\rightarrow}
\newcommand{\rra}{\rightrightarrows}

\renewcommand{\d}{\/\mathrm{d}\/}
\renewcommand{\thefootnote}{\arabic{footnote}}

% ----------------------------------------------------------------

% Macro for 'List of Symbols', 'List of Notations' etc...
\def\listofsymbols{\input{symbols} \cleardoublepage}
\def\addsymbol #1: #2#3{$#1$ \> \parbox{5in}{#2 \dotfill \pageref{#3}}\\}
\def\newnot#1{\label{#1}}

\hypersetup{
    %bookmarks=true, % show bookmarks bar?
    unicode=false, % non-Latin characters in Acrobat�s bookmarks
    pdftoolbar=true, % show Acrobat�s toolbar?
    pdfmenubar=true, % show Acrobat�s menu?
    pdffitwindow=false, % window fit to page when opened
    pdfstartview={FitH}, % fits the width of the page to the window
    pdftitle={My title}, % title
    pdfauthor={Author}, % author
    pdfsubject={Subject}, % subject of the document
    pdfcreator={Creator}, % creator of the document
    pdfproducer={Producer}, % producer of the document
    pdfkeywords={keywords}, % list of keywords
    pdfnewwindow=true, % links in new window
    colorlinks=true, % false: boxed links; true: colored links
    linkcolor=blue, % color of internal links
    citecolor=blue, % color of links to bibliography
    filecolor=magenta, % color of file links
    urlcolor=green % color of external links
}

%---------------------------------------------------------------------------
\newcommand {\apgt} {\ {\raise-.5ex\hbox{$\buildrel>\over\sim$}}\ }
\newcommand {\aplt} {\ {\raise-.5ex\hbox{$\buildrel<\over\sim$}}\ }

\makeatletter
\def\myfnt{\ifx\protect\@typeset@protect\expandafter\footnote\else\expandafter\@gobble\fi}
\makeatother

\begin{document}
Some text. Some text. Some text.
\begin{definition}
  $0$ is the first natural number.
\end{definition}
Some more text. Some more text

\begin{remark}
Some authors, contrary to Giuseppe Peano, do not consider consider that $0\in\mathbf{N}$.
\end{remark}

\end{document} 

在此处输入图片描述

相关内容