Skip to content

Instantly share code, notes, and snippets.

@percursoaleatorio
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save percursoaleatorio/2722c6f601cbcf9b639a to your computer and use it in GitHub Desktop.
Save percursoaleatorio/2722c6f601cbcf9b639a to your computer and use it in GitHub Desktop.
@echo off
rem nery[_at_]tecnico.ulisboa.pt v2014.01.16 [CC BY-NC-SA]
rem OBJETIVO: Converter de RST para DOCX utilizando o PANDOC.
rem Criar ficheiro de texto com o mesmo nome e extensão DOCX
rem PRE-REQUISITOS:
rem C:\Users\nery\AppData\Local\Pandoc\
rem --reference-docx=FILE
rem Use the specified file as a style reference in producing a docx file.
rem The following styles are used by pandoc: [paragraph] Normal, Compact, Title, Authors, Date, Heading 1, Heading 2, Heading 3, rem Heading 4, Heading 5, Block Quote, Definition Term, Definition, Body Text, Table Caption, Image Caption; [character] Default rem Paragraph Font, Body Text Char, Verbatim Char, Footnote Ref, Link.
rem ( pandoc --output=%%~nf.docx --reference-docx=Reference.docx %%f )
@echo on
for %%f in (*.rst) do (
pandoc --reference-docx="C:\Users\nery\AppData\Local\Pandoc\reference.docx" --output="%%~nf.docx" "%%f"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment