ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Problem with the paragraph
@ 2023-12-13 14:22 Ursula Hermann
  2023-12-13 14:52 ` [NTG-context] " Henning Hraban Ramm
  2023-12-14 20:20 ` Wolfgang Schuster
  0 siblings, 2 replies; 6+ messages in thread
From: Ursula Hermann @ 2023-12-13 14:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Dear list,

I have this example. I need the whole paragraph in color. But there is something wrong.
\definepapersize[MyBook][width=19cm,height=24cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook
%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
\setupbodyfont[Times New Roman, 12.2pt]
\definemargindata  [MyInMargin][inright]
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
    text=Theorem,
    title=yes,
    width=fit,
    distance=0.2em,
    alternative=serried,
  ]
\definetextbackground[paragraph][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  before={\switchtobodyfont[global]},
  after={},
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}\blackrule[color=black, height=0.10ex, width=13.50cm]
\starttext
\margintext {1.1.1}
\starttext
\bf{Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor)}.
\stoptext
\starttext
{\it
\par Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aus-\par
sage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen
machen Sie sich die Bedeutung der beiden Aussagen klar.
\stoptext
\par
\starttext
1. \m\forall m ∈ M : ∃f ∈ F : h(m, f).\par
2. ∃f ∈ F : ∀m ∈ M : h(m, f).\par
\stoptext
\blank
\starttext
\startparagraph
\blank
\tf Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass
ein \m ∃\forall∀ oder ein \m \forall∀\m∃ versteckt ist. Dann ist es besonders wichtig, die
Formulierung sehr lange zu prüfen und eventuell auch formalisiert
noch einmal aufzuschreiben.”\blank
Der Wert von y = f(x) ist unabhängig von der Wahl\par
von x“ ist gleichbedeutend mit ∃y : ∀x : f(x) = y \par
(Beutelspacher [10, S.54]).
\blank
\stopparagraph
\stoptext

Many thanks
Uschi


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

[-- Attachment #2: u.pdf --]
[-- Type: application/pdf, Size: 22662 bytes --]

[-- Attachment #3: Type: text/plain, Size: 511 bytes --]

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Problem with the paragraph
  2023-12-13 14:22 [NTG-context] Problem with the paragraph Ursula Hermann
@ 2023-12-13 14:52 ` Henning Hraban Ramm
  2023-12-14  9:44   ` Ursula Hermann
  2023-12-14 20:20 ` Wolfgang Schuster
  1 sibling, 1 reply; 6+ messages in thread
From: Henning Hraban Ramm @ 2023-12-13 14:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 13.12.23 um 15:22 schrieb Ursula Hermann:
> Dear list,
> 
> I have this example. I need the whole paragraph in color. But there is 
> something wrong.

> \definetextbackground[paragraph][

> \startparagraph

\startparagraph starts a paragraph environment. If you overwrite it by 
defining another, the behaviour is undefined.

First try to give your textbackground a different name.

Hraban

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Problem with the paragraph
  2023-12-13 14:52 ` [NTG-context] " Henning Hraban Ramm
@ 2023-12-14  9:44   ` Ursula Hermann
  2023-12-15 12:59     ` Bruce Horrocks
  0 siblings, 1 reply; 6+ messages in thread
From: Ursula Hermann @ 2023-12-14  9:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Dear Henning,


If I change the name of the textbackground with my example, I sent yesterday, there is no color in the paragraph.


Many thanks

Uschi

________________________________
Von: Henning Hraban Ramm <texml@fiee.net>
Gesendet: Mittwoch, 13. Dezember 2023 15:52:08
An: mailing list for ConTeXt users
Betreff: [NTG-context] Re: Problem with the paragraph

Am 13.12.23 um 15:22 schrieb Ursula Hermann:
> Dear list,
>
> I have this example. I need the whole paragraph in color. But there is
> something wrong.

> \definetextbackground[paragraph][

> \startparagraph

\startparagraph starts a paragraph environment. If you overwrite it by
defining another, the behaviour is undefined.

First try to give your textbackground a different name.

Hraban

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

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

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Problem with the paragraph
  2023-12-13 14:22 [NTG-context] Problem with the paragraph Ursula Hermann
  2023-12-13 14:52 ` [NTG-context] " Henning Hraban Ramm
@ 2023-12-14 20:20 ` Wolfgang Schuster
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2023-12-14 20:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Ursula Hermann


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

Ursula Hermann schrieb am 13.12.2023 um 15:22:
>
> Dear list,
>
> I have this example. I need the whole paragraph in color. But there is 
> something wrong.
>
> \definepapersize[MyBook][width=19cm,height=24cm]
>
> \setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook
>
> %\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
>

This doesn't work to use Times New Roman as main font, you can use

     \setupbodyfont[termes]

to get a times lookalike.
>
> \setupbodyfont[Times New Roman, 12.2pt]
>
> \definemargindata [MyInMargin][inright]
>
> \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
>
> \defineenumeration
>
> [theorem]
>
>   [
>
> text=Theorem,
>
> title=yes,
>
> width=fit,
>
> distance=0.2em,
>
> alternative=serried,
>
>   ]
>
> \definetextbackground[paragraph][
>
> location=paragraph,
>
> background=color,
>
> backgroundcolor=lightgray,
>
> leftoffset=.5\bodyfontsize,
>
> rightoffset=.5\bodyfontsize,
>
> topoffset=.5\bodyfontsize,
>
> bottomoffset=.5\bodyfontsize,
>
> before={\switchtobodyfont[global]},
>
> after={},
>
> frame=off,]
>
> \margintext{\blackrule[color=black, height=0.10ex, 
> width=1cm]\\}\blackrule[color=black, height=0.10ex, width=13.50cm]
>
> \starttext
>
> \margintext {1.1.1}
>

What is the purpose of all these starttext/stoptext blocks?

> \starttext
>
> \bf{Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor)}.
>
> \stoptext
>
> \starttext
>
> {\it
>
> \par Sei M die Menge aller Männer und F die Menge aller Frauen. Die 
> Aus-\par
>
> sage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen
>
> machen Sie sich die Bedeutung der beiden Aussagen klar.
>
> \stoptext
>
> \par
>
> \starttext
>

1. Use the itemize environment to create numbered blocks.

2. Learn the correct usage of inline math mode, i.e. \m{...}

> 1. \m\forall m ∈M : ∃f ∈F : h(m, f).\par
>
> 2. ∃f ∈F : ∀m ∈M : h(m, f).\par
>
> \stoptext
>
> \blank
>
> \starttext
>
> \startparagraph
>
> \blank
>
> \tf Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass
>
> ein \m ∃\forall∀oder ein \m \forall∀\m∃versteckt ist. Dann ist es 
> besonders wichtig, die
>
> Formulierung sehr lange zu prüfen und eventuell auch formalisiert
>
> noch einmal aufzuschreiben.”\blank
>
> Der Wert von y = f(x) ist unabhängig von der Wahl\par
>
> von x“ ist gleichbedeutend mit ∃y : ∀x : f(x) = y \par
>
> (Beutelspacher [10, S.54]).
>
> \blank
>
> \stopparagraph
>
> \stoptext
>

Wolfgang


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

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

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Problem with the paragraph
  2023-12-14  9:44   ` Ursula Hermann
@ 2023-12-15 12:59     ` Bruce Horrocks
  2023-12-18  8:12       ` Ursula Hermann
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Horrocks @ 2023-12-15 12:59 UTC (permalink / raw)
  To: ntg-context mailing list



> On 14 Dec 2023, at 09:44, Ursula Hermann <ursula.hermann@univie.ac.at> wrote:
> 
> If I change the name of the textbackground with my example, I sent yesterday, there is no color in the paragraph. 
> 

Try the following version of your example which incoporates Hraban's and Wolfgang's suggestions.
Also take care over changing style so use \bold{this is bold} or {\bf this is bold} but not \bf{this is bold}.

\definepapersize[MyBook][width=19cm,height=24cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook
%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
\setupbodyfont[Times New Roman, 12.2pt]
\definemargindata  [MyInMargin][inright]
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
    text=Theorem,
    title=yes,
    width=fit,
    distance=0.2em,
    alternative=serried,
  ]
\definetextbackground[GrayBackground][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
  \blackrule[color=black, height=0.10ex, width=13.50cm]
\starttext
\margintext {1.1.1}
{\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).}
\par Sei M die Menge aller Männer und F die Menge aller Frauen. Die
Aussage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen
machen Sie sich die Bedeutung der beiden Aussagen klar.
\par
\startitemize[n]
 \item \m{\forall m ∈ M : ∃f ∈ F : h(m, f)}
 \item ∃f ∈ F : ∀m ∈ M : h(m, f).
\stopitemize
% I changed the above to use \startitemize but have a look at \placeformula as well

\startGrayBackground
Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass
ein \m{∃\forall} oder ein \m{\forall\m∃} versteckt ist. Dann ist es besonders 
wichtig, die
Formulierung sehr lange zu prüfen und eventuell auch formalisiert
noch einmal aufzuschreiben.”
\blank
Der Wert von \m{y = f(x)} ist unabhängig von der Wahl\par
von \m{x\doubleprime} ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} \par
(Beutelspacher [10, S.54]).
\stopGrayBackground
\stoptext

—
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: Problem with the paragraph
  2023-12-15 12:59     ` Bruce Horrocks
@ 2023-12-18  8:12       ` Ursula Hermann
  0 siblings, 0 replies; 6+ messages in thread
From: Ursula Hermann @ 2023-12-18  8:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Bruce, 

Thank you for your Mail 
It works  perfect. Thank you .
Uschi Hermann 

-----Ursprüngliche Nachricht-----
Von: Bruce Horrocks <ntg@scorecrow.com> 
Gesendet: Freitag, 15. Dezember 2023 14:00
An: ntg-context mailing list <ntg-context@ntg.nl>
Betreff: [NTG-context] Re: Problem with the paragraph



> On 14 Dec 2023, at 09:44, Ursula Hermann <ursula.hermann@univie.ac.at> wrote:
> 
> If I change the name of the textbackground with my example, I sent yesterday, there is no color in the paragraph. 
> 

Try the following version of your example which incoporates Hraban's and Wolfgang's suggestions.
Also take care over changing style so use \bold{this is bold} or {\bf this is bold} but not \bf{this is bold}.

\definepapersize[MyBook][width=19cm,height=24cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook %\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper \setupbodyfont[Times New Roman, 12.2pt] \definemargindata  [MyInMargin][inright] \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
    text=Theorem,
    title=yes,
    width=fit,
    distance=0.2em,
    alternative=serried,
  ]
\definetextbackground[GrayBackground][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
  \blackrule[color=black, height=0.10ex, width=13.50cm] \starttext \margintext {1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).} \par Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aussage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen Sie sich die Bedeutung der beiden Aussagen klar.
\par
\startitemize[n]
 \item \m{\forall m ∈ M : ∃f ∈ F : h(m, f)}  \item ∃f ∈ F : ∀m ∈ M : h(m, f).
\stopitemize
% I changed the above to use \startitemize but have a look at \placeformula as well

\startGrayBackground
Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass ein \m{∃\forall} oder ein \m{\forall\m∃} versteckt ist. Dann ist es besonders wichtig, die Formulierung sehr lange zu prüfen und eventuell auch formalisiert noch einmal aufzuschreiben.”
\blank
Der Wert von \m{y = f(x)} ist unabhängig von der Wahl\par von \m{x\doubleprime} ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} \par (Beutelspacher [10, S.54]).
\stopGrayBackground
\stoptext

—
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2023-12-18 16:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-13 14:22 [NTG-context] Problem with the paragraph Ursula Hermann
2023-12-13 14:52 ` [NTG-context] " Henning Hraban Ramm
2023-12-14  9:44   ` Ursula Hermann
2023-12-15 12:59     ` Bruce Horrocks
2023-12-18  8:12       ` Ursula Hermann
2023-12-14 20:20 ` Wolfgang Schuster

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).