-
Notifications
You must be signed in to change notification settings - Fork 16
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
\newtheorem
does not use trivlist settings
#767
Comments
Your examples, seem to be a white lie @mbertucci47 :-). You say Anyhow, your proposed solution goes in the wrong direction in my opinion. You do not want to hardwire such settings somewhere in the middle of the code (this is worse than allowing So a better solution, in my opinion, might be this:
That doesn't solve this, unfortunately:
That is a bug in the code; I guess I confused myself trying to support the various legacy setting possibilities. For the moment that could be (partly) repaired with
but this way you can't alter the |
@FrankMittelbach Wow I did not even notice that, yes you are right. Sorry about that!
Yes that's definitely better. When I naively add your proposed code to my example it seems to indent the entire block, but I suspect some other changes being made in latex3/latex2e#1561 might fix this. |
It needed more than my handwaving reply (due to one or two bugs discovered this way. I think it is now correct and will show up in the next dev release in a couple of days. |
@mbertucci47 Its now in the dev release an that should be available by now, so please give it a try and see if my additions and changes have improved the situation |
@FrankMittelbach Looks good to me. The only difference I see in my example between tagging and no tagging is with tagging, the distance between the theorem name and number is slightly less than without tagging. With pdflatex (so computer modern, not latin modern), it's enough to change line breaks. |
To clarify, I think that issue was there before the most recent change. Here are screenshots showing the difference. Both were compiled with pdflatex-dev. Without taggingWith taggingThe |
it is not the \labelsep; it is the fact that pdflatex by default still uses OT1 fonts, but tagging always T1 fonts and they are different. If you run both with \usepackage[T1]{fontenc} the linebreaking changes not so much. But there is another difference in that the text body is somewhat offset on the page. Nothing to do with the list stuff, that looks like something entirely different (and should probably get some test file and an issue for itself. |
Good point, but I don't know what you mean by "the linebreaking changes not so much". If I load
I'm not able to replicate this. Adding To avoid confusion, here is the test file I'm using. \DocumentMetadata
{
lang=en-US,
pdfversion=2.0,
pdfstandard=ua-2,
testphase={phase-III,math,title,table,firstaid}
}
\documentclass{article}
\usepackage{showframe}
\usepackage[T1]{fontenc}
\usepackage{kantlipsum}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}
\kant[1][1-2]
\kant[2][1-2]
\begin{enumerate}
\item abc
\item \kant[3][1-2]
\kant[4][1-2]
\end{enumerate}
\end{theorem}
\end{document} and commenting/uncommenting the |
hmm, probably means I'm not able to compare the right files :-) yes, confirmed there is this difference and it looks like an incompatibility: we don't box the theorem heading so the space inside contributes to the line strech and that seems to be enough to alter the line breaking a lot (actually for the better in my opinion in that case, but that isn't the point here)
That looks like a typical Heisenberg: So all in all what remains is put an \mbox around the heading of the theorem. |
Ah apologies for the confusion caused by my silly American defaults :) I can replicate the shifting issue by setting |
With my letter paper default and lualatex-dev, toggling the commented lines in the example that follows gives the following behavior. Bad output
Good output
With my letter-default, the shifted text only occurs with the first, bad output. I don't know if this is expected behavior so I will let someone else open an issue if needed. %\DocumentMetadata{} % toggle
\documentclass[a4paper]{article}
%\usepackage{graphics} % toggle
\usepackage{kantlipsum}
\begin{document}
\kant[1-4]
\end{document} |
I know there is some discrepancy expected in output between the tagging code
\newtheorem
and the usual one. However, I think with minimal effort they could look much closer than they currently do. Right now\@begintheorem
calls\UseInstance{block}{theorem}{}
but this could be changed to\UseInstance{blockenv}{theorem}{par-skip=\parskip,parindent=\parindent}
. This makes the heading indented but adding\noindent
before\mode_leave_vertical:
seems to fix this without affecting tagging (I don't claim this is the correct fix).Here's the output without tagging.
Now adding
\DocumentMetadata { lang=en-US, pdfversion=2.0, pdfstandard=ua-2, testphase={phase-III,math,title,table,firstaid} }
to the example above gives
With the proposed fix:
Similar changes would need to be made for the amsthm firstaid.
Edit
Hmm I see the proposed fix also affects the indent in
enumerate
. Not sure about that at the moment.The text was updated successfully, but these errors were encountered: