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
    Commented Oct 30, 2019 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. Commented Oct 30, 2019 at 20:46
  • 3
    Could you post a small compilable code of what you've tried that we can play with?
    – Bernard
    Commented Oct 30, 2019 at 20:57
  • 1
    Please post a MWE with your descriptions and your definedescription parameters
    – sztruks
    Commented Oct 31, 2019 at 7:12

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .