Skip to content

Commit

Permalink
move from Overleaf
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmalhans committed Jan 12, 2017
1 parent a774002 commit 50f1271
Show file tree
Hide file tree
Showing 493 changed files with 147,066 additions and 0 deletions.
Binary file added Arimo-BoldItalic_B.ttf
Binary file not shown.
Binary file added Arimo-Bold_B.ttf
Binary file not shown.
Binary file added Arimo-Italic_B.ttf
Binary file not shown.
Binary file added Arimo_B.ttf
Binary file not shown.
Binary file added LinLibertine_RBI_B.otf
Binary file not shown.
Binary file added LinLibertine_RB_B.otf
Binary file not shown.
Binary file added LinLibertine_RI_B.otf
Binary file not shown.
Binary file added LinLibertine_RZI_B.otf
Binary file not shown.
Binary file added LinLibertine_RZ_B.otf
Binary file not shown.
Binary file added LinLibertine_R_B.otf
Binary file not shown.
117 changes: 117 additions & 0 deletions Makefile
@@ -0,0 +1,117 @@
# specify thh main file and all the files that you are including
SOURCE= main.tex $(wildcard local*.tex) $(wildcard chapters/*.tex)


# specify your main target here:
pdf: main.bbl main.pdf #by the time main.pdf, bib assures there is a newer aux file

all: pod cover

complete: index main.pdf

index: main.and

main.pdf: main.aux
xelatex main

main.aux: $(SOURCE)
xelatex -no-pdf main

#create only the book
main.bbl: $(SOURCE) localbibliography.bib
xelatex -no-pdf main
bibtex -min-crossrefs=200 main


main.and:
sed -i s/.*\\emph.*// main.adx #remove titles which biblatex puts into the name index
sed -i 's/hyperindexformat{\\\(infn {[0-9]*\)}/\1/' main.sdx # ordering of references to footnotes
sed -i 's/hyperindexformat{\\\(infn {[0-9]*\)}/\1/' main.adx
sed -i 's/hyperindexformat{\\\(infn {[0-9]*\)}/\1/' main.ldx
python3 fixindex.py
mv mainmod.adx main.adx
makeindex -o main.and main.adx
makeindex -o main.lnd main.ldx
makeindex -o main.snd main.sdx
xelatex main
xelatex main


#create a png of the cover
cover: FORCE
convert main.pdf\[0\] -quality 100 -background white -alpha remove -bordercolor "#999999" -border 2 cover.png
cp cover.png googlebooks_frontcover.png
convert -geometry 50x50% cover.png covertwitter.png
display cover.png


#prepare for print on demand services
pod: bod createspace googlebooks

#prepare for submission to BOD
bod: bod/bodcontent.pdf

bod/bodcontent.pdf: complete
sed "s/output=book/output=coverbod/" main.tex >bodcover.tex
xelatex bodcover.tex
xelatex bodcover.tex
mv bodcover.pdf bod
./filluppages 4 main.pdf bod/bodcontent.pdf

# prepare for submission to createspace
createspace: createspace/createspacecontent.pdf

createspace/createspacecontent.pdf: complete
sed "s/output=book/output=covercreatespace/" main.tex >createspacecover.tex
xelatex createspacecover.tex
xelatex createspacecover.tex
mv createspacecover.pdf createspace
./filluppages 1 main.pdf createspace/createspacecontent.pdf

googlebooks: googlebooks_interior.pdf

googlebooks_interior.pdf: complete
cp main.pdf googlebooks_interior.pdf
pdftk main.pdf cat 1 output googlebooks_frontcover.pdf

openreview: openreview.pdf


openreview.pdf: main.pdf
pdftk main.pdf multistamp orstamp.pdf output openreview.pdf

proofreading: proofreading.pdf


proofreading.pdf: main.pdf
pdftk main.pdf multistamp prstamp.pdf output proofreading.pdf

blurb: blurb.html blurb.tex biosketch.tex biosketch.html


blurb.tex: blurb.md
pandoc -f markdown -t latex blurb.md>blurb.tex

blurb.html: blurb.md
pandoc -f markdown -t html blurb.md>blurb.html

biosketch.tex: blurb.md
pandoc -f markdown -t latex biosketch.md>biosketch.tex

biosketch.html: blurb.md
pandoc -f markdown -t html biosketch.md>biosketch.html

#housekeeping
clean:
rm -f *.bak *~ *.backup *.tmp \
*.adx *.and *.idx *.ind *.ldx *.lnd *.sdx *.and *.rdx *.rnd *.wdx *.wnd \
*.log *.blg *.ilg \
*.aux *.toc *.cut *.out *.tpm *.bbl *-blx.bib *_tmp.bib \
*.glg *.glo *.gls *.wrd *.wdv *.xdv \
*.run.xml \
chapters/*aux chapters/*~ chapters/*.bak chapters/*.backup

realclean: clean
rm -f *.dvi *.ps *.pdf

FORCE:
5 changes: 5 additions & 0 deletions assignments
@@ -0,0 +1,5 @@
Jean 1 2 3 4 5 6
Dankmar 7 11 12 13 14 15
Kilu 8
Michael 9
Andi 10
42 changes: 42 additions & 0 deletions assignproofreaders.py
@@ -0,0 +1,42 @@
import sys
import datetime

paperhiveID = sys.argv[1]

template = """Dear {name},
thanks for your offer. The book can be found at
https://paperhive.org/documents/{paperhiveID}
You are assigned the following chapters:
* {chapterlist}
You can either download the PDF, proofread locally and send the corrections in your preferred format, or you can create a Paperhive account and add your suggestions right in your browser.
Guidelines for proofreaders can be found here
http://langsci-press.org/public/downloads/LangSci_Guidelines_Proofreaders.pdf
We aim at having the corrections in by {duedate}.
Best wishes and thanks again for your help
Sebastian
"""

chapters = ['0']+[l.strip() for l in open("chapternames").readlines()]
assignments = open("assignments").readlines()

mails = []

duedate = (datetime.datetime.now()+datetime.timedelta(days=28)).strftime('%B %d')

for a in assignments:
name = a.split()[0]
chapternumbers = a.split()[1:]
chapterlist = '\n'.join("%s %s"%(i,chapters[int(i)]) for i in chapternumbers)
#linklist = '\n'.join(["http://www.glottotopia.org/%s/%s.pdf"%(author,i) for i in chapternumbers])
#orlist = "\n".join(["https://via.hypothes.is/http://www.glottotopia.org/%s/%s.pdf"%(author,i) for i in chapternumbers])
mails.append(template.format(name=name, paperhiveID=paperhiveID,chapterlist=chapterlist,duedate=duedate))

separator = '\n'+80*'-'+'\n'
print separator.join(mails)
46 changes: 46 additions & 0 deletions autoindex.py
@@ -0,0 +1,46 @@
#!/usr/bin/python3

import glob
import re

lgs=open("locallanguages.txt").read().split('\n')
terms=open("localsubjectterms.txt").read().split('\n')[::-1]#reverse to avoid double indexing
print("found %i language names for autoindexing" % len(lgs))
print("found %i subject terms for autoindexing" % len(terms))

files = glob.glob('chapters/*tex')

SUBJECTP = re.compile
for f in files:
print("indexing %s" % f)
#strip preamble of edited volume chapters to avoid indexing there
a = open(f).read().split(r"\begin{document}")
content = a[-1]
preamble = ''
joiner = ''
if len(a) == 2:
preamble = a[0]
joiner = r"\begin{document}"
for lg in lgs:
lg = lg.strip()
if lg == '':
continue
content= re.sub('(?<!ili{|.../|...=|..._|icht|euOJ)%s(?![\w}])'%lg, '\ili{%s}'%lg, content)
for term in terms:
term = term.strip()
if term == '':
continue
content= re.sub('(?<!isi{|..._|.SuH|...=|y=ge)%s(?![-_\w}])'%term, '\isi{%s}'%term, content)
nlg = len(re.findall('\\ili{',content))
nt = len(re.findall('\\isi{',content))
outfile = open(f.replace('chapters','indexed'), 'w')
outfile.write(preamble)
outfile.write(joiner)
outfile.write(content)
outfile.close()
print(" %s now contains %i indexed languages and %i indexed subject terms"%(f.split('/')[-1],nlg,nt))

print("indexed files are in the folder 'indexed'")



26 changes: 26 additions & 0 deletions backmatter.tex
@@ -0,0 +1,26 @@
\backmatter
\phantomsection
\addcontentsline{toc}{part}{Literaturverzeichnis}
\ohead{Literaturverzeichnis}
\printbibliography[heading=literaturverzeichnis]
\clearpage


\phantomsection
\addcontentsline{toc}{part}{Index}
\addcontentsline{toc}{chapter}{Personenregister}
\ohead{Personenregister}
\printindex
\cleardoublepage

\phantomsection
\addcontentsline{toc}{chapter}{Sprachregister}
\ohead{Sprachregister}
\printindex[lan]
\cleardoublepage

\phantomsection
\addcontentsline{toc}{chapter}{Sachregister}
\ohead{Sachregister}
\printindex[sbj]
\cleardoublepage

0 comments on commit 50f1271

Please sign in to comment.