我有一个复杂的博士论文模板。我需要包含一个完善的(第二)摘要,但连字符看起来很糟糕。文档的其余部分都是英文的。当我尝试 Babel 包时,我遇到了选项冲突。
\PassOptionsToPackage{english,polish}{babel}
也不起作用:
“!LaTeX 错误:命令‘\lll’已定义。”
答案1
polish.ldf
由于神秘的原因,
\let\lll=\l \let\LLL=\L
\def\plll{\lll}
\def\pLLL{\LLL}
当然,这应该是这样的
\let\polish@l=\l \let\polish@L=\L
\def\plll{\polish@l}
\def\pLLL{\polish@L}
在某些地方使用此方法是为了在某些情况改变其含义的情况下恢复其含义。
问题的解决方案:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[polish]{babel}
\makeatletter
\let\polish@l=\lll \let\polish@L=\LLL
\let\lll\relax \let\LLL\relax % undefine them
\def\plll{\polish@l}
\def\pLLL{\polish@L}
\makeatother
\usepackage{amssymb}
就您而言,该babel
包是由类加载的,因此必须提供语言选项\documentclass
:
\documentclass[
12pt, % The default document font size, options: 10pt, 11pt, 12pt
english, % ngerman for German
polish,
singlespacing, % Single line spacing, alternatives: onehalfspacing or doublespacing
headsepline, % Uncomment to get a line under the header
]{MastersDoctoralThesis} % The class file specifying the document structure
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\setcounter{secnumdepth}{4}
\makeatletter
\let\polish@l=\lll \let\polish@L=\LLL
\let\lll\relax \let\LLL\relax % undefine them
\def\plll{\polish@l}
\def\pLLL{\polish@L}
\makeatother
其余部分与您的代码相同。