1

I am compiling my CV. My MWE is:

\documentclass[12pt]{article}
\usepackage{array, xcolor, bibentry, longtable}
\usepackage[margin=3cm]{geometry}
\usepackage[english]{babel}

\title{\bfseries\Huge My name}
\author{\large{\textbf{\textit{February 2019}}}}
\date{}
\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}}
\newcolumntype{R}{p{0.85\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}


\begin{filecontents}{my2.bib}
@book{bnm,
title={Title},
author={Author, 1 and Author, 2},
publisher={Cambridge University Press},
address={Cambridge}
}
\end{filecontents}


\begin{document}
\maketitle
\vspace{20pt}
\section*{Personal Information}
Date of Birth: XXXX\\[7pt]
Citizenship: XXXX\\[7pt]
\begin{minipage}{\textwidth}
Address:
\begin{tabular}[t]{@{}l@{}}
    Mine in my city,\\
    in my place
\end{tabular}
\end{minipage}\\[7pt]
Phone: +39 123 45678\\[7pt]
\begin{minipage}{\textwidth}
Email:
\begin{tabular}[t]{@{}l@{}}\medskip \smallskip
    email1@email.com\\ 
    email2@email.com
\end{tabular}
\end{minipage}\\[7pt]
Personal website: www.mysite.com

\section*{Education}
\begin{longtable}{L!{\VRule}R}
2008&{Ph.D. in Economics}\\
&Supervisor: My friend \\
& Thesis: My title\\
& Thesis committee: ABC; DEF\\[5pt]
\end{longtable}

\bibliographystyle{plain}
\nobibliography{my2}
\section*{Research}
\subsection*{\it Main publications}
\subsection*{\it Books}
\begin{longtable}{L!{\VRule}R}
2014&\bibentry{bnm}\\
\end{longtable}

\section*{References}
Upon request.


\end{document}

Everything works fine. I would like to make the address of my website and my emails clickable. Hence I load the package hyperref. However when I do so, I got the following error message when compiling:

! LaTeX Error: Lonely \item--perhaps a missing list environment.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.3 \bibitem{bnm}

Apparently, there is a conflict between the list of references and the additional package hyperref.

Is there any way I can overcome this? Maybe, another package? Thanks in advance.

EDIT

These are the first lines of the log file:

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6840)
entering extended mode

I use TeXworks v. 0.6.2 (MikTex 2.9.6840)

Second update

I updated my release, but still the problem persists. This is the first line of the log file:

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6930)
entering extended mode

Third update

I updated MikTeX as user as well, but still the problem persists.

This is the complete logfile (after using \listfiles)

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6930)
entering extended mode
("C:/Users/Dario/Desktop/Nuova cartella/prova2.tex"
LaTeX2e <2018-12-01>
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/base\article.cls"
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/base\size12.clo"))
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/tools\array.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/xcolor\xcolor.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/graphics-cfg\color.cfg")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/graphics-def\pdftex.def"))
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/natbib\bibentry.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/tools\longtable.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/geometry\geometry.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/graphics\keyval.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/oberdiek\ifpdf.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/oberdiek\ifvtex.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/ifxetex\ifxetex.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/geometry\geometry.cfg"))
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/babel\babel.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/babel\switch.def")
*************************************
* Local config file bblopts.cfg used
*
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/arabi\bblopts.cfg")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/babel-english\english.ldf"
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/babel\babel.def"
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/babel\txtbabel.def"))))
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/hyperref\hyperref.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/oberdiek\hobsub-hyperref.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/oberdiek\hobsub-generic.sty"))
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/oberdiek\auxhook.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/oberdiek\kvoptions.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/hyperref\pd1enc.def")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/00miktex\hyperref.cfg")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/url\url.sty"))
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/hyperref\hpdftex.def"
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/oberdiek\rerunfilecheck.sty"))

LaTeX Warning: Writing file `./my2.bib'.


No file prova2.aux.
("C:\Program Files (x86)\MiKTeX 2.9\tex/context/base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/hyperref\nameref.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/oberdiek\gettitlestring.sty"))
Overfull \hbox (20.06664pt too wide) in alignment at lines 56--61
 [] [] 
No file prova2.bbl.

LaTeX Warning: Citation `bnm' undefined on input line 69.


Overfull \hbox (20.06664pt too wide) in alignment at lines 68--70
 [] [] 
[1{C:/Users/Dario/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}] [2]
(prova2.aux)

 *File List*
 article.cls    2018/09/03 v1.4i Standard LaTeX document class
  size12.clo    2018/09/03 v1.4i Standard LaTeX file (size option)
   array.sty    2018/12/30 v2.4k Tabular extension package (FMi)
  xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)
   color.cfg    2016/01/02 v1.6 sample color configuration
  pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex
bibentry.sty    2007/10/30 1.5 (PWD)
longtable.sty    2014/10/28 v4.11 Multi-page Table package (DPC)+ FMi change
geometry.sty    2018/04/16 v5.8 Page Geometry
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
   ifpdf.sty    2018/09/07 v3.3 Provides the ifpdf switch
  ifvtex.sty    2016/05/16 v1.6 Detect VTeX and its facilities (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
geometry.cfg
   babel.sty    2018/11/13 3.27 The Babel package
 bblopts.cfg    2005/09/08 v0.1 add Arabic and Farsi to "declared" options of b
abel
 english.ldf    2017/06/06 v3.3r English support from the babel system
hyperref.sty    2018/11/30 v6.88e Hypertext links for LaTeX
hobsub-hyperref.sty    2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2016/05/16 v1.14 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2016/05/16 v1.14 Construct package bundles (HO)
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
 intcalc.sty    2016/05/16 v1.2 Expandable calculations with integers (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
pdftexcmds.sty    2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty    2016/05/16 v1.14 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2016/05/16 v1.4 Expandable calculations on big integers (HO)
  bitset.sty    2016/05/16 v1.2 Handle bit-vector datatype (HO)
uniquecounter.sty    2016/05/16 v1.3 Provide unlimited unique counter (HO)
letltxmacro.sty    2016/05/16 v1.5 Let assignment for LaTeX macros (HO)
 hopatch.sty    2016/05/16 v1.3 Wrapper for package hooks (HO)
xcolor-patch.sty    2016/05/16 xcolor patch
atveryend.sty    2016/05/16 v1.9 Hooks at the very end of document (HO)
atbegshi.sty    2016/06/09 v1.18 At begin shipout hook (HO)
refcount.sty    2016/05/16 v3.5 Data extraction from label references (HO)
 hycolor.sty    2016/05/16 v1.8 Color options for hyperref/bookmark (HO)
 auxhook.sty    2016/05/16 v1.4 Hooks for auxiliary files (HO)
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
  pd1enc.def    2018/11/30 v6.88e Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
     url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.
 hpdftex.def    2018/11/30 v6.88e Hyperref driver for pdfTeX
rerunfilecheck.sty    2016/05/16 v1.8 Rerun checks for auxiliary files (HO)
supp-pdf.mkii
 nameref.sty    2016/05/21 v2.44 Cross-referencing by name of section
gettitlestring.sty    2016/05/16 v1.5 Cleanup title references (HO)
 ***********


Package rerunfilecheck Warning: File `prova2.out' has changed.
(rerunfilecheck)                Rerun to get outlines right
(rerunfilecheck)                or use package `bookmark'.


LaTeX Warning: There were undefined references.

 )
(see the transcript file for additional information)<C:/Program Files (x86)/MiK
TeX 2.9/fonts/type1/public/amsfonts/cm/cmbx12.pfb><C:/Program Files (x86)/MiKTe
X 2.9/fonts/type1/public/amsfonts/cm/cmbxti10.pfb><C:/Program Files (x86)/MiKTe
X 2.9/fonts/type1/public/amsfonts/cm/cmr12.pfb><C:/Program Files (x86)/MiKTeX 2
.9/fonts/type1/public/amsfonts/cm/cmti12.pfb>
Output written on prova2.pdf (2 pages, 52366 bytes).
SyncTeX written on prova2.synctex.gz.
Transcript written on prova2.log.
This is BibTeX, Version 0.99d (MiKTeX 2.9.6930)
The top-level auxiliary file: prova2.aux
The style file: plain.bst
Database file #1: my2.bib
Warning--empty year in bnm
(There was 1 warning)
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6930)
entering extended mode
("C:/Users/Dario/Desktop/Nuova cartella/prova2.tex"
LaTeX2e <2018-12-01>
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/base\article.cls"
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/base\size12.clo"))
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/tools\array.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/xcolor\xcolor.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/graphics-cfg\color.cfg")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/graphics-def\pdftex.def"))
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/natbib\bibentry.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/tools\longtable.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/geometry\geometry.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/graphics\keyval.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/oberdiek\ifpdf.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/oberdiek\ifvtex.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/ifxetex\ifxetex.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/geometry\geometry.cfg"))
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/babel\babel.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/babel\switch.def")
*************************************
* Local config file bblopts.cfg used
*
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/arabi\bblopts.cfg")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/babel-english\english.ldf"
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/babel\babel.def"
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/babel\txtbabel.def"))))
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/hyperref\hyperref.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/oberdiek\hobsub-hyperref.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/oberdiek\hobsub-generic.sty"))
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/oberdiek\auxhook.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/oberdiek\kvoptions.sty")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/hyperref\pd1enc.def")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/00miktex\hyperref.cfg")
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/url\url.sty"))
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/hyperref\hpdftex.def"
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/oberdiek\rerunfilecheck.sty"))

LaTeX Warning: File `my2.bib' already exists on the system.
               Not generating it from this source.

(prova2.aux) ("C:\Program Files (x86)\MiKTeX 2.9\tex/context/base\supp-pdf.mkii
"
[Loading MPS to PDF converter (version 2006.09.02).]
)
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
("C:\Program Files (x86)\MiKTeX 2.9\tex/latex/hyperref\nameref.sty"
("C:\Program Files (x86)\MiKTeX 2.9\tex/generic/oberdiek\gettitlestring.sty"))
(prova2.out) (prova2.out)
Overfull \hbox (20.06664pt too wide) in alignment at lines 56--61
 [] [] 
(prova2.bbl

! LaTeX Error: Lonely \item--perhaps a missing list environment.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.3 \bibitem{bnm}

?

Note that the name of my tex file is prova2.tex.

2
  • 1
    Since you are using MikTeX? Did you update as both user and admin. Might be an idea to post the entire log, then we can easily see when a file is taken from the user part and the admin part of the miktex installation. It might also be an idea to add \listfiles before \documentclass, this prints a list of used packages at the end of the log file. – daleif Jan 9 '19 at 12:42
  • @daleif actually I updated miktex as admin not as user. I thought it could be the same. I will update as user as well and see what happens and in case I will post the log file. Thanks – Dario Jan 9 '19 at 13:39
2

The issue with your code is that you missed to call package natbib (please note that bibentry is a part of natbib). Therefore you have to change the bib style from plain to plainnat.

Package hyperref should be called in your case last.

So please see the following code (code changings are marked with <=====):

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{bnm,
  title     = {Title},
  author    = {Author, One and Author, Two},
  publisher = {Cambridge University Press},
  address   = {Cambridge},
  year      = {2014},
}
\end{filecontents}

\listfiles
\documentclass[12pt]{article}

\usepackage[margin=3cm]{geometry}
\usepackage[english]{babel}

\usepackage{array, xcolor, longtable}

\usepackage{natbib} % <=================================================
\usepackage{bibentry}
\usepackage{hyperref} % <===================================[colorlinks]


\title{\bfseries\Huge My name}
\author{\large{\textbf{\textit{February 2019}}}}
\date{}
\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}}
\newcolumntype{R}{p{0.84\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}


\begin{document}
\maketitle
\vspace{20pt}
\section*{Personal Information}
Date of Birth: XXXX\\[7pt]
Citizenship: XXXX\\[7pt]
\begin{minipage}{\textwidth}
Address:
\begin{tabular}[t]{@{}l@{}}
    Mine in my city,\\
    in my place
\end{tabular}
\end{minipage}\\[7pt]
Phone: +39 123 45678\\[7pt]
\begin{minipage}{\textwidth}
Email:
\begin{tabular}[t]{@{}l@{}}\medskip \smallskip
    \href{mailto:email1@email.com}{email1@email.com}\\ % <==============
    \href{mailto:email2@email.com}{email2@email.com} % <================
\end{tabular}
\end{minipage}\\[7pt]
Personal website: \url{www.mysite.com} % <==============================

\section*{Education}
\begin{longtable}{L!{\VRule}R}
2008&{Ph.D. in Economics}\\
&Supervisor: My friend \\
& Thesis: My title\\
& Thesis committee: ABC; DEF\\[5pt]
\end{longtable}

\bibliographystyle{plainnat} % plain
\nobibliography{\jobname}
\section*{Research}
\subsection*{\it Main publications}
\subsection*{\it Books}
\begin{longtable}{L!{\VRule}R}
2014&\bibentry{bnm}\\
\end{longtable}

\section*{References}
Upon request.

\end{document}

and its result:

enter image description here

0
1

It works for me. Make sure you remove all temp files before compiling again

\documentclass[12pt]{article}
\usepackage{array, xcolor, bibentry, longtable}
\usepackage[margin=3cm]{geometry}
\usepackage[english]{babel}

%%
\usepackage[
    colorlinks,
    linkcolor={red!50!black},
    citecolor={blue!50!black},
    urlcolor={blue!80!black}
  ]{hyperref}
%%

\title{\bfseries\Huge My name}
\author{\large{\textbf{\textit{February 2019}}}}
\date{}
\definecolor{lightgray}{gray}{0.8}
\newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}}
\newcolumntype{R}{p{0.85\textwidth}}
\newcommand\VRule{\color{lightgray}\vrule width 0.5pt}


\begin{filecontents}{my2.bib}
@book{bnm,
title={Title},
author={Author, 1 and Author, 2},
publisher={Cambridge University Press},
address={Cambridge}
}
\end{filecontents}


\begin{document}
\maketitle
\vspace{20pt}
\section*{Personal Information}
Date of Birth: XXXX\\[7pt]
Citizenship: XXXX\\[7pt]
\begin{minipage}{\textwidth}
Address:
\begin{tabular}[t]{@{}l@{}}
    Mine in my city,\\
    in my place
\end{tabular}
\end{minipage}\\[7pt]
Phone: +39 123 45678\\[7pt]
\begin{minipage}{\textwidth}
Email:
\begin{tabular}[t]{@{}l@{}}\medskip \smallskip
    \href{mailto:email1@email.com}{email1@email.com}\\
    \href{mailto:email2@email.com}{email2@email.com}
\end{tabular}
\end{minipage}\\[7pt]
Personal website: \href{www.mysite.com}{www.mysite.com}

\section*{Education}
\begin{longtable}{L!{\VRule}R}
2008&{Ph.D. in Economics}\\
&Supervisor: My friend \\
& Thesis: My title\\
& Thesis committee: ABC; DEF\\[5pt]
\end{longtable}

\bibliographystyle{plain}
\nobibliography{my2}
\section*{Research}
\subsection*{\it Main publications}
\subsection*{\it Books}
\begin{longtable}{L!{\VRule}R}
2014&\bibentry{bnm}\\
\end{longtable}

\section*{References}
Upon request.


\end{document}

enter image description here

1
  • actually I did. I removed every temporary file. I also put the file in another empty folder. Might it be something related to updating the package? – Dario Jan 9 '19 at 0:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.