LaTeX elsarticle style frontmatter - latex

I am experiencing a slight annoyance with LaTeX and Elsevier's elsarticle style.
I cannot get rid of the superscript a in front of the affiliation.
It is needed for multiple authors, so affiliations can be associated with different authors. It is unnecessary in case of a single author.
I could not find a way to remove it.
Is there a way to accomplish this?
This is my LaTeX code.
\documentclass[preprint,12pt,authoryear,nopreprintline]{elsarticle}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
\SweaveOpts{concordance=TRUE}
\begin{frontmatter}
\title{Recursive Combinatorial Functions, Matrices,\\ and a Diagram Notation}
\author{Erich Neuwirth}%
\ead{erich.neuwirth#univie.ac.at}%
\affiliation{organisation={University of Vienna, Faculty of Computer Science}}%
\date{\today}
\end{frontmatter}
Some text
\end{document}

Related

LaTeX change name of \bibliography{} heading (or remove entirely)

I have seen this question asked a few times on here but none of the answers have gotten me exactly what I want. I am using Overleaf to write a LaTeX document and when I make a bibliography (using the natbib library) it automatically makes a heading named "References". Can I remove this heading somehow? I've tried a couple other options but they haven't worked. I've attached a minimal working example below:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\usepackage{hyperref}
\begin{document}
Here is a citation \citep{Source}.
\bibliographystyle{apalike}
\bibliography{refs}
\end{document}
Not sure what didn't work with the existing responses - perhaps you could point to them and indicate what you didn't like about the results? Does replacing the \bibliography{refs} with the following help? (BTW, as this is not an Overleaf question, it's just LaTeX, perhaps remove the overleaf tag and reference.)
\begingroup
\renewcommand
\refname{}
\bibliography{refs}
\endgroup

latex: Can I create a link to "References" section?

I am using thebibliography environment for putting a few references; manually and not using Bibtex.
Is there a way to create a hyper link from text to jump to the top of the References?
\documentclass[12pt]{article}
\begin{document}
Reviewed record documents \cite{dailyConstructionNotes}
\begin{thebibliography}{}
\bibitem {dailyNotes} Daily Reports.
\end{thebibliography}
\end{document}
If you load the hyperref package, all your \cite commands will automatically create a link to the bibliography.
If you explicitly want to jump to the top of the References, you could add an hypertarget:
\documentclass[12pt]{article}
\usepackage{hyperref}
\begin{document}
Reviewed record documents \cite{dailyNotes}
\hyperlink{foo}{top of bibliography}
\newpage
\hypertarget{foo}{}
\begin{thebibliography}{1}
\bibitem {dailyNotes} Daily Reports.
\end{thebibliography}
\end{document}

Key-value lookup system in Latex macros fails if value has latex tokens

I am trying to use a sort of key-value lookup system in a LaTeX document, but I am having problems when the value itself has LaTeX code within it. In my document, I have the following macro definitions:
\makeatletter
\def\NewLabel#1#2{\expandafter\xdef\csname LBL##1\endcsname{#2}}
\def\Ref#1{\#ifundefined{LBL##1}{???}{\csname LBL##1\endcsname}}
With these macros, I can do the following in my document:
\NewLabel{name1}{John Smith}
\begin{document}
\Ref{name1}
\end{document}
However, the following fails complaining about an extra }:
\usepackage{hyperref}
\NewLabel{name1}{\href{mailto:johnsmith#exmaple.com}{John Smith}}
\begin{document}
\Ref{name1}
\end{document}
I know the solution has to have something to do with \protect or \relax or something like that, but I can't figure out what it is.
Does anyone know the solution to this problem?
I found two solutions to my problem, one using \noexpand and the other changing \xdef to \gdef, though I must admit that I do not fully understand the consequences of my solutions (particularly the use of \gdef). The more narrow solution using \noexpand is:
\documentclass{article}
\makeatletter
\def\NewLabel#1#2{\expandafter\xdef\csname LBL##1\endcsname{#2}}
\def\Ref#1{\#ifundefined{LBL##1}{???}{\csname LBL##1\endcsname}}
\usepackage{hyperref}
\NewLabel{name1}{\noexpand\href{mailto:johnsmith#exmaple.com}{John Smith}}
\begin{document}
\Ref{name1}
\end{document}
The wider solution using \gdef is:
\documentclass{article}
\makeatletter
\def\NewLabel#1#2{\expandafter\gdef\csname LBL##1\endcsname{#2}}
\def\Ref#1{\#ifundefined{LBL##1}{???}{\csname LBL##1\endcsname}}
\usepackage{hyperref}
\NewLabel{name1}{\href{mailto:johnsmith#exmaple.com}{John Smith}}
\begin{document}
\Ref{name1}
\end{document}
Though I see why using \gdef instead of \xdef will avoid expanding the argument, which was previously causing the problem, I am not sure what negative consequences this could have. Is there a context where the change from \xdef to \gdef could cause problems?

How to include a LaTeX paper into another LaTeX paper in OverLeaf?

I have LaTeX paper that I need to include in my dissertation. I am working in OverLeaf. That paper was written under one document class while the university has its own class. I need to include the paper in the dissertation so that it has the university style, its images need to be listed in the list of figures of the dissertation, and the authors listed in the paper's bibliography needs to be listed in the university's class bibliography. Is there any way I can do that in OverLeaf?
There are several dedicated packages for this. For example have a look at the combine, subdocs or docmute packages (A list with even more suggestions can be fond at https://www.ctan.org/recommendations/docmute).
Here a short example with the docmute package
\documentclass{book}
\usepackage{lipsum}
\usepackage{docmute}
\begin{document}
\tableofcontents
text
\chapter{imported paper}
\input{test}% assuming your paper is called test.tex
\end{document}
A Latex document cannot have multiple \documentclass. One solution would be to split the header/content of your latex document in overleaf:
Create a master.tex with the documentclass and put all your content (text between \begin{document} and \end{document} in a second content.tex. In the master, just \input{content}.
In your dissertation, just copy content.tex, its figure and add \input{} in the master file of your University which has the specific documentclass and bibliography settings.

LATEX: delete the number of page from the backmatter

im tring to delete the page number from my \backmatter sequence. I've succeded to do this, writing this code:
\begin{document}
.
.
.
\backmatter
\begingroup
\makeatletter
\let\ps#plain\ps#empty
\addcontentsline{toc}{chapter}{Allegati}
\input{Allegati}
\input{Bibliografia}
\listoffigures
\listoftables
\listof{grafico}{Elenco dei grafici}
\endgroup
\end{document}
But, I don't know why, the last page of my document still have his number. In the code above the last page is a graphic list, but if I change the order of my sequence, for example putting the bibliography in the last position, the this element will present the page number. I'm writing this document using the book class.
Someone can help me?
thanks
As you did not provide a MWE (Minimal Working Example) I can just guess what your document's preamble contains.
Have a look at this code please:
\documentclass{book}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancypagestyle{plain}{
\lhead{}
\chead{}
\rhead{}
\lfoot{}
\cfoot{}
\rfoot{}
}
\begin{document}
text
\newpage
text
\newpage
\backmatter
\begingroup
\pagestyle{plain}
\addcontentsline{toc}{chapter}{Allegati}
\listoffigures
\listoftables
%\listof{grafico}{Elenco dei grafici}
\endgroup
\end{document}
EDIT1:
This way you redefine the plain-style that is used by every chapter-page in your document.
If you do not want to change it document-wide, your approach is correct; just add a \clearpage before the last \endgroup. It won't create a new page, but delete the pagenumber. Btw, if you don't really need the \begingroup \endgroup leave it out, this will also delete the last page number.
END-EDIT1
A few things to note:
If you use plain book-class, you can use fancyhdr for setting a
page style like in the above example. Later just load the wanted
pagestyle and from there on it will be used.
If you want to write a document according to the modern
standard of LaTeX, maybe think about using a KOMA-class, which
provides great functions for changing the page style (and often they
also work better ;))
For me this MWE does work, having no pagenumber on the last page; if it does not for you, please give us more information about your document.

Resources