novathesis icon indicating copy to clipboard operation
novathesis copied to clipboard

\ref across files

Open Paul-Grey opened this issue 3 years ago • 4 comments

Bom dia a todos, estou a usar a versão 5.3.1 e tenho uma pergunta relacionada com \ref{} de labels, figuras, equações e tabelas entre ficheiros. Por exemplo: No ficheiro chapter1.tex tenho uma label \label{A} Então consigo usar \ref{A} no mesmo ficheiro. E o texmaker até faz a sugestão dessa ref. Mas se eu quiser fazer a mesma \ref no ficheiro chapter2.tex o Texmaker não faz a sugestão da label definida no chapter1.tex. Na compilação final as \refs até aparecem bem se fizer a compilação dos vários capítulos em questão. No entanto, facilitava bastante o trabalho se fosse possível ter as sugestões durante a escrita. Isto também para o comando \gls{} para os símbolos do ficheiro symbols.tex. Não sei se já fizeram esta pergunta por aqui mas não encontrei nada. No grande Oraculo (Google) encontro algumas soluções relacionadas com um \package{xr} e \externaldocument{chapter1} que perimte ir buscar labels a outros ficheiros mas não consigo implemetar isso no template. Alguem tem ou teve o mesmo problema e consegue ajudar?

Paul-Grey avatar Mar 21 '21 21:03 Paul-Grey

Note: The repository author prefers english to be used; using an english title and writing the issue in portuguese is also misleading.

While I use VSCode + LaTeX Workshop extension it also happens to me from time to time. The blame is both on the editor and the template (this or any other kind of), sometimes the editor is just not that powerful and unable to establish links between several files, in others, the template is too convoluted to get it working properly.

Given that upgrading your template version might be too much work, I recommend trying the VSCode + LaTeX Workshop extension combo

jmg-duarte avatar May 26 '21 10:05 jmg-duarte

I agree this problem is annoying! :(

@jmg-duarte is probably right when he says that the fault is shared between the editor(s) and the template itself. But, as all the labels are declared in the template.aux file, it is unclear for me why the editors don't locate/define/use them for suggestions. I'll have to dig deeper into the editor/plugin source code to figure out why!

BTW, I think the problem remains in version v6.x.

joaomlourenco avatar May 27 '21 16:05 joaomlourenco

Thank you for your input. I changed to Overleaf and there it is working quite well. So yes it is definitely connected to the editors (before i was using TexMaker). But now everything works fine since I pay for Overleaf as well....maybe the perks of not using freeware :)

Paul-Grey avatar May 28 '21 08:05 Paul-Grey

Thanks for the feedback and for confirming that it works all right in Overleaf. I think I have to try a few editors and make a “white list” of recommended editors. :)

joaomlourenco avatar May 28 '21 09:05 joaomlourenco