Skip to content

Commit

Permalink
Format toc subsections.
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenpieters committed Jul 30, 2023
1 parent ee06223 commit bfab002
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rules_doc_generator/model/section.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,13 @@ def to_latex(self, id_map: RefDict) -> str:
result += '\\phantomsection '
result += '\\addtocounter{subsubsection}{1} '
result += '\\addcontentsline{toc}{subsubsection}{\\arabic{section}.\\arabic{subsection}.\\arabic{subsubsection}~~ ' + self.format_text.to_latex(id_map) + '} '
result += f'\\refstepcounter{{manual_refs}} \label{{{self.id}}} {self.format_text.to_latex(id_map)}\n'
result += f'\\refstepcounter{{manual_refs}} \label{{{self.id}}} '
if self.toc:
result += '{\\Large \\color{darkgray}'
result += self.format_text.to_latex(id_map)
if self.toc:
result += '}'
result += '\n'
if self.snippet:
snippet_lines = self.snippet.to_latex(id_map).split('\n')
for snippet_text in snippet_lines:
Expand Down

0 comments on commit bfab002

Please sign in to comment.