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}
17 \usepackage{longtable}
20 \usepackage{wrapstuff}
22 if spec
.geometry
is not None:
23 spec
.texout
.write(br
'\usepackage[' +
24 spec
.geometry
.encode('UTF-8') +
26 spec
.texout
.write(br
'''\begin{document}
27 \newcommand{\href}[2]{#2\footnote{\detokenize{#1}}}
28 \def\glowiconsize{%fmm}
29 \newcommand{\glowicon}[1]{\includegraphics[
30 width=\glowiconsize,height=\glowiconsize,keepaspectratio
32 \newcommand{\ifnotempty}[2]{\expandafter\ifx\expandafter\relax
33 \detokenize{#1}\relax\else #2\fi}
35 ''' % (spec
.icon_size
, spec
.layout
))
37 spec
.texout
.write(b
'\\end{document}\n')
41 with spec_from_commandline_args() as spec
:
45 if __name__
== '__main__':