-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.sh
More file actions
executable file
·36 lines (29 loc) · 887 Bytes
/
make.sh
File metadata and controls
executable file
·36 lines (29 loc) · 887 Bytes
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
#!/bin/bash
cat <<-EOM > draft.tex
\documentclass{article}
\usepackage{url}
\begin{document}
Some citations
EOM
bibtex-tidy ./*.bib \
--no-escape \
--no-strip-comments \
--months \
--curly \
--sort-fields \
--duplicates \
--blank-lines \
--modify
cat ./*.bib | grep '@.*{.*,' | sed 's/@article{//' | sed 's/@inproceedings{//' | sed 's/@book{//' | sed 's/@inbook{//' | sed 's/@phdthesis{//' | sed 's/@misc{//' | sed 's/@mastersthesis{//' | sed 's/@techreport{//' | sed 's/@preprint{//' | tr '\n' ' ' | sed 's/,[[:space:]]*$/}/' | sed 's/^/\\cite{/' >> draft.tex
cat <<-EOM >> draft.tex
{ \footnotesize
\bibliographystyle{plain}
\bibliography{atlas,other,theses}
}
\end{document}
EOM
cat draft.tex
xelatex draft.tex
bibtex draft
xelatex draft.tex
xelatex draft.tex