Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
build document with pandoc only
Browse files Browse the repository at this point in the history
  • Loading branch information
gpelouze committed Dec 25, 2019
1 parent 037135c commit 319ce94
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 292 deletions.
28 changes: 0 additions & 28 deletions .gitignore

This file was deleted.

38 changes: 5 additions & 33 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,38 +1,10 @@
markdowns = tuto_python_astro.md
texs = $(markdowns:.md=.tex)
pdfs = $(markdowns:.md=.pdf)
md=tuto_python_astro.md
pdf=$(md:.md=.pdf)

# Pandoc options --------------------------------------------------------------
tex_template = template.latex
pd_options = --toc
pd_options += --filter=latex_minted.py

# Latex options ---------------------------------------------------------------
latex_engine = xelatex
latex_engine_opt = -shell-escape # for minted
latex_temps = *.aux *.log *.out *.toc *.pyg *.mintedcmd

# Rules -----------------------------------------------------------------------
all : pdf
pdf : $(pdfs)
tex : $(texs)

%.tex : %.md
pandoc -s -f markdown -t latex --template=$(tex_template) $(pd_options) $< -o $@

%.aux : %.tex
$(latex_engine) $(latex_engine_opt) $<

%.pdf : %.tex %.aux
$(latex_engine) $(latex_engine_opt) $<
$(pdf) : $(md)
pandoc --pdf-engine=xelatex $< -o $@

.PHONY : clean

clean :
@echo "Removing side products..."
@rm $(texs) $(latex_temps) 2> /dev/null || echo
@rm -r _minted-* 2> /dev/null || echo

cleanall : clean
@echo "Removing final products..."
@rm $(pdfs) 2> /dev/null || echo
rm $(pdf) 2> /dev/null
85 changes: 0 additions & 85 deletions latex_minted.py

This file was deleted.

143 changes: 0 additions & 143 deletions template.latex

This file was deleted.

37 changes: 34 additions & 3 deletions tuto_python_astro.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,41 @@
---
title: Bases de Python pour l’astronomie
date: Septembre 2018
shortauthor: G. Pelouze
author:
- Gabriel Pelouze ([email protected])
mainlang: french
- Gabriel Pelouze

lang: fr
toc: true
numbersections: true
toc-depth: 2
papersize: a4
geometry:
- top=30mm
- bottom=32mm
- left=20mm
- right=30mm
linkcolor: blue
urlcolor: blue
toccolor: blue
header-includes: |
\usepackage[mono=false]{libertine}
\let\oldtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{\oldtableofcontents\clearpage}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex}
\renewcommand{\labelitemi}{–}
\usepackage{fancyhdr}
\usepackage{titling}
\fancyhead{}
\fancyhead[c]{\textit{\theauthor :} \thetitle}
\renewcommand{\headrulewidth}{0.4pt}
\pagestyle{fancy}
\usepackage[linecolor=lightgray,linewidth=1pt,skipabove=12pt,skipbelow=15pt]{mdframed}
\surroundwithmdframed{Shaded}
...

# Introduction
Expand Down

0 comments on commit 319ce94

Please sign in to comment.