Skip to content

Commit

Permalink
section numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatera committed Mar 29, 2024
1 parent 24d39f6 commit da4d799
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mathics/doc/latex_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,11 +737,11 @@ def latex(self, doc_data: dict, quiet=False) -> str:
sections = "\n\n".join(section.latex(doc_data) for section in self.subsections)
slug = f"{self.chapter.part.slug}/{self.chapter.slug}/{self.slug}"
section_string = (
"\n\n\\section*{%s}{%s}\n" % (title, index)
"\n\n\\section{%s}{%s}\n" % (title, index)
+ "\n\\label{%s}" % latex_label_safe(slug)
+ "\n\\sectionstart\n\n"
+ f"{content}"
+ ("\\addcontentsline{toc}{section}{%s}" % title)
# + ("\\addcontentsline{toc}{section}{%s}" % title)
+ sections
+ "\\sectionend"
)
Expand Down
2 changes: 1 addition & 1 deletion test/doc/test_latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_load_latex_documentation():
).strip() == "Let's sketch the function\n\\begin{tests}"
assert (
first_section.latex(doc_data)[:30]
).strip() == "\\section*{Curve Sketching}{}"
).strip() == "\\section{Curve Sketching}{}"
assert (
third_chapter.latex(doc_data)[:38]
).strip() == "\\chapter{Further Tutorial Examples}"
Expand Down

0 comments on commit da4d799

Please sign in to comment.