Skip to content

Commit

Permalink
Fix foreword position
Browse files Browse the repository at this point in the history
  • Loading branch information
y-yu committed May 1, 2018
1 parent 8f996b7 commit e6ba094
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 5,5 @@ all : book.pdf
clean :
latexmk -C

book.pdf : book.tex
book.pdf : book.tex body.tex
latexmk -pdf book.tex
3 changes: 2 additions & 1 deletion body.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 5,13 @@

if __name__ == "__main__":
print('\\frontmatter')
print('\\input{./target/foreword.tex}')
print('\\tableofcontents')
print('\\mainmatter')
print('\\setcounter{secnumdepth}{3}')

for line in sys.stdin:
r = re.search(r'\[.*\]\((.*)\.md\)$', line)
if r is not None:
if r is not None and not r.group(1) == 'foreword':
src = r.group(1)
print('\\input{./target/' src '.tex}')

0 comments on commit e6ba094

Please sign in to comment.