1

I am new to LaTeX so please excuse my limited knowledge in terminology.

I am working on a project report. I was given a template which uses multiple documents which are then called with \input in the main document. I am using TeXstudio so when I open the main document I have access to all called documents. I have noticed a problem.

When I try to reference a figure that was not presented in the same document I can not reference it. I can se the label in the TeXstudio suggestions when I type\ref{}. When I build the document I just get ??

I know that I should add some code, to be more specific but I think I cant recreate the problem with code in this situation

CH4
  • 75
  • 2
    You need to compile at least twice to have references resolved, unless you're using an automated build process. Have you done that? Also, if the open file (in TeXStudio) is not actually \input into the main document, its labels won't be found. – Alan Munn Jul 31 '22 at 21:24
  • The file is \input into the main document. I have compiled multiple times and it still doesn't work right – CH4 Aug 01 '22 at 05:33
  • I use TeXstudio and referencing captions from \input-ed files work as expected. To recreate the problem, test with an example-image and use filecontents. – FHZ Aug 01 '22 at 13:47

0 Answers0