小编sna*_*alx的帖子

生成乳胶.toc文件中markdown的目录

我有一个乳胶生成的.toc文件,其中包含大文档的目录.我想将TOC提取到(github-)降价列表,例如使用pandoc.

我有

\contentsline {chapter}{\numberline {1}Introduction}{1}{chapter.1}
\contentsline {section}{\numberline {1.1}Aim and Motivation}{1}{section.1.1}
\contentsline {section}{\numberline {1.2}State of the art}{1}{section.1.2}
\contentsline {section}{\numberline {1.3}Outline}{1}{section.1.3}
\contentsline {chapter}{\numberline {2}Fundamentals}{2}{chapter.2}
...
Run Code Online (Sandbox Code Playgroud)

在我的.toc文件中.

并希望得到这样的东西

1. Introduction
  1.1. Aim and Motivation
  1.2. State-of-the-art
  1.3. Outline
2. Fundamentals
Run Code Online (Sandbox Code Playgroud)

另一种选择是直接从tex文件中提取这些信息(没有内容).但是,我无法让这个工作,我也认为它更容易出错.

有什么建议?

markdown latex pandoc github-flavored-markdown

5
推荐指数
1
解决办法
666
查看次数