reledmac 中的居中文本

reledmac 中的居中文本

请考虑以下 MWE

\documentclass[12pt, twoside]{book}
\usepackage{polyglossia,fontspec,xunicode}
\usepackage[a4paper, total={16cm, 22cm}]{geometry}
\usepackage{libertine}
\usepackage{unicode-math}
\usepackage[noresetlinenumannotation, series={A}, noend,noeledsec,noledgroup]{reledmac}
\newcommand{\bv}[1]{\linenumannotation{#1}}
\makeatletter
\Xwraplinenumannotation{\@firstofone}
\renewcommand{\linenumrep}[1]{}
\makeatother
\Xnoidenticallinenumannotation
\fnpos{critical-familiar}
\Xarrangement[A]{paragraph}

\setmainfont{TeX Gyre Pagella}
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\vspace*{\fill}
\begin{center}
\end{center}
\vspace{\fill}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
\begin{document}
\chapter*{}
   \beginnumbering
  \linenummargin{inner}
  \pstart
  \noindent
\begin{center}
    \ledouternote{A2\textit{r}}Here beginneth the story of my life as told to you by the most righteous, most learned fellow of the West Midlands\\
  \textsc{Dr Lorem Ipsum}.\\
  \end{center}
  \pend 
  \endnumbering
  \firstlinenum{1}
  \linenumincrement{1}
  \beginnumbering
  \linenummargin{inner}
  \pstart
    \bv{1}
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Et leo duis ut diam. Viverra orci sagittis eu volutpat odio facilisis mauris. Ac feugiat sed \edtext{lectus}{\Afootnote{lectulus}} vestibulum mattis. Eget sit amet tellus cras adipiscing. Nec dui nunc mattis enim ut. Tincidunt arcu non sodales neque sodales\ledouternote{A2\textit{v}}. Semper feugiat nibh sed pulvinar proin gravida hendrerit. Ornare aenean euismod elementum nisi quis eleifend quam. Vitae elementum curabitur vitae nunc sed velit dignissim \edtext{sodales}{\Afootnote{sodalis}} ut. Ullamcorper malesuada proin libero nunc. Nunc congue nisi vitae suscipit tellus mauris a diam. Orci dapibus ultrices in iaculis nunc.

\bv{2}Tempus quam pellentesque nec nam aliquam sem et. Netus et malesuada fames ac turpis. Euismod lacinia at quis risus sed vulputate odio ut. Ut sem nulla pharetra diam sit amet. Sed libero enim sed faucibus turpis in eu. Interdum consectetur libero id faucibus nisl tincidunt. Elementum nisi quis eleifend quam adipiscing. Eget mi proin sed libero enim. Sed velit dignissim sodales ut eu sem integer vitae justo. Venenatis lectus magna fringilla urna porttitor rhoncus dolor purus. Pellentesque. 
    \pend
    \endnumbering
    \end{document}

由于某些原因,每当我将reledmac环境中的某些文本居中时,段落就会出现一些怪异的情况。在这种情况下,我无法显示旁注,并且间距不均匀。你知道原因吗?谢谢!平均能量损失

答案1

  1. 命令\centering(由环境调用center)重新定义\\
  2. 对此的重新定义\\包括插入一些\vspace
  3. Reledmac 假定...\vspace内部不存在,并且每行具有相同的高度。\pstart\pend
  4. 这就是你为什么会发现奇怪的事情的原因。
  5. 你应该改变段落而不是使用\\
  6. 此外,center环境还会添加垂直空间,这在 内部是有问题的\pstart。因此请使用\centering代替。

所以 :

\documentclass[12pt, twoside]{book}
\usepackage{polyglossia,fontspec,xunicode}
\usepackage[a4paper, total={16cm, 22cm}]{geometry}
\usepackage{libertine}
\usepackage{unicode-math}
\usepackage[noresetlinenumannotation, series={A}, noend,noeledsec,noledgroup]{reledmac}
\newcommand{\bv}[1]{\linenumannotation{#1}}
\makeatletter
\Xwraplinenumannotation{\@firstofone}
\renewcommand{\linenumrep}[1]{}
\makeatother
\Xnoidenticallinenumannotation
\fnpos{critical-familiar}
\Xarrangement[A]{paragraph}

\setmainfont{TeX Gyre Pagella}
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}
\vspace*{\fill}
\begin{center}
\end{center}
\vspace{\fill}
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
\begin{document}
\chapter*{}
   \beginnumbering
  \linenummargin{inner}
  \pstart
  \noindent
  \centering
    \ledouternote{A2\textit{r}}Here beginneth the story of my life as told to you by the most righteous, most learned fellow of the West Midlands

  \textsc{Dr Lorem Ipsum}.
  \pend
  \endnumbering
  \firstlinenum{1}
  \linenumincrement{1}
  \beginnumbering
  \linenummargin{inner}
  \pstart
    \bv{1}
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Et leo duis ut diam. Viverra orci sagittis eu volutpat odio facilisis mauris. Ac feugiat sed \edtext{lectus}{\Afootnote{lectulus}} vestibulum mattis. Eget sit amet tellus cras adipiscing. Nec dui nunc mattis enim ut. Tincidunt arcu non sodales neque sodales\ledouternote{A2\textit{v}}. Semper feugiat nibh sed pulvinar proin gravida hendrerit. Ornare aenean euismod elementum nisi quis eleifend quam. Vitae elementum curabitur vitae nunc sed velit dignissim \edtext{sodales}{\Afootnote{sodalis}} ut. Ullamcorper malesuada proin libero nunc. Nunc congue nisi vitae suscipit tellus mauris a diam. Orci dapibus ultrices in iaculis nunc.

\bv{2}Tempus quam pellentesque nec nam aliquam sem et. Netus et malesuada fames ac turpis. Euismod lacinia at quis risus sed vulputate odio ut. Ut sem nulla pharetra diam sit amet. Sed libero enim sed faucibus turpis in eu. Interdum consectetur libero id faucibus nisl tincidunt. Elementum nisi quis eleifend quam adipiscing. Eget mi proin sed libero enim. Sed velit dignissim sodales ut eu sem integer vitae justo. Venenatis lectus magna fringilla urna porttitor rhoncus dolor purus. Pellentesque.
    \pend
    \endnumbering
    \end{document}

附言:下次,请提供不需要特殊字体的 MWE。

相关内容