aboutsummaryrefslogtreecommitdiff
path: root/citations.tex
diff options
context:
space:
mode:
authorHolden Rohrer <hdawg7797@yahoo.com>2019-07-30 22:59:46 -0400
committerHolden Rohrer <hdawg7797@yahoo.com>2019-07-30 22:59:46 -0400
commitaad153f208ccc6261b32569b29ffedd404491064 (patch)
treec22f82bd266f06d3d82f831647527479ea792d6c /citations.tex
parent1f5f3357535d046ccfb562e1f74f7a48fdf5f000 (diff)
Revert "working non-alphabetized citation"
This reverts commit 91b82a1f493d3356b543285f6b668748c3317639.
Diffstat (limited to 'citations.tex')
-rw-r--r--citations.tex16
1 files changed, 12 insertions, 4 deletions
diff --git a/citations.tex b/citations.tex
index addb4ec..12ea915 100644
--- a/citations.tex
+++ b/citations.tex
@@ -1,6 +1,6 @@
\long\edef\citations{}
-\long\def\newcitation#1{%
- \long\edef\citations{
+\long\def\newcitation#1#2{%
+ \long\edef\citations{{#2}%allows alphabetization by including sanitized relevant data
\hangafter=-1 \hangindent=0.5in%hanging indents must be inserted every paragraph
\citations\par #1}%
}
@@ -28,7 +28,7 @@
\ifx\@pubdate\empty \else \advance \commas by 1\fi%
\ifx\@locator\empty \else \advance \commas by 1\fi%
\def\comma{\advance\commas by -1 \noexpand\ifnum\noexpand\commas>0 ,\noexpand\fi}%
- \ifnewcite\newcitation{\@namedisp \@title \@contain \@contrib \@version \@relnums \@publish \@pubdate \@locator.}\fi%
+ \ifnewcite\newcitation{\@namedisp \@title \@contain \@contrib \@version \@relnums \@publish \@pubdate \@locator.}\fi{\@namedisp\cltitle\clcontain}\fi%
(\ifnameinline
\ifx\@last\empty
\@title
@@ -41,5 +41,13 @@
\long\def\biblio{ %generates a bibliography
\vfil \eject %prints all previous pages and starts bibliography
\line{\hfil Works Cited \hfil}%
- \citations%
+ %%Alphabetization
+ \immediate\openout0=sort.tex%
+ \immediate\write0{\citations}%
+ \immediate\closeout0
+ \immediate\write18{python3 sort.py}%sort sort.tex alphabetically by the first group (also remove first group)
+ \immediate\openin0=sort.tex
+ \immediate\read0 to \data
+ \immediate\data
+ \immediate\closein0
}