我已经将 .docx 文件转换为 .tex,并且正在尝试创建一个运行标题。浏览论坛后,我发现了一些不错的代码来生成此标题。不幸的是,当我尝试实现\section
或\subsection
功能时,我收到了多个错误。
目前,标题为 0:00––0:00,显示已创建,但我无法实际创建部分和子部分环境。我附上了我的序言,以便您查看是否有我遗漏的内容。
\documentclass[twoside,14pt]{memoir}
\usepackage{lettrine}
\usepackage{dblfnote}
\usepackage[para]{footmisc}
\usepackage{ragged2e}
\usepackage[pagestyles]{titlesec}
\usepackage{polyglossia}
\setmainlanguage{syriac}
\setmainfont{Serto Antioch Bible}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\arabic{subsection}}
\pagestyle{empty}
% definition of the page style with required headers
\newpagestyle{Biblestyle}{
\setheadrule{.009pt}
\sethead[\thepage][\chaptertitle]
[\toptitlemarks\thesection:\toptitlemarks\thesubsection---%
\bottitlemarks\thesection:\bottitlemarks\thesubsection]%
{\toptitlemarks\thesection:\toptitlemarks\thesubsection---%
\bottitlemarks\thesection:\bottitlemarks\thesubsection}{\chaptertitle}{\thepage}
}
% sets the marks to be used (section and subsection)
\setmarks{section}{subsection}
% sections and subsections formatting
\titleformat{\section}
{}{\lettrine{\thesection}}{0em}{}[\vskip-0.65\baselineskip]
\titleformat{\subsection}[runin]
{\small\bfseries}{\thesubsection}{1em}{}
\titlespacing{\section}{1em}{-1pt}{0pt}
\titlespacing{\subsection}{0pt}{0pt}{1em}
\pagestyle{Biblestyle}
\renewcommand{\LettrineFontHook}{\bfseries}
\setlength{\parindent}{0pt}
\newlength\NumLen
\newlength\LinLen
% indents one line of text. Indentation= width of section number + 1em
\newcommand\IndOne{%
\settowidth\NumLen{\thesection}
\addtolength\NumLen{1em}
\setlength\LinLen{\dimexpr\textwidth-\NumLen}%\the\NumLen\the\LinLen
\parshape 2 \NumLen \LinLen 0pt \textwidth}
% indents two lines of text. Indentation= width of section number + 1em
\newcommand\IndTwo{%
\settowidth\NumLen{\thesection}
\addtolength\NumLen{1em}
\setlength\LinLen{\dimexpr\textwidth-\NumLen}%\the\NumLen\the\LinLen
\parshape 3 \NumLen \LinLen \NumLen \LinLen 0pt \textwidth}
\let\oldfootnote\footnote
\renewcommand{\footnote}[1]{\oldfootnote{~#1}}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\LTRfootnote{This is the first footnote.} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\LTRfootnote{This is the second footnote.} Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{document}
编辑:我在这里用摘录更新了这个问题。
我已附上一些预期输出的图片。此图显示了我想要的页眉。唯一的区别是我不想在第一页上显示页眉。我还希望英文标题位于奇数页,叙利亚文标题位于偶数页。