1 # paperdoorknob: Print glowfic
3 # This program is free software: you can redistribute it and/or modify it
4 # under the terms of the GNU General Public License as published by the
5 # Free Software Foundation, version 3.
7 from args
import spec_from_commandline_args
8 from glowfic
import Thread
12 def process(spec
: Spec
) -> None:
13 spec
.texout
.write(br
'''\documentclass{article}
16 \usepackage{longtable}
19 \usepackage{wrapstuff}
21 if spec
.geometry
is not None:
22 spec
.texout
.write(br
'\usepackage[' +
23 spec
.geometry
.encode('UTF-8') +
25 spec
.texout
.write(br
'''\begin{document}
26 \newcommand{\href}[2]{#2\footnote{\detokenize{#1}}}
27 \def\glowiconsize{%fmm}
28 \newcommand{\glowicon}[1]{\includegraphics[
29 width=\glowiconsize,height=\glowiconsize,keepaspectratio
31 \newcommand{\ifnotempty}[2]{\expandafter\ifx\expandafter\relax
32 \detokenize{#1}\relax\else #2\fi}
34 ''' % (spec
.icon_size
, spec
.layout
))
36 spec
.texout
.write(b
'\\end{document}\n')
40 with spec_from_commandline_args() as spec
:
44 if __name__
== '__main__':