Latex Figures side-by-side in AR document class - latex

I am currently working on formatting an article for publication in Annual Reviews journal. They provide the class file that suppose to make the process easier.
The file could be downloaded here: https://www.annualreviews.org/pb-assets/Authors%20Assets/AR-Style1-1653591280420.zip
Here is the MRE:
\documentclass{ar-1col-S2O}
\usepackage[caption=false]{subfig}
% Document starts
\begin{document}
%Example of a Figure
\section{ELEMENTS\ OF\ THE\ MANUSCRIPT}
\subsection{Figures}Figures should be cited in the main text in chronological order. This is dummy text with a citation to the first figure (\textbf{Figure \ref{fig:sub_a}}). Citations to \textbf{Figure \ref{fig:sub}} (and other figures) will be bold.
\begin{figure}
\subfloat[Figure A]{\includegraphics[width=0.4\textwidth]{example-image-a}\label{fig:sub_a}}\quad
\subfloat[Figure A]{\includegraphics[width=0.4\textwidth]{example-image-b}\label{fig:sub_b}}
\caption{Combined figure}\label{fig:sub}
\end{figure}
\end{document}
Which gives me this:
And I need it to look like this (side-by-side with bold panel marker in the corner):
Any help or suggestions are welcome. Thank you.

\documentclass{ar-1col-S2O}
\usepackage[caption=false]{subfig}
% Document starts
\begin{document}
%Example of a Figure
\section{ELEMENTS\ OF\ THE\ MANUSCRIPT}
\subsection{Figures}Figures should be cited in the main text in chronological order. This is dummy text with a citation to the first figure (\textbf{Figure \ref{fig:sub_a}}). Citations to \textbf{Figure \ref{fig:sub}} (and other figures) will be bold.
\begin{figure}
\begin{minipage}{.4\textwidth}
\subfloat[Figure A]{\includegraphics[width=\textwidth]{example-image-a}\label{fig:sub_a}}
\end{minipage}
\hfill
\begin{minipage}{.4\textwidth}
\subfloat[Figure A]{\includegraphics[width=\textwidth]{example-image-b}\label{fig:sub_b}}
\end{minipage}
\caption{Combined figure}\label{fig:sub}
\end{figure}
\end{document}

Related

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}

LaTeX: Citation found in .bib-file but only name of citation returned, bibliography not printed

I got this issue in LayteX (Overleaf) where the \cite{} and \textcite{} command does find my source, but then returns the exact name of the source in my .bib-file. It looks something like this (I couldn't add images somehow):
text...(world'bank"2022)....text.
While the correct output should be:
text... (World Bank, 2022) .... text
The source:
#online{world_bank_2022,
title = {World Bank Open Data {\textbar} Data},
url = {https://data-worldbank-org.eur.idm.oclc.org/},
author = {{World Bank}},
urldate = {2022-10-07},
date = {2022},
file = {World Bank Open Data | Data:C\:\\Users\\jhans\\Zotero\\storage\\X739YI3J\\data-worldbank-org.eur.idm.oclc.org.html:text/html},
}
The package and file name. Name of the bib-file corresponds 1:1 with the imported library file:
\usepackage[backend=biber, style=apa]{biblatex}
\addbibresource{Bibliography-ASP.bib}
And as a result, the following command also does not return anything:
\newpage
\printbibliography
The error messages are:
Empty bibliography on input line 360.
Overfull \hbox (6.3094pt too wide) in paragraph at lines 34--35
Citation 'world_bank_2022' on page 1 undefined on input line 34.
As an illustration, I created a MWE with the exact same structure and packages as in my original file.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{rotating}
\usepackage{multirow,booktabs,setspace,caption}
\usepackage{tikz}
\usepackage{ntheorem}
\usepackage{longtable}
\newtheorem{hyp}{H}
\usepackage{subcaption}
\usepackage{lipsum}
\usepackage{minted}
\usepackage{wrapfig}
\usepackage{csquotes}
\usepackage{hyperref}
\usepackage[backend=biber, style=apa]{biblatex}
\addbibresource{Bibliography IIA ASP.bib}
\title{AS\&P Assignment 3}
\author{Hans van Beek, 497005}
\date{14 October 2022}
\begin{document}
\maketitle
\section{Panel Data Modelling: Time-to-Export}\label{q1}
\subsection{Hypotheses}\label{q1: hypotheses}
The current analysis focuses on three hypothesised determinants of the time-to-export in hours (\textit{time\_to\_export}) between countries and over time using data from the World Bank (\cite{world_bank_2022}). The time-to-export is an important indicator of a country's quality of export and import conditions with a lower time-to-export (\textit{time\_to\_export}) in hours reflecting a more efficient economy. An appropriate determinant of the variation in the size of a country's economy could therefore be the GDP per capita (providing a good benchmark). The first hypothesis (i) therefore states that a higher GDP is
\newpage
\printbibliography
\newpage
\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}

\maketitle to use several times with combine in LaTeX

I am trying to make a .tex template for a book of abstracts for the conference. I want the template to be compilable, so the participants are able to see their abstracts separately before submitting. Moreover I want to use the files to compile the book of abstracts with table of contents and titles.
So, I have master file
\documentclass[12pt]{combine}
\usepackage{authblk}
\begin{document}
\tableofcontents
\begin{papers}
\coltocauthor{Crist\'{o}bal Josevich Junta, Fyodor Simeonovich Kivrin}
\coltoctitle{Title of the first abstract}
\import{first}
\coltocauthor{Roman Oyra-Oyra}
\coltoctitle{Title of the second abstract}
\import{second}
\end{papers}
\end{document}
And two imported files are:
\documentclass{article}
\usepackage{authblk}
\title{Title of the first abstract}
\author[1]{Crist\'{o}bal Josevich Junta}
\author[2]{Fyodor Simeonovich Kivrin}
\affil[1]{Department of the Meaning of Life}
\affil[2]{Department of Linear Happiness}
\begin{document}
\maketitle
Text of the first abstract.
\end{document}
and
\documentclass{article}
\usepackage{authblk}
\title{Title of the second abstract}
\author[1]{Roman Oyra-Oyra}
\affil[1]{Laboratory of the most unexpected sciences}
\begin{document}
\maketitle
Text of the second abstract.
\end{document}
The problem is the second \maketitle does not print authors names and their affiliation.
I have tried using redefined \settitle instead of \maketitle
\makeatletter
\newcommand{\settitle}{\#maketitle}
\makeatother
it did not help.
Also, I tried titling package, which led to no change.
I want \maketitle to print the names and affiliations or to find out the better way to automatically make titles for each abstract.

No page number for divider pages in LaTeX

I have a report in LaTeX, and i have used the following commands to create my Appendix, however, my lecturer states that any divider pages should be unnumbered.
\documentclass{report}
\usepackage{appendix}
\begin{document}
\include{chap1}
\include{appendix}
\end{document}
Then in appendix.tex
\appendix
\pagestyle{empty}
\appendixpage
\noappendicestocpagenum
\addappheadtotoc
This creates the Appendices divider page, but still puts a page number on it in the footer. There is no page number in the TOC, as expected.
How can I remove it from the footer?
I looked at the appendix.sty source, and I see the problem: line 74, in the definition of \#chap#pppage, issues a \thispagestyle{plain} command, thus overriding your \pagestyle{empty} for this page. The inelegant but direct way to fix this is to redefine the command without this line - issue the following code after importing the package.
Revised, tested version
\documentclass{report}
\usepackage{appendix}
%==== The action ================
\makeatletter
\def\#chap#pppage{%
\clear#ppage
\if#twocolumn\onecolumn\#tempswatrue\else\#tempswafalse\fi
\null\vfil
\markboth{}{}%
{ \centering \interlinepenalty \#M
\normalfont \Huge \bfseries \appendixpagename\par}%
\if#dotoc#pp\addappheadtotoc\fi
\vfil\newpage
\if#twoside
\if#openright \null \thispagestyle{empty}\newpage\fi
\fi
\if#tempswa \twocolumn\fi
}
\makeatother
%==== Back to the document ========
\begin{document}
\tableofcontents
\chapter{Blah}
Rhubarb, rhubarb, rhubarb.
\appendix
\pagestyle{empty}
\appendixpage
\noappendicestocpagenum
\addappheadtotoc
\chapter{Boff}
Cabbages, cabbages, cabbages.
\end{document}
The TeX FAQ might come in handy here:
I asked for “empty”, but the page is numbered
If you use \pagestyle{empty} and you
find some pages are numbered anyway,
you are probably encountering one of
the style decisions built into the
standard LaTeX classes: that certain
special pages should always appear
with \pagestyle{plain}, with a page
number at the centre of the page foot.
The special pages in question are
those (in article class) containing a
\maketitle, or (in book and report
classes) \chapter or \part commands.
The simple solution is to reissue the
page style after the command, with
effect for a single page, as, for
example (in article):
\maketitle
\thispagestyle{empty}
So give adding \thispagestyle{empty} after your \appendix a try.
try changing \pagestyle{empty} to \thispagestyle{empty} and put it after \addappheadtotoc.
Try instead:
\pagenumbering{gobble}
\begin{appendices} \newpage
\clearpage
\pagenumbering{arabic}
\addtocounter{page}{100}
\tableofcontents
\newpage
*Special thanks to https://tex.stackexchange.com/questions/6639/removing-page-numbers-but-not-headers!

Resources