Skip to content

Latest commit

 

History

History
176 lines (117 loc) · 6.29 KB

documentation-workflow.md

File metadata and controls

176 lines (117 loc) · 6.29 KB

Convert docx to Markdown

from docx

NAME='Manual-EDIT-Platform-04-Working-with-the-TaxEditor'
mkdir $NAME
cd $NAME
pandoc -f docx -t markdown ../../../$NAME.docx --output=$NAME.md --markdown-headings=atx --wrap=none --extract-media="."

from odt

NAME='Manual-EDIT-Platform-04-Working-with-the-TaxEditor'
mkdir $NAME
cd $NAME
pandoc -f odt -t markdown ../../../$NAME.odt --output=$NAME.odt.md --markdown-headings=atx --wrap=none --extract-media="."

==> odt yields better results as compared with using docx as source format, e.g. cross-references are not lost! The odt must be produced with MS Word via the "save as ..." function since LibreOffice introduces a couple of problems

See also sripts/convert-docx2md.sh for a script which could be used to to the conversion from docx.

export type:

  • markdown (Pandoc markdown) - preferred
  • markdown_mmd = (MultiMarkdown)

export options

  • --reference-links - yields a better layout after exporting, less artifacts from syntax problems with image attributed like {width=....}, bu all links are at the end of the file

Creating publications (pdf, etc.)

https://learnbyexample.github.io/customizing-pandoc/ https://opensource.com/article/18/9/pandoc-research-paper

install dependencies

For pandoc see /usr/share/doc/pandoc/README.Debian

For general installation instruction of texlive on Debian and Ubuntu see: https://www.tug.org/texlive/debian.html

apt-get install pandoc pandoc-citeproc
apt-get install texlive-latex-extra texlive-xetex texlive-fonts-extra texlive-lang-arabic

pdfTeX vesion as installed on the develper machine:

pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian)
kpathsea version 6.3.1

export as pdf

pandoc Manual-EDIT-Platform-04-Working-with-the-TaxEditor.md -f markdown --pdf-engine=xelatex  -V 'mainfont:Arial Unicode MS' -V geometry:a4paper  -V geometry:margin=2cm \
--toc  --number-sections \
--titlepage=true --titlepage-color=FFFFFF --titlepage-background=../layout/Title-A4.png\
--template=../templates/eisvogel-2.0.0/eisvogel.latex \
-o Manual-EDIT-Platform-04-Working-with-the-TaxEditor.pdf

NOTES:

TODO

See sub-folder ./test/ for the , resuting test.pdf on test cases and experiments.

Pandoc Templates

Pandoc filters

pandoc-wrapfig

A pandoc filter for pdf/LaTeX export with the wrapfig package, which brings latex wrapfig for pandoc.

Original from https://github.com/scotthartley/pandoc-wrapfig forked to https://github.com/akohlbecker/pandoc-wrapfig/ and improved by wrapping the image by a rasisebox.

Cloned to ./pandoc-filters/pandoc-wrapfig as git submodule

To be activated in pandoc markdown by adding to the header:

header-includes:
- \usepackage{wrapfig}

and executing pandoc with the filter option:

--filter $FILTERS_FOLDER/pandoc-wrapfig/pandoc-wrapfig.py

Trouble shooting:

Markdown WYSIWYG TaxEditor

For pandoc markdown

Atom Editor

Packages

Guides onm using Atom as pandoc mardown editor:

Packages:

Shortcuts

  • CTRL , : Open settings
  • CTRL SHIFT p : Open command palette

TODO Tests

  • image adding - OK
  • image upload - OK
  • index creation --> pandoc - OK, see eisvogel template

Working with Typora

  • !!! *use proper presets !!! --> ask Andreas
  • DO NOT USE the zoom image function as this will transform markdown images ![]() to html images <img ...> which will not work in our setup. --> see typora/typora-issues#249

simple git ui for windows?