ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* What is the proper way to define many different list types in a document?
       [not found] <253499394.1008080.1643071983973.ref@mail.yahoo.com>
@ 2022-01-25  0:53 ` Joel via ntg-context
  2022-01-25  7:15   ` Aditya Mahajan via ntg-context
  0 siblings, 1 reply; 2+ messages in thread
From: Joel via ntg-context @ 2022-01-25  0:53 UTC (permalink / raw)
  To: ntg-context; +Cc: Joel


[-- Attachment #1.1: Type: text/plain, Size: 1831 bytes --]

I have about several different types of list that reoccur multiple times in my documents. Though I tried to keep things simple, by just defining the type when it appears, strange glitches appear. For instance, I have one that uses the ☞ (pointing hand) logo, and sometimes that randomly appears in the wrong lists, for reasons I cannot understand.

Below is how I'm defining my lists. I have about a dozen more, this is a sample. Is there some more robust and consistent manner in which I should be defining them, so the settings from one type don't spill over into the other types?
--Joel

%prompt

\definesymbol[bighand][{{☞}}]

\define[1]\prompt{%
    \setupitemize[symbol=bighand]
    \startitemize
        {\it #1}
    \stopitemize
}%

\prompt{What did you learn about today?}

%vocabulary

\startcolumns[n=3]\startitemize[n]
\item word1
\item word2
\item word3
\stopitemize\stopcolumns

%nested outline

\startitemize[1]
    \item some text
    \startitemize[2]
        \item some text
        \startitemize[3]
              \item some text
        \stopitemize
    \stopitemize
\stopitemize

%written answer (produces some lines after the question for writing an answer)

\define[1]\writingbox{%
    \dorecurse{#1}{%
        \hairline%
    }
}

\startitemize[n]
\item Which planet is closest to Earth? \writingbox{4}
\item What is the moon made of? \writingbox{4}
\stopitemize

%materials list

\startcolumns[n=3]\startitemize
\item crayons
\item scissors
\item glue
\stopitemize\stopcolumns

%word search clues (should be simple, but strangely this keeps getting the ☞ logo added instead of showing numbers)
\startitemize[n]
\item a type of hat worn
\item a cold season
\stopitemize

[-- Attachment #1.2: Type: text/html, Size: 2510 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: What is the proper way to define many different list types in a document?
  2022-01-25  0:53 ` What is the proper way to define many different list types in a document? Joel via ntg-context
@ 2022-01-25  7:15   ` Aditya Mahajan via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Aditya Mahajan via ntg-context @ 2022-01-25  7:15 UTC (permalink / raw)
  To: Joel via ntg-context; +Cc: Aditya Mahajan

[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]

On Tue, 25 Jan 2022, Joel via ntg-context wrote:

> I have about several different types of list that reoccur multiple times in my documents. Though I tried to keep things simple, by just defining the type when it appears, strange glitches appear. For instance, I have one that uses the ☞ (pointing hand) logo, and sometimes that randomly appears in the wrong lists, for reasons I cannot understand.
> 
> Below is how I'm defining my lists. I have about a dozen more, this is a sample. Is there some more robust and consistent manner in which I should be defining them, so the settings from one type don't spill over into the other types?
> --Joel
> 
> %prompt
> 
> \definesymbol[bighand][{{☞}}]
> 
> \define[1]\prompt{%
>     \setupitemize[symbol=bighand]
>     \startitemize
>         {\it #1}
>     \stopitemize
> }%

This is a global definition. So, once this macro is used, symbol=bighand for all itemize. What you can use instead is:

\define[1]\prompt{%
    \startitemize[symbol=bighand]
        {\it #1}
    \stopitemize
}%


or even better:

\defineitemgroup[prompt][symbol=bighand,style=italic]

...

\startprompt
  \item
\stopprompt

> %written answer (produces some lines after the question for writing an answer)
> 
> \define[1]\writingbox{%
>     \dorecurse{#1}{%
>         \hairline%
>     }
> }

There is also: https://wiki.contextgarden.net/Command/fillinrules

Aditya

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-25  7:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <253499394.1008080.1643071983973.ref@mail.yahoo.com>
2022-01-25  0:53 ` What is the proper way to define many different list types in a document? Joel via ntg-context
2022-01-25  7:15   ` Aditya Mahajan via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).