modified: spffq.py
[GalaxyCodeBases.git] / etc / pandoc / Sakefile.master
blob6f2a7b1b730a7e63a6aeaafade80d519148350f0
1 # Extensionless name of Markdown file
2 #! MARKDOWN_FILE = PUT THE NAME HERE
4 # Variables
5 #! PREFIX = /Users/andrew/.pandoc
6 #! BIB_FILE = /Users/andrew/Dropbox/Readings/Papers.bib
7 #! CSL = american-political-science-association
8 #! CROSSREF = --filter pandoc-crossref -M figPrefix:"Figure" -M eqnPrefix:"Equation" -M tblPrefix:"Table"
10 # Other common CSLs: 
11 #   * chicago-fullnote-bibliography
12 #   * chicago-syllabus-no-bib
13 #   * apa
14 #   * apsa-no-bib
16 # To add version control footer support in PDFs:
17 #   1. Run vcinit in the directory
18 #   2. Place `./vc` at the front of the formula
19 #   3. Add `-V vc` to the pandoc command
20 #   4. Change pagestyle to athgit instead of ath
22 generate output:
23   help: convert Markdown file to different formats
25   pdf:
26     help: convert to PDF
27     dependencies:
28       - $MARKDOWN_FILE.md
29     formula: >
30       replace_includes $MARKDOWN_FILE.md | pandoc -r markdown+simple_tables+table_captions+yaml_metadata_block $CROSSREF -w latex -s -S --default-image-extension=pdf --latex-engine=xelatex --template=$PREFIX/templates/xelatex.template --filter pandoc-citeproc --csl=$PREFIX/csl/$CSL.csl --bibliography=$BIB_FILE -V chapterstyle=hikma-article -V pagestyle=ath -o $MARKDOWN_FILE.pdf
31     output: 
32       - $MARKDOWN_FILE.pdf
34   docx:
35     help: convert to nice looking Word file through LibreOffice
36     dependencies:
37       - $MARKDOWN_FILE.md
38     formula: >
39       replace_includes $MARKDOWN_FILE.md | replace_pdfs | pandoc -r markdown+simple_tables+table_captions+yaml_metadata_block $CROSSREF -w odt -S --default-image-extension=png --template=$PREFIX/templates/odt.template --reference-odt=$PREFIX/styles/reference.odt --filter pandoc-citeproc --csl=$PREFIX/csl/$CSL.csl --bibliography=$BIB_FILE -o $MARKDOWN_FILE.odt; 
40       /Applications/LibreOffice.app/Contents/MacOS/soffice --invisible --convert-to docx $MARKDOWN_FILE.odt;
41       rm $MARKDOWN_FILE.odt
42     output: 
43       - $MARKDOWN_FILE.docx
45   manuscript:
46     help: convert to a Word file formatted as a manuscript through LibreOffice
47     dependencies:
48       - $MARKDOWN_FILE.md
49     formula: >
50       replace_includes $MARKDOWN_FILE.md | replace_pdfs | pandoc -r markdown+simple_tables+table_captions+yaml_metadata_block $CROSSREF -w odt -S --default-image-extension=png --template=$PREFIX/templates/odt-manuscript.template --reference-odt=$PREFIX/styles/reference-manuscript.odt --filter pandoc-citeproc --csl=$PREFIX/csl/$CSL.csl --bibliography=$BIB_FILE -o $MARKDOWN_FILE-manuscript.odt; 
51       /Applications/LibreOffice.app/Contents/MacOS/soffice --invisible --convert-to docx $MARKDOWN_FILE-manuscript.odt;
52       rm $MARKDOWN_FILE-manuscript.odt
53     output: 
54       - $MARKDOWN_FILE-manuscript.docx
56   html:
57     help: convert to HTML
58     dependencies:
59       - $MARKDOWN_FILE.md
60     formula: >
61       replace_includes $MARKDOWN_FILE.md | replace_pdfs | pandoc -r markdown+simple_tables+table_captions+yaml_metadata_block $CROSSREF -w html -S --default-image-extension=png --template=$PREFIX/templates/html.template --css=$PREFIX/styles/marked/kultiad-serif.css --filter pandoc-citeproc --csl=$PREFIX/csl/$CSL.csl --bibliography=$BIB_FILE -o $MARKDOWN_FILE.html
62     output: 
63       - $MARKDOWN_FILE.html
65   bibliography:
66     help: extract citations into a separate BibTeX file
67     dependencies:
68       - $MARKDOWN_FILE.md
69     formula: >
70       bib_extract --bibtex_file $BIB_FILE $MARKDOWN_FILE.md $MARKDOWN_FILE.bib
71     output:
72       - $MARKDOWN_FILE.bib