-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHOWTO
More file actions
105 lines (81 loc) · 4.94 KB
/
HOWTO
File metadata and controls
105 lines (81 loc) · 4.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/bash
# The `bash HOWTO` command, given at the command line within the `mdgBookSVG10Kit-main` directory
# in your computer, will automatically carry out the following steps leading to the creation of the
# collection book: `mdgBookSVG10v1.pdf`.
#
# Create three sub-folders: `bin`, `images`, `res`, under the `mdgBookSVG10-main` directory
# `bin` - folder for Bash files: mdg102mid+svg.sh, mdg102midRndN+svg.sh, mdgEntriesSVG10.sh
# `images` - folder for image files for book cover/title page: 1ed.png, FrontCover.pdf
# `res` - folder for ABC, SVG, PDF output files; initially contains:
# schola-1.abc - table of measures for Part I of the minuet-trios
# hyperref.cfg - file containing the \hypersetup{} keyvalues for the \hyperref pkg
# mdg10.bib - bibliography file for the book
# mdgBookSVG10v1.tex - main LaTeX file for book
# mdgBookSVG10v1-cover.tex - LaTeX file for cover page
mkdir bin images res
mv *.sh bin
mv 1ed.png images; mv FrontCover.pdf images
mv schola-1.abc res; mv 000tables.pdf res
mv hyperref.cfg res; mv mdg10.bib res
mv *.tex res
# Change directory res folder then, for each Bash file in `bin`, create a link
# from `bib` to `res`
cd res
ln -s ../bin/*.sh .
# Within `res` directory, generate nnn MDGs (nnn is number of MDG minuet-trios in book to be created)
# For 250 minuet-trios to be generated: nnn=250. Here we generate 20
./mdg102midRndN+svg.sh 20
# Generate a list of SVGs created by the previous step:
ls --color=never sf-*.svg > svgList.txt
# Create a list of figure entries for LaTeX file; *.pdf_tex files are also created using inkscape
./mdgEntriesSVG10.sh svgList.txt
# Change the font sizes of titles and subtitles in each ldmt-*.pdf_tex file
sed -i 's/\\textbf{sf:/\\footnotesize \\tt {sf:/g' sf-*.pdf_tex
sed -i 's/\\textbf{:/\\footnotesize \\tt {:/g' sf-*.pdf_tex
sed -i 's/\\textbf{Perm\./\\footnotesize \\tt {Perm\.\\/' sf-*.pdf_tex
sed -i 's/\\textbf{= 90/\\footnotesize \\tt {= 90/' sf-*.pdf_tex
sed -i 's/\[t\]{c}\\textit{3}/\[t\]{c}\\textit{\\scriptsize 3}/g' sf-*.pdf_tex
sed -i 's/\[t\]{c}\\textit{3}/\[t\]{c}\\textit{\\scriptsize 3}/g' sf-*.pdf_tex
sed -i 's/\[t\]{l}\\textit{/\[t\]{c}\\texttt{\\footnotesize /g' sf-*.pdf_tex
sed -i 's/\\textbf{Flute}/\\texttt{\\small Flute\\hspace*{3mm}}/g' sf-*.pdf_tex
sed -i 's/\\textbf{Violin}/\\texttt{\\small Violin\\hspace*{4mm}}/g' sf-*.pdf_tex
sed -i 's/\\textbf{Clavier}/\\texttt{\\small Clavier\\hspace*{6mm}}/g' sf-*.pdf_tex
sed -i 's/\\textbf{Cello}/\\texttt{\\small Cello\\hspace*{4mm}}/g' sf-*.pdf_tex
# Move svgList.txt.output to svgList.tex
cp svgList.txt.output svgList.tex
# Remove trailing `001` from each svgList.tex entry
sed -i.OLD 's/001}/}/g' svgList.tex
sed -i.OLD 's/001.mid}/.mid}/g' svgList.tex
# Create SVGs for the 000tables.pdf (Tables of Measures);
# also corresponding *pdf_tex files using inkscape
abcm2ps -v -O= schola-1.abc
inkscape --export-filename=schola-1001.pdf --export-area-drawing --export-latex schola-1001.svg
inkscape --export-filename=schola-1002.pdf --export-area-drawing --export-latex schola-1002.svg
inkscape --export-filename=schola-1003.pdf --export-area-drawing --export-latex schola-1003.svg
inkscape --export-filename=schola-1004.pdf --export-area-drawing --export-latex schola-1004.svg
inkscape --export-filename=schola-1005.pdf --export-area-drawing --export-latex schola-1005.svg
inkscape --export-filename=schola-1006.pdf --export-area-drawing --export-latex schola-1006.svg
inkscape --export-filename=schola-1007.pdf --export-area-drawing --export-latex schola-1007.svg
inkscape --export-filename=schola-1008.pdf --export-area-drawing --export-latex schola-1008.svg
inkscape --export-filename=schola-1009.pdf --export-area-drawing --export-latex schola-1009.svg
inkscape --export-filename=schola-1010.pdf --export-area-drawing --export-latex schola-1010.svg
## add \url{---}for URL; change to scriptsize
sed -i.OLD 's/\[from http/\\scriptsize\[from \\url{http/g' schola-1001.pdf_tex
sed -i.OLD 's/cus)\]/cus)}\]/g' schola-1001.pdf_tex
## - add "\scriptsize" before every 3-plet"
## - change font for measure numbers from italics (it) to typewriter (tt)
## - change staff labels from bold to typewriter (tt)
sed -i.OLD 's/\[t\]{c}\\textit{3}/\[t\]{c}\\textit{\\scriptsize 3}/g' schola-1*.pdf_tex
sed -i.OLD 's/\[t\]{l}\\textit{/\[t\]{c}\\texttt{\\footnotesize /g' schola-1*.pdf_tex
sed -i.OLD 's/\\textbf{Flute}/\\texttt{\\small Flute}/g' schola-1*.pdf_tex
sed -i.OLD 's/\\textbf{Violin}/\\texttt{\\small Violin\\hspace*{3mm}}/g' schola-1*.pdf_tex
sed -i.OLD 's/\\textbf{Clavier}/\\texttt{\\small Clavier\\hspace*{5mm}}/g' schola-1*.pdf_tex
sed -i.OLD 's/\\textbf{Cello}/\\texttt{\\small Cello}/g' schola-1*.pdf_tex
# Generate the PDF
pdflatex -synctex=1 -interaction=nonstopmode -shell-escape mdgBookSVG10v1.tex
bibtex mdgBookSVG10v1.aux
pdflatex -synctex=1 -interaction=nonstopmode -shell-escape mdgBookSVG10v1.tex
pdflatex -synctex=1 -interaction=nonstopmode -shell-escape mdgBookSVG10v1.tex
###
##
#