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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/templates/default.latex
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ $endif$
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\providecommand{\subsubparagraph}{} % template for Level 6 Markdown headers
$if(numbersections)$
\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$}
$else$
Expand Down
3 changes: 2 additions & 1 deletion src/Text/Pandoc/Writers/LaTeX.hs
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,7 @@ sectionHeader classes ident level lst = do
3 -> "subsubsection"
4 -> "paragraph"
5 -> "subparagraph"
6 -> "subsubparagraph"
_ -> ""
inQuote <- gets stInQuote
let prefix = if inQuote && level' >= 4
Expand All @@ -686,7 +687,7 @@ sectionHeader classes ident level lst = do
let stuffing = star <> optional <> contents
stuffing' <- hypertarget True ident $
text ('\\':sectionType) <> stuffing <> lab
return $ if level' > 5
return $ if level' > 6
then txt
else prefix $$ stuffing'
$$ if unnumbered && not unlisted
Expand Down
1 change: 1 addition & 0 deletions test/lhs-test.latex
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\providecommand{\subsubparagraph}{} % template for Level 6 Markdown headers
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
Expand Down
1 change: 1 addition & 0 deletions test/lhs-test.latex+lhs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\providecommand{\subsubparagraph}{} % template for Level 6 Markdown headers
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
Expand Down
1 change: 1 addition & 0 deletions test/writer.latex
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\providecommand{\subsubparagraph}{} % template for Level 6 Markdown headers
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
Expand Down
1 change: 1 addition & 0 deletions test/writers-lang-and-dir.latex
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\providecommand{\subsubparagraph}{} % template for Level 6 Markdown headers
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifLuaTeX
\usepackage[bidi=basic]{babel}
Expand Down