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"
|
||||
|
||||
FONT="monofur for Powerline"
|
||||
FONT='monofur for Powerline'
|
||||
EXTENSION='.pdf'
|
||||
|
||||
read -d '' usage <<EOUSAGE
|
||||
Usage: $0 [-h][-f FONT] RESUME_FILE
|
||||
Usage: $0 [-h][-f FONT][-t] RESUME_FILE
|
||||
|
||||
OPTIONS
|
||||
-f FONT Specify font by name.
|
||||
-h Display this help.
|
||||
-t Compile intermediate TeX instead of PDF.
|
||||
EOUSAGE
|
||||
|
||||
while getopts 'f:h' opt; do
|
||||
while getopts 'f:ht' opt; do
|
||||
case "${opt}" in
|
||||
f)
|
||||
FONT=$OPTARG
|
||||
|
|
@ -24,6 +26,9 @@ while getopts 'f:h' opt; do
|
|||
h)
|
||||
excat "$usage"
|
||||
;;
|
||||
t)
|
||||
EXTENSION='.tex'
|
||||
;;
|
||||
*)
|
||||
dedcat "$usage"
|
||||
;;
|
||||
|
|
@ -34,7 +39,7 @@ shift $((OPTIND-1))
|
|||
[ -z "$1" ] && dedcat "$usage"
|
||||
|
||||
pandoc $1 \
|
||||
-o $(sed 's/\(.md\)$//' <<<$1).pdf \
|
||||
-o $(sed 's/\(.md\)$//' <<<$1)"$EXTENSION" \
|
||||
--pdf-engine=xelatex \
|
||||
-V mainfont="$FONT" \
|
||||
-V fontsize=9pt \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue