first title page draft
This commit is contained in:
parent
2578792982
commit
d85f5deae6
@ -6,7 +6,7 @@ document-options:
|
|||||||
doc-class: "memoir"
|
doc-class: "memoir"
|
||||||
doc-class-options: "twoside"
|
doc-class-options: "twoside"
|
||||||
fontsize: "10"
|
fontsize: "10"
|
||||||
pagesize: "a4"
|
pagesize: "a5"
|
||||||
|
|
||||||
project-options:
|
project-options:
|
||||||
language: 'en' # see chapter 18.20 in https://texdoc.org/serve/memman.pdf/0
|
language: 'en' # see chapter 18.20 in https://texdoc.org/serve/memman.pdf/0
|
||||||
|
38
sakara.py
38
sakara.py
@ -121,7 +121,10 @@ clean:
|
|||||||
with open(mainfile_path, 'w') as maintex:
|
with open(mainfile_path, 'w') as maintex:
|
||||||
maintex.write(mainfile_content)
|
maintex.write(mainfile_content)
|
||||||
maintex.write('\n')
|
maintex.write('\n')
|
||||||
# include tex
|
# title page
|
||||||
|
titlepage=gettitlepage(conf)
|
||||||
|
maintex.write(titlepage)
|
||||||
|
# include chapters
|
||||||
for infile in conf['project-options']['infiles']:
|
for infile in conf['project-options']['infiles']:
|
||||||
# maintex.write(infile)
|
# maintex.write(infile)
|
||||||
f=os.path.join("chapters", os.path.basename(infile).split('.')[0]+".tex")
|
f=os.path.join("chapters", os.path.basename(infile).split('.')[0]+".tex")
|
||||||
@ -131,6 +134,39 @@ clean:
|
|||||||
maintex.write('\n')
|
maintex.write('\n')
|
||||||
maintex.write(r'\end{document}')
|
maintex.write(r'\end{document}')
|
||||||
|
|
||||||
|
def gettitlepage(conf):
|
||||||
|
title_page=r'''
|
||||||
|
\begin{titlingpage} %This starts the title page
|
||||||
|
% center textblock on page % https://tex.stackexchange.com/a/378157/264579
|
||||||
|
\setlrmarginsandblock{2.5cm}{*}{1} % this is manual and only works for a5
|
||||||
|
\setulmarginsandblock{2.5cm}{*}{1}
|
||||||
|
\checkandfixthelayout
|
||||||
|
\begin{flushright}
|
||||||
|
\hrule width \hsize height 2pt
|
||||||
|
\kern 1mm
|
||||||
|
\hrule width \hsize
|
||||||
|
\vspace{ 1.5em}
|
||||||
|
\Huge
|
||||||
|
title\par
|
||||||
|
% \vspace{ 0.5em}
|
||||||
|
\huge
|
||||||
|
subtitlep osttitle\par
|
||||||
|
\vspace{ 2em}
|
||||||
|
\Large
|
||||||
|
author
|
||||||
|
\vspace{ 1.5em}
|
||||||
|
\hrule width \hsize
|
||||||
|
\kern 1mm
|
||||||
|
\hrule width \hsize height 2pt
|
||||||
|
\vspace*{\fill}
|
||||||
|
\LARGE
|
||||||
|
SAKARA
|
||||||
|
% \vspace{ 2em}
|
||||||
|
\end{flushright}
|
||||||
|
\end{titlingpage}
|
||||||
|
'''
|
||||||
|
return title_page
|
||||||
|
|
||||||
def make_pdf(conf):
|
def make_pdf(conf):
|
||||||
os.system("cd "+conf['project-options']['project']+" && make") # https://stackoverflow.com/a/92395
|
os.system("cd "+conf['project-options']['project']+" && make") # https://stackoverflow.com/a/92395
|
||||||
# subprocess.call("make")
|
# subprocess.call("make")
|
||||||
|
Loading…
Reference in New Issue
Block a user