Is it possible to acheive something similar to
\title{\myTitle \thanks{ \input{../acknowledgement} }}
(which doesn't work?) in order to load the content for \thanks on the fly?
footnotesinputtitles
Is it possible to acheive something similar to
\title{\myTitle \thanks{ \input{../acknowledgement} }}
(which doesn't work?) in order to load the content for \thanks on the fly?
This uses titling
. You still need to specify most of the formatting for the authors simply because you are trying to get addresses etc. in as well. But you can use \title
as normal. Moreover, it avoids the need for multicol
which can cause headaches. Put the paragraphs you want typeset as part of the title block in \myabstract{}
so they get included in \maketitle
. It is necessary to typeset twice to get things in the right places as the code uses tikzmark
.
\documentclass[10pt,letterpaper,twocolumn]{article}
\usepackage{lipsum}
\usepackage{ragged2e}
\usepackage[margin=0.6in]{geometry}
\usepackage{titling,calc,tikz}
\usetikzlibrary{tikzmark,calc}
\newlength{\bitwidth}
\setlength{\bitwidth}{\textwidth-26pt}
\newlength{\titlewidth}
\setlength{\titlewidth}{5\bitwidth/7}
\newlength{\authorwidth}
\setlength{\authorwidth}{2\bitwidth/7}
\newlength{\normalparindent}
\setlength{\normalparindent}{\parindent}
\pretitle{\begin{minipage}{\titlewidth}\tikzmark{t1}\begin{flushleft}\tikzmark{t2}\huge}
\posttitle{\end{flushleft}\par\vskip 1em\itshape\setlength{\parindent}{\normalparindent}\noindent\artabstract\tikzmark{b}\par\vskip .5em\end{minipage}\par\vskip 1.5em }
\preauthor{\begin{minipage}{\authorwidth}\begin{flushright}\Large}
\postauthor{\end{flushright}\end{minipage}}
\predate{\relax}
\postdate{\relax}
\renewcommand{\maketitlehookb}{\hspace{13pt}\tikzmark{m}\hspace{13pt}}
\newcommand{\artabstract}{\relax}
\newcommand{\myabstract}[1]{\renewcommand{\artabstract}{#1}}
\makeatletter
\def\@maketitle{% modified from titling.sty
\newpage%
\null%
\setlength{\parindent}{0pt}%
\vskip 2em%
\vspace*{\droptitle}%
\maketitlehooka%
{\@bspreauthor \@author \@bspostauthor}%
\maketitlehookb%
{\@bspretitle \@title \@bsposttitle}%
\maketitlehookc%
{\@bspredate \@date \@bspostdate}%
\maketitlehookd}
\makeatother
\title{Test with a long long long long long long long long long long long long long long long long long long long title}
\author{Author\\{\small Address\\Tel}\bigskip\\Author\\{\small Address\\Tel}\bigskip\\Author\\{\small Address\\Tel}\bigskip\\Author\\{\small Address\\Tel}}
\date{}
\myabstract{\lipsum[1-2]\par This is just here to avoid the peculiarities in spacing caused by dummy text.}
\begin{document}
\maketitle
\begin{tikzpicture}[remember picture, overlay]
\path [draw, line width=6pt] ($({pic cs:t1} -| {pic cs:m})!1/2!({pic cs:t2} -| {pic cs:m})$) -- ({pic cs:b} -| {pic cs:m});
\end{tikzpicture}
\lipsum[1-4]
\end{document}
The \lipsum[1-4]
gives me a bad box warning. \lipsum[1-10]
gave me two.
To remove the extra spacing between addresses and telephone numbers, format the authors as follows:
\author{Author\\{\small Address\\Tel\bigskip\\}Author\\{\small Address\\Tel\bigskip\\}Author\\{\small Address\\Tel\bigskip\\}Author\\{\small Address\\Tel\\}}
Firstly, you should complete the coding by copying the way authblk
modifies the \maketitle
command: it saves a copy in \AB@maketitle
and then redefines the tabular
environment. In authblk
the code is
\let\AB@maketitle=\maketitle
\def\maketitle
{{\renewenvironment{tabular}[2][]{\begin{center}}
{\end{center}}
\AB@maketitle}}
You just want to change that center
environment to a flushleft
.
Secondly for the vertical spacing, authblk
has the length \affilsep
which by default is 1em
. You can make it zero by writing
\setlength{\affilsep}{0pt}
Thirdly, \thanks
can be replaced by \footnote
without problem.
Now for some style comments. Setting of font sizes etc. should be done in your macro definitions etc. not added to the final text. So for the new \maketitle
command write
{\huge\textbf{\@title}\par}
to get a huge bold title. (You can follow the \par
by \vspace{...}
to add some vertical space here.) Similarly styling of the affiliations and small italic should be set via authblk
's mechanism of specifying the \Affilfont
:
\renewcommand{\Affilfont}{\itshape\small}
Putting this together gives
with a corresponding author note at the bottom of the page:
\documentclass[11pt]{article}
\usepackage{authblk}
\usepackage[document]{ragged2e}
\setlength{\affilsep}{0pt}
\renewcommand{\Affilfont}{\itshape\small}
\makeatletter
\renewcommand{\maketitle}{\bgroup\setlength{\parindent}{0pt}
\begin{flushleft}
{\huge\textbf{\@title}\par}
\@author
\end{flushleft}\egroup
}
\let\AB@maketitle=\maketitle
\def\maketitle{{\renewenvironment{tabular}[2][]{\begin{flushleft}}
{\end{flushleft}}
\AB@maketitle}}
\makeatother
\begin{document}
\title{My Title}
\author[a]{Author One\footnote{Corresponding author email email@so.so}}
\author[b,c]{Author Two}
\affil[a]{Address one\newline Town\newline Country}
\affil[b]{Address two\newline Town\newline Country}
\maketitle
\noindent
\textbf{Abstract.} My abstract goes here.
\smallskip
\noindent Keywords: a few words here.
\section{Introduction}
Text.
\end{document}
Best Answer
I assume "doesn't work" means in this case "Generates the following error:"
Right?
\thanks
expands its argument (at least which the standard classes) and so you need to\protect
the\input
:An alternative would be the
catchfile
package to store the content of the input file in a macro first using\CatchFileDef{\mymacro}{<file>}{}
.