1

I am currently trying to have a reference for each of the \input of my document. The working tree looks something like this:

project
 |--main.tex
 |--chapter1
       |--chapter1-1.tex
       |--chapter1-1.bib

I have a compile script resting at project level, and main.tex is:

\begin{document}
  \input{chapter1/chapter1-1.tex}
\end{document}

Inside chapter1-1.tex, I tried:

\bibliography{chapter1-1}

which will not work. If I do:

\bibliography{chapter1/chapter1-1}

it will work. Is there a way to call relative directory for the bib file inside chapter1?

1
  • 2
    You can imagine \input just taking the indicated .tex file and pasting it into your main.tex. That explains why everything is happening at the folder level of main.tex and you need to give the path as chapter1/chapter1-1 to your .bib file. You'd need a way to tell chapter1-1.tex that it is being called from a different directory. Maybe ctan.org/pkg/import can help you.
    – moewe
    Sep 7, 2018 at 20:51

0

You must log in to answer this question.

Browse other questions tagged .