Skip to content

Commit b71a7bc

Browse files
skotnicznymarijnh
authored andcommitted
Better TOC
1 parent d316b47 commit b71a7bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/render_latex.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ let renderer = {
9898
paragraph_close() { return "" },
9999

100100
heading_open(token) {
101-
if (token.tag == "h1") return `\\label{${chapter[1]}}\\chapter${/^00/.test(file) ? "*" : ""}{`
101+
if (token.tag == "h1") return `\\label{${chapter[1]}}${/^00/.test(file) || chapter[1] === "hints" ? "\\addchap" : "\\chapter"}{`
102102
if (token.tag == "h2") return `\n\n${id(token)}\\section{`
103103
if (token.tag == "h3") return `\n\n${id(token)}\\subsection{`
104104
if (token.tag == "h4") return `\n\n${id(token)}\\subsubsection{`

0 commit comments

Comments
 (0)