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
Incorrect indentation when \AgdaHide is used #2623
Comments
By the way, I found a way to quickly generate PNG files without lots of empty space for use in bug reports:
|
I tried your original example, and found it looks even more wrong when the |
From the CHANGELOG: "Note that if any token in L or E belongs to a previous code block, then the constraint may not be satisfied unless (say) the \noindent Text.
\begin{AgdaMultiCode}{2}
\begin{code}
mutual
\end{code}
\begin{code}
postulate A : Set
\end{code}
\end{AgdaMultiCode}
More text.
\begin{AgdaMultiCode}{2}
\begin{code}
mutual
\end{code}
\begin{code}
postulate B : Set
\end{code}
\end{AgdaMultiCode}
Even more text. |
The example in the OP has been fixed by 2d85838. However, I'm not satisfied with how the following code is handled: \documentclass{article}
\usepackage{agda}
\pagestyle{empty}
\begin{document}
\begin{AgdaAlign}
\begin{code}
postulate
A : Set
\end{code}
\AgdaHide{
\begin{code}
mutual
\end{code}}
\begin{code}
postulate B : Set
\end{code}
\end{AgdaAlign}
\end{document} Output: I think |
Upon closer thought I think that the code above is handled in a reasonable way, assuming that it should be handled at all, rather than throwing an error message. Here is a different example, that one might expect should work: \documentclass{article}
\usepackage{agda}
\AgdaNoSpaceAroundCode{}
\pagestyle{empty}
\begin{document}
\begin{AgdaAlign}
\begin{code}
postulate
A
\end{code}
\AgdaHide{
\begin{code}
B
\end{code}}
\begin{code}
C : Set
\end{code}
\end{AgdaAlign}
\end{document} Output: Should we even try to handle code of this form? |
I added a test case for the example in the OP. |
Consider the following code:
In the resulting document the two code blocks are not aligned:
As a workaround one can add a module header, and make sure that everything is indented relative to it:
The text was updated successfully, but these errors were encountered: