只有当我打开时,我才会在-drivenhyperref
的第一列中遇到奇怪的垂直对齐问题。没有,第一列的行会像其他列一样垂直对齐到顶部。打开后,第一列的行就像它们有一个内置的换行符一样,并在换行列中向下移动一行。MWE -- 比较注释与未注释:datatool
longtabu
hyperref
hyperref
hyperref
\documentclass[12pt]{article}
\usepackage{filecontents}
\begin{filecontents}{actionitems.csv}
ID|Project|Opened|Due|Issue|From|Lead|Closed|Note
1|Area 51|2012/12/12|2012/12/21|Prepare for the ending of the world|A. Crackpot|So Crazy||12/12 Survived the trial day \DTLpar 12/22 Bored now -- go on to the next thing
2|Roswell|2012/12/12|2012/12/21|Prepare for alien abduction|Tinfoil Hat|I.M. Gullible||12/21 Where are they? \DTLpar 12/22 Left Behind!
\end{filecontents}
\usepackage{datatool}
\DTLsetseparator{|}
\DTLloaddb{actionitems}{actionitems.csv}
\usepackage{fullpage}
\usepackage{booktabs,longtable,tabu}
\usepackage{pdflscape}
% Note difference in vertical alignment of ID column with package hyperref commented or not:
\usepackage{hyperref}
\begin{document}
\pagestyle{empty}
\tabulinesep=1mm
\begin{landscape}
\begin{longtabu}{ X[1,r] X[2,l] X[2,l] X[2,l] X[5,l] X[3,l] X[5,l] }
\caption*{Open Action Items}\\
\toprule
ID & Project & Opened & Due & Issue & Lead & Note\\ \hline
\endhead
\DTLforeach*{actionitems}
{\id=ID,\project=Project,\opened=Opened,\due=Due,\issue=Issue,\lead=Lead,\note=Note}
{\id & \project & \opened & \due & \issue & \lead & \note\\ \hline}
\end{longtabu}
\end{landscape}
\end{document}
答案1
这种行为是典型的行为,当一个\special
或其他那是什么节点以垂直模式显示。文档grfguide
在颜色特效的上下文中讨论了这个问题,但这是一个普遍的问题。
解决方法与颜色相同,进入水平模式即可避免该问题。
这似乎行得通
\begin{longtabu}{ >{\mbox{}}X[1,r] X[2,l] X[2,l] X[2,l] X[5,l] X[3,l] X[5,l] }
% ^^^^^^^^^^