Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/martinomensio/doc2latex_process_chapters

A stupid tool to process the outputs of docx2latex.com to create clean latex content divided into chapters
https://github.com/martinomensio/doc2latex_process_chapters

docx2latex googledocs latex preprocessing

Last synced: 16 days ago
JSON representation

A stupid tool to process the outputs of docx2latex.com to create clean latex content divided into chapters

Awesome Lists containing this project

README

        

# Doc2latex utility tool

This tool, given a Google Doc exported to latex using https://www.docx2latex.com/, cleans up the content and produces the chapter files (and abstract) that can be loaded in another latex template.

To make this work, specific rules have to be used while writing the Google Docs document:

- ensure to use Google Docs hierarchical headings
- for the abstract write it between the title ( preceeded by the `Abstract` heading): its sections won't be displayed in the TOC.
- footnotes to citations must be in the form `Key: ` where `` is the identifier of the bibitem.
- for images substitution, add a `[FIG: CAPTION:]` and use refs like `[REF FIG:]` where `` is the name of the pdf file to be placed in the folder `figures`.
- for tables to be listed in TOC, use `[TABLE: CAPTION:]`, that can be referenced with `[REF TABLE:]`
- to have cross references use `[REF ]` where `` has been used inside a declaration `[LABEL:]`

Procedure:

- use Doc2Latex https://www.docx2latex.com/docx2latex_free
- extract the `.zip` file in the subdirectory `source`
- run the python script
- chech the output results in the folder `out`

The results are:

- `media` folder with all the pictures from the Google Doc. You may want to substitute them with vectorial pdfs
- `partials` folder that will contain the abstract and the chapters

## Note

This code is potentially full of bugs