-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lineno breaks/hides content, if \nointerlineskip
is used.
#3
Comments
@T-F-S Thanks for reporting this. I don't understand the lineno code well enough to know how to fix this, but I'd be happy to accept a complete patch if you have one. |
Closing this issue as I believe this has been resolved by T-F-S/tcolorbox#183; if that's not correct please let me know. |
This is issue is reproducible without
Full example
\documentclass{article}
\usepackage{lineno}
\usepackage{multicol}
\makeatletter
\def\muzimuzhiPATCH{%
\def\@LN@depthbox{%
% \@tempdima is set to \prevdepth before
\ifdim\@tempdima>-1000pt\relax
\dp\@tempboxa=\@tempdima
\fi
\nointerlineskip
\ifdim\@tempdima>-1000pt\relax
\kern-\@tempdima
% \else % is this needed?
% \kern-\dp\@tempboxa
\fi
\box\@tempboxa}}
\def\FrankPATCH{%
\def\@LN@depthbox{%
\ifdim\@tempdima = -1000pt
% \nointerlineskip is already set so we don't need set it again (and we shouldn't back up)
\else
\dp\@tempboxa=\@tempdima
\nointerlineskip
\kern-\@tempdima
\fi
\box\@tempboxa}}
\makeatother
\begin{document}
\def\testWithPrevdepth#1{{%
\noindent\texttt{\UseName{str_if_empty:nTF}{#1}{default}{\detokenize{#1}}}\par
before text\par
#1%
\noindent\vskip0pt % any vskip triggers the problem
content\par
after text\par}\medskip}
\def\tests#1{{#1%
\testWithPrevdepth{}
\testWithPrevdepth{\prevdepth=10pt}
\testWithPrevdepth{\prevdepth=-10pt}
\testWithPrevdepth{\prevdepth=-100pt}
\testWithPrevdepth{\prevdepth=-1000pt}
\newpage
}}
\tests{}
\tests{\linenumbers}
\tests{\linenumbers\muzimuzhiPATCH}
\tests{\linenumbers\FrankPATCH}
\end{document} |
Thanks @muzimuzhi for the examples. I've applied Frank's patch to |
…00pt - See #3 (comment) - Thanks to @muzimuzhi and @FrankMittelbach for the patches and testing
Thanks again @muzimuzhi I've applied the additional patches. Can you please check the latest version of I couldn't work out how to remove the extra inter-line skip. It's probably fine as is, so I may leave it for now. |
I've submitted a new release of |
Ignoring the restored inter-line skip, I can confirm |
In T-F-S/tcolorbox#183 a problem in interaction between
tcolorbox
andlineno
was reported.The problem is nailed down to a
\prevdepth
problem withlineno
in T-F-S/tcolorbox#183 (comment):Also, an incomplete patch for
lineno
is provided in T-F-S/tcolorbox#183 (comment)The text was updated successfully, but these errors were encountered: