-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
ConTeXt writer: new section syntax and --section-divs #4295
Conversation
This is not yet ideal. This piece of markdown # Section
## Subsection
### Subsubsection
#### Subsubsubsection
##### Subsubsubsubsection
###### Subsubsubsubsubsection
####### Subsubsubsubsubsubssection translates to \section[title={Section},reference={section}]
\subsection[title={Subsection},reference={subsection}]
\subsubsection[title={Subsubsection},reference={subsubsection}]
\subsubsubsection[title={Subsubsubsection},reference={subsubsubsection}]
\subsubsubsubsection[title={Subsubsubsubsection},reference={subsubsubsubsection}]
\
\ The problem is not so much in the spurious backslashes but rather in the fact that even with the original behaviour section levels beyond 5 were silently discarded. What should be the desired behaviour here? I would go for simply generating all those lower levels even if they are not predefined in ConTeXt. If the user wants to use such deep nesting they should just adapt their preamble. |
There are a number of possibilities:
In any case, it's probably most convenient (and least astonishing) to update the standalone preamble with the environments that allow the output to generate a document with the titles that reflect the author's intent. Also, nice work on the |
@DaveJarvis
I would just generate |
That's a good idea. Perhaps output a warning, then, directing the user to see the subsub module in the event they have nested too deeply? |
+++ Henri Menke [Jan 23 18 15:20 ]:
What should be the desired behaviour here? I would go for simply
generating all those lower levels even if they are not predefined in
ConTeXt. If the user wants to use such deep nesting they should just
adapt their preamble.
That sounds okay to me.
|
@jgm Done. I have also added a test for |
Thanks, merged! |
Fixes #2609.
This PR introduces the new-style section headings.
On top of this, the ConTeXt writer now supports the
--section-divs
option to write sections in the fenced style@pmazaitis @ousia @DaveJarvis