-
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
Cannot set leftmargin
via \SetTemplateKeys{block}{display}
#755
Comments
The block still calls the legacy commands, in this case |
@u-fischer I see, thanks. I understand these interfaces are a work in progress. So is there any way to change the settings besides either passing the key directly to |
I think we have conflicting goals here. I think that the block implementation has to make use of the legacy list environments because they are all over the place in existing document classes and as long as those aren't updated (and many will not) this means that either we keep it (which allows for tagging even of those classes) or drop it (which means we rule out those as being usable going forward) without a full replacement of their code. So my tendency is to just document this as a restriction. |
@FrankMittelbach I'm a little confused. Isn't the point of separating the |
@mbertucci47 yes the idea is to separate both and for new classes that do not also implement Some of that behavior might eventually be controlled with something like |
I am not sure whether this is a viable solution. \DocumentMetadata \usepackage{kantlipsum} %\SetTemplateKeys{block}{display}{ \DeclareInstance{block}{list-1}{display}{leftmargin=2cm} \begin{document} \kant[1][1-2] \begin{enumerate}%[leftmargin=2cm] % this works \end{document} |
@senthilmm Yes that does work, thanks. @FrankMittelbach is it supported behavior to call something like \begingroup
\DeclareInstance{block}{list-1}{display}{leftmargin=2cm}
\begin{enumerate}
\item abc
\item \kant[1][1-2]
\kant[2][1-2]
\end{enumerate}
\endgroup |
It works but better would be to use @mbertucci47 your use of The real and basically perhaps the only purpose of that command is inside a template after the keys have been assigned, e.g., if an environment offers an optional argument to specify keys that argument is then passed to the |
@FrankMittelbach Thanks for the explanation, it clarified a lot. I have one followup question. If \DocumentMetadata
{
lang=en-US,
pdfversion=2.0,
pdfstandard=ua-2,
testphase={phase-III,math,table,title,firstaid}
}
\documentclass{article}
\usepackage{kantlipsum}
\begin{document}
\begin{enumerate}
\item \kant[1][1-2]
\begin{enumerate}
\item \kant[1][1-2]
\end{enumerate}
\end{enumerate}
\begingroup
\EditInstance{block}{list-1}{leftmargin=2cm,rightmargin=1cm}
\begin{enumerate}
\item \kant[1][1-2]
\begin{enumerate}
\item \kant[1][1-2]
\end{enumerate}
\end{enumerate}
\endgroup
\begingroup
\EditInstance{block}{list-1}{leftmargin=2cm}
\begin{enumerate}
\item \kant[1][1-2]
\begin{enumerate}
\item \kant[1][1-2]
\end{enumerate}
\end{enumerate}
\endgroup
\end{document} If nothing is specified for It's possible this should be a new issue, just let me know and I'll open one. |
This is because of the dependencies with the legacy list setting. What happens with lists is the following:
Now the defaults in
So leftmargin is set to So to prevent that you would need to specify Same would happen in standard 2e right now if one adds a value into This certainly needs a good documentation and going forward I hope we will see classes not using |
@FrankMittelbach Again, thanks for the detailed explanation. To me that procedure is counterintuitive; I wonder why lists were set up that way (I guess by Leslie Lamport?). I was especially surprised because as I mentioned, I'm trying to implement margin-changing for tagged theorems and the problem is still there when you replace |
@mbertucci47 can you explain in a bit more detail what you try to achieve? Eg with an example of intended output? |
I am trying to implement margin setting for keytheorems with tagging enabled and ran into trouble overriding the
block
settings locally with\SetTemplateKeys
. The following MWE shows the issue:If
leftmargin
orrightmargin
is set in the optional argument ofenumerate
then it works as expected. The same is true forrightmargin
if set with\SetTemplateKeys{block}{display}
. Butleftmargin
set in\SetTemplateKeys
has no effect. It doesn't matter if this is executed in the preamble or right before the environment.Am I trying to use this the wrong way? Or is this a bug in the block code? Even in the first case, it's odd that
rightmargin
does something whileleftmargin
does not.The text was updated successfully, but these errors were encountered: