Skip to content
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

Different behavior of \setlength in preamble in acmart documentclass #501

Open
sfzhu93 opened this issue Jul 19, 2023 · 0 comments
Open

Comments

@sfzhu93
Copy link

sfzhu93 commented Jul 19, 2023

\documentclass[acmsmall,review,anonymous,screen]{acmart}
% \documentclass{article}

\newlength{\myproofrightwidth}
\setlength{\myproofrightwidth}{0.3\linewidth} % line 1

\newcommand\rightside[1]
{\penalty-1 \mbox{~}\hfill%
 \begin{minipage}[t]{\myproofrightwidth}%
    by #1%
 \end{minipage}}

\begin{document}

\setlength{\myproofrightwidth}{0.3\linewidth} % line 2: necessary for acmart
left text \rightside{\the\linewidth}

\end{document}

In this code snippet, setting \myproofrightwidth in preamble has a different behavior from other document classes, such as article or ieeetran. If line 2 is commented out, the right side prints 0.0pt. However, this behavior is different from article. In article, the right side correctly prints the line width as a non-zero value. In acmart, you have to set up the length again at the beginning of the document to behave the same as in other document classes.

overleaf document for the above code snippet: https://www.overleaf.com/read/ybmyxnydwjff

This bug makes some of the packages to behave differently, e.g., using the \BY command in pfsteps. The snippet also comes from a use case of pfsteps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant