0

I tried to combine separate papers (chapters) into the main Thesis file. I use Natbib for references. It worked well for separate papers's files but after incoporating into Thesis.tex file, lots of (?), (??), etc. appeared in PDF output instead of proper citation. I was wondering if natbib package has conflict with any other packages in the Thesis.tex file. Here is the preamble in the main Thesis file (before I added natbib package):

% Package to determine wether XeTeX is used
\usepackage{ifxetex}

\ifxetex
    % XeTeX specific packages and settings
    % Language, diacritics and hyphenation
    \usepackage[babelshorthands]{polyglossia}
    \setmainlanguage{english}
    \setotherlanguages{swedish}

    % Font settings
    \setmainfont{Times New Roman}
    \setromanfont{Times New Roman}
    \setsansfont{Arial}
    \setmonofont{Courier New}
\else
    % Plain LaTeX specific packages and settings
    % Language, diacritics and hyphenation
    % Use English and Swedish languages. 
    \usepackage[swedish,english]{babel} 

    % Font settings
    \usepackage{type1cm}
    \usepackage[latin1]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{mathptmx}
    
    % Enable scaling of images on import
    \usepackage{graphicx}
\fi


% Tables
\usepackage{booktabs}
\usepackage{tabularx}

% Document links and bookmarks
\usepackage{hyperref} 

% Numbering of headings down to the subsection level
\numberingdepth{subsection}

% Including headings down to the subsection level in contents
\contentsdepth{subsection}

And here is the (shortened) Paper11.tex file:

\chapter{Paper1}




%Introduction
\section{Introduction}

Since the Industrial Revolution, anthropogenic CO$_2$ emissions have risen dramatically, primarily driven by rapid industrialization and a heavy reliance on fossil fuels. Emission levels are projected to record a new high in 2023, bouncing back after the decline experienced during the pandemic \citep{fried23}. CO$_2$ and other greenhouse gases have contributed to global warming, causing many places on Earth to be unbearable to live in. Besides environmental degradation, income inequality is another major challenge we have been facing. According to the World Inequality Report 2022 \citep{chancel22}, global inequality, as measured by the ratio between the average income of the top 10\% and the bottom 50\% of the world population, doubled from 20 to 40 between 1820 and 1910 and has remained relatively constant around 40 since 1910. 



% \newpage
\bibliographystyle{standard2}
\bibliography{refs1}

Here is the PDF output

I used the following citation:

@book{chancel22,
  title={{World Inequality Report 2022}},
  author={Chancel, L. and Piketty, T. and Saez, E. and Zucman, G.},
  year={2022},
  publisher={World Inequality Lab},
  chapter={14},
  pages={458--496}
}

Please help me with this issue. I also have two minor other issues that need to be resolved:

1, I used the following in each paper's file to list references (I need separate refenrences at the end of each paper (chapter)):

%References
\newpage
\bibliographystyle{standard2}
\bibliography{refs}

In the table of contents in the Thesis' PDF file, each reference part appeared as a chapter, instead of a section in a chapter, which is very annoying. I tried to include \section{} but then References appeared twice, which is even more annoying. Any solution to this?

2, I want to list Appendix section using A, B, C instead of numbers like other sections in each chapter. Subsections should be A.1, A.2, etc. Is there any simple way to do this? I had to set the format of listing and reset again after each chapter, which is not very elegant.

Thank you so much for your help.

8
  • 1
    ` \usepackage{type1cm} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{mathptmx}` looks wrong, th efirst one allows scalable computer modern (better to use fix-cm which does the same but it does nothing useful here as you are using mthptmx to get a times roman clone. are you really encoding the file as latin not the default utf-8 ? Certainly as posted here on this site it must be utf-8 you can not post latin1 encoded text here. Commented Aug 18, 2024 at 20:07
  • 2
    please don't post disconnected fragments post a small complete document that shows the problem. Most of the code you have posted is font related which is unrelated to teh question. and you don't show a single \cite Commented Aug 18, 2024 at 20:09
  • 2
    there is nothing here that would allow anyone to understand your issue, Your title suggests you have a problem with natbib package but you have not posted any code using natbib. You still have no test document, the fragments don't use natbib but do use some non standard standard2.bst bibtex file that you do not show. Commented Aug 18, 2024 at 21:06
  • 1
    if you make an example that shows the problem someone will test it. Have you run bibtex since adding the cite? Commented Aug 19, 2024 at 7:48
  • 1
    To make clear, what David is talking about, when he says you should make an example that shows the problem → How to write a MWEB (Minimal working example with Bibliography)? and don't miss: I've just been asked to write a minimal working example (MWE), what is that?. Commented Aug 19, 2024 at 8:49

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.