HOW TO WORK PRODUCTIVELY WITH THOUSANDS OF REFERENCES TO WRITE PAPERS AND BOOKS: A GUIDE TOGETHER WITH CODE FOR SOME FREE TOOLS TO MAKE LIFE EASIER. ... [ Word Count: 3.000 ~ 12 PAGES | Revised: 2019.5.24 ]

@tibra · 2019-05-24 09:04 · science

ffsdf.jpeg

  # BLOG **Tutorial.** I think many people would benefit from using LaTeX. For example, when managing enormous lists of references. When in the midst of writing other documents. _I am sharing here my code for some tools that I wrote earlier. Free as in freedom _and_ free beer to use. Indeed, spread the word. Let's all get on the same page. Public domain. Consider this code GPLv3 licensed. Tools are written in LaTeX itself, because it's _nice_ to be _able_ to _print out_ your own list references list and carry it around and be able to it read _away_ from the big screen, agreed? No warranties: just some code I think would be useful._ I'm also back to posting. Was busy. Last two months.   #### Word count: 3.000 ~ 12 PAGES   |   Revised: 2019.5.24 — 〈  1  〉— ## LET'S MAKE IT SUMMARY: A program in LaTeX to convert minimal description of references for papers into code for MARKUP and code for LaTeX bibliography files. HOW TO USE: Place the REFERENCES code in `references.tex` in a code editor and see the examples. Place the other code as you like in files `bookscode.tex`, `pagesandbookscode.tex`, and `pagescode.tex`, and place these files in the *same* folder as `references.tex` and compile to generate an updated .pdf file. The two letter marks refer to utility. Such marks are arbitrary. Merely selected to be easily distinguishable and requiring no less than making two typos to accidentally change one into the others. Useless-as-reference documents are listed but only in shorthand. Code is automatically generated for complete data only for useless references or those useless reference good to cite as an example marked `\forref`. *pt* indicates less useful texts. Less useful because low quality. *er* indicates less useful texts. Less useful because has errors. *su* indicates less useful texts. No errors, merely not super interesting. That is, no original ideas appear for the first time in such references. Other, earlier reference should cited regarding these themes. *gd* indicates less useful texts. No errors, no new idea, but good theme or didactically interesting. *ix* indicates a *useful* text. It has new ideas that seem to appear there for the first time anywhere. But it also appears to have some errors. *bp* indicates a *useful* text. It has new ideas that seem to appear there for the first time anywhere. It appears to have no errors. _Each review is just my personal opinion._ The produced .pdf file will have bookmarks for alphabetic categorization of references and count how many monographs and how many papers are present in the list. See the bottom of the list. Reference data can be added in shorthand and bibliography ready code for a blog or typeset paper is generated automatically where appropriate. PASTE: the references that you want to use you copy and paste the *code* generated in the .pdf file into the .bib file that corresponds to the paper template. COMPILE: the paper `template.tex`, using the code editor you prefer, say, TeXmaker, after you have installed your preferred distribution of LaTeX. _The following example `references.tex` document has several references included as examples of shorthand._ — 〈  2  〉— ## references.tex
\documentclass{article}\usepackage{xparse}% FOR \seq
\usepackage{etoolbox}% FOR \ifdefstring AND \ifnumgreater
\usepackage{mathtools}% FOR \raisebox AND \resizebox
\usepackage[margin=32mm]{geometry}\usepackage[colorlinks=true,linkcolor=coral,urlcolor=coral]{hyperref}% FOR \url
\usepackage{xcolor}% FOR \definecolor
\definecolor{coral}{RGB}{240,128,128}
\usepackage{xifthen}% For \ifthenelse AND \isempty REQUIRES ifmtarg.sty
\input{pagesandbookscode}
\input{pagescode}
\input{bookscode}

\begin{document}\setcounter{PapersCount}{0}\setcounter{BooksCount}{0}\setcounter{PapersAndBooksCount}{0}\begin{center}\LARGE\color{coral}MARKUP~\(\rightarrow\)~BIBTEX\end{center}\vspace{2mm}

\color{coral}\section*{NOTATION}\color{black}

\coauthorsset The first named author in the list \emph{and none or some} of the other authors in the list together wrote each of these papers.

\section{A}

\book[1007/978-1-4419-8598-9]{bp}{ABA96}{+Martin*Abadi, +Luca*Cardelli,}{A theory of objects}{+New York: Springer, 1996.}

\pages1,gd,ABBASS,H,(2006,Pareto optimal approaches to neuroensemble learning).

\book{bp}{ABE96}{+Harold*Abelson, +Gerald*Sussman,}{Structure and interpretation of computer programs}{+Cambridge: Massachusetts Institute of Technology Press, 1996.}

\pages1,su,ABERNETHY,J,WARMUTH,M,(2010,Repeated games against budgeted adversaries).

\pagesinabook{bp}{ABR17}{+Samson*Abramsky,}{Contextuality}{Categories for the working philosopher}{+Oxford: University Press, 2017.}

\pagesinabook[1016/B978-0-444-52869-8.50010-4]{bp}{ABR09}{+Samson*Abramsky, +Bob*Coecke,}{Categorical quantum mechanics}{Quantum logic}{+Amsterdam: Elsevier North Holland, 2009.}

\pagesinabook[1007/978-3-642-58622-4\_1]{bp}{ABR99}{+Samson*Abramsky, +Guy*McCusker,}{Game semantics}{Computational logic}{+Berlin: Springer, 1999.}

\pages1,er,ACKERLEY,C,(2009,Preface \tobook{Watt}).

\pagesinajournal{bp}{ADA29}{+Donald*Adams,}{Experimental studies of adaptive behavior in cats}{Comparative psychology monographs}{{6}{27}{1--168}{4}{1929}}

\bookdocument[adleman.usc.edu/files/2018/03/20180722-prenes-excerpt-2052hym.pdf]{ix}{ADL18}{+Leonard*Adleman,}{Memes, genes, and cenes}{1--X}{3}{2018}

\book[1007/BFB0090185]{bp}{ADLE92}{+Leonard*Adleman, +Ming-Deh*Huang,}{Primality testing and abelian varieties over finite fields}{+Berlin: Springer, 1992.}

\pagesinajournal[1145/83880.84528]{bp}{AGH90}{+Gul*Agha,}{Concurrent object oriented programming}{Communications of the association for computing machinery}{{33}{9}{125--141}{8}{1990}}

\pagesinabook[1007/3-540-61363-3\_1]{bp}{AGH96}{+Gul*Agha,}{Modeling concurrent systems: Actors, nets, and the problem of abstraction and composition}{Applications and theory of petri nets}{+Berlin: Springer, 1996.}

\pagesinajournal{ix}{AKE70}{+George*Akerlof,}{The market for lemons: Quality uncertainty and the market mechanism}{Quarterly journal of economics}{{84}{3}{488--500}{8}{1970}}

\pages5,su,\coauthorsset AMARI,S, CICHOCKI,A, FINKE,M, IKEDA,S, MUELLER,K, MURATA,N, NAKAHARA,H, WU,S, YANG,H, (1995,A new learning algorithm for blind signal separation),(1995,A statistical theory of overtraining),(1998,Convergence of the wake-sleep algorithm),(1999,Population decoding based on an unfaithful model),(2001,Neural implementation of bayesian inference in population codes).

\pagesdocument[arxiv.org/abs/1901.07831]{bp}{ARIS19}{+Jonas*Arista, +Neil*O'Connell,}{Loop-erased walks and random matrices}{1--25}{1}{2019}

\pagesinabook{su}{AUM88}{+Robert*Aumann,}{Foreword}{A general theory of equilibrium selection games}{+Cambridge: Massachusetts Institute of Technology Press, 1988.} \forref

\pagesinajournal[1007/S001820050111]{bp}{AUM99}{+Robert*Aumann,}{Interactive epistemology}{International journal of game theory}{{28}{3}{263--314}{8}{1999}}

\book{bp}{AUM95}{+R.*Aumann, +M.*Maschler, +R.*Stearns,}{Repeated games with incomplete information}{+Cambridge: Massachusetts Institute of Technology Press, 1995.}

\book{su}{AUM74}{+Robert*Aumann, +Lloyd*Shapely,}{Values of nonatomic games}{+Princeton: University Press, 1974.} \forref

\book{gd}{AWOD06}{+Steve*Awodey,}{Category theory}{+Oxford: University Press, 2006.} \forref

\section{B}

\pages4,su,\coauthorsset BAGNELL,A, BOOTS,B, GIORNO,A, GORDON,G, GRUBB,A, HEBERT,M, SUN,W, VEMULA,A, (2011,Generalized boosting algorithms for convex optimization),(2011,Ignoring distractors in the absence of labels),(2019,Contrasting exploration in parameter and action space: A zeroth order optimization perspective),(2019,Dual policy iteration).

\pages1,su,BAILEY,J,EPPS,J,VINH,N,(2009,Information theoretic measures for clusterings comparison).

\book{bp}{BAI55}{+Samuel*Bailey,}{Letters on the philosophy of the human mind}{1+London: Brown Longman Green Longmans, 1855.}

\book{bp}{BAI58}{+Samuel*Bailey,}{Letters on the philosophy of the human mind}{2+London: Brown Longman Green Longmans Roberts, 1858.}

\book{bp}{BAI63}{+Samuel*Bailey,}{Letters on the philosophy of the human mind}{3+London: Green Longman Roberts, 1863.}

\book{gd}{BICH02}{+Klaus*Bichteler,}{Stochastic integration with jumps}{+Cambridge: University Press, 2002.} \forref

\pagesinajournal[4230/LIPICS.SNAPL.2015.4]{gd}{BIE15}{+P.*Bielik, +V.*Raychev, +M.*Vechev,}{Programming with big code}{Summit on advances in programming languages}{{1}{1}{41--50}{5}{2015}} \forref

\book{gd}{BIR10}{+Richard*Bird,}{Pearls of functional algorithm design}{+Cambridge: University Press, 2010.} \forref

\book{gd}{BIR88}{+Richard*Bird, +Philip*Wadler,}{Introduction to functional programming}{+Hemel Hempstead: Prentice Hall, 1988.} \forref

\book{bp}{BLA391}{+Brand*Blanshard,}{The nature of thought}{1+London: Allen Unwin, 1939.}

\book{bp}{BLA392}{+Brand*Blanshard,}{The nature of thought}{2+London: Allen Unwin, 1939.}

\book{gd}{BOD72}{+Margaret*Boden,}{Purposive explanation in psychology}{+Cambridge: Harvard University Press, 2006.} \forref

\book{bp}{BOD81}{+Margaret*Boden,}{Minds and mechanisms}{+Ithaca: Cornell University Press, 1981.}

\book{bp}{BOD061}{+Margaret*Boden,}{Mind as machine}{1+Oxford: University Press, 2006.}

\book{bp}{BOD062}{+Margaret*Boden,}{Mind as machine}{2+Oxford: University Press, 2006.}

\pages{10},su,\coauthorsset BOWER,J, ANDERSON,B, ASSAD,C, ATIYA,A, BHALLA,U, BANIK,J, HASSELMO,M, LEE,M, MEAD,C, NELSON,M, RASNOW,B, PAULIN,M, RYCKEBUSCH,S, UHLEY,J, WILSON,M, WONG,Y, (1987,A computer simulation of the olfactory cortex with functional implications for storage and retrieval of olfactory information),(1987,Neural networks for template matching),(1987,Optimal neural spike classification),(1988,A system for simulating neural networks),(1988,Modeling small oscillating biological networks in analog very large scale integration),(1988,Neural control of sensory acquisition),(1988,Simulation and measurement of the electric fields generated by weakly electric fish),(1989,A computer modeling approach to understanding the inferior olive and its relationships to the cerebellar cortex in rats),(1989,A computer simulation of oscillatory behavior in cerebral cortical networks),(1990,Cholinergic modulation may enhance cortical associative memory function).

\color{coral}\section*{COUNT}\color{black}

\addtocounter{PapersAndBooksCount}{\value{PapersCount}}\addtocounter{PapersAndBooksCount}{\value{BooksCount}}{\large\vspace*{5mm}\noindent\hspace*{17pt}\sc{Total: Nonfiction:}~\arabic{PapersAndBooksCount}\vspace*{5mm} \sc{Texts} \(\,\simeq\,\) \arabic{BooksCount} \sc{Books} + \arabic{PapersCount} \sc{Papers}}\end{document}
— 〈  3  〉— ## bookscode.tex
\newcounter{BooksCount}\def\books#1,#2,#3.{\raggedright\hangindent=56pt\noindent\addtocounter{BooksCount}{#1}\textbf{#1}~~~\(\mathsf{BOOKS}\)~~\(\mathsf{#2}\)~~\texttt{#3}.\linebreak}

\def\volumeaddresspublisheryearbibtexB#1+#2: #3, #4.{\raggedright\ifthenelse{\isempty{#1}}{}{volume = "#1", }\linebreak address = "#2", publisher = "#3",\linebreak year = "#4",}

\newcommand{\book}[6][]{\noindent\stepcounter{BooksCount}\raggedright\hangindent=48pt\textbf{1}~~**\(\mathsf{#2}\)**~~\texttt{\&\#160;}~~[\(\mathsf{#3}\)]~~\texttt{\&\#160;}~~\commaversion{#4}, *\textit{#5}*, \volumeaddresspublisheryearmarkup#6\ifthenelse{\isempty{#1}}{.}{, \url{https://doi.org/10.#1}.}\linebreak\linebreak\hspace*{-31pt}\texttt{@book}\{\texttt{#3,~author = "\andversion{#4}",\linebreak title = "#5", \volumeaddresspublisheryearbibtexB#6\ifthenelse{\isempty{#1}}{}{ doi = "10.#1",}}\}\linebreak\vspace{2mm}}

\newcommand{\bookdocument}[8][]{\noindent\stepcounter{BooksCount}\raggedright\hangindent=48pt\textbf{1}~~**\(\mathsf{#2}\)**~~\texttt{\&\#160;}~~[\(\mathsf{#3}\)]~~\texttt{\&\#160;}~~\commaversion{#4}, #5, \url{https://#1}, #6, #7.#8.\linebreak\linebreak\hspace*{-31pt}\texttt{@book}\{\texttt{#3,~author = "\andversion{#4}",\linebreak title = "#5",\linebreak pages = "#6", month = "\themonth{#7}", year = "#8", \linebreak url = "\url{https://#1}",}\}\linebreak\vspace{2mm}}
— 〈  4  〉— ## pagesandbookscode.tex
\newcommand{\coauthorsset}{({\footnotesize\sc{CoauthorsSet})~~}}

\newcommand{\takeit}[1]{#1}

\newcounter{PapersAndBooksCount}

\def\bibtexformat+#1*#2,{{\sc#1} {\sc#2}}

\def\markupformat+#1*#2,{**{\sc#1} \(\mathsf{\uppercase{#2}}\)**}

% ONLY tmpa and tmpb EXIST tmpA AND tmpB AND tmpx and tmpX AND tmpWord DO NOT EXIST

\ExplSyntaxOn
\NewDocumentCommand{\andversion}{m}{\seq_set_split:Nnn\l_tmpb_seq{~}{#1}\int_zero:N\l_tmpb_int\seq_map_inline:Nn\l_tmpb_seq
    {\int_incr:N\l_tmpb_int\int_compare:nTF{\int_mod:nn{\l_tmpb_int-1}{1}=0}
        {\expandafter\expandafter\expandafter\bibtexformat\takeit{##1}}{##1}
        \int_compare:nT{\l_tmpb_int<\seq_count:N\l_tmpb_seq}{\hspace{0.32em}and\hspace{0.32em}}}}
\ExplSyntaxOff

\ExplSyntaxOn
\NewDocumentCommand{\commaversion}{m}{\seq_set_split:Nnn\l_tmpa_seq{~}{#1}\int_zero:N\l_tmpa_int\seq_map_inline:Nn\l_tmpa_seq
    {\int_incr:N\l_tmpa_int\int_compare:nTF{\int_mod:nn{\l_tmpa_int-1}{1}=0}
        {\expandafter\expandafter\expandafter\markupformat\takeit{##1}}{##1}
        \int_compare:nT{\l_tmpa_int<\seq_count:N\l_tmpa_seq}{,\hspace{0.32em}}}}
\ExplSyntaxOff

\newcommand{\name}[1]{\(\mathsf{\uppercase{#1}}\)**,}

\newcommand{\forref}{\hspace*{-52pt}\raisebox{1mm}{\resizebox{!}{11pt}{\(\uparrow\)}}\(\mathsf{\;JUST\;\;FOR\;\;REFERENCE}\)\linebreak}
— 〈  5  〉— ## pagescode.tex
\newcommand{\themonth}[1]{\def\eatit{#1}\ifdefstring{\eatit}{1}{jan}{}\ifdefstring{\eatit}{2}{feb}{}\ifdefstring{\eatit}{3}{mar}{}\ifdefstring{\eatit}{4}{apr}{}\ifdefstring{\eatit}{5}{may}{}\ifdefstring{\eatit}{6}{jun}{}\ifdefstring{\eatit}{7}{jul}{}\ifdefstring{\eatit}{8}{aug}{}\ifdefstring{\eatit}{9}{sep}{}\ifdefstring{\eatit}{10}{oct}{}\ifdefstring{\eatit}{11}{nov}{}\ifdefstring{\eatit}{12}{dec}{}}

\newcounter{PapersCount}\def\pages#1,#2,#3.{\raggedright\hangindent=52pt\addtocounter{PapersCount}{#1}\textbf{#1}~~~\(\mathsf{PAGES}\)~~\(\mathsf{#2}\)~~\texttt{#3}.\linebreak}

\newcommand{\tobook}[1]{(to \textit{#1})}
\newcommand{\ofbook}[1]{(to \textit{#1})}

\newcommand{\volumeissuepagesmonthyearmarkup}[5]{#1(#2):#3, #4.#5}

\newcommand{\volumeissuepagesmonthyearbibtex}[5]{\linebreak volume = "#1", issue = "#2", pages = "#3",\linebreak month = \themonth{#4}, year = "#5",}

\def\volumeaddresspublisheryearmarkup#1+#2: #3, #4.{\ifthenelse{\isempty{#1}}{}{#1, }#2: #3, #4}

\def\volumeaddresspublisheryearbibtexP#1+#2: #3, #4.{\raggedright\ifthenelse{\isempty{#1}}{}{volume = "#1", }\linebreak address = "#2", publisher = "#3",\linebreak year = "#4",}

\newcommand{\pagesinajournal}[7][]{\noindent\stepcounter{PapersCount}\raggedright\hangindent=48pt\textbf{1}~~**\(\mathsf{#2}\)**~~\texttt{\&\#160;}~~[\(\mathsf{#3}\)]~~\texttt{\&\#160;}~~\commaversion{#4}, #5, *\textit{#6}*, \volumeissuepagesmonthyearmarkup#7\ifthenelse{\isempty{#1}}{.}{, \url{https://doi.org/10.#1}.}\linebreak\linebreak\hspace*{-31pt}\texttt{@Article}\{\texttt{#3, author = "\andversion{#4}",\linebreak title = "#5",\linebreak journal = "#6", \volumeissuepagesmonthyearbibtex#7\ifthenelse{\isempty{#1}}{}{ doi = "10.#1",}}\}\linebreak}

\newcommand{\pagesinabook}[7][]{\noindent\stepcounter{PapersCount}\raggedright\hangindent=48pt\textbf{1}~~**\(\mathsf{#2}\)**~~\texttt{\&\#160;}~~[\(\mathsf{#3}\)]~~\texttt{\&\#160;}~~\commaversion{#4}, #5, *\textit{#6}*, \volumeaddresspublisheryearmarkup#7\ifthenelse{\isempty{#1}}{.}{, \url{https://doi.org/10.#1}.}\linebreak\linebreak\hspace*{-31pt}\texttt{@Incollection}\{\texttt{#3, author = "\andversion{#4}",\linebreak title = "#5",\linebreak booktitle = "#6", \volumeaddresspublisheryearbibtexP#7\ifthenelse{\isempty{#1}}{}{ doi = "10.#1",}}\}\linebreak}

\newcommand{\pagesdocument}[8][]{\noindent\stepcounter{PapersCount}\raggedright\hangindent=48pt\textbf{1}~~**\(\mathsf{#2}\)**~~\texttt{\&\#160;}~~[\(\mathsf{#3}\)]~~\texttt{\&\#160;}~~\commaversion{#4}, #5, \url{https://#1}, #6, #7.#8.\linebreak\linebreak\hspace*{-31pt}\texttt{@book}\{\texttt{#3,~author = "\andversion{#4}",\linebreak title = "#5",\linebreak pages = "#6", month = "\themonth{#7}", year = "#8", \linebreak url = "\url{https://#1}",}\}\linebreak\vspace{2mm}}
— 〈  6  〉— ## examplebibliography.bib
@Book{ADA29, author = "Donald Adams",
    title = "Experimental studies of adaptive behavior in cats",
    address = "Baltimore", publisher = "Johns Hopkins University Press", year = "1929",}

@Article{AGH90, author = "Gul Agha",
    title = "Concurrent object oriented programming",
    journal = "Communications of the association for computing machinery", volume = "33", number = "9", pages = "125--141", 
    month = sep, year = "1990",
    doi = "10.1145/83880.84528",}

@Incollection{AGH96, author = "Gul Agha",
    title = "Modeling concurrent systems: Actors, nets, and the problem of abstraction and composition",
    booktitle = "Applications and theory of petri nets",
    address = "Berlin", publisher = "Springer",
    year = "1996",
    doi: "10.1007/3-540-61363-3\_1",}

@Article{GIL61, author = "Edgar Gilbert", 
    title = "Random plane networks",
    journal = "Journal of the society for industrial and applied mathematics",
    volume = "9", issue = "4", pages = "533--543",
    month = mar, year = "1961", doi = "10.1137/0109045",}

@Book{Gir89, author = "Jean-Yves Girard",
    title = "Proofs and types",
    address = "Cambridge",
    publisher = "Cambridge University Press",
    year = "1989",}

@Book{GROS64, author = "Stephen Grossberg",
    title = "Theory of embedding fields with applications to psychology and neurophysiology",
    address = "New York",
    publisher = "Rockefeller Institute for Medical Research",
    year = "1964",}

@Article{GROS75, author = "Stephen Grossberg",
    title = "Adaptive pattern classification and universal recoding: Parallel development and coding of neural feature detectors",
    journal = "Biological cybernetics",
    volume = "23", issue = "3", pages = "121--134",
    month = dec, year = "1975",
    doi = "10.1007/BF00344744",}

@Article{GROS76, author = "Stephen Grossberg",
    title = "Adaptive pattern classification and universal recoding: Feedback, expectation, olfaction, and illusions",
    journal = "Biological cybernetics",
    volume = "23", issue = "4", pages = "187--202",
    month = jan, year = "1976",
    doi = "10.1007/BF00340335",}

@Incollection{HOL95, author = "John Holland",
    title = "Can there be a unified theory of complex adaptive systems?",
    booktitle = "The mind, the brain, and complex adaptive systems",
    address = "Reading", publisher = "Addison Wesley",
    year = "1995",}
— 〈  7  〉— ## exampletemplate.tex ``` \documentclass[a4paper,11pt]{article} \pdfoutput=1 \usepackage[numbers,sort&compress]{natbib} \usepackage[colorlinks=true,citecolor=coral,linkcolor=coral,urlcolor=coral]{hyperref} \usepackage{mathtools,xkeyval,xcolor,fancyhdr,etoolbox,amssymb,tikz} \usepackage[bindingoffset=0.2in,% left=1in,right=1in,top=1in,bottom=1in,% footskip=.25in]{geometry} \definecolor{coral}{RGB}{240,128,128}\definecolor{darkgrey}{RGB}{51,51,51} \fancypagestyle{plain}{\renewcommand{\headrulewidth}{0pt}\fancyhf{} \fancyfoot[C]{\color{coral}\raisebox{-8pt}{\Large\thepage}}} \pagestyle{fancy} \renewcommand{\headrule}{\vbox to 0pt{\hbox to\headwidth{\color{coral}\leader
#science #development #programming #giveaway #software
Payout: 0.000 HBD
Votes: 229
More interactions (upvote, reblog, reply) coming soon.