2016/03/18

Fazendo um Glossário no LaTeX

Ao usar o TeXstudio, este não vem com o compilador necessário para fazer os glossários.
É necessário o Perl ou aparecerá o seguinte erro



Process started: makeglossaries.exe "xxxxxxxx"
makeglossaries.exe
: The Perl interpreter could not be found.
Process exited with error(s)


A solução é baixar o compilador Pearl em
https://www.perl.org/get.html

Depois de instalado, basta seguir algumas dicas simples de uso como apresentado em 


Código a ser compilado
-------------------------------------------------------------
\documentclass{article}
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[acronym, toc]{glossaries}

\makeglossaries
\input{biblioteca/glossary.tex}
\begin{document}
\tableofcontents
\section{Primeira Seção}
The \Gls{latex} typesetting markup language is specially suitable for documents that include \gls{maths}. \Glspl{formula} are rendered properly an easily once one gets used to the commands.

\clearpage
\section{Segunda Seção}
\vspace{5mm}
Given a set of numbers, there are elementary methods to compute its \acrlong{gcd}, which is abbreviated \acrshort{gcd}. This process is similar to that used for the \acrfull{lcm}.

\printglossary
\printglossary[type=\acronymtype]

\end{document}
-------------------------------------------------------------
O arquivo da biblioteca/glossary.tex
-------------------------------------------------------------
\newglossaryentry{latex}
{
    name=latex,
    description={Is a mark up language specially suited for scientific documents}
}

\newglossaryentry{maths}
{
    name=mathematics,
    description={Mathematics is what mathematicians do}
}

\newglossaryentry{formula}
{
    name=formula,
    description={A mathematical expression}
}

\newacronym{gcd}{GCD}{Greatest Common Divisor}

\newacronym{lcm}{LCM}{Least Common Multiple}

-------------------------------------------------------------
[tex] [pdf] [zip]


Resultado


Nenhum comentário: