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

Defines a command in the LaTeX template for Level 6 Markdown headers #8298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dvnrussell
Copy link

Adds a "\subsubparagraph" command definition to the LaTeX template. This command defaults to the current behavior, which compiles level 6 headers (tagged h6 in HTML) to plain text.

Closes #8069.

A potential concern for this change: the command is defined in default.latex, but that's only helpful when the standalone option is used. I am new to this codebase, so I'm not sure if the LaTeX writer has access to the standalone condition. Actually, this is my first pull request on an open source project, so I would love any feedback or advice.

Adds a "\subsubparagraph" command definition to the LaTeX template.
This command defaults to the current behavior, which
compiles level 6 headers (tagged h6 in HTML) to plain text.
@jgm
Copy link
Owner

jgm commented Sep 13, 2022

A potential concern for this change: the command is defined in default.latex, but that's only helpful when the standalone option is used.

That's exactly why I've hesitated on this before.

I am new to this codebase, so I'm not sure if the LaTeX writer has access to the standalone condition.

Yes, it does. (Check for a Just value in writerTemplate in WriterOptions).
In the LW monad this is in state, so

  isStandalone <- gets (isJust . writerTemplate . stOptions)

will get it for you.

However, I'm not sure I'd want to make the behavior vary depending on whether a template is used. That could be confusing, I think.

Your PR looks good. I just need to think more about whether it's too much of a drawback that fragments produced after this change may not compile without special macro definitions.

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.

Markdown to LaTeX: Level 6 Heading
2 participants