LyXGlossary with Lyx

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
Jazz
Posts: 5
Joined: Sun Aug 22, 2010 2:18 pm

Glossary with Lyx

Post by Jazz »

Hi there,
at this moment I write my bachelor thesis and need a glossary.

I created a Databse with BibDesk and inserted it in my LyxDokument over the menubar.

I selected Style: glsplain

Preamble is:
...
\usepackage{gloss}
...

When I try too create a PDF there are a lot of erros like:
Undefined control sequence.
Description: \begin{thegloss}

What goes wrong??
Thanks.

Jazz
Last edited by Jazz on Mon Aug 23, 2010 11:30 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Glossary with Lyx

Post by meho_r »

Hi and welcome.

Please, create an example .lyx file with some dummy text which demonstrates the problem, put it (and all necessary external files if there are any) in a ZIP archive and attach it to your next post. Board Rules (and need for a Minimal Working Example) apply to LyX-related problems too.
Jazz
Posts: 5
Joined: Sun Aug 22, 2010 2:18 pm

Re: Glossary with Lyx

Post by Jazz »

Thanks for your reply.

Here are the requested files
Attachments
Archiv.zip
Glossar Test
(4.03 KiB) Downloaded 230 times
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Glossary with Lyx

Post by meho_r »

I'm not sure if you'll be able to use gloss package directly from LyX. You'll probably have to export your LYX file to LaTeX (plain) to make things work. This is just one of many shortcomings of LyX when a little bit more complicated documents need to be produced. It seems that, for now, the only way to produce glossaries in LyX is to use nomencl package (LyX's User Guide, section 6.7).

So, if you want to use BibTeX and gloss, you'll probably have to use one of "real" LaTeX editors and work with code. The important points regarding gloss package are:

1. put \makegloss command in the preamble
2. use \gloss{key} to mark the term and write it to .gls.aux file
3. put \printgloss{database} command in the place where you want the glossary to appear
4. run latex (or pdflatex) on the .tex file
5. run bibtex on .gls.aux (note gls part; you must run bibtex on this .gls.aux file, not on "plain" .aux file).
6. run latex (or pdflatex) two more times.

I exported the LYX file you attached in your previous post to .tex and added necessary commands to produce the glossary. You may test it running the following sequence of commands:

Code: Select all

pdflatex glossartest.tex
bibtex glossartest.gls.aux
pdflatex glossartest.tex
pdflatex glossartest.tex
Attachments
Archiv.zip
(1.2 KiB) Downloaded 225 times
Jazz
Posts: 5
Joined: Sun Aug 22, 2010 2:18 pm

Re: Glossary with Lyx

Post by Jazz »

Great it works!!! Thank you. Too bad that Lyx doesn't support it directly.
Jazz
Posts: 5
Joined: Sun Aug 22, 2010 2:18 pm

Re: Glossary with Lyx

Post by Jazz »

Hi,
is there another way to create a glossary and a short cut list.
I use already nomencl for short cuts. Do you know a solution?
Thanks
Jazz
Posts: 5
Joined: Sun Aug 22, 2010 2:18 pm

Glossary with Lyx

Post by Jazz »

I solved it.

I created a Script

Code: Select all

pdflatex Thesis.tex
pdflatex Thesis.tex
makeindex Thesis.nlo -s nomencl.ist -o Thesis.nls
pdflatex Thesis.tex
bibtex Thesis.gls.aux
pdflatex Thesis.tex
Open Thesis.pdf
This is how I use nomencl and gloss package at the same time!
For a german glossar don't forget to add in preamble

Code: Select all

%Glossar

\usepackage[german]{gloss}
\makegloss
In Lyx I can use the standard Nomencl etc.
and

Code: Select all

\printgloss{
glossar

Code: Select all

}
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: Glossary with Lyx

Post by meho_r »

Nice :) Now that the issue is solved, please mark the thread as solved by editing your first post and using the green checkmark.
Post Reply