Text FormattingAccents and listofsymbols.sty

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
s.g.
Posts: 7
Joined: Tue Apr 14, 2009 4:06 pm

Accents and listofsymbols.sty

Post by s.g. »

I'm trying to include a list of symbols in a template I'm preparing. I've found listofsymbols package, but I have a problem with accents. I would like to be able to compile words in Spanish.

When using package babel I can directly type accents, but when some symbol description has an accent, say "Energía", I get errors from listofsymbols.

I've tried to edit the .sty, and added to it

Code: Select all

\RequirePackage[utf8]{inputenc} \RequirePackage[spanish]{babel
but that doesn't seem to work.

Is there any way?

Thank you in advance

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Accents and listofsymbols.sty

Post by localghost »

Provide a minimal working example (MWE) with the default listofsymbols package and the other packages included in the preamble as usual.


Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
s.g.
Posts: 7
Joined: Tue Apr 14, 2009 4:06 pm

Accents and listofsymbols.sty

Post by s.g. »

Thanks, the simplest code would be something like this:

Code: Select all

\documentclass{article}
\usepackage[final]{listofsymbols}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}

\begin{document}
  \listofsymbols
  \opensymdef
     \newsym[Energía]{symE}{E}                     % With an accent
     \newsym[Masa]{symm}{m}
     \newsym[Velocidad de la luz]{symc}{c}
  \[\symE=\symm \symc^2\]
  donde \symE es la energía \ldots
  \closesymdef
\end{document}
which works fine if I avoid the accent in the symbol definition:

Code: Select all

\documentclass{article}
\usepackage[final]{listofsymbols}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}   		


\begin{document}
  \listofsymbols
  \opensymdef
     \newsym[Energia]{symE}{E}                     % Without accents
     \newsym[Masa]{symm}{m}
     \newsym[Velocidad de la luz]{symc}{c}
  \[\symE=\symm \symc^2\]
  donde \symE es la energía \ldots
  \closesymdef
\end{document}
s.g.
Posts: 7
Joined: Tue Apr 14, 2009 4:06 pm

Re: Accents and listofsymbols.sty

Post by s.g. »

Is there any alternative package for a list of symbols?
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Accents and listofsymbols.sty

Post by localghost »

s.g. wrote:Is there any alternative package for a list of symbols?
It seems that the package is not supporting other languages. You may try the glossaries package. But you won't have the comfort of using commands that generate a list automatically.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
s.g.
Posts: 7
Joined: Tue Apr 14, 2009 4:06 pm

Re: Accents and listofsymbols.sty

Post by s.g. »

Thanks, I'll try that.
Post Reply