Edit: See improved version below
This is a (preliminary) solution, defining a command for specifing an image, using wrapfig
package and some of it's features and the author name as well as some information on the author.
The information is written to a file, which is included automatically at the end.
It misses some more features of course and some configuration possibilities at the moment.
Description of the parameters, see for special values the code and the the calling.
- Optional argument: Specify the options
- Image file name
- Author name
- Author information
\documentclass{elsarticle}
\usepackage{xparse}%
\usepackage{blindtext}
\usepackage{morewrites}
\usepackage{wrapfig}
\usepackage{xkeyval}%
\newwrite\authorbibfile%
\AtBeginDocument{%
\immediate\openout\authorbibfile=\jobname.aub%
}%
\AtEndDocument{%
\immediate\closeout\authorbibfile
\InputIfFileExists{\jobname.aub}{}{}
}%
\makeatletter
\define@key{authorbib}{scale}[1]{%
\def\AuthorbibKVMacroScale{#1}%
}
\define@key{authorbib}{wraplines}[10]{%
\def\AuthorbibKVMacroWraplines{#1}%
}
\define@key{authorbib}{imagewidth}[4cm]{%
\def\AuthorbibKVMacroImagewidth{#1}%
}
\define@key{authorbib}{overhang}[10pt]{%
\def\AuthorbibKVMacroOverhang{#1}%
}
\define@key{authorbib}{imagepos}[l]{%
\def\AuthorbibKVMacroImagepos{#1}%
}
\makeatother
\presetkeys{authorbib}{imagepos=l,imagewidth=4cm,wraplines=15,overhang=20pt}{}
\newlength{\AuthorbibTopSkip}
\newlength{\AuthorbibBottomSkip}
\setlength{\AuthorbibTopSkip}{\baselineskip}
\setlength{\AuthorbibBottomSkip}{\baselineskip}
\NewDocumentCommand{\authorbibliography}{+o+m+m+m}{%
\IfNoValueTF{#1}{%
}{%
\setkeys{authorbib}{#1}%
\immediate\write\authorbibfile{%
\string\begin{wrapfigure}[\AuthorbibKVMacroWraplines]{\AuthorbibKVMacroImagepos}[\AuthorbibKVMacroOverhang]{\AuthorbibKVMacroImagewidth}^^J
\string\includegraphics[scale=\AuthorbibKVMacroScale]{#2}^^J
\string\end{wrapfigure}^^J
}%
}%
\IfNoValueTF{#3}{%
\typeout{Warning: No author name}%
}{%
\immediate\write\authorbibfile{%
\unexpanded{\vspace{\AuthorbibTopSkip}}^^J
\string\noindent\relax
\unexpanded{\textbf{#3}\par}^^J
\string\noindent\relax
\unexpanded{#4}^^J%
\unexpanded{\vspace{\AuthorbibBottomSkip}}^^J
}%
}%
}%
\begin{document}
\blindtext
\authorbibliography[scale=0.3,wraplines=10,overhang=40pt,imagewidth=4cm,imagepos=r]{bild_erwin_schroedinger}{Erwin Schr\"odinger}{\blindtext}
\authorbibliography[scale=0.4,imagewidth=5cm,wraplines=13,overhang=-50pt]{bild_erwin_schroedinger}{Erwin Schr\"odinger}{\blindtext}
\authorbibliography[scale=0.3,wraplines=10,overhang=40pt,imagewidth=4cm,imagepos=r]{bild_erwin_schroedinger}{Erwin Schr\"odinger}{\blindtext}
\end{document}
Improved version : authorbiography.sty
\NeedsTeXFormat{LaTeX2e}%
\ProvidesPackage{authorbiography}%
\usepackage{graphicx}%
\usepackage{xparse}%
\usepackage{textcomp}%
\usepackage{tocloft}
\usepackage{morewrites}%
\usepackage{wrapfig}%
\usepackage{xkeyval}%
\usepackage{etoolbox}%
\usepackage{tcolorbox}%
\newwrite\authorbibfile%
\AtBeginDocument{%
\immediate\openout\authorbibfile=\jobname.aub%
}%
\newlength{\AuthorbioTopSkip}%
\newlength{\AuthorbioBottomSkip}%
\setlength{\AuthorbioTopSkip}{\baselineskip}%
\setlength{\AuthorbioBottomSkip}{\baselineskip}%
\define@key{authorbio}{wraplines}[10]{%
\def\AuthorbioKVMacroWraplines{#1}%
}
\define@key{authorbio}{imagewidth}[4cm]{%
\def\AuthorbioKVMacroImagewidth{#1}%
}
\define@key{authorbio}{overhang}[10pt]{%
\def\AuthorbioKVMacroOverhang{#1}%
}
\define@key{authorbio}{imagepos}[l]{%
\def\AuthorbioKVMacroImagepos{#1}%
}
\define@key{authorbio}{yearofbirth}[]{
\def\AuthorbioKVMacroYearofbirth{#1}%
}%
\define@key{authorbio}{yearofdeath}[]{
\def\AuthorbioKVMacroYearofdeath{#1}%
}%
\define@key{authorbio}{BiographyName}[1]{%
\def\AuthorbioKVMacroBiographyName{#1}%
}%
\newtoggle{AuthorBiographyInTOC}%
\settoggle{AuthorBiographyInTOC}{false}%
\define@boolkey{authorbio}{totoc}[false]{%
\ifKV@authorbio@totoc
\toggletrue{AuthorBiographyInTOC}
\else
\togglefalse{AuthorBiographyInTOC}
\fi
}%
\newcommand{\listofauthorbiographiesname}{List of Author Biographies}
\newlistof{authorbiographies}{bio}{\listofauthorbiographiesname}
\presetkeys{authorbio}{imagepos=l,imagewidth=4cm,wraplines=15,overhang=20pt,totoc=false}{}%
\newcommand*{\authorbiography@@singlename}{Biography of author}%
\newcommand*{\authorbiography@@name}{Biographies of authors}%
\DeclareExpandableDocumentCommand{\authorbiographyname}{+m}{%
\IfNoValueTF{#1}{%
\authorbiography@@name%
}{%
\ifnumgreater{#1}{1}{%
\authorbiography@@name}{%
\ifnumequal{#1}{1}{%
\authorbiography@@singlename%
}{}%
}%
}%
}%
\NewDocumentCommand{\Authorbiography}{+o}
{%
\immediate\closeout\authorbibfile%
\csundef{AuthorbioKVMacroBiographyName}%
\clearpage
\ifnumgreater{\value{authorbiographies}}{0}{% Only add a page/entries if the authorbiographies counter is greater than 0
\IfValueTF{#1}{%
\setkeys*{authorbio}{#1}%
\iftoggle{AuthorBiographyInTOC}{%
\ifcsdef{AuthorbioKVMacroBiographyName}{%
\ifcsdef{chapter}{%
\chapter*{\AuthorbioKVMacroBiographyName}% %Check for KOMA addchap etc later on.
\markboth{\AuthorbioKVMacroBiographyName}{\AuthorbioKVMacroBiographyName}%
\addcontentsline{toc}{chapter}{\AuthorbioKVMacroBiographyName}%
}{%
\section*{\AuthorbioKVMacroBiographyName}%
\markboth{\AuthorbioKVMacroBiographyName}{\AuthorbioKVMacroBiographyName}
\addcontentsline{toc}{section}{\AuthorbioKVMacroBiographyName}%
}%
}{%
\ifcsdef{chapter}{%
\chapter*{\authorbiographyname{\number\value{authorbiographies}}}%
\addcontentsline{toc}{chapter}{\authorbiographyname{\number\value{authorbiographies}}}%
}{% Assume that \section* exists ;-)
\section*{\authorbiographyname{\number\value{authorbiographies}}}%
\addcontentsline{toc}{section}{\authorbiographyname{\number\value{authorbiographies}}}
}%
\markboth{\authorbiographyname{\number\value{authorbiographies}}}{\authorbiographyname{\number\value{authorbiographies}}}%
}%
}{}%
}{% No further ado, just add a (chapter) header to the page
\ifcsdef{chapter}{%
\chapter*{\authorbiographyname{\number\value{authorbiographies}}}%
}{% Assume that \section* exists ;-)
\section*{\authorbiographyname{\number\value{authorbiographies}}}%
}%
\markboth{\authorbiographyname{\number\value{authorbiographies}}}{\authorbiographyname{\number\value{authorbiographies}}}%
}%
\InputIfFileExists{\jobname.aub}{\typeout{authorbiographies: Inputting file successfully}}{\typeout{Error: File \jobname.aub does not exist}}%
}% End of \ifnumgreater...
}%
\NewDocumentCommand{\authorbiographyyearofdeathstyle}{+o}{%
\textbf{\textdied #1)}%
}%
\NewDocumentCommand{\authorbiographyyearofbirthstyle}{+o}{%
\textbf{(\textborn #1}%
}%
\NewDocumentCommand{\writeauthorlifeinfo}{+o}{%
\global\undef\AuthorbioKVMacroYearofbirth%
\global\undef\AuthorbioKVMacroYearofdeath%
\IfValueTF{#1}{%
\setkeys*{authorbio}{#1}%
\ifcsdef{AuthorbioKVMacroYearofbirth}{%
\authorbiographyyearofbirthstyle[\AuthorbioKVMacroYearofbirth]%
\ifcsdef{AuthorbioKVMacroYearofdeath}{%
, \authorbiographyyearofdeathstyle[\AuthorbioKVMacroYearofdeath]%
}{%
\textbf{)} % No year of death given ...unknown or still alive
}%
}{% No year of birth give, but perhaps a year of death?
\ifcsdef{AuthorbioKVMacroYearofdeath}{%
(\textborn ? , \authorbiographyyearofdeathstyle[\AuthorbioKVMacroYearofdeath]%
}{%
% Do nothing
}%
}%
}{% No argument given, do nothing
}%
}%
\NewDocumentCommand{\authorbiography}{+o+m+m+m}{%
\csundef{AuthorbioKVMacroWraplines}%
\setkeys*{authorbio}{#1}%
\IfNoValueTF{#3}{%
\typeout{Warning: No author name}% Needs improvement
}{%
\refstepcounter{authorbiographies}%
\addcontentsline{bio}{section}{\protect{#3}}% Should be improved!
\immediate\write\authorbibfile{%
\string\begin{tcolorbox}[floatplacement=htp,float,boxrule=0pt,boxsep=0pt,left=0pt,right=0pt,top=0pt,bottom=0pt,arc=0mm,auto outer arc,width=\textwidth]%
% \string\vskip\AuthorbioTopSkip%
\string\begin{wrapfigure}[\AuthorbioKVMacroWraplines]{\AuthorbioKVMacroImagepos}[\AuthorbioKVMacroOverhang]{\AuthorbioKVMacroImagewidth}%
\string\centering%
\string\includegraphics\expandafter[\XKV@rm]{#2}% Use the \XKV@rm macro for possible remaining macros designed only for \includegraphics
\string\end{wrapfigure}%
\unexpanded{\noindent}%
\unexpanded{\textbf{#3}}%
\writeauthorlifeinfo[#1]%
\string\par^^J
\string\noindent^^J%
\unexpanded{#4}%
% \string\vskip\AuthorbioBottomSkip%
\string\end{tcolorbox}%
}%
}%
}%
\endinput%
driver file
\documentclass{scrbook}
\usepackage{authorbiography}%
\usepackage{hyperref}%
\usepackage{blindtext}%
\begin{document}%
\tableofcontents
\clearpage
\listofauthorbiographies
\section{Normal Content}
\blindtext
\authorbiography[scale=0.3,overhang=0pt,wraplines=9,imagewidth=3cm,imagepos=l,yearofbirth={1887},yearofdeath={1961}]{bild_erwin_schroedinger}{Erwin Schr\"odinger}{\blindtext}%
\authorbiography[scale=0.3,wraplines=10,overhang=0pt,imagewidth=5cm,imagepos=r,yearofbirth={1564},yearofdeath={1616}]{CHANDOS3}{William Shakespeare}{\blindtext}%
\authorbiography[scale=0.2,width={4cm},imagewidth=6cm,wraplines=15,imagepos=l,overhang=0pt,yearofbirth={1879},yearofdeath={1955}]{einstein.jpg}{Albert Einstein}{\blindtext}%
\authorbiography[scale=0.1,imagewidth=3cm,wraplines=10,imagepos=r,overhang=0pt,yearofbirth={1879},yearofdeath={1955}]{einstein.jpg}{Albert Einstein}{\blindtext}%
\authorbiography[scale=0.1,imagewidth=3cm,wraplines=10,imagepos=r,overhang=0pt,yearofbirth={1879}]{einstein.jpg}{Albert Einstein}{\blindtext}%
\Authorbiography% Standard behaviour
\Authorbiography[totoc=true,BiographyName={Authors}] % Use some more configurability
\end{document}
Some notes on this 'package'...
It requires still some manual tweaking about the wrapfig
parameters, this is not automatically done, the floating works nice, but the last one is not at the top, so this is ... well, bad.
There are many improvements and ideas possible, I will come back to it.
No one wanted to answer my question, there were just some comments debating whether documentation is adequate or not (notably without any links to support claims of adequate documentation). So I will try to answer it myself.
The first trick is to use a titlepage, where you can design the first page of the document regardless of how the rest looks. I ended up using this to just put some header picture and text, title, author, date, with some nice formatting. So I diverged from my original intention to make a copy of the Elsevier article, which has both abstract and start of the article text on the front page. But by using the titlepage tag, I don't need to learn how to write a document class, because I can just use the standard article class (probably works with report class too I guess).
\begin{titlepage}
... code for first page ...
\end{titlepage}
The second trick is to use minipages. It can be seen in the "header" example I linked in the question, but can also be used to set a list of authors to the left and then the abstract to the right of that. Here is an example to put two authors spaced out left and right side of the page using minipages:
\begin{minipage}[t]{0.5\textwidth}
\begin{flushleft}
\large
\emph{Author:}
\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Author
Mr.~Dan-Erik \textsc{Lindberg}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Author
\end{flushleft}
\end{minipage}
%
\begin{minipage}[t]{0.3\textwidth}
\begin{flushright}
\large
\emph{Co-author:}
\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Co-author
Dr. Firstname \textsc{Surname}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Co-author
\end{flushright}
\end{minipage}
These few things should be enough to put together any layout. But there are some additional things you might want to look at. Such as, the package xcolor with the colorbox and parbox combination, for an easy way to put boxes with background color and white text (for example) or similar layout things.
Since I ended up in an entirely different place than where I started, I don't really see a reason to post my final solution here, because it isn't an answer to the question, but the above tips should get anyone started to produce something similar to Elsevier et al.
Best Answer
I figured the solution to add 2 columns from the hint by tohecz. People who want to create 2 columns need to just add: Document Class->(in) Custom (type-->) 5p (5p without brackets, quotes,etc.).