* numbered exercises
@ 2021-08-24 18:31 Henning Hraban Ramm via ntg-context
2021-08-24 19:17 ` Wolfgang Schuster via ntg-context
0 siblings, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2021-08-24 18:31 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm
Hi, I’m typesetting a textbook that contains numbered and indented exercises. They must not float.
Which structure should I use for them? There must be an easy answer, but I draw a blank.
At the moment I’m using heads, derived from 'section', but the exercises should have independent numbers, and I’m unsure how I should setup the indentation. With 'narrower' the numbered titles would be difficult.
\setuplabeltext[en][Exercise=Exercise~]
\definehead[Exercise][section]
\setuphead[Exercise][
bodypartlabel=Exercise,
number=yes,
ownnumber=yes, % ??
way=bytext, % ??
]
\starttext
\startExercise[title={Something to do},reference=ex:something]
This can have several paragraphs and maybe images etc.
\stopExercise
\stoptext
Hraban
___________________________________________________________________________________
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] 9+ messages in thread
* Re: numbered exercises
2021-08-24 18:31 numbered exercises Henning Hraban Ramm via ntg-context
@ 2021-08-24 19:17 ` Wolfgang Schuster via ntg-context
2021-08-24 19:26 ` Henning Hraban Ramm via ntg-context
0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-08-24 19:17 UTC (permalink / raw)
To: Henning Hraban Ramm via ntg-context; +Cc: Wolfgang Schuster
Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:
> Hi, I’m typesetting a textbook that contains numbered and indented exercises. They must not float.
>
> Which structure should I use for them? There must be an easy answer, but I draw a blank.
Use an enumeration.
Wolfgang
___________________________________________________________________________________
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] 9+ messages in thread
* Re: numbered exercises
2021-08-24 19:17 ` Wolfgang Schuster via ntg-context
@ 2021-08-24 19:26 ` Henning Hraban Ramm via ntg-context
2021-08-24 19:34 ` Wolfgang Schuster via ntg-context
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2021-08-24 19:26 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm
> Am 24.08.2021 um 21:17 schrieb Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>:
>
> Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:
>> Hi, I’m typesetting a textbook that contains numbered and indented exercises. They must not float.
>>
>> Which structure should I use for them? There must be an easy answer, but I draw a blank.
>
> Use an enumeration.
Thank you, but how can I define a title/caption for the enumeration and its reference?
Hraban
___________________________________________________________________________________
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] 9+ messages in thread
* Re: numbered exercises
2021-08-24 19:26 ` Henning Hraban Ramm via ntg-context
@ 2021-08-24 19:34 ` Wolfgang Schuster via ntg-context
2021-08-24 19:46 ` Henning Hraban Ramm via ntg-context
2021-08-24 19:43 ` Gavin via ntg-context
2021-08-24 22:19 ` Aditya Mahajan via ntg-context
2 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-08-24 19:34 UTC (permalink / raw)
To: Henning Hraban Ramm via ntg-context; +Cc: Wolfgang Schuster
Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 21:26:
>
>> Am 24.08.2021 um 21:17 schrieb Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>:
>>
>> Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:
>>> Hi, I’m typesetting a textbook that contains numbered and indented exercises. They must not float.
>>>
>>> Which structure should I use for them? There must be an easy answer, but I draw a blank.
>>
>> Use an enumeration.
>
> Thank you, but how can I define a title/caption for the enumeration and its reference?
\defineenumeration
[Exercise]
[text=Exercise,
title=yes,
titleleft=,
titleright=,
way=bytext,
margin=1em]
\starttext
\samplefile{lorem}
\startExercise [title={Something to do},reference=ex:something]
\samplefile{lorem}
\stopExercise
\stoptext
Wolfgang
___________________________________________________________________________________
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] 9+ messages in thread
* Re: numbered exercises
2021-08-24 19:26 ` Henning Hraban Ramm via ntg-context
2021-08-24 19:34 ` Wolfgang Schuster via ntg-context
@ 2021-08-24 19:43 ` Gavin via ntg-context
2021-08-24 22:19 ` Aditya Mahajan via ntg-context
2 siblings, 0 replies; 9+ messages in thread
From: Gavin via ntg-context @ 2021-08-24 19:43 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Gavin
> On Aug 24, 2021, at 1:26 PM, Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl> wrote:
>> Am 24.08.2021 um 21:17 schrieb Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>:
>> Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:
>>> Hi, I’m typesetting a textbook that contains numbered and indented exercises. They must not float.
>>>
>>> Which structure should I use for them? There must be an easy answer, but I draw a blank.
>>
>> Use an enumeration.
>
> Thank you, but how can I define a title/caption for the enumeration and its reference?
>
Hi Hraban,
Here’s an example from my textbook which might be helpful. I use this enumeration for example problems, but exercises could be similar. You have access to the rest of the textbook, so feel free to grab anything useful.
-Gavin
In the environment file:
% Example Problems
\defineenumeration[example]
\setupenumeration[example][
margin=no,
headstyle=\ss\sc,
text=Example, % This text is part of the number, e.g. "Example 2.3"
style=\ss,
alternative=serried,
title=no, % This would be a title after the number
prefix=yes, % Turns on the prefix
prefixsegments=chapter, % makes the prefix the chapter number
way=bychapter, % Numbers within each chapter
%margin=standard, % Indents block on the left
width=fit, % Makes the space between the number and the question a good size
indentnext=no,
]
\definedelimitedtext[solution][
spacebefore=medium,
spaceafter=medium,
style=\rm\it,
leftmargin=standard, % Indents block on the left
rightmargin=yes, % Indents block on the right
indentnext = no,
]
In the text:
\startexample[ex:organ]
What interval is produced by two consecutive thirds?
\startsolution
We wish to add a third to a third.
\startformula
\text{3rd} + \text{3rd} = 2\units{steps} + 2\units{steps} = 4\units{steps} = \text{5th}
\stopformula
Two thirds produce a fifth.
\stopsolution
\stopexample
___________________________________________________________________________________
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] 9+ messages in thread
* Re: numbered exercises
2021-08-24 19:34 ` Wolfgang Schuster via ntg-context
@ 2021-08-24 19:46 ` Henning Hraban Ramm via ntg-context
2021-08-24 20:07 ` Henning Hraban Ramm via ntg-context
0 siblings, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2021-08-24 19:46 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm
> Am 24.08.2021 um 21:34 schrieb Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>:
>
> Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 21:26:
>>> Am 24.08.2021 um 21:17 schrieb Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>:
>>>
>>> Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:
>>>> Hi, I’m typesetting a textbook that contains numbered and indented exercises. They must not float.
>>>>
>>>> Which structure should I use for them? There must be an easy answer, but I draw a blank.
>>>
>>> Use an enumeration.
>> Thank you, but how can I define a title/caption for the enumeration and its reference?
>
>
> \defineenumeration
> [Exercise]
> [text=Exercise,
> title=yes,
> titleleft=,
> titleright=,
> way=bytext,
> margin=1em]
>
> \starttext
>
> \samplefile{lorem}
>
> \startExercise [title={Something to do},reference=ex:something]
> \samplefile{lorem}
> \stopExercise
>
> \stoptext
Thank you, I didn’t even try, since the wiki looked like it wasn’t possible. Sorry!
I’ll wikify that.
Hraban
___________________________________________________________________________________
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] 9+ messages in thread
* Re: numbered exercises
2021-08-24 19:46 ` Henning Hraban Ramm via ntg-context
@ 2021-08-24 20:07 ` Henning Hraban Ramm via ntg-context
0 siblings, 0 replies; 9+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2021-08-24 20:07 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm
[-- Attachment #1.1: Type: text/plain, Size: 709 bytes --]
Here’s what I have now (result attached):
\define[1]\ÜbungNrCmd{\inmargin{\offset[y=3em]{\rotate[rotation=90]{\SectionFont #1}}}}
\defineenumeration[Übung][
text=Übung,
title=yes,
titleleft=,
titleright=,
titledistance=-1em,
titlestyle=\SectionFont,
%numberstyle=\SectionFont,
numbercommand=\ÜbungNrCmd,
way=bytext,
margin=1em,
before={\blank[2*line]},
]
Now I’d like to have a vertical line beside the text, starting below the title.
And because I want to use the “sketchy“ lines we discussed a while ago (I needed them for the same book), it must be a MetaPost-drawn line.
What’s the right approach? Overlay? Textbackground?
Hraban
[-- Attachment #1.2.1: Type: text/html, Size: 1523 bytes --]
[-- Attachment #1.2.2: PastedGraphic-1.png --]
[-- Type: image/png, Size: 32269 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] 9+ messages in thread
* Re: numbered exercises
2021-08-24 19:26 ` Henning Hraban Ramm via ntg-context
2021-08-24 19:34 ` Wolfgang Schuster via ntg-context
2021-08-24 19:43 ` Gavin via ntg-context
@ 2021-08-24 22:19 ` Aditya Mahajan via ntg-context
2021-08-25 8:03 ` Henning Hraban Ramm via ntg-context
2 siblings, 1 reply; 9+ messages in thread
From: Aditya Mahajan via ntg-context @ 2021-08-24 22:19 UTC (permalink / raw)
To: Henning Hraban Ramm via ntg-context; +Cc: Aditya Mahajan
[-- Attachment #1: Type: text/plain, Size: 616 bytes --]
On Tue, 24 Aug 2021, Henning Hraban Ramm via ntg-context wrote:
> > Am 24.08.2021 um 21:17 schrieb Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>:
> >
> > Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:
> >> Hi, I’m typesetting a textbook that contains numbered and indented exercises. They must not float.
> >>
> >> Which structure should I use for them? There must be an easy answer, but I draw a blank.
> >
> > Use an enumeration.
>
> Thank you, but how can I define a title/caption for the enumeration and its reference?
http://www.ntg.nl/maps/36/09.pdf
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] 9+ messages in thread
* Re: numbered exercises
2021-08-24 22:19 ` Aditya Mahajan via ntg-context
@ 2021-08-25 8:03 ` Henning Hraban Ramm via ntg-context
0 siblings, 0 replies; 9+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2021-08-25 8:03 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm
> Am 25.08.2021 um 00:19 schrieb Aditya Mahajan via ntg-context <ntg-context@ntg.nl>:
>
> On Tue, 24 Aug 2021, Henning Hraban Ramm via ntg-context wrote:
>
>>> Am 24.08.2021 um 21:17 schrieb Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>:
>>>
>>> Henning Hraban Ramm via ntg-context schrieb am 24.08.2021 um 20:31:
>>>> Hi, I’m typesetting a textbook that contains numbered and indented exercises. They must not float.
>>>>
>>>> Which structure should I use for them? There must be an easy answer, but I draw a blank.
>>>
>>> Use an enumeration.
>>
>> Thank you, but how can I define a title/caption for the enumeration and its reference?
>
> http://www.ntg.nl/maps/36/09.pdf
Thank you, that also answers my last question.
Hraban
___________________________________________________________________________________
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] 9+ messages in thread
end of thread, other threads:[~2021-08-25 8:03 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 18:31 numbered exercises Henning Hraban Ramm via ntg-context
2021-08-24 19:17 ` Wolfgang Schuster via ntg-context
2021-08-24 19:26 ` Henning Hraban Ramm via ntg-context
2021-08-24 19:34 ` Wolfgang Schuster via ntg-context
2021-08-24 19:46 ` Henning Hraban Ramm via ntg-context
2021-08-24 20:07 ` Henning Hraban Ramm via ntg-context
2021-08-24 19:43 ` Gavin via ntg-context
2021-08-24 22:19 ` Aditya Mahajan via ntg-context
2021-08-25 8:03 ` Henning Hraban Ramm 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).