expex
当我一起使用和时遇到两个问题parcolumns
。
- 无光泽的柱子上出现了很大的缝隙。
- 注释上方出现间隙,导致两列/段落不再对齐。
为什么会出现这些问题?又该如何克服?
编辑#1: 这个问题出现了类似的问题,但解决方案与我不太相关。
MWE(XeLaTeX):
\documentclass{book}
\usepackage{parcolumns}
\usepackage{expex}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont[Script=Hebrew]{FrankRuehl}
\newfontfamily\englishfont{Linux Libertine O}
\usepackage{lipsum}
\usepackage{changepage}
\strictpagecheck
\makeatletter
\def\pc@placeboxes{%
\global\let\@tempa\relax%
\hb@xt@\linewidth{%
\vfuzz30ex %
\vbadness\@M%
\splittopskip\z@skip%
\checkoddpage\ifoddpage
\count@\z@%
\loop\ifnum\count@<\pc@columncount%
\advance\count@\@ne%
\my@placeboxes@body%
\repeat%
\else
\count@\pc@columncount%
\loop\ifnum\count@>\z@%
\my@placeboxes@body%
\advance\count@\m@ne%
\repeat%
\fi
}%
\@tempa%
}
\def\my@placeboxes@body{%
\expandafter\ifvoid\csname pc@column@\number\count@\endcsname%
\hskip\csname pc@column@width@\number\count@\endcsname%
\else%
\expandafter\setbox\expandafter\@tempboxa%
\expandafter\vsplit\csname pc@column@\number\count@\endcsname%
to \dp\strutbox%
\vbox{\unvbox\@tempboxa}%
\fi%
\expandafter\ifvoid\csname pc@column@\number\count@\endcsname%
\else%
\global\let\@tempa\pc@placeboxes%
\fi%
\ifnum\count@>\z@%
\strut%
\hfill%
\ifpc@rulebetween%
\vrule%
\hfill%
\fi%
\fi%
}
\makeatother
\begin{document}
\begin{parcolumns}[%
sloppy = true,
sloppyspaces = true,
nofirstindent = true,
colwidths = {1=0.67\textwidth, 2=0.29\textwidth}
]{2}
\colchunk[1]{\exdisplay\begingl
\gla Far far away behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. //
\glb Far far away behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. //
\glc Far far away behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. //
\endgl\xe
}
\colchunk[2]{\small%
\lipsum[2]
}
\end{parcolumns}
\end{document}
输出:
编辑#2:更简单的MWE(XeLaTeX):
\documentclass{book}
\usepackage{parcolumns}
\usepackage{expex}
\usepackage{lipsum}
\begin{document}
\begin{parcolumns}[%
sloppy = true,
sloppyspaces = true,
nofirstindent = true,
colwidths = {1=0.67\textwidth, 2=0.29\textwidth}
]{2}
\colchunk[1]{\exdisplay\begingl
\gla Far far away behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. //
\glb Far far away behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. //
\glc Far far away behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. //
\endgl\xe
}
\colchunk[2]{\small%
\lipsum[2]
}
\end{parcolumns}
\end{document}
答案1
\begingl
和之间的物品\endgl
被放入一个箱子中。因此,parcolumns
和parallel
无法正常完成工作,因为他们只看到一条很长的线。
以下破解方法拆开了外包装盒。但内部零件仍装在盒子里。
\documentclass{book}
\usepackage{parcolumns}
\usepackage{expex}
\usepackage{lipsum}
\newsavebox\expexBox
\newenvironment{unvtop}{%
\let\orgvtop\vtop
\protected\def\vtop{%
\let\vtop=\orgvtop
\global\setbox\expexBox=\vtop
}%
\ignorespaces
}{%
\unvbox\expexBox
\ignorespacesafterend
}
\begin{document}
\begin{parcolumns}[%
sloppy = true,
sloppyspaces = true,
nofirstindent = true,
colwidths = {1=0.67\textwidth, 2=0.29\textwidth}
]{2}
\colchunk[1]{%
\begin{unvtop}
\exdisplay\begingl
\gla A Far far away behind the word mountains, far from the countries
Vokalia and Consonantia, there live the blind texts. //
\glb B Far far away behind the word mountains, far from the countries
Vokalia and Consonantia, there live the blind texts. //
\glc C Far far away behind the word mountains, far from the countries
Vokalia and Consonantia, there live the blind texts. //
\endgl\xe
\end{unvtop}
}
\colchunk[2]{\small%
\lipsum[2]
}
\end{parcolumns}
\end{document}