From aad153f208ccc6261b32569b29ffedd404491064 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Tue, 30 Jul 2019 22:59:46 -0400 Subject: Revert "working non-alphabetized citation" This reverts commit 91b82a1f493d3356b543285f6b668748c3317639. --- citations.tex | 16 ++++++++++++---- 1 file 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 } -- cgit