convert markdown files to LaTeX files
Go to file
2024-10-02 02:26:03 +02:00
testfiles add first draft of pdf2book.py 2024-10-01 21:44:00 +02:00
md2parallel.sh mkparallel run badly 2024-10-02 02:26:03 +02:00
md2verse.sh md2verse.sh write to stdout 2024-10-01 15:51:29 +02:00
mkparallel.sh mkparallel run badly 2024-10-02 02:26:03 +02:00
mkverse.sh mv conf.sh to verse.conf 2024-10-02 00:34:27 +02:00
parallel-template.tex mkparallel run badly 2024-10-02 02:26:03 +02:00
parallel.conf mkparallel run badly 2024-10-02 02:26:03 +02:00
pdf2book.py pdf2book.py works 2024-10-02 00:20:15 +02:00
README.md mkparallel run badly 2024-10-02 02:26:03 +02:00
verse.conf mv conf.sh to verse.conf 2024-10-02 00:34:27 +02:00

README

All names are temporary and happy about suggestions of improvement.


md2verse.sh

create .tex from markdown files in verse format This bash-script converts an easy markdown file in aqoaba dialect to LaTeX code. This LaTeX code needs a wrapper LaTeX script with

\usepackage{verse, gmverse}

in the preamble and some other features. The path to markdown files, chapter names and other options can be configured in the verse.conf file. The verse.conf file is read by mkverse.sh`.


mkverse.sh

The mkverse.sh script creates a PDF file out of several easy markdown files. Some options need to be set in vers.conf file. A single configuration file can be given to mkverse.sh to use instead of verse.conf.

cp verse.conf quaderno.conf
./mkverse.sh quaderno.conf

--- 

## md2parallel.sh

--- 

## pdf2book.py
This script takes a pdf and reorders pages for printing signatures.
The number of pages per signature can be varied 
Dependency: `pypdf`

s=1: 1,2,3,4 -> 04,01.02,03 i=0 08,05.06,07 i=1 12,09.10,11 i=2 16,13.14,15 i=3 20,17.18,19 i=4 down=(i+1)4s up= (i)4s+1 #pages_mod=$(python -c " (int(pages/s)+1)*(pages%s) " ) for i in $(pages%s) print (down--,up++,up++,down--)

s=2: 1,2,3,4,5,6,7,8 -> 08,01.02,07 06,03.04,05 i=0 16,09.10,15 14,11.12,13 i=1 24,17.18,23 22,19.20.21 i=2 down=(i+1)4s up= (i)4s+1 for i in range(pages%s): for count in range(2): print (down--,up++,up++,down--)

s=3: 1,2,3,4,5,6,7,8,9,10,11,12 -> 12,01.02,11 10,03.04,09 08,05.06,07
24,13.14,23 22,15.16,21 20,17.18,19 s=4: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 -> 16,01.02,15 14,03.04,13 12,05.06,11 10,07.08,09
32,17,18,31 30,19.20.29 28,21.22.27 26,23.24,25




---

### TODO
- [x] create md2verse.sh 
- [ ] create mk2parallel.sh
    - [ ] fix geometry bug
    - [ ] fix multi-word string chapter bug 
- [ ] create md2tex.sh
- [ ] create pdf2sig.sh /pdf2book.py -s/--sigsize [0,3,4,5]
- [ ] insert cleaning step (html to md)
- [ ] md2html -> sed pertubation -> html2md