0

I'm working on the translation of a German book and have created the following macro so as to link some translated words and expressions to their original, which then I print at the end of the document:

\documentclass{book} 

\usepackage[brazil]{babel}
\usepackage{hyperref}
\usepackage{enumitem}

%%% Regulating dictionary entires

\newcommand{\DicEntry}[2]
    {%
    \hyperlink{#1}{#2}%
    \label{#1}%
    }
\newcommand{\DicShow}[3]
    {%
    \footnotesize
    \begin{enumerate}[label=Pág. \pageref{#1} -]
        \item
        \hypertarget{#1}{\textbf{#2}}
            \subitem {#3}
    \end{enumerate}
    }

\begin{document}

%%% Excerpt of Translated Text

Ele é um homem de especial \DicEntry{redlichkeit}{nobreza}...

%%% Excerpt of Dictionary Entries

\DicShow{redlichkeit}{Redlichkeit, die (-en):}
    {
    Mit guten Absichten und großem Ernst.
    }

\end{document}

It looks like this:

enter image description here

It works fine all right, but I've been wondering if there's any way to make it more efficiente, as in thus:

  • A command that reads back the text and outputs all the Dictionary Entries automatically, somewhat like the endnote package.
  • Outputting the glossary to a separate file, all of which I'll combine later.

I appreciate any ideas.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.