段落末尾的额外空白行(reledpar / reledmac)

段落末尾的额外空白行(reledpar / reledmac)

我正在使用reledpar/reledmac将“概要”格式化为两列,并且偶尔(显然是随机的)看到额外的空白行,而源文本中没有空白行/换行符。您可以在以下示例中看到空白行: 在此处输入图片描述

这是我的.tex 文件的代码:

    \documentclass[oneside, 8pt]{extarticle}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, left=15mm, right=35mm]{geometry}
\usepackage[german]{babel}
\usepackage{alltt}
\usepackage{relsize}
\usepackage{subscript}
\usepackage[normalem]{ulem}
\usepackage{fontawesome}
\usepackage{reledmac}
\usepackage{reledpar}

\setlength \parindent{0pt}
\rightnoteupfalse
\linenummarginR{left}
\pagenumbering{gobble}
\title{Does not matter}
\begin{document}
\begin{pairs}
\begin{Leftside}
\beginnumbering{}

\pstart{}
first ~\\
\skipnumbering{}
\pend{}


\pstart{}
this is a line\pend{}
\pstart{}
another line\pend{}
\pstart{}
line \pend{}
\pstart{}
just a line\pend{}
\pstart{}
and a line\pend{}
\pstart{}
oh it's a line~\\
\skipnumbering{}
\pend{}

\pstart{}
just a line\pend{}
\pstart{}
and a line\pend{}
\pstart{}
oh it's a line~\\
\skipnumbering{}
\pend{}

\pstart{}
just a line\pend{}
\pstart{}
and a line\pend{}
\pstart{}
oh it's a line~\\
\skipnumbering{}
\pend{}




\endnumbering{}
\end{Leftside}
\begin{Rightside}
\beginnumbering{}

\pstart{}
a heading\\
\skipnumbering{}
\pend{}


\pstart{}
\pend{}
\pstart{}
\pend{}
\pstart{}
\pend{}
\pstart{}
\pend{}
\pstart{}
\pend{}
\pstart{}
~\\
\skipnumbering{}
\pend{}


\pstart{}
just a line\pend{}
\pstart{}
and a line\pend{}
\pstart{}
oh it's a line~\\
\skipnumbering{}
\pend{}

\pstart{}
just a line\pend{}
\pstart{}
and a line\pend{}
\pstart{}
~\\
\skipnumbering{}
\pend{}

\endnumbering{}
\end{Rightside}
\end{pairs}
\Columns{}
\end{document}

我认为这可能是一个类似的问题邮政,但我没有使用 setspace 包,所以我认为这是一个不同的问题。有什么解决办法吗?

答案1

问题出~\\在右侧。这会使你的一侧更长。并且 reledpar 使左侧的高度相同。

考虑一下这段代码,它是我从您的代码中简化而来的:

  • 不再肤浅{}
  • 不再\skipnumbering
  • 1 每行都添加行号,以便调试
  • MWE 不需要任何类或包

这是代码

\documentclass[oneside, ]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, left=15mm, right=35mm]{geometry}
\usepackage[german]{babel}
\usepackage{reledmac}
\usepackage{reledpar}

\setlength \parindent{0pt}
\rightnoteupfalse
\firstlinenum*{1}
\linenumincrement*{1}
\linenummarginR{left}
\pagenumbering{gobble}
\title{Does not matter}
\begin{document}
\begin{pairs}
\begin{Leftside}
\beginnumbering

\pstart
first ~\\
\pend


\pstart
this is a line
\pend
\pstart
another line
\pend
\pstart
line
\pend
\pstart
just a line
\pend
\pstart
and a line here the problem
\pend
\pstart
oh it's a line~
\pend

\pstart
just a line
\pend
\pstart
and a line
\pend
\pstart
oh it's a line
\skipnumbering
\pend

\pstart
just a line
\pend
\pstart
and a line
\pend
\pstart
oh it's a line~\\
\skipnumbering
\pend




\endnumbering
\end{Leftside}
\begin{Rightside}
\beginnumbering

\pstart
a heading\\
\pend


\pstart
\pend
\pstart
\pend
\pstart
\pend
\pstart
\pend
\pstart
\pend
\pstart
~\\
\pend


\pstart
just a line
\pend
\pstart
and a line
\pend
\pstart
oh it's a line~\\
\pend

\pstart
just a line
\pend
\pstart
and a line
\pend
\pstart
~\\
\pend

\endnumbering
\end{Rightside}
\end{pairs}
\Columns
\end{document}

产生以下输出 输出

您可以看到右侧和左侧的额外空格是相同的,并且~\\与右侧的您相对应。

如果我删除它,一切都好了

\documentclass[oneside, ]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, left=15mm, right=35mm]{geometry}
\usepackage[german]{babel}
\usepackage{reledmac}
\usepackage{reledpar}

\setlength \parindent{0pt}
\rightnoteupfalse
\firstlinenum*{1}
\linenumincrement*{1}
\linenummarginR{left}
\pagenumbering{gobble}
\title{Does not matter}
\begin{document}
\begin{pairs}
\begin{Leftside}
\beginnumbering

\pstart
first ~\\
\pend


\pstart
this is a line
\pend
\pstart
another line
\pend
\pstart
line
\pend
\pstart
just a line
\pend
\pstart
and a line here the problem
\pend
\pstart
oh it's a line
\pend

\pstart
just a line
\pend
\pstart
and a line
\pend
\pstart
oh it's a line
\pend

\pstart
just a line
\pend
\pstart
and a line
\pend
\pstart
oh it's a line
\pend




\endnumbering
\end{Leftside}
\begin{Rightside}
\beginnumbering

\pstart
a heading\\
\pend


\pstart
\pend
\pstart
\pend
\pstart
\pend
\pstart
\pend
\pstart
\pend
\pstart
\pend


\pstart
just a line
\pend
\pstart
and a line
\pend
\pstart
oh it's a line
\pend

\pstart
just a line
\pend
\pstart
and a line
\pend
\pstart
\pend

\endnumbering
\end{Rightside}
\end{pairs}
\Columns
\end{document}

在此处输入图片描述

问题是“你为什么要添加~\\?”我确信你这样做有充分的理由,但由于 reledmac 的内部机制,这不是一个好主意。你期望什么?我认为我们在 reledmac 内部有一个针对你的问题的解决方案。

相关内容