-
Notifications
You must be signed in to change notification settings - Fork 0
/
template_lib.py
70 lines (64 loc) · 2.08 KB
/
template_lib.py
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
# template_lib.py BEGIN
headp = """% HEAD BEGIN
\\documentclass[letterpaper, 12pt]@@@@article^^^^
\\usepackage@@@@graphicx^^^^
\\usepackage@@@@multicol^^^^
\\usepackage@@@@anysize^^^^
\\usepackage@@@@fontspec^^^^
\\usepackage[fontset=none]@@@@ctex^^^^
\\usepackage@@@@tabularx^^^^
\\usepackage[breaklinks=true, colorlinks=true]@@@@hyperref^^^^
\\setlength\\columnsep@@@@30pt^^^^
\\marginsize@@@@30pt^^^^@@@@30pt^^^^@@@@10pt^^^^@@@@20pt^^^^
\\setmainfont[]@@@@TeX Gyre Bonum^^^^
\\setCJKmainfont[BoldFont=Noto Serif CJK SC Bold, ItalicFont=FandolKai]@@@@Noto Sans CJK SC^^^^
\\setlength@@@@\\parindent^^^^@@@@0cm^^^^
\\begin@@@@document^^^^
\\begin@@@@center^^^^
\\Huge\\textbf@@@@南哪大专历史学院醒前消息^^^^
\\end@@@@center^^^^
\\vspace@@@@4mm^^^^
\\hrule
\\renewcommand\\tabularxcolumn[1]@@@@m@@@@#1^^^^^^^^
\\begin@@@@tabularx^^^^@@@@\\textwidth^^^^@@@@>@@@@\\hsize.2\\hsize^^^^X>@@@@\\hsize.6\\hsize^^^^X>@@@@\\hsize.2\\hsize^^^^X^^^^
\\begin@@@@flushleft^^^^
{date}\\, No.{no}
\\end@@@@flushleft^^^^
&
\\begin@@@@center^^^^
\\textit@@@@“{saying}”^^^^
\\end@@@@center^^^^
&
\\begin@@@@flushright^^^^
\\textbf@@@@南京市鼓楼区^^^^
\\end@@@@flushright^^^^
\\end@@@@tabularx^^^^
\\vspace@@@@-3.5mm^^^^
\\hrule
\\vspace@@@@4mm^^^^
% HEAD END
""" # date, no, saying; @@@@ -> {, ^^^^ -> }
partbp = """\centerline@@@@\huge\\textbf@@@@{part_name}^^^^^^^^
\\begin@@@@multicols^^^^@@@@2^^^^
""" # part_name; @@@@ -> {, ^^^^ -> }
partmp = """\\section@@@@{sec_name}^^^^
{sec_cont}
""" # \url{} in sec_cont -> \\sloppy\\url@@@@^^^^ ;sec_name, sec_cont; @@@@ -> {, ^^^^ -> }
parte = """\\end{multicols}
\\hrule
\\vspace{4mm}
"""
appb = """% APPENDIX BEGIN
\\centerline{\\huge\\textbf{附录}}
\\begin{figure}[htbp]
\\centering
"""
appm = """ \\begin@@@@minipage^^^^[b]@@@@0.32\\textwidth^^^^
\\centering
\\includegraphics[width=0.5\\textwidth]@@@@{with_ext}^^^^
\\caption@@@@{no_ext}^^^^
\\end@@@@minipage^^^^
""" # swith_ext, no_ext; @@@@ -> {, ^^^^ -> }
appe = """\end{figure}
\end{document}"""
# template_lib.py END