我正在用脚本格式写一本书。对于章节的间距和下划线,我使用了 soul 包。但是,它在目录和参考书目中引发了错误。我不知道如何纠正这个问题。
以下是示例代码:
...
\documentclass[a4paper, 12pt, headsepline, twoside, openright, parskip,fleqn]{scrreprt}
\usepackage{filecontents}
\begin{filecontents}{xyz.bib}
@article{two,
title={Die neuen Vierventil-Ottomotoren fur die mittlere Braureihe von Mercedes-Benz (Germany)},
author={Abthoff, Von J and Huttebraucker, D and Zahn, W and Bockel, H},
journal={Mtz},
volume={53},
pages={496--508},
year={1992}
}
@inproceedings{three,
title={Strategies for NOx reduction in heavy duty engines},
author={Al-Sened, A and Karimi, E},
booktitle={Proceedings of the 23rd CIMAC Congress},
year={2001}
}
@misc{four,
title={Deutsche Stiftung Weltbevölkerung},
author={Bundesministerium für Wirtschaft und Arbeit},
year={2003/04},
publisher={NOAA}
}
\end{filecontents}
\usepackage{soul}
\usepackage{soulutf8}
\usepackage{anyfontsize}
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\fontsize{14}{16.8}\bfseries}
{\ul{\thechapter\enspace}}
{0em}
{\ul}
\setul{0.3pt}{1.5pt}
\titleformat{\section}
{\normalfont\fontsize{12}{15}\bfseries}
{\ul{\thesection\enspace}}
{0em}
{\ul}
\titleformat{\subsection}
{\normalfont\fontsize{12}{15}\bfseries}
{\ul{\thesubsection\enspace}}
{0em}
{\ul}
\titleformat{\subsubsection}
{\normalfont\fontsize{12}{15}\bfseries}
{\ul{\thesubsubsection\enspace}}
{0em}
{\ul}
\usepackage{fontspec}
\usepackage{unicode-math}
\setmainfont{Arial}
\setsansfont{Arial}
\setmathfont{GFSNeohellenicMath.otf}%equation font in arial font
\setmathfont[range=up]{Arial}
\setmathfont[range=it]{Arial Italic}
\setmathfont[range=bfup]{Arial Bold}
\setmathfont[range=bfit]{Arial Bold Italic}
\usepackage[numbers]{natbib}
\bibliographystyle{IEEEtranN}
\bibpunct{/}{/}{;}{n}{}{,}
\renewcommand{\bibnumfmt}[1]{/#1/}
\begin{document}
\tableofcontents
\chapter{Thermodynamics}
\section{Heat}
Propagation of turbulent flames \cite{two} in spark-ignition engines is considered from the viewpoint of the different possible regimes \cite{three} of premixed turbulent combustion.\cite{four} Nondimensional parameters defining known combustion regimes are reviewed,
\medskip
\bibliography{xyz}
\end{document}
...
答案1
事实证明,一点soul
都不喜欢\@mkboth
。
如果不需要标题,解决方案就是本地中和命令。
请注意,这scrreprt
并不像titlesec
。而且下划线(尤其是这么紧)在印刷上不太合理。
\begin{filecontents}{\jobname.bib}
@article{two,
title={Die neuen Vierventil-Ottomotoren fur die mittlere Braureihe von Mercedes-Benz (Germany)},
author={Abthoff, Von J and Huttebraucker, D and Zahn, W and Bockel, H},
journal={Mtz},
volume={53},
pages={496--508},
year={1992}
}
@inproceedings{three,
title={Strategies for NOx reduction in heavy duty engines},
author={Al-Sened, A and Karimi, E},
booktitle={Proceedings of the 23rd CIMAC Congress},
year={2001}
}
@misc{four,
title={Deutsche Stiftung Weltbevölkerung},
author={Bundesministerium für Wirtschaft und Arbeit},
year={2003/04},
publisher={NOAA}
}
\end{filecontents}
\documentclass[a4paper, 12pt, headsepline, twoside, openright, parskip,fleqn]{scrreprt}
\usepackage{soulutf8}
\usepackage{anyfontsize}
\usepackage{titlesec}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage[numbers]{natbib}
\setul{0.3pt}{1.5pt}
\makeatletter
\newcommand{\ulex}[1]{%
\let\@mkboth\@gobbletwo % neutralize \@mkboth in unnumbered chapters
\expanded{\noexpand\ul{#1}}}
\makeatother
\titleformat{name=\chapter}
{\normalfont\fontsize{14}{16.8}\bfseries}
{\ul{\thechapter\enspace}}
{0em}
{\ul}
\titleformat{name=\chapter,numberless}
{\normalfont\fontsize{14}{16.8}\bfseries}
{}
{0em}
{\ulex}
\titleformat{\section}
{\normalfont\fontsize{12}{15}\bfseries}
{\ul{\thesection\enspace}}
{0em}
{\ul}
\titleformat{\subsection}
{\normalfont\fontsize{12}{15}\bfseries}
{\ul{\thesubsection\enspace}}
{0em}
{\ul}
\titleformat{\subsubsection}
{\normalfont\fontsize{12}{15}\bfseries}
{\ul{\thesubsubsection\enspace}}
{0em}
{\ul}
\setmainfont{Arial}
\setsansfont{Arial}
\setmathfont{GFSNeohellenicMath.otf}%equation font in arial font
\setmathfont[range=up]{Arial}
\setmathfont[range=it]{Arial Italic}
\setmathfont[range=bfup]{Arial Bold}
\setmathfont[range=bfit]{Arial Bold Italic}
\bibliographystyle{IEEEtranN}
\bibpunct{/}{/}{;}{n}{}{,}
\renewcommand{\bibnumfmt}[1]{/#1/}
\begin{document}
\tableofcontents
\chapter{Thermodynamics}
\section{Heat}
Propagation of turbulent flames \cite{two} in spark-ignition engines is considered from the viewpoint of the different possible regimes \cite{three} of premixed turbulent combustion.\cite{four} Nondimensional parameters defining known combustion regimes are reviewed,
\medskip
\bibliography{xyz}
\end{document}