LaTeX forum ⇒ TeXShopGlossaries

Information and discussion about TeXShop, an integrated LaTeX environment for Mac OS X
bruhan
Posts: 7
Joined: Thu Sep 06, 2012 5:34 pm

Glossaries

Postby bruhan » Sun Mar 15, 2015 3:59 am

Hello. I would like to make a glossary in my TeXshop version. I've seen a post which teaches us how to create a makeglossary in TeXshop in an iMac

http://the-moni-blog.blogspot.com.br/20 ... n-mac.html

But I can't find my engines directory. Can anyone help me?

Thanks

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Mar 15, 2015 11:53 am

Hi and welcome,

personally, i would always refer to Glossaries, Nomenclature, Lists of Symbols and Acronyms, an article written by the author itself. The basics of compiling are still valid, but the possibilities have changed a bit. Nicola has done quite a lot of development.

As to where you find the binary files, please run on the command line:
  1. $ which makeglossaries


makeglossaries is a perl script that eases the call to makeindex (or xindy).
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

bruhan
Posts: 7
Joined: Thu Sep 06, 2012 5:34 pm

Postby bruhan » Sun Mar 15, 2015 7:42 pm

Thanks Johannes. I found my engines alright. I then created a file

#!/bin/sh

bfname=$(dirname "$1")/"`basename "$1" .tex`"

makeindex -s "$bfname".ist -t "$bfname".alg -o "$bfname".acr "$bfname".acn
makeindex -s "$bfname".ist -t "$bfname".glg -o "$bfname".gls "$bfname".glo

Then tried to make it executable, but it didn't work. Any ideas what dirname "$1" and `basename "$1" .tex` would be?

Thanks

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Mar 15, 2015 8:28 pm

Dirname seems to be the name of your current directory, basename is the basename of your current tex file. Why are worrying yourself with that stuff?


Run makeglossaries basename and everything will be fine. Remember, the basename is the name of your texfile, without the ending.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

bruhan
Posts: 7
Joined: Thu Sep 06, 2012 5:34 pm

Postby bruhan » Sun Mar 15, 2015 10:27 pm

Johanes, thank you for your answer. I'm trying to get a the makeglossaries appear on my drop down menu. Still haven't managed.

bruhan
Posts: 7
Joined: Thu Sep 06, 2012 5:34 pm

Postby bruhan » Sun Mar 15, 2015 10:53 pm

I'm a beginner in this issue (!) and am having difficulties in following the recipes. I figured out I have to run make glossaries, but I haven't understood how or when. Should I run it through the terminal using my main file? What should I do after this?

bruhan
Posts: 7
Joined: Thu Sep 06, 2012 5:34 pm

Postby bruhan » Sun Mar 15, 2015 10:57 pm

I have two files: a main file (Include_Tese) where I include my glossary file (Glossario) and a glossary file.

When I ran:
makeglossaries My_Main_File

I got the following answer:

  1. makeglossaries version 2.14 (2014-03-06)
  2. added glossary type 'main' (glg,gls,glo)
  3. Warning: File 'Include_Tese.glo' is empty.
  4. Have you used any entries defined in glossary 'main'?
  5. Remember to use package option 'nomain' if you
  6. don't want to use the main glossary.
Last edited by Stefan Kottwitz on Mon Mar 16, 2015 12:26 am, edited 1 time in total.
Reason: code marked

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Mar 15, 2015 11:51 pm

Without any code, its hard to suggest anything. Please add a minimal working example.

At the first LaTeX run, helper files are created. The external tool makeglossaries, which is applpied on the basename of the mainfile (without file extension) sorts out the glossary stuff and write other files. With the next run of LaTeX, those files are read and the final glossary is printed.

So, you have to run the helper script/programm/app in between your LaTeX runs.

To the actual problem: please have a look at the message, it gives you some clues.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

bruhan
Posts: 7
Joined: Thu Sep 06, 2012 5:34 pm

Postby bruhan » Mon Mar 16, 2015 12:19 am

Thanks again. Thanks for your patience.

My minimum code is as follows:

  1. \documentclass[11pt, a4paper]{report}
  2. \usepackage{makeidx}
  3. \usepackage{hyperref}
  4. \usepackage{natbib}
  5. \makeindex
  6. \usepackage[toc]{glossaries}
  7. \input{Capitulos/Glossario}
  8. \makeglossaries
  9.  
  10. \begin{document}
  11. \printglossary
  12. \end{document}


My Glossario File is:

\newglossaryentry{chama}
{
name= {chama},
description={uma rea\c{c}\~ao autosustentada}
}
\newglossaryentry{(LTE)}
{
name = {equilibrio}
description={localmente}
}


When I run latex followed by makeglossaries followed by latex and latex again, I get a compiled document without a glossary
Last edited by Stefan Kottwitz on Mon Mar 16, 2015 12:25 am, edited 1 time in total.
Reason: code marked

bruhan
Posts: 7
Joined: Thu Sep 06, 2012 5:34 pm

Postby bruhan » Mon Mar 16, 2015 12:47 am

Also, I run latex from the drop down menu in my Texshop window, and I run makeglossaries MyFile (without extension) from the terminal (and I get:

bruno$ makeglossaries Include_Tese
makeglossaries version 2.14 (2014-03-06)
added glossary type 'main' (glg,gls,glo)
Warning: File 'Include_Tese.glo' is empty.
Have you used any entries defined in glossary 'main'?
Remember to use package option 'nomain' if you
don't want to use the main glossary.


Return to “TeXShop”

Who is online

Users browsing this forum: No registered users and 3 guests