Skip to content

Conversation

@mzuenni
Copy link
Collaborator

@mzuenni mzuenni commented Nov 24, 2025

No description provided.

command = config.args.tex_command
if command is None and tex_path.is_file():
try:
with tex_path.open() as f:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you parsing the source to determine which latex compiler to use?
Can you add some example command and usecase in a comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just support the "standart" tex practice of magic comments: https://tex.stackexchange.com/tags/magic-comment/info

The bapctools wai of dealing with this would be to add tex_command to the bapctools.yaml.

Copy link
Owner

@RagnarGrootKoerkamp RagnarGrootKoerkamp Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never saw this before; weird stuff. Do you actually have a usecase for it?

Which document should contain the comment? Does it modify the mode for the entire problemset if I put it in one problem.en.tex?

I assume it should be in the main entrypoint file right? ie problem.tex or contest.tex, and the user can specify this by overriding/customizing these files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its supposed to go in the main file, i.e., the one with the document class.

The usecase is that your editor can pick this up and select the right tex to compile your documents

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you add a comment with a link or so then ready to go :)

@mzuenni mzuenni merged commit 6ca77dc into main Dec 2, 2025
6 checks passed
@mzuenni mzuenni deleted the latex-command branch December 2, 2025 13:34
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

Successfully merging this pull request may close these issues.

3 participants