0

Is there any way to get \definedescription & \setupdescriptions to not only produce the inline description, but also an entry in a sorted glossary? Perhaps with before= & after= to add the commands for the glossary?

4
  • 2
    Not very clear. What do you want to exactly? Use the description environment and automate the insertion of terms in a glossary? Could you provide a small compilable code and give details?
    – Bernard
    Oct 30 '19 at 20:31
  • This is exactly what I want.... to make one entry in the source file that produces an description where I placed it, and also adds that description to a sorted glossary. Unfortunately I cannot post a MWE, as I don't know how to make it work. Perhaps a new macro that invokes both facilities would work too.... The links from contextgarden to the source for Context seem to be broken, so I cannot even jump into the deep end. Oct 30 '19 at 20:46
  • 3
    Could you post a small compilable code of what you've tried that we can play with?
    – Bernard
    Oct 30 '19 at 20:57
  • 1
    Please post a MWE with your descriptions and your definedescription parameters
    – sztruks
    Oct 31 '19 at 7:12
1

Other than needing to resolve some "normal" formatting issues, I've found a solution....

\setuppapersize[letter]
\setupexternalfigures[location=default]
\setupwhitespace[medium]

\definedescription[conceptdesc][alternative=serried,headstyle=bold,width=broad]

\definesynonyms[conceptsyn][concepts][\expandconcept]
\setupsynonyms[conceptsyn][width=4cm, criterium=all]

\def\concept#1#2%
{
\conceptsyn{#1}{#2}
\index{#1}
\conceptdesc{#1}#2\par
}


\starttext 

\chapter{The Great Text}

\input lorem.tex

\concept{Catatonic Choochoo}{
The etherial vehicle one travels on when being 
kidnapped by friends.
}

\input lorem.tex

\concept{Application Binary Interface}{
In computer software, an application binary 
interface is an interface between two binary program modules; often, one of these modules is a library or operating system facility, and the other is a program that is being run by a user.
}

\input lorem.tex

\chapter{Concepts}
\placelistofconcepts

\chapter{Index}
\placeindex

\stoptext

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.