Mathpix / mathpix-markdown-it

Markdown rendering + Latex extras (equations, tables, ...), with conversion features, for the scientific community
MIT License
493 stars 44 forks source link

Add the ability to support the `\tableofcontents` command #220

Open OlgaRedozubova opened 1 year ago

OlgaRedozubova commented 1 year ago
Screen Shot 2023-01-06 at 10 42 30

We already have the ability to generate a table of contents in the background with [[toc]]

We can add the ability to support the \tableofcontents command

https://www.overleaf.com/learn/latex/Table_of_contents

\title{Sections and Chapters}

\tableofcontents

\section{Introduction}
This is the first section (numbered).

\addcontentsline{toc}{section}{Unnumbered Section}
\section*{Unnumbered Section}
An unnumbered section

\section{Second section}
The second numbered section.
Screen Shot 2023-01-06 at 10 45 36
OlgaRedozubova commented 1 year ago

Another request from user to support this https://mathpix.zendesk.com/agent/tickets/23458