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

Technical note on \endinput removing trailing space might be wrong? #210

Open
user202729 opened this issue Nov 16, 2022 · 0 comments
Open

Comments

@user202729
Copy link

The part that "\endinput ends the content before the final space" may be a documentation error.

I believe that \endinput by itself does not remove the trailing space by itself, rather it's a side effect of the fact that TeX ignores spaces after control sequences.

E.g. in the following code

\documentclass{article}
\usepackage{pythontex}
\begin{document}
\begin{pycode}
def f():
	print(r"1\empty")
\end{pycode}
123\pyc{f()}456
\end{document}

The space is not visible. While in the following code

\documentclass{article}
\usepackage{pythontex}
\begin{document}
\begin{pycode}
def f():
	print(r"1\endinput 77")
\end{pycode}
123\pyc{f()}456
\end{document}

The space is visible.

As such, I think it would be better to simply remove the suggestion of using \endinput to remove the trailing space. Using % suffices. (or even \empty / \relax but this one would be confusing)

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