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

First line printed outside of environment #44

Closed
noctux opened this issue Apr 1, 2019 · 3 comments
Closed

First line printed outside of environment #44

noctux opened this issue Apr 1, 2019 · 3 comments
Labels
wontfix this is by design or for other reasons unfixable

Comments

@noctux
Copy link

noctux commented Apr 1, 2019

Hello, thank you for the package!

I'm currently porting our exercises from exsheets to xsim, and noticed a strange behaviour. Up to now, we used the following structure for crossreferencing:

\begin{exTask}[name=Verarbeitung]\label{checksum}
...
\end{exTask}

However, with xsim, the label is not correctly set afterwards. However, it works when the \label command is placed on a new line. The problem seems to be that any content that is on the same line as the start of the environment is acutally emitted before the environment is started.

MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}

\usepackage{xsim,lipsum,xcolor}

\begin{document}

\begin{exercise}[subtitle=lipsum] ASDF
	\lipsum[1]
\end{exercise}

\end{document}

Output:
2019-04-01-123525_662x350_scrot

Thank your for your effort!

@cgnieder
Copy link
Owner

This is because the inside of an exercise is written to an external file. The reading mechanism cannot cope with stuff that is on the same line as \begin{exercise}. I am afraid I can't change this behaviour

@cgnieder cgnieder added the wontfix this is by design or for other reasons unfixable label Sep 26, 2019
@cgnieder
Copy link
Owner

This is actually mentioned in the manual but I will emphasize it in the next release!

@noctux
Copy link
Author

noctux commented Sep 26, 2019

Thank you for the explanation and for looking into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix this is by design or for other reasons unfixable
Projects
None yet
Development

No branches or pull requests

2 participants