LaTeX forum ⇒ GeneralError for Glossaries in Subfile

LaTeX specific issues not fitting into one of the other forums of this category.
Posts: 4
Joined: Sat Apr 14, 2012 7:36 pm

Error for Glossaries in Subfile

Postby merelda » Thu Jul 17, 2014 9:48 pm

I'm using the Glossaries package to generate acronyms and glossaries.

I defined the acronyms in a separate file as acronyms.tex.

My file structure is as follows (ch2.tex is one folder in of main.tex):

Main Folder
- Ch.2 Folder
-- ch2.tex
- main.tex

I have a main file main.tex and a subfile ch2.tex:

in main.tex:

  1. \usepackage[acronym]{glossaries}
  2. \usepackage{subfiles}
  3. \makeglossaries
  4. \loadglsentries[acronyms]{acronyms.tex}

in ch2.tex:

  1. \documentclass[../main.tex]{subfiles}

However, I can build the main.tex and get the correct list of glosseries, but when I only build ch2.tex I get the following error:

../main.tex:20: LaTeX Error: File `acronyms.tex' not found. [\loadglsentries[acronyms]{acronyms.tex}]

But it was clearly found when I build main.tex?

I tried to add
  1. \loadglsentries[acronyms]{../acronyms.tex}
in ch2.tex, but no luck.

By the way, if I don't put the glossaries in an extra file but do all the definition in main.tex then it compiles fine for ch2.tex. So I figured it's probably some relative path issues, but I tried all the combinations I could think of but still no luck.

Any ideas?


Return to “General”

Who is online

Users browsing this forum: No registered users and 11 guests