Texworks does not update bibliography
I can perfectly compile main.tex
file below and have a pdf on OverLeaf but can't do it on TeXworks on my pc. So I can't have reference section.
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage[colorlinks]{hyperref}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{hyperref}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{Human:1}
newpage
bibliographystyle{unsrt}
bibliography{water} % bibliography prints here
end{document}
This post is too complicated to understand. It doesn't work.
Here is water.bib
file:
RequirePackage{filecontents}
begin{filecontents}{water.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
EDIT: This is the error:
(c:/texlive/2018/texmf-dist/tex/latex/hyperref/nameref.sty
(c:/texlive/2018/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./main.out) (./main.out)
(c:/texlive/2018/texmf-dist/tex/latex/amsfonts/umsa.fd)
(c:/texlive/2018/texmf-dist/tex/latex/amsfonts/umsb.fd) [1{c:/texlive /2018/texm
f-var/fonts/map/pdftex/updmap/pdftex.map} <./images/latex.png>]
Runaway argument?
]{NAME:1}
! Paragraph ended before @citex was complete.
<to be read again>
par
l.74
?
bibliographies bibtex texworks update
|
show 2 more comments
I can perfectly compile main.tex
file below and have a pdf on OverLeaf but can't do it on TeXworks on my pc. So I can't have reference section.
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage[colorlinks]{hyperref}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{hyperref}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{Human:1}
newpage
bibliographystyle{unsrt}
bibliography{water} % bibliography prints here
end{document}
This post is too complicated to understand. It doesn't work.
Here is water.bib
file:
RequirePackage{filecontents}
begin{filecontents}{water.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
EDIT: This is the error:
(c:/texlive/2018/texmf-dist/tex/latex/hyperref/nameref.sty
(c:/texlive/2018/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./main.out) (./main.out)
(c:/texlive/2018/texmf-dist/tex/latex/amsfonts/umsa.fd)
(c:/texlive/2018/texmf-dist/tex/latex/amsfonts/umsb.fd) [1{c:/texlive /2018/texm
f-var/fonts/map/pdftex/updmap/pdftex.map} <./images/latex.png>]
Runaway argument?
]{NAME:1}
! Paragraph ended before @citex was complete.
<to be read again>
par
l.74
?
bibliographies bibtex texworks update
1
Isbegin{filecontents}{water.bib}
correct? Should it bebegin{filecontents}{water.bib}
?
– Mico
Jan 3 at 23:37
Unfortunately it didn't work.
– Rageful
Jan 3 at 23:39
Are you sure about the claim that "I can perfectly compile main.tex file below ... on OverLeaf"? To get your code to compile, I had to (a) change both instances ofwater
towater
, (b) not load thenatbib
package (since it's a mistake to load bothnatbib
andcite
), (c) in the entryHuman:1
, changeauthor = Name J.~E.}
toauthor = {Name J.~E.}
(can you spot the missing{
symbol?), and (d) usedcite
commands to cite eitherHuman:1
orPerson:2
. Your code currently featurescite{NAME:1}
, but you do not provide an entry with keyNAME:1
...
– Mico
Jan 4 at 0:22
I changed cite{NAME:1} to cite{Human:1}. But I still can't see referance section.
– Rageful
Jan 4 at 9:12
After making the four changes given above, did you perform a full recompile cycle (LaTeX-BibTeX-LaTeX-LaTeX)?
– Mico
Jan 4 at 10:37
|
show 2 more comments
I can perfectly compile main.tex
file below and have a pdf on OverLeaf but can't do it on TeXworks on my pc. So I can't have reference section.
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage[colorlinks]{hyperref}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{hyperref}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{Human:1}
newpage
bibliographystyle{unsrt}
bibliography{water} % bibliography prints here
end{document}
This post is too complicated to understand. It doesn't work.
Here is water.bib
file:
RequirePackage{filecontents}
begin{filecontents}{water.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
EDIT: This is the error:
(c:/texlive/2018/texmf-dist/tex/latex/hyperref/nameref.sty
(c:/texlive/2018/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./main.out) (./main.out)
(c:/texlive/2018/texmf-dist/tex/latex/amsfonts/umsa.fd)
(c:/texlive/2018/texmf-dist/tex/latex/amsfonts/umsb.fd) [1{c:/texlive /2018/texm
f-var/fonts/map/pdftex/updmap/pdftex.map} <./images/latex.png>]
Runaway argument?
]{NAME:1}
! Paragraph ended before @citex was complete.
<to be read again>
par
l.74
?
bibliographies bibtex texworks update
I can perfectly compile main.tex
file below and have a pdf on OverLeaf but can't do it on TeXworks on my pc. So I can't have reference section.
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage[colorlinks]{hyperref}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{hyperref}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{Human:1}
newpage
bibliographystyle{unsrt}
bibliography{water} % bibliography prints here
end{document}
This post is too complicated to understand. It doesn't work.
Here is water.bib
file:
RequirePackage{filecontents}
begin{filecontents}{water.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
EDIT: This is the error:
(c:/texlive/2018/texmf-dist/tex/latex/hyperref/nameref.sty
(c:/texlive/2018/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./main.out) (./main.out)
(c:/texlive/2018/texmf-dist/tex/latex/amsfonts/umsa.fd)
(c:/texlive/2018/texmf-dist/tex/latex/amsfonts/umsb.fd) [1{c:/texlive /2018/texm
f-var/fonts/map/pdftex/updmap/pdftex.map} <./images/latex.png>]
Runaway argument?
]{NAME:1}
! Paragraph ended before @citex was complete.
<to be read again>
par
l.74
?
bibliographies bibtex texworks update
bibliographies bibtex texworks update
edited Jan 4 at 9:11
Rageful
asked Jan 3 at 23:31
RagefulRageful
1069
1069
1
Isbegin{filecontents}{water.bib}
correct? Should it bebegin{filecontents}{water.bib}
?
– Mico
Jan 3 at 23:37
Unfortunately it didn't work.
– Rageful
Jan 3 at 23:39
Are you sure about the claim that "I can perfectly compile main.tex file below ... on OverLeaf"? To get your code to compile, I had to (a) change both instances ofwater
towater
, (b) not load thenatbib
package (since it's a mistake to load bothnatbib
andcite
), (c) in the entryHuman:1
, changeauthor = Name J.~E.}
toauthor = {Name J.~E.}
(can you spot the missing{
symbol?), and (d) usedcite
commands to cite eitherHuman:1
orPerson:2
. Your code currently featurescite{NAME:1}
, but you do not provide an entry with keyNAME:1
...
– Mico
Jan 4 at 0:22
I changed cite{NAME:1} to cite{Human:1}. But I still can't see referance section.
– Rageful
Jan 4 at 9:12
After making the four changes given above, did you perform a full recompile cycle (LaTeX-BibTeX-LaTeX-LaTeX)?
– Mico
Jan 4 at 10:37
|
show 2 more comments
1
Isbegin{filecontents}{water.bib}
correct? Should it bebegin{filecontents}{water.bib}
?
– Mico
Jan 3 at 23:37
Unfortunately it didn't work.
– Rageful
Jan 3 at 23:39
Are you sure about the claim that "I can perfectly compile main.tex file below ... on OverLeaf"? To get your code to compile, I had to (a) change both instances ofwater
towater
, (b) not load thenatbib
package (since it's a mistake to load bothnatbib
andcite
), (c) in the entryHuman:1
, changeauthor = Name J.~E.}
toauthor = {Name J.~E.}
(can you spot the missing{
symbol?), and (d) usedcite
commands to cite eitherHuman:1
orPerson:2
. Your code currently featurescite{NAME:1}
, but you do not provide an entry with keyNAME:1
...
– Mico
Jan 4 at 0:22
I changed cite{NAME:1} to cite{Human:1}. But I still can't see referance section.
– Rageful
Jan 4 at 9:12
After making the four changes given above, did you perform a full recompile cycle (LaTeX-BibTeX-LaTeX-LaTeX)?
– Mico
Jan 4 at 10:37
1
1
Is
begin{filecontents}{water.bib}
correct? Should it be begin{filecontents}{water.bib}
?– Mico
Jan 3 at 23:37
Is
begin{filecontents}{water.bib}
correct? Should it be begin{filecontents}{water.bib}
?– Mico
Jan 3 at 23:37
Unfortunately it didn't work.
– Rageful
Jan 3 at 23:39
Unfortunately it didn't work.
– Rageful
Jan 3 at 23:39
Are you sure about the claim that "I can perfectly compile main.tex file below ... on OverLeaf"? To get your code to compile, I had to (a) change both instances of
water
to water
, (b) not load the natbib
package (since it's a mistake to load both natbib
and cite
), (c) in the entry Human:1
, change author = Name J.~E.}
to author = {Name J.~E.}
(can you spot the missing {
symbol?), and (d) used cite
commands to cite either Human:1
or Person:2
. Your code currently features cite{NAME:1}
, but you do not provide an entry with key NAME:1
...– Mico
Jan 4 at 0:22
Are you sure about the claim that "I can perfectly compile main.tex file below ... on OverLeaf"? To get your code to compile, I had to (a) change both instances of
water
to water
, (b) not load the natbib
package (since it's a mistake to load both natbib
and cite
), (c) in the entry Human:1
, change author = Name J.~E.}
to author = {Name J.~E.}
(can you spot the missing {
symbol?), and (d) used cite
commands to cite either Human:1
or Person:2
. Your code currently features cite{NAME:1}
, but you do not provide an entry with key NAME:1
...– Mico
Jan 4 at 0:22
I changed cite{NAME:1} to cite{Human:1}. But I still can't see referance section.
– Rageful
Jan 4 at 9:12
I changed cite{NAME:1} to cite{Human:1}. But I still can't see referance section.
– Rageful
Jan 4 at 9:12
After making the four changes given above, did you perform a full recompile cycle (LaTeX-BibTeX-LaTeX-LaTeX)?
– Mico
Jan 4 at 10:37
After making the four changes given above, did you perform a full recompile cycle (LaTeX-BibTeX-LaTeX-LaTeX)?
– Mico
Jan 4 at 10:37
|
show 2 more comments
2 Answers
2
active
oldest
votes
You mixed here two things.
First: The part
RequirePackage{filecontents}
begin{filecontents}{jobname.bib} % <===========================================
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
is only used to build an compilable MWE including TeX code and bib
file. Suppose you have the file mwe.tex
then jobname.bib
is changed to mwe.bib
to be accessable from the MWE.
Usually you have a file mybib.bib
you can address to you code (if it is in the same directory) with bibliography{mybib}
Please see that the extention .bib
is ommitted.
So in your case simply use
RequirePackage{filecontents}
begin{filecontents}{jobname.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{NAME:1}
newpage
bibliographystyle{unsrt}
bibliography{jobname} % bibliography prints here
end{document}
to show your issue with an MWE.
SECOND: in real simply use
file mybib.bib
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
and the productive tex code, for example test.tex
(see command bibliography{mybib}
at the end):
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{NAME:1}
newpage
bibliographystyle{unsrt}
bibliography{mybib} % bibliography prints here <====================
end{document}
Please see that I changed the order of calling hyperref
: in your case is should be called last and do not call packages twice (I deleted the second call of hyperref
in the code above) ...
UPDATE:
Now let us have a look on your given code. There are some issues too:
You called package
cite
causing the error you mentioned. Please read the documentation ofcite
with typingtexdoc cite
on your terminal/console. If you want to use packagecite
, you need to delete the call ofnatbib
(you can not use both together) and usebibliographystyle{unsrt}
.If you want to use
natbib
(please read documentation withtexdoc natbib
on your console/terminal) you need to delete the call ofcite
and to change the used bibliography style tobibliographystyle{unsrtnat}
. To get numbered bib entries add optionnumbers
tonatbib
:usepackage[numbers]{natbib}
. For the following MWE I choosed this variant ...
In your bib entry
Human:1
is a{
missing for author:
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = {Name J.~E.},
year = {2017},
edition = {4th},
}
In your bib file is no bib entry
NAME:1
you call in your tex code. I changed it toHuman:1
.
Now please see the following compilable code
RequirePackage{filecontents}
begin{filecontents}{jobname.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = {Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123--456},
number = {52},
month = {March},
publisher = {Publisher},
}
end{filecontents}
documentclass[11pt,a4paper]{article}
usepackage[numbers]{natbib} % <===================================
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
%usepackage{pgfplots} % <========================= not needed for issue
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{example-image}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{Human:1}
newpage
bibliographystyle{unsrtnat} % <==================================
bibliography{jobname} % bibliography prints here
end{document}
and the resulting pdf:
At last a remark: your used
to build your title page is wrong. Better use vspace{3cm}
and change the used value for your needs ...
@Mico I saw just now your comment to the question. Feel free to write an answer too. I will add your comment to my answer, if it is okay for you ...
– Kurt
Jan 4 at 1:30
I left comments below the query, rather than provide a standalone answer, as I believed that the OP's code was so full of errors that the OP's claim, that TeXworks was somehow to blame, had to be challenged directly...
– Mico
Jan 4 at 4:02
add a comment |
You need to run
latex
bibtex
latex
latex
Overleaf does that for you. In Texworks, you need to do it manually. Next to the green button you use to compile, you can choose what you want to run :)
1
Welcome to TeX.SE. Did you verify that your suggestions lead to success, using the OP's code as the starting point?
– Mico
Jan 4 at 1:05
I only just saw the edit. I misunderstood. Sorry!
– Wenonah
Jan 4 at 8:32
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f468478%2ftexworks-does-not-update-bibliography%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You mixed here two things.
First: The part
RequirePackage{filecontents}
begin{filecontents}{jobname.bib} % <===========================================
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
is only used to build an compilable MWE including TeX code and bib
file. Suppose you have the file mwe.tex
then jobname.bib
is changed to mwe.bib
to be accessable from the MWE.
Usually you have a file mybib.bib
you can address to you code (if it is in the same directory) with bibliography{mybib}
Please see that the extention .bib
is ommitted.
So in your case simply use
RequirePackage{filecontents}
begin{filecontents}{jobname.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{NAME:1}
newpage
bibliographystyle{unsrt}
bibliography{jobname} % bibliography prints here
end{document}
to show your issue with an MWE.
SECOND: in real simply use
file mybib.bib
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
and the productive tex code, for example test.tex
(see command bibliography{mybib}
at the end):
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{NAME:1}
newpage
bibliographystyle{unsrt}
bibliography{mybib} % bibliography prints here <====================
end{document}
Please see that I changed the order of calling hyperref
: in your case is should be called last and do not call packages twice (I deleted the second call of hyperref
in the code above) ...
UPDATE:
Now let us have a look on your given code. There are some issues too:
You called package
cite
causing the error you mentioned. Please read the documentation ofcite
with typingtexdoc cite
on your terminal/console. If you want to use packagecite
, you need to delete the call ofnatbib
(you can not use both together) and usebibliographystyle{unsrt}
.If you want to use
natbib
(please read documentation withtexdoc natbib
on your console/terminal) you need to delete the call ofcite
and to change the used bibliography style tobibliographystyle{unsrtnat}
. To get numbered bib entries add optionnumbers
tonatbib
:usepackage[numbers]{natbib}
. For the following MWE I choosed this variant ...
In your bib entry
Human:1
is a{
missing for author:
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = {Name J.~E.},
year = {2017},
edition = {4th},
}
In your bib file is no bib entry
NAME:1
you call in your tex code. I changed it toHuman:1
.
Now please see the following compilable code
RequirePackage{filecontents}
begin{filecontents}{jobname.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = {Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123--456},
number = {52},
month = {March},
publisher = {Publisher},
}
end{filecontents}
documentclass[11pt,a4paper]{article}
usepackage[numbers]{natbib} % <===================================
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
%usepackage{pgfplots} % <========================= not needed for issue
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{example-image}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{Human:1}
newpage
bibliographystyle{unsrtnat} % <==================================
bibliography{jobname} % bibliography prints here
end{document}
and the resulting pdf:
At last a remark: your used
to build your title page is wrong. Better use vspace{3cm}
and change the used value for your needs ...
@Mico I saw just now your comment to the question. Feel free to write an answer too. I will add your comment to my answer, if it is okay for you ...
– Kurt
Jan 4 at 1:30
I left comments below the query, rather than provide a standalone answer, as I believed that the OP's code was so full of errors that the OP's claim, that TeXworks was somehow to blame, had to be challenged directly...
– Mico
Jan 4 at 4:02
add a comment |
You mixed here two things.
First: The part
RequirePackage{filecontents}
begin{filecontents}{jobname.bib} % <===========================================
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
is only used to build an compilable MWE including TeX code and bib
file. Suppose you have the file mwe.tex
then jobname.bib
is changed to mwe.bib
to be accessable from the MWE.
Usually you have a file mybib.bib
you can address to you code (if it is in the same directory) with bibliography{mybib}
Please see that the extention .bib
is ommitted.
So in your case simply use
RequirePackage{filecontents}
begin{filecontents}{jobname.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{NAME:1}
newpage
bibliographystyle{unsrt}
bibliography{jobname} % bibliography prints here
end{document}
to show your issue with an MWE.
SECOND: in real simply use
file mybib.bib
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
and the productive tex code, for example test.tex
(see command bibliography{mybib}
at the end):
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{NAME:1}
newpage
bibliographystyle{unsrt}
bibliography{mybib} % bibliography prints here <====================
end{document}
Please see that I changed the order of calling hyperref
: in your case is should be called last and do not call packages twice (I deleted the second call of hyperref
in the code above) ...
UPDATE:
Now let us have a look on your given code. There are some issues too:
You called package
cite
causing the error you mentioned. Please read the documentation ofcite
with typingtexdoc cite
on your terminal/console. If you want to use packagecite
, you need to delete the call ofnatbib
(you can not use both together) and usebibliographystyle{unsrt}
.If you want to use
natbib
(please read documentation withtexdoc natbib
on your console/terminal) you need to delete the call ofcite
and to change the used bibliography style tobibliographystyle{unsrtnat}
. To get numbered bib entries add optionnumbers
tonatbib
:usepackage[numbers]{natbib}
. For the following MWE I choosed this variant ...
In your bib entry
Human:1
is a{
missing for author:
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = {Name J.~E.},
year = {2017},
edition = {4th},
}
In your bib file is no bib entry
NAME:1
you call in your tex code. I changed it toHuman:1
.
Now please see the following compilable code
RequirePackage{filecontents}
begin{filecontents}{jobname.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = {Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123--456},
number = {52},
month = {March},
publisher = {Publisher},
}
end{filecontents}
documentclass[11pt,a4paper]{article}
usepackage[numbers]{natbib} % <===================================
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
%usepackage{pgfplots} % <========================= not needed for issue
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{example-image}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{Human:1}
newpage
bibliographystyle{unsrtnat} % <==================================
bibliography{jobname} % bibliography prints here
end{document}
and the resulting pdf:
At last a remark: your used
to build your title page is wrong. Better use vspace{3cm}
and change the used value for your needs ...
@Mico I saw just now your comment to the question. Feel free to write an answer too. I will add your comment to my answer, if it is okay for you ...
– Kurt
Jan 4 at 1:30
I left comments below the query, rather than provide a standalone answer, as I believed that the OP's code was so full of errors that the OP's claim, that TeXworks was somehow to blame, had to be challenged directly...
– Mico
Jan 4 at 4:02
add a comment |
You mixed here two things.
First: The part
RequirePackage{filecontents}
begin{filecontents}{jobname.bib} % <===========================================
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
is only used to build an compilable MWE including TeX code and bib
file. Suppose you have the file mwe.tex
then jobname.bib
is changed to mwe.bib
to be accessable from the MWE.
Usually you have a file mybib.bib
you can address to you code (if it is in the same directory) with bibliography{mybib}
Please see that the extention .bib
is ommitted.
So in your case simply use
RequirePackage{filecontents}
begin{filecontents}{jobname.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{NAME:1}
newpage
bibliographystyle{unsrt}
bibliography{jobname} % bibliography prints here
end{document}
to show your issue with an MWE.
SECOND: in real simply use
file mybib.bib
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
and the productive tex code, for example test.tex
(see command bibliography{mybib}
at the end):
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{NAME:1}
newpage
bibliographystyle{unsrt}
bibliography{mybib} % bibliography prints here <====================
end{document}
Please see that I changed the order of calling hyperref
: in your case is should be called last and do not call packages twice (I deleted the second call of hyperref
in the code above) ...
UPDATE:
Now let us have a look on your given code. There are some issues too:
You called package
cite
causing the error you mentioned. Please read the documentation ofcite
with typingtexdoc cite
on your terminal/console. If you want to use packagecite
, you need to delete the call ofnatbib
(you can not use both together) and usebibliographystyle{unsrt}
.If you want to use
natbib
(please read documentation withtexdoc natbib
on your console/terminal) you need to delete the call ofcite
and to change the used bibliography style tobibliographystyle{unsrtnat}
. To get numbered bib entries add optionnumbers
tonatbib
:usepackage[numbers]{natbib}
. For the following MWE I choosed this variant ...
In your bib entry
Human:1
is a{
missing for author:
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = {Name J.~E.},
year = {2017},
edition = {4th},
}
In your bib file is no bib entry
NAME:1
you call in your tex code. I changed it toHuman:1
.
Now please see the following compilable code
RequirePackage{filecontents}
begin{filecontents}{jobname.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = {Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123--456},
number = {52},
month = {March},
publisher = {Publisher},
}
end{filecontents}
documentclass[11pt,a4paper]{article}
usepackage[numbers]{natbib} % <===================================
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
%usepackage{pgfplots} % <========================= not needed for issue
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{example-image}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{Human:1}
newpage
bibliographystyle{unsrtnat} % <==================================
bibliography{jobname} % bibliography prints here
end{document}
and the resulting pdf:
At last a remark: your used
to build your title page is wrong. Better use vspace{3cm}
and change the used value for your needs ...
You mixed here two things.
First: The part
RequirePackage{filecontents}
begin{filecontents}{jobname.bib} % <===========================================
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
is only used to build an compilable MWE including TeX code and bib
file. Suppose you have the file mwe.tex
then jobname.bib
is changed to mwe.bib
to be accessable from the MWE.
Usually you have a file mybib.bib
you can address to you code (if it is in the same directory) with bibliography{mybib}
Please see that the extention .bib
is ommitted.
So in your case simply use
RequirePackage{filecontents}
begin{filecontents}{jobname.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
end{filecontents}
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{NAME:1}
newpage
bibliographystyle{unsrt}
bibliography{jobname} % bibliography prints here
end{document}
to show your issue with an MWE.
SECOND: in real simply use
file mybib.bib
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123-456},
number = {52},
month = {March},
publisher = {Publisher}
}
and the productive tex code, for example test.tex
(see command bibliography{mybib}
at the end):
documentclass[11pt,a4paper,oneside]{article}
usepackage{natbib}
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
usepackage{pgfplots}
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{cite}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{latex.png}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{NAME:1}
newpage
bibliographystyle{unsrt}
bibliography{mybib} % bibliography prints here <====================
end{document}
Please see that I changed the order of calling hyperref
: in your case is should be called last and do not call packages twice (I deleted the second call of hyperref
in the code above) ...
UPDATE:
Now let us have a look on your given code. There are some issues too:
You called package
cite
causing the error you mentioned. Please read the documentation ofcite
with typingtexdoc cite
on your terminal/console. If you want to use packagecite
, you need to delete the call ofnatbib
(you can not use both together) and usebibliographystyle{unsrt}
.If you want to use
natbib
(please read documentation withtexdoc natbib
on your console/terminal) you need to delete the call ofcite
and to change the used bibliography style tobibliographystyle{unsrtnat}
. To get numbered bib entries add optionnumbers
tonatbib
:usepackage[numbers]{natbib}
. For the following MWE I choosed this variant ...
In your bib entry
Human:1
is a{
missing for author:
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = {Name J.~E.},
year = {2017},
edition = {4th},
}
In your bib file is no bib entry
NAME:1
you call in your tex code. I changed it toHuman:1
.
Now please see the following compilable code
RequirePackage{filecontents}
begin{filecontents}{jobname.bib}
@BOOK{Human:1,
title = {{R}ocket {P}ropulsion {E}lements},
publisher = {John Wiley Sons},
author = {Name J.~E.},
year = {2017},
edition = {4th},
}
@ARTICLE{Person:2,
author = {Jones, A.~B. and Smith, J.~M.},
title = {{A}rticle {T}itle},
journal = {{J}ournal {T}itle},
year = {2013},
volume = {13},
pages = {123--456},
number = {52},
month = {March},
publisher = {Publisher},
}
end{filecontents}
documentclass[11pt,a4paper]{article}
usepackage[numbers]{natbib} % <===================================
usepackage{url}
usepackage[utf8x]{inputenc}
usepackage{siunitx}
usepackage{indentfirst}
usepackage{amsmath}
usepackage{amssymb}
usepackage{tikz}
usetikzlibrary{arrows}
usetikzlibrary{patterns}
usepackage{caption}
%usepackage{pgfplots} % <========================= not needed for issue
usepackage{listings}
usepackage{color}
usepackage{graphicx}
graphicspath{{images/}}
usepackage{parskip}
usepackage{fancyhdr}
usepackage{vmargin}
setmarginsrb{3 cm}{2.5 cm}{3 cm}{2.5 cm}{1 cm}{1.5 cm}{1 cm}{1.5 cm}
usepackage[colorlinks]{hyperref} % <===============================================
title{Life is too short to learn LaTeX} % Title
author{Rageful} % Author
date{01.01.2019} % Date
makeatletter
letthetitle@title
lettheauthor@author
letthedate@date
makeatother
pagestyle{fancy}
fancyhf{}
rhead{theauthor}
lhead{thetitle}
cfoot{thepage}
renewcommand{refname}{Referance}
begin{document}
begin{titlepage}
centering
vspace*{0.5 cm}
includegraphics[scale = 0.08]{example-image}\[1.0 cm]
{centering textsc{LARGE LATEX} newlinenewline textsc{LARGE PROJECT}\[2.0 cm]}
textsc{Large 17.01.2019}\[0.5 cm]
rule{linewidth}{0.2 mm} \[0.4 cm]
{ huge bfseries thetitle}\
rule{linewidth}{0.2 mm} \[3.5 cm]
begin{minipage}{0.5textwidth}
begin{flushleft} large
emph{Person A}\
end{flushleft}
end{minipage}~
begin{minipage}{0.4textwidth}
begin{flushright} large
emph{Person B :} \
end{flushright}
end{minipage}\[2 cm]
end{titlepage}
section{Preface}
Why is LaTeX too hard? cite{Human:1}
newpage
bibliographystyle{unsrtnat} % <==================================
bibliography{jobname} % bibliography prints here
end{document}
and the resulting pdf:
At last a remark: your used
to build your title page is wrong. Better use vspace{3cm}
and change the used value for your needs ...
edited Jan 4 at 1:39
answered Jan 4 at 0:01
KurtKurt
35.8k847161
35.8k847161
@Mico I saw just now your comment to the question. Feel free to write an answer too. I will add your comment to my answer, if it is okay for you ...
– Kurt
Jan 4 at 1:30
I left comments below the query, rather than provide a standalone answer, as I believed that the OP's code was so full of errors that the OP's claim, that TeXworks was somehow to blame, had to be challenged directly...
– Mico
Jan 4 at 4:02
add a comment |
@Mico I saw just now your comment to the question. Feel free to write an answer too. I will add your comment to my answer, if it is okay for you ...
– Kurt
Jan 4 at 1:30
I left comments below the query, rather than provide a standalone answer, as I believed that the OP's code was so full of errors that the OP's claim, that TeXworks was somehow to blame, had to be challenged directly...
– Mico
Jan 4 at 4:02
@Mico I saw just now your comment to the question. Feel free to write an answer too. I will add your comment to my answer, if it is okay for you ...
– Kurt
Jan 4 at 1:30
@Mico I saw just now your comment to the question. Feel free to write an answer too. I will add your comment to my answer, if it is okay for you ...
– Kurt
Jan 4 at 1:30
I left comments below the query, rather than provide a standalone answer, as I believed that the OP's code was so full of errors that the OP's claim, that TeXworks was somehow to blame, had to be challenged directly...
– Mico
Jan 4 at 4:02
I left comments below the query, rather than provide a standalone answer, as I believed that the OP's code was so full of errors that the OP's claim, that TeXworks was somehow to blame, had to be challenged directly...
– Mico
Jan 4 at 4:02
add a comment |
You need to run
latex
bibtex
latex
latex
Overleaf does that for you. In Texworks, you need to do it manually. Next to the green button you use to compile, you can choose what you want to run :)
1
Welcome to TeX.SE. Did you verify that your suggestions lead to success, using the OP's code as the starting point?
– Mico
Jan 4 at 1:05
I only just saw the edit. I misunderstood. Sorry!
– Wenonah
Jan 4 at 8:32
add a comment |
You need to run
latex
bibtex
latex
latex
Overleaf does that for you. In Texworks, you need to do it manually. Next to the green button you use to compile, you can choose what you want to run :)
1
Welcome to TeX.SE. Did you verify that your suggestions lead to success, using the OP's code as the starting point?
– Mico
Jan 4 at 1:05
I only just saw the edit. I misunderstood. Sorry!
– Wenonah
Jan 4 at 8:32
add a comment |
You need to run
latex
bibtex
latex
latex
Overleaf does that for you. In Texworks, you need to do it manually. Next to the green button you use to compile, you can choose what you want to run :)
You need to run
latex
bibtex
latex
latex
Overleaf does that for you. In Texworks, you need to do it manually. Next to the green button you use to compile, you can choose what you want to run :)
answered Jan 3 at 23:49
WenonahWenonah
133
133
1
Welcome to TeX.SE. Did you verify that your suggestions lead to success, using the OP's code as the starting point?
– Mico
Jan 4 at 1:05
I only just saw the edit. I misunderstood. Sorry!
– Wenonah
Jan 4 at 8:32
add a comment |
1
Welcome to TeX.SE. Did you verify that your suggestions lead to success, using the OP's code as the starting point?
– Mico
Jan 4 at 1:05
I only just saw the edit. I misunderstood. Sorry!
– Wenonah
Jan 4 at 8:32
1
1
Welcome to TeX.SE. Did you verify that your suggestions lead to success, using the OP's code as the starting point?
– Mico
Jan 4 at 1:05
Welcome to TeX.SE. Did you verify that your suggestions lead to success, using the OP's code as the starting point?
– Mico
Jan 4 at 1:05
I only just saw the edit. I misunderstood. Sorry!
– Wenonah
Jan 4 at 8:32
I only just saw the edit. I misunderstood. Sorry!
– Wenonah
Jan 4 at 8:32
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f468478%2ftexworks-does-not-update-bibliography%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Is
begin{filecontents}{water.bib}
correct? Should it bebegin{filecontents}{water.bib}
?– Mico
Jan 3 at 23:37
Unfortunately it didn't work.
– Rageful
Jan 3 at 23:39
Are you sure about the claim that "I can perfectly compile main.tex file below ... on OverLeaf"? To get your code to compile, I had to (a) change both instances of
water
towater
, (b) not load thenatbib
package (since it's a mistake to load bothnatbib
andcite
), (c) in the entryHuman:1
, changeauthor = Name J.~E.}
toauthor = {Name J.~E.}
(can you spot the missing{
symbol?), and (d) usedcite
commands to cite eitherHuman:1
orPerson:2
. Your code currently featurescite{NAME:1}
, but you do not provide an entry with keyNAME:1
...– Mico
Jan 4 at 0:22
I changed cite{NAME:1} to cite{Human:1}. But I still can't see referance section.
– Rageful
Jan 4 at 9:12
After making the four changes given above, did you perform a full recompile cycle (LaTeX-BibTeX-LaTeX-LaTeX)?
– Mico
Jan 4 at 10:37