I have been looking on tex.stackexchange
and Googling but I can't find a decent two column template.
Does anyone know of site or have a template for a two column article style tex file?
That has a bibliography portion as well?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI have been looking on tex.stackexchange
and Googling but I can't find a decent two column template.
Does anyone know of site or have a template for a two column article style tex file?
That has a bibliography portion as well?
In www.latextemplates.com there are 3 nice general LaTeX templates for articles. One of these made with the scrartcl
class have this layout:
Another good source is www.sharelatex.com. Among the 76 articles templates for submission to scientific journals or proceedings, several have a two column format. You can download or open and compile in ShareLaTeX.
In any case, as most code of article templates are interchangeable between the standard article
class and others general article class (as paper
, scrartcl
, artikel
, etc.) as well as in specific journal class (as svjour3
, etc.) you can experiment easily with most classes with the same template replacing the first line (that is, change \docummentclass{article}
by \docummentclass{paper}
but search in each case in the documentation for specific options to add/remove for each class (for example, paper
class have a \smalltableofcontents
that you cannot use in the article
class, but \tableofcontents
work in any class).
I'm new to LaTeX and I've spent a few days searching for two-column article templates and tried out the ones mentioned in the main answer and a dozen others. I hit various issues and finally landed on this clean and simple template that I think also answers this question (which is the top tex stackexchange search result for "two column") and many newbies like me will find useful (screenshot below):
% test.tex
\title{Article Title\cite{LinkReference1}}
\author{Some Author\cite{Author1}}
\newcommand{\abstractText}{\noindent
Abstract goes here.
}
%%%%%%%%%%%%%%%%%
% Configuration %
%%%%%%%%%%%%%%%%%
\documentclass[12pt, a4paper, twocolumn]{article}
\usepackage{xurl}
\usepackage[super,comma,sort&compress]{natbib}
\usepackage{abstract}
\renewcommand{\abstractnamefont}{\normalfont\bfseries}
\renewcommand{\abstracttextfont}{\normalfont\small\itshape}
\usepackage{lipsum}
%%%%%%%%%%%%%%
% References %
%%%%%%%%%%%%%%
% If changing the name of the bib file, change \bibliography{test} at the bottom
\begin{filecontents}{test.bib}
@misc{LinkReference1,
title = "Link Title",
author = "Link Creator(s)",
howpublished = "\url{https://example.com/}",
}
@misc{Author1,
author = "LastName, FirstName",
howpublished = "\url{mailto:email@example.com}",
}
@article{ArticleReference1,
author = "Lastname1, Firstname1 and Lastname2, Firstname2",
title = "Article title",
year = "Year",
journal = "Journal name",
note = "\url{https://dx.doi.org/...}",
}
\end{filecontents}
% Any configuration that should be done before the end of the preamble:
\usepackage{hyperref}
\hypersetup{colorlinks=true, urlcolor=blue, linkcolor=blue, citecolor=blue}
\begin{document}
%%%%%%%%%%%%
% Abstract %
%%%%%%%%%%%%
\twocolumn[
\begin{@twocolumnfalse}
\maketitle
\begin{abstract}
\abstractText
\newline
\newline
\end{abstract}
\end{@twocolumnfalse}
]
%%%%%%%%%%%
% Article %
%%%%%%%%%%%
\section{Section1Title}
This is the first sentence\cite{ArticleReference1}.
\section{Section2Title}
\lipsum[1]
%%%%%%%%%%%%%%
% References %
%%%%%%%%%%%%%%
\nocite{*}
\bibliographystyle{plain}
\bibliography{test}
\end{document}
% Create PDF on Linux:
% FILE=test; pkill -9 -f ${FILE} &>/dev/null; rm -f ${FILE}*aux ${FILE}*bbl ${FILE}*bib ${FILE}*blg ${FILE}*log ${FILE}*out ${FILE}*pdf &>/dev/null; pdflatex -halt-on-error ${FILE}; bibtex ${FILE} && pdflatex ${FILE} && pdflatex ${FILE} && (xdg-open ${FILE}.pdf &)
Screenshot:
As noted in detail in the last line of the file, to process the inline bib file, the general procedure is to run pdflatex multiple times and bibtex after the first run. For example:
$ pdflatex -halt-on-error test
$ bibtex test
$ pdflatex test.tex
$ pdflatex test.tex
# Now open test.pdf
To reduce the margins:
\usepackage{geometry}
\geometry{top=1cm,bottom=1.5cm,left=2cm,right=2cm,includehead,includefoot}
\setlength{\columnsep}{7mm} % Column separation width
hyperref
should be loaded last.
Jan 5, 2019 at 9:48
\usepackage{hyperref}
and \hypersetup[...]
should always be loaded right before \begin{document}
?
Jan 5, 2019 at 16:45
IEEEtran
document class. You can see a sample document in the IEEEtran_HOWTO document. Some scientific journals provide their own tailored templates.res.cls
to~/texmf/tex/latex/res/
(you can create this folder withmkdir -p ~/texmf/tex/latex/res
). As soon as you move it there, you should be able to find it with:kpsewhich res.cls
, even without runningmktexslr
. If it can't be found, you have an unusual problem with your system, and should ask for help.kpsewhich res.cs
should return/home/<dustin>/texmf/tex/latex/res/res.cls
(assuming you are logged in as 'dustin'). If it does, that means the class file should be as usable as any other regular class file./usr/local/.../texmf/tex/latex/res/
(best make the directory too while you're at it) as it is a LaTeX thing. But what is the advantage? It is easier to access and keep track of your localtexmf
, and there is less danger of manually installed classes and style files getting overwritten by system updates (which is probably not a serious concern, but still).