Use Biblatex to get an overview of the keywords from my sources - latex

Hi I'm using LaTeX to write a literature review and BibLaTeX to print my sources and bibliography.
I would like to get an overview of all the keywords used in the articles I have gathered so far.
Since I have them all in a .bib file I figured that there probably is some easy way to get all the keywords from there that utilises BibLaTeX and the BibTeX-format of the file with the info.
From what I can gather BibLaTeX has the support for using keywords to sort the bibliography, or include/exclude certain sources based on keywords, but I can't find if or how I can print other information from the .bib than the full source. I've found \printfield in the documentation but it's not recognised when I use it in my document, even though the \textcite and the \printbibliography works fine so I'm guessing I'm using it wrong. Here's how I've tried to use it:
\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage[style=authoryear,backend=biber]{biblatex}
\addbibresource{sample.bib}
\title{Test}
\author{Me}
\begin{document}
\maketitle
\section*{Citation examples}
\parencite{Smith:2012qr}.
\printfield{keywords}
\printbibliography
\end{document}
I hope my question is clear enough.
Thank you.

Based on this question https://tex.stackexchange.com/questions/332292/listing-indexing-and-linking-keywords-in-biblatex you could use one of the packages for index creation, e.g. imakeidx:
\documentclass{article}
\begin{filecontents*}[overwrite]{\jobname.bib}
#article{Padial2010,
title={The Integrative Future Of Taxonomy},
author={Padial, J.M. and Miralles, A. and la Riva, I.D. and Vences, M.},
journal={Frontiers in Zoology},
year={2010},
volume={7},
number={16},
pages={1--14},
note={Cited by 4},
abstract={Text},
publisher={Some Publishing},
doi={10.1186/1742-9994-7-16},
issn={1742-9994},
file={./2004_Jensen_Homecoming.pdf},
keywords={biology, taxonomy},
}
#article{Padissal2010,
title={The Integrative Future Of Taxonomy},
author={Padial, J.M. and Miralles, A. and la Riva, I.D. and Vences, M.},
journal={Frontiers in Zoology},
year={2010},
volume={7},
number={16},
pages={1--14},
note={Cited by 4},
abstract={Text},
publisher={Some Publishing},
doi={10.1186/1742-9994-7-16},
issn={1742-9994},
file={./2004_Jensen_Homecoming.pdf},
keywords={math, taxonomy},
}
\end{filecontents*}
\usepackage{biblatex}
\addbibresource{\jobname.bib}
\usepackage{imakeidx}
\makeindex[name=keywords, title=List of Keywords]
\DeclareIndexFieldFormat{keywords}{\forcsvfield{\index[keywords]}{keywords}}
\AtEveryBibitem{\indexfield{keywords}}
\begin{document}
\nocite{*}
\printbibliography
\printindex[keywords]
\end{document}

Related

Capitalize journal title for apa in Latex

I am using overleaf to put together my references that follow the apa 7th edition. The journal titles however are not capitalized. How do I correct that? Note that I tried the method suggested in this post Capitalize journal name in latex but it didn't work for me.
Here is a minimal reproducible example:
\documentclass[man]{apa7}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa,uniquename=false,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{refs.bib}
\begin{document}
\parencite{golinkoff1979comparison} said this
\printbibliography
\end{document}
My refs.bib here
#article{golinkoff1979comparison,
title={A comparison of fathers' and mothers' speech with their young children},
author={Golinkoff, Roberta Michnick and Ames, Gail Johnson},
journal={Child development},
pages={28--32},
year={1979},
publisher={JSTOR}
}
The reference prints this:
This is a cross post: https://tex.stackexchange.com/questions/670231/capitalize-journal-title-for-apa-in-latex
Same method as in the post you linked to:
\documentclass[man]{apa7}
\usepackage[american]{babel}
\title{text}
\shorttitle{short title}
\usepackage{csquotes}
\usepackage[style=apa,uniquename=false,sortcites=true,sorting=nyt,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\begin{filecontents*}[overwrite]{\jobname.bib}
#article{golinkoff1979comparison,
title={A comparison of fathers' and mothers' speech with their young children},
author={Golinkoff, Roberta Michnick and Ames, Gail Johnson},
journal={Child development},
pages={28--32},
year={1979},
publisher={JSTOR}
}
\end{filecontents*}
\usepackage{mfirstuc}
\DeclareFieldFormat{journaltitle}{\capitalisewords{#1}}
\addbibresource{\jobname.bib}
\begin{document}
\parencite{golinkoff1979comparison} said this
\printbibliography
\end{document}

How can I create hyperlink in Acronyms in latex

How can I make my acronyms such that if someone clicks on acronyms then gets redirected to the actual list where all the acronyms are listed?
\documentclass{scrbook}
\usepackage[acronym]{glossaries}
\makeglossaries
\input{acronyms}
\begin{document}
\mainmatter
\printglossary[type=\acronymtype]
\chapter{ch1}
\acrfull{WLAN} is used as a trial for my example and problem
\chapter{ch2}
\acrfull{LAN} is used as a trial for my example and problem
\arcshort{LAN}
\end{document}
with acronyms.tex:
\newacronym{WLAN}{WLAN}{Wireless Local Area Network}
\newacronym{LAN}{LAN}{Local Area Network}
Adding the hyperref package will give you cross-references between your acronyms and the list of acronyms:
\documentclass{scrbook}
\usepackage{hyperref}
\usepackage[acronym]{glossaries}
\makeglossaries
\newacronym{WLAN}{WLAN}{Wireless Local Area Network}
\newacronym{LAN}{LAN}{Local Area Network}
\begin{document}
\mainmatter
\printglossary[type=\acronymtype]
\chapter{ch1}
\acrfull{WLAN} is used as a trial for my example and problem
\chapter{ch2}
\acrfull{LAN} is used as a trial for my example and problem
\end{document}

Citation not getting displayed - instead the alias is getting displayed in the pdf

I am trying to use \cite to cite items from bibliography.bib. However, my citations are not working properly.
The environment, code and output are as below:
\documentclass[12pt]{article}
\usepackage{amssymb,amsmath,amsfonts,eurosym,geometry,ulem,graphicx,caption,color,setspace,sectsty,comment,footmisc,caption,pdflscape,subfigure,array,hyperref,booktabs,dcolumn,threeparttable, adjustbox,apacite,dirtytalk,multirow,tabularx,booktabs,longtable,lscape,placeins,tikz}
\usepackage[backend=biber,natlib,style=author-year,citestyle=authoryear]{biblatex}
\usepackage{ulem}
\usepackage{float}
\restylefloat{table}
\usepackage{pgfplots}
\pgfplotsset{width=12cm,compat=1.9}
\usepackage{pst-func}
\psset{unit=2cm}
\usepackage{hyperref}
\hypersetup{colorlinks=true,urlcolor=blue,citecolor=blue,linkcolor=red}
\usepackage[center]{caption}
\usepackage{setspace}
\usepackage{epsfig}
\usepackage{graphics}
\usepackage{lscape}
\usepackage[english]{babel}
\usepackage{color}
\addbibresource{bibfile.bib}
\begin{document}
This is a \cite{sample}.
\end{document}
The cite takes reference from my .bib file, which is in the same folder. Here I have attached a sample citation.
#article{sample,
title={What is the price elasticity of housing demand?},
author={Hanushek, Eric A and Quigley, John M},
journal={The Review of Economics and Statistics},
pages={449--454},
year={1980},
publisher={JSTOR}
}
The output that I am getting looks like
Author Year with year linking to the bibliography section. However, I want it like Author, Year with the entire phrase linking to the bibliography section
Could you please help me with this issue?
Thank You :)
P.S. : I know my environment is not perfect. It has some packages repeated twice. :)
NEVER IGNORE ERROR MESSAGES! After an error, latex only recovers enough to syntax check the rest of the document. There is no point at even looking at what might or might not be valid output while there are still errors!
There are several major problems:
don't load packages multiple times and in particular don't load them multiple times with different options. An error message in the log file will explicitly tell you about the option clash
don't load incompatible package like apacite and biblatex in the same document. An error message in the log file with explicitly tell you that these two packages are not compatible
the biblatex option is called natbib, not natlib. An error message will explicitly tell you that it does not know the option natlib
the biblatex style is called authoryear, not author-year. An explicit error message will tell you that author-year style is not found
... and then there are many other duplicate, unnecessary or obsolete packages. You should clean up your preamble and only load the packages you need. Also hyperref should be loaded after the other packages.
\documentclass[12pt]{article}
\usepackage{amssymb,amsmath,amsfonts,eurosym,geometry,ulem,graphicx,caption,color,setspace,sectsty,comment,footmisc,caption,pdflscape,subfigure,array,
%hyperref,
booktabs,dcolumn,threeparttable, adjustbox,
%apacite,
dirtytalk,multirow,tabularx,booktabs,longtable,
%lscape,
placeins,tikz}
\usepackage[backend=biber,natbib,style=authoryear,citestyle=authoryear]{biblatex}
%\usepackage{ulem}
\usepackage{float}
\restylefloat{table}
\usepackage{pgfplots}
\pgfplotsset{width=12cm,compat=1.9}
\usepackage{pst-func}
\psset{unit=2cm}
%\usepackage{hyperref}
%\usepackage[center]{caption}
%\usepackage{setspace}
%\usepackage{epsfig}
%\usepackage{graphics}
%\usepackage{lscape}
\usepackage[english]{babel}
%\usepackage{color}
\usepackage{hyperref}
\hypersetup{colorlinks=true,urlcolor=blue,citecolor=blue,linkcolor=red}
\begin{filecontents*}[overwrite]{\jobname.bib}
#article{sample,
title={What is the price elasticity of housing demand?},
author={Hanushek, Eric A and Quigley, John M},
journal={The Review of Economics and Statistics},
pages={449--454},
year={1980},
publisher={JSTOR}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
This is a \cite{sample}.
\end{document}

affiliations and corresponding author comment as footnotes on latex article

I am trying to use the LaTeX article document class to create a simple paper with the authors listed on the title page with their (potentially multiple repeating) affiliations as numeric footnotes and other author comments as symbolic footnotes. For example, I want something like
However, I haven't been able to make this happen despite trying multiple different solutions. Is there a simple way to do this?
I have tried using the bigfoot package to create multiple different types of footnotes combined with footmisc with the multiple option to get multiple footnote markers with commas between them, but I end up with superposed markers and no footnotes. My minimal latex document is:
\documentclass{article}
\title{My title}
\usepackage[multiple]{footmisc}
\usepackage{bigfoot}
\DeclareNewFootnote{AAffil}[arabic]
\DeclareNewFootnote{ANote}[fnsymbol]
\author{
David Kaplan\footnoteAAffil{A University}\footnoteAAffil{Another University}\footnoteANote{Corresponding author}\footnoteANote{Equal contributors}
\and
Prince Charming\FootnotemarkAAffil{2}\FootnotemarkANote{2}
}
\date{\today}
\begin{document}
\maketitle
\end{document}
And the output I get is:
One possibility is to switch to the amsart class and then using the amsaddr package:
\documentclass{amsart}
\title{My title}
\author{David Kaplan $^{1,2,\ast,\dagger}$}
\address{$^1$A University}
\address{$^2$Another University}
\address{$^{\ast}$Corresponding author}
\address{$^{\dagger}$Equal contributors}
\author{Prince Charming $^{1,\dagger}$}
\usepackage[foot]{amsaddr}
\begin{document}
\maketitle
\end{document}
With help from others, I posted a solution to this question here. For completeness, I am copying the solution below:
\documentclass{article} % <---- No titlepage
\title{My title}
%\usepackage[dont-mess-around]{fnpct} % <---- I decided not to use fnpct, but rather put in the commas by hand
\usepackage{bigfoot}
\DeclareNewFootnote{AAffil}[arabic]
\DeclareNewFootnote{ANote}[fnsymbol]
\usepackage{etoolbox}
\makeatletter
\patchcmd\maketitle{\def\#makefnmark{\rlap{\#textsuperscript{\normalfont\#thefnmark}}}}{}{}{}
\makeatother
% Hook into the \thanks command for the article class to print the footnotes
\makeatletter
\def\thanksAAffil#1{% <--- These %'s are necessary for spacing
\footnotemarkAAffil\protected#xdef\#thanks{\#thanks%
\protect\footnotetextAAffil[\the \c#footnoteAAffil]{#1}}%
}
\def\thanksANote#1{%
\footnotemarkANote%
\protected#xdef\#thanks{\#thanks%
\protect\footnotetextANote[\the \c#footnoteANote]{#1}}%
}
\makeatother
\author{% <---- Not sure if these %'s are necessary, but can't hurt
David Kaplan%
\thanksAAffil{A University}$^{,}$\thanksAAffil{Another University}$^{,}$%
\thanksANote{Corresponding author}$^{,}$\thanksANote{Equal contributors}%
, %
Prince Charming%
\footnotemarkAAffil[2]$^{,}$\thanksAAffil{Still another university}$^{,}$\footnotemarkANote[2]$^{,}$%
\thanksANote{Another note}%
, %
Mohamed Ali%
\thanksAAffil{I am the greatest U.}%
}
\date{\today}
\begin{document}
\maketitle
\begin{abstract}
This is the abstract.
\end{abstract}
\section{Introduction}
More Text
\end{document}

Citing mathoverflow answers using \bibitem(without using bibtex)

Is there a way to cite mathoverflow answers using the following :
\begin{thebibliography}
\bibitem ....the mathoverflow citation
\end{thebibliography}
I did the following :
\documentclass[11pt]{amsart}
\setlength{\textheight}{23cm}
\setlength{\textwidth}{16cm}
\setlength{\topmargin}{-0.8cm}
\setlength{\parskip}{0.3\baselineskip}
\hoffset=-1.4cm
\usepackage{pifont}
\usepackage{amsmath,amscd,amssymb}
\usepackage{hyperref}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{conjecture}[subsection]{Conjecture}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{remark}[theorem]{Remark}
\numberwithin{equation}{section}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{corollary}[theorem]{Corollary}
\renewcommand{\thefootnote}{\arabic{footnote}}
\input xy
\xyoption{all}
\begin{document}
some text \cite{MO1}
\begin{thebibliography}{1}
\bibitem{MO1} gowers (\url{https://mathoverflow.net/users/1459/gowers}), Examples of common false beliefs in mathematics, URL (version: 2020-09-03): \url{https://mathoverflow.net/q/23478}
\end{thebibliography}
\end{document}
I know that there are ways to do it using bibtex and creating a separate .bib file. But I was thinking whether we could do it just using \bibitem?
Any help from anyone is welcome.
You could copy the rendered citation from the top of the cite popup:
With some tiny modifications, like wrapping the urls into suitable macros, you can directly use this in your bibliography:
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\begin{thebibliography}{1}
\bibitem{gowers} gowers (\url{https://mathoverflow.net/users/1459/gowers}), Examples of common false beliefs in mathematics, URL (version: 2020-09-03): \url{https://mathoverflow.net/q/23478}
\end{thebibliography}
\end{document}

Resources