-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e822a6e
commit c17e6ab
Showing
5 changed files
with
50 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
sed -i -e 's/<!--begin-->/<!--beginRedo/g' $1 | ||
sed -i -e 's/<!--end-->/3nD-->/g' $1 | ||
sed -i -e 's/<!--uncommentbegin/<!--uncommentbeginRedo-->/g' $1 | ||
sed -i -e 's/uncommentend-->/<!--uncommentendRedo-->/g' $1 | ||
|
||
pandoc $1 -o $2 | ||
|
||
sed -i -e 's/<!--beginRedo/<!--begin-->/g' $1 | ||
sed -i -e 's/3nD-->/<!--end-->/g' $1 | ||
sed -i -e 's/<!--uncommentbeginRedo-->/<!--uncommentbegin/g' $1 | ||
sed -i -e 's/<!--uncommentendRedo-->/uncommentend-->/g' $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,17 @@ | ||
# PDF creation | ||
|
||
This document explains the workflow for the generic creation of a PDF version | ||
of the main .md document. | ||
of the main .md document. (On Linux distributions) | ||
|
||
## Make sure [`pandoc`](https://pandoc.org/) is installed locally on your system: | ||
On Linux (Debian/Ubuntu): | ||
>sudo apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra | ||
|
||
For other distributions see: https://pandoc.org/installing.html | ||
# sudo apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-extra-utils texlive-latex-extra | ||
|
||
## Prepare the `OS-Strategy-NHMW-Vx.md`file for conversion | ||
## Convert `.md` file to `.pdf` | ||
Run the script `pdf_conversion.sh` | ||
|
||
search and replace: | ||
|
||
* 1: `<!-- comment .pdf creation begin -->` with `<!--` | ||
* 2: `<!-- comment .pdf creation end -->` with `-->` | ||
* 3: `<!-- uncomment begin` with `<!-- uncomment begin -->` | ||
* 4: `<!-- uncomment end` with `<!-- uncomment end -->` | ||
|
||
## Create .pdf | ||
Open a terminal and convert the .md file to .pdf | ||
> pandoc sourcefile.md -o outputfile.pdf | ||
## Undo comment/uncomment | ||
|
||
search and replace: | ||
|
||
* 1: `<!--` with `<!-- comment .pdf creation begin -->` | ||
* 2: `-->` with `<!-- comment .pdf creation end -->` | ||
* 3: `<!-- uncomment begin -->` with `<!-- uncomment begin` | ||
* 4: `<!-- uncomment end -->` with `<!-- uncomment end` | ||
# sh pdf_conversion yourInputfile.md yourOutputfile.pdf | ||
|
||
## Check the pdf file | ||
That's it! Hope you like the result. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters