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

Header identifiers in chapters for Context output #3968

Closed
PeterDavidson opened this issue Oct 12, 2017 · 1 comment
Closed

Header identifiers in chapters for Context output #3968

PeterDavidson opened this issue Oct 12, 2017 · 1 comment

Comments

@PeterDavidson
Copy link

I'm not sure if it is intended behaviour, but when using the Context writer and
--top-level-division=chapter, no header identifiers are applied to chapters. This is not the case when the top level identifier is section, and does not seem to apply to other writers (such as latex).

If we have test.md

# Chapter

## Section

### Subsection

# Another Chapter {#another}

and run

pandoc --top-level-division=chapter -t context -o temp.tex test.md

we get

\chapter{Chapter}
\section[section]{Section}

\subsection[subsection]{Subsection}

\chapter{Another Chapter}

but

pandoc --top-level-division=chapter -t latex -o temp.tex test.md

gives

\chapter{Chapter}\label{chapter}

\section{Section}\label{section}

\subsection{Subsection}\label{subsection}

\chapter{Another Chapter}\label{another}

and

pandoc --top-level-division=section -t context -o temp.tex test.md

gives

\section[chapter]{Chapter}

\subsection[section]{Section}

\subsubsection[subsection]{Subsection}

\section[another]{Another Chapter}

To make appendices work properly I need to have chapters as the top level division, but the lack of labels/identifiers is causing problems. Can this be fixed?

@jgm
Copy link
Owner

jgm commented Oct 12, 2017

It's just an oversight. I'll fix it.

@jgm jgm closed this as completed in 75d8c99 Oct 12, 2017
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

2 participants