resumaker: new -t flag to output TeX
This commit is contained in:
parent
1a878e547a
commit
750a2cfaf2
1 changed files with 9 additions and 4 deletions
|
|
@ -6,17 +6,19 @@
|
||||||
|
|
||||||
. "$(dirname $0)/util/logging.bash"
|
. "$(dirname $0)/util/logging.bash"
|
||||||
|
|
||||||
FONT="monofur for Powerline"
|
FONT='monofur for Powerline'
|
||||||
|
EXTENSION='.pdf'
|
||||||
|
|
||||||
read -d '' usage <<EOUSAGE
|
read -d '' usage <<EOUSAGE
|
||||||
Usage: $0 [-h][-f FONT] RESUME_FILE
|
Usage: $0 [-h][-f FONT][-t] RESUME_FILE
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-f FONT Specify font by name.
|
-f FONT Specify font by name.
|
||||||
-h Display this help.
|
-h Display this help.
|
||||||
|
-t Compile intermediate TeX instead of PDF.
|
||||||
EOUSAGE
|
EOUSAGE
|
||||||
|
|
||||||
while getopts 'f:h' opt; do
|
while getopts 'f:ht' opt; do
|
||||||
case "${opt}" in
|
case "${opt}" in
|
||||||
f)
|
f)
|
||||||
FONT=$OPTARG
|
FONT=$OPTARG
|
||||||
|
|
@ -24,6 +26,9 @@ while getopts 'f:h' opt; do
|
||||||
h)
|
h)
|
||||||
excat "$usage"
|
excat "$usage"
|
||||||
;;
|
;;
|
||||||
|
t)
|
||||||
|
EXTENSION='.tex'
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
dedcat "$usage"
|
dedcat "$usage"
|
||||||
;;
|
;;
|
||||||
|
|
@ -34,7 +39,7 @@ shift $((OPTIND-1))
|
||||||
[ -z "$1" ] && dedcat "$usage"
|
[ -z "$1" ] && dedcat "$usage"
|
||||||
|
|
||||||
pandoc $1 \
|
pandoc $1 \
|
||||||
-o $(sed 's/\(.md\)$//' <<<$1).pdf \
|
-o $(sed 's/\(.md\)$//' <<<$1)"$EXTENSION" \
|
||||||
--pdf-engine=xelatex \
|
--pdf-engine=xelatex \
|
||||||
-V mainfont="$FONT" \
|
-V mainfont="$FONT" \
|
||||||
-V fontsize=9pt \
|
-V fontsize=9pt \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue