* [NTG-context] Alignments of margin notes
@ 2024-08-01 12:28 Gerion Entrup
2024-08-01 12:50 ` [NTG-context] " Taco Hoekwater
2024-08-01 14:13 ` Wolfgang Schuster
0 siblings, 2 replies; 17+ messages in thread
From: Gerion Entrup @ 2024-08-01 12:28 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1107 bytes --]
Hi,
I want to make a two sided document with margin notes.
The notes should not be hyphenated and always aligned to the inner text body.
However, I did not get this to work.
It hyphenates and the alignment is only correct at even pages.
Do you know the correct way?
Here is a MWE:
```
\setuppagenumbering[location={footer, right}, alternative=doublesided]
\definealign[myalign][inner, nothyphenated]
\setupmargindata[inmargin][
location=outer,
style=italic,
% nothing of that seems to have any effect
% align=myalign,
% align=inner,
% align=nothyphentated,
align={inner, nothyphentated},
]
\starttext
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\stoptext
```
Best,
Gerion
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-01 12:28 [NTG-context] Alignments of margin notes Gerion Entrup
@ 2024-08-01 12:50 ` Taco Hoekwater
2024-08-01 13:08 ` Henning Hraban Ramm
2024-08-01 13:36 ` Hans Hagen
2024-08-01 14:13 ` Wolfgang Schuster
1 sibling, 2 replies; 17+ messages in thread
From: Taco Hoekwater @ 2024-08-01 12:50 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
Something seems wrong with the align processing inside \setupmargindata, because using a macro like
\def\Inmargin#1{\inmargin{\blank[-line]\startalignment[inner,nothyphenated]#1\stopalignment}}
works ok (the \blank[-line] is a side-effect of using the environment inside a margin text).
Best, Taco
> On 1 Aug 2024, at 14:28, Gerion Entrup <gerion.entrup@flump.de> wrote:
>
> Hi,
>
> I want to make a two sided document with margin notes.
> The notes should not be hyphenated and always aligned to the inner text body.
> However, I did not get this to work.
> It hyphenates and the alignment is only correct at even pages.
>
> Do you know the correct way?
>
> Here is a MWE:
> ```
> \setuppagenumbering[location={footer, right}, alternative=doublesided]
>
> \definealign[myalign][inner, nothyphenated]
> \setupmargindata[inmargin][
> location=outer,
> style=italic,
> % nothing of that seems to have any effect
> % align=myalign,
> % align=inner,
> % align=nothyphentated,
> align={inner, nothyphentated},
> ]
>
> \starttext
>
> \inmargin{significant incredible components}\input knuth
> \inmargin{significant incredible components}\input knuth
> \inmargin{significant incredible components}\input knuth
> \inmargin{significant incredible components}\input knuth
> \inmargin{significant incredible components}\input knuth
> \inmargin{significant incredible components}\input knuth
> \inmargin{significant incredible components}\input knuth
> \inmargin{significant incredible components}\input knuth
>
> \stoptext
> ```
>
> Best,
> Gerion___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
—
Taco Hoekwater E: taco@bittext.nl
genderfluid (all pronouns)
___________________________________________________________________________________
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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-01 12:50 ` [NTG-context] " Taco Hoekwater
@ 2024-08-01 13:08 ` Henning Hraban Ramm
2024-08-01 13:36 ` Hans Hagen
1 sibling, 0 replies; 17+ messages in thread
From: Henning Hraban Ramm @ 2024-08-01 13:08 UTC (permalink / raw)
To: ntg-context
Am 01.08.24 um 14:50 schrieb Taco Hoekwater:
> Something seems wrong with the align processing inside \setupmargindata, because using a macro like
I also got the impression that something must be wrong from my
experiments with inmargin captions (see my architectural guides article
in the current journal) but couldn’t yet make a minimal example.
E.g. I needed \outermarginwidth for inner margin, the vertical placement
is irregular, and I couldn’t always get the alignment that I wanted.
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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-01 12:50 ` [NTG-context] " Taco Hoekwater
2024-08-01 13:08 ` Henning Hraban Ramm
@ 2024-08-01 13:36 ` Hans Hagen
2024-08-01 14:05 ` Gerion Entrup
1 sibling, 1 reply; 17+ messages in thread
From: Hans Hagen @ 2024-08-01 13:36 UTC (permalink / raw)
To: ntg-context
On 8/1/2024 2:50 PM, Taco Hoekwater wrote:
> Hi,
>
> Something seems wrong with the align processing inside \setupmargindata, because using a macro like
>
> \def\Inmargin#1{\inmargin{\blank[-line]\startalignment[inner,nothyphenated]#1\stopalignment}}
>
> works ok (the \blank[-line] is a side-effect of using the environment inside a margin text).
can you test with
\permanent\protected\tolerant\def\definealign[#1]#*[#2]%
{\pushmacro\raggedcommand
\pushmacro\updateraggedskips
\edef\m_spac_align_named{#1}%
\edef\m_spac_align_asked{#2}%
\spac_align_add_to_cache
\popmacro\updateraggedskips
\popmacro\raggedcommand}
(in cont-new.mkxl after \unprotect)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-01 13:36 ` Hans Hagen
@ 2024-08-01 14:05 ` Gerion Entrup
0 siblings, 0 replies; 17+ messages in thread
From: Gerion Entrup @ 2024-08-01 14:05 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 858 bytes --]
Am Donnerstag, 1. August 2024, 15:36:57 MESZ schrieb Hans Hagen:
> On 8/1/2024 2:50 PM, Taco Hoekwater wrote:
> > Hi,
> >
> > Something seems wrong with the align processing inside \setupmargindata, because using a macro like
> >
> > \def\Inmargin#1{\inmargin{\blank[-line]\startalignment[inner,nothyphenated]#1\stopalignment}}
> >
> > works ok (the \blank[-line] is a side-effect of using the environment inside a margin text).
> can you test with
>
> \permanent\protected\tolerant\def\definealign[#1]#*[#2]%
> {\pushmacro\raggedcommand
> \pushmacro\updateraggedskips
> \edef\m_spac_align_named{#1}%
> \edef\m_spac_align_asked{#2}%
> \spac_align_add_to_cache
> \popmacro\updateraggedskips
> \popmacro\raggedcommand}
>
> (in cont-new.mkxl after \unprotect)
I see no visible change for my minimal example with that.
Gerion
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-01 12:28 [NTG-context] Alignments of margin notes Gerion Entrup
2024-08-01 12:50 ` [NTG-context] " Taco Hoekwater
@ 2024-08-01 14:13 ` Wolfgang Schuster
2024-08-01 14:20 ` Gerion Entrup
1 sibling, 1 reply; 17+ messages in thread
From: Wolfgang Schuster @ 2024-08-01 14:13 UTC (permalink / raw)
To: mailing list for ConTeXt users, Gerion Entrup
Gerion Entrup schrieb am 01.08.2024 um 14:28:
> Hi,
>
> I want to make a two sided document with margin notes.
> The notes should not be hyphenated and always aligned to the inner text body.
> However, I did not get this to work.
> It hyphenates and the alignment is only correct at even pages.
>
> Do you know the correct way?
>
> Here is a MWE:
> ```
> \setuppagenumbering[location={footer, right}, alternative=doublesided]
>
> \definealign[myalign][inner, nothyphenated]
> \setupmargindata[inmargin][
> location=outer,
> style=italic,
> % nothing of that seems to have any effect
> % align=myalign,
> % align=inner,
> % align=nothyphentated,
> align={inner, nothyphentated},
> ]
Use \setupmarginframed for the alignment.
\setupmarginframed
[inmargin]
[align={inner,nothyphenated}]
Wolfgang
___________________________________________________________________________________
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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-01 14:13 ` Wolfgang Schuster
@ 2024-08-01 14:20 ` Gerion Entrup
2024-08-01 14:36 ` Wolfgang Schuster
0 siblings, 1 reply; 17+ messages in thread
From: Gerion Entrup @ 2024-08-01 14:20 UTC (permalink / raw)
To: mailing list for ConTeXt users, Wolfgang Schuster
[-- Attachment #1.1: Type: text/plain, Size: 1997 bytes --]
Am Donnerstag, 1. August 2024, 16:13:23 MESZ schrieb Wolfgang Schuster:
> Gerion Entrup schrieb am 01.08.2024 um 14:28:
> > Hi,
> >
> > I want to make a two sided document with margin notes.
> > The notes should not be hyphenated and always aligned to the inner text body.
> > However, I did not get this to work.
> > It hyphenates and the alignment is only correct at even pages.
> >
> > Do you know the correct way?
> >
> > Here is a MWE:
> > ```
> > \setuppagenumbering[location={footer, right}, alternative=doublesided]
> >
> > \definealign[myalign][inner, nothyphenated]
> > \setupmargindata[inmargin][
> > location=outer,
> > style=italic,
> > % nothing of that seems to have any effect
> > % align=myalign,
> > % align=inner,
> > % align=nothyphentated,
> > align={inner, nothyphentated},
> > ]
>
> Use \setupmarginframed for the alignment.
>
> \setupmarginframed
> [inmargin]
> [align={inner,nothyphenated}]
Does the align parameter of \setupmargindata has any function, then?
Also, using setupmarginframed leads to other problems:
- The margin text is bold now(?)
- All margin nodes are on the left of the page now (this should be only the case for even pages)
I tested with (and Hans' patch):
```
\setuppagenumbering[location={footer, right}, alternative=doublesided]
% \definealign[myalign][inner, nothyphenated]
\setupmarginframed[inmargin][
location=outer,
style=italic,
% align=myalign,
% align=inner,
% align=nothyphentated,
align={inner, nothyphentated},
]
\starttext
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\inmargin{significant incredible components}\input knuth
\stoptext
```
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-01 14:20 ` Gerion Entrup
@ 2024-08-01 14:36 ` Wolfgang Schuster
2024-08-01 15:19 ` Gerion Entrup
0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Schuster @ 2024-08-01 14:36 UTC (permalink / raw)
To: Gerion Entrup; +Cc: mailing list for ConTeXt users
Gerion Entrup schrieb am 01.08.2024 um 16:20:
> Am Donnerstag, 1. August 2024, 16:13:23 MESZ schrieb Wolfgang Schuster:
>> Gerion Entrup schrieb am 01.08.2024 um 14:28:
>>> Hi,
>>>
>>> I want to make a two sided document with margin notes.
>>> The notes should not be hyphenated and always aligned to the inner text body.
>>> However, I did not get this to work.
>>> It hyphenates and the alignment is only correct at even pages.
>>>
>>> Do you know the correct way?
>>>
>>> Here is a MWE:
>>> ```
>>> \setuppagenumbering[location={footer, right}, alternative=doublesided]
>>>
>>> \definealign[myalign][inner, nothyphenated]
>>> \setupmargindata[inmargin][
>>> location=outer,
>>> style=italic,
>>> % nothing of that seems to have any effect
>>> % align=myalign,
>>> % align=inner,
>>> % align=nothyphentated,
>>> align={inner, nothyphentated},
>>> ]
>> Use \setupmarginframed for the alignment.
>>
>> \setupmarginframed
>> [inmargin]
>> [align={inner,nothyphenated}]
> Does the align parameter of \setupmargindata has any function, then?
> Also, using setupmarginframed leads to other problems:
> - The margin text is bold now(?)
> - All margin nodes are on the left of the page now (this should be only the case for even pages)
The location of the margin block and the style are still controlled by
\setupmargindata and only the alignment has to be changed with
\setupmarginframed.
\setupmargindata
[inmargin]
[location=outer,
style=italic]
\setupmarginframed
[inmargin]
[align={inner,nothyphenated}]
Wolfgang
___________________________________________________________________________________
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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-01 14:36 ` Wolfgang Schuster
@ 2024-08-01 15:19 ` Gerion Entrup
2024-08-01 15:37 ` Wolfgang Schuster
0 siblings, 1 reply; 17+ messages in thread
From: Gerion Entrup @ 2024-08-01 15:19 UTC (permalink / raw)
To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2235 bytes --]
Am Donnerstag, 1. August 2024, 16:36:06 MESZ schrieb Wolfgang Schuster:
> Gerion Entrup schrieb am 01.08.2024 um 16:20:
> > Am Donnerstag, 1. August 2024, 16:13:23 MESZ schrieb Wolfgang Schuster:
> >> Gerion Entrup schrieb am 01.08.2024 um 14:28:
> >>> Hi,
> >>>
> >>> I want to make a two sided document with margin notes.
> >>> The notes should not be hyphenated and always aligned to the inner text body.
> >>> However, I did not get this to work.
> >>> It hyphenates and the alignment is only correct at even pages.
> >>>
> >>> Do you know the correct way?
> >>>
> >>> Here is a MWE:
> >>> ```
> >>> \setuppagenumbering[location={footer, right}, alternative=doublesided]
> >>>
> >>> \definealign[myalign][inner, nothyphenated]
> >>> \setupmargindata[inmargin][
> >>> location=outer,
> >>> style=italic,
> >>> % nothing of that seems to have any effect
> >>> % align=myalign,
> >>> % align=inner,
> >>> % align=nothyphentated,
> >>> align={inner, nothyphentated},
> >>> ]
> >> Use \setupmarginframed for the alignment.
> >>
> >> \setupmarginframed
> >> [inmargin]
> >> [align={inner,nothyphenated}]
> > Does the align parameter of \setupmargindata has any function, then?
> > Also, using setupmarginframed leads to other problems:
> > - The margin text is bold now(?)
> > - All margin nodes are on the left of the page now (this should be only the case for even pages)
>
> The location of the margin block and the style are still controlled by
> \setupmargindata and only the alignment has to be changed with
> \setupmarginframed.
>
> \setupmargindata
> [inmargin]
> [location=outer,
> style=italic]
>
> \setupmarginframed
> [inmargin]
> [align={inner,nothyphenated}]
Thanks, that works for the alignment. It does not change the hyphenation.
I would have expected this line breaks in the margin note:
significant
incredible
components
Instead, ConTeXt generates:
significant in
credible com
ponents
In general:
Does the "align" argument in setupmargindata has a meaning at all?
Why is the action to setup margin notes splitted in setupmargindata and setupmarginframed? I find it kind of unintuitive.
Gerion
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-01 15:19 ` Gerion Entrup
@ 2024-08-01 15:37 ` Wolfgang Schuster
2024-08-01 23:13 ` Gerion Entrup
0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Schuster @ 2024-08-01 15:37 UTC (permalink / raw)
To: Gerion Entrup; +Cc: mailing list for ConTeXt users
Gerion Entrup schrieb am 01.08.2024 um 17:19:
> Am Donnerstag, 1. August 2024, 16:36:06 MESZ schrieb Wolfgang Schuster:
>> Gerion Entrup schrieb am 01.08.2024 um 16:20:
>>> Am Donnerstag, 1. August 2024, 16:13:23 MESZ schrieb Wolfgang Schuster:
>>>> Gerion Entrup schrieb am 01.08.2024 um 14:28:
>>>>> Hi,
>>>>>
>>>>> I want to make a two sided document with margin notes.
>>>>> The notes should not be hyphenated and always aligned to the inner text body.
>>>>> However, I did not get this to work.
>>>>> It hyphenates and the alignment is only correct at even pages.
>>>>>
>>>>> Do you know the correct way?
>>>>>
>>>>> Here is a MWE:
>>>>> ```
>>>>> \setuppagenumbering[location={footer, right}, alternative=doublesided]
>>>>>
>>>>> \definealign[myalign][inner, nothyphenated]
>>>>> \setupmargindata[inmargin][
>>>>> location=outer,
>>>>> style=italic,
>>>>> % nothing of that seems to have any effect
>>>>> % align=myalign,
>>>>> % align=inner,
>>>>> % align=nothyphentated,
>>>>> align={inner, nothyphentated},
>>>>> ]
>>>> Use \setupmarginframed for the alignment.
>>>>
>>>> \setupmarginframed
>>>> [inmargin]
>>>> [align={inner,nothyphenated}]
>>> Does the align parameter of \setupmargindata has any function, then?
>>> Also, using setupmarginframed leads to other problems:
>>> - The margin text is bold now(?)
>>> - All margin nodes are on the left of the page now (this should be only the case for even pages)
>> The location of the margin block and the style are still controlled by
>> \setupmargindata and only the alignment has to be changed with
>> \setupmarginframed.
>>
>> \setupmargindata
>> [inmargin]
>> [location=outer,
>> style=italic]
>>
>> \setupmarginframed
>> [inmargin]
>> [align={inner,nothyphenated}]
> Thanks, that works for the alignment. It does not change the hyphenation.
> I would have expected this line breaks in the margin note:
>
> significant
> incredible
> components
>
> Instead, ConTeXt generates:
>
> significant in
> credible com
> ponents
>
> In general:
> Does the "align" argument in setupmargindata has a meaning at all?
The align key works and the output is correct but the problem in this
case is a user error.
When you compare mine and your example you should notice a difference in
the spelling of nothyphenated which has an extra "t" in your case.
> Why is the action to setup margin notes splitted in setupmargindata and setupmarginframed? I find it kind of unintuitive.
There are two different mechanism at work here:
1. The placement of the texts is controlled with the margindata
mechanism has style and align options.
2. In addition to the placement mechanism some of the margin texts make
use of \framed for the content. Because not all margin texts should make
use \framed this is optional and controlled with an extra setup-command.
The separate setup mechanism avoid also problems with keys which have a
different meaning for the placement of the margin texts, e.g. location
is an already existing framed-key but it is also used to set the
horizontal position of the block.
Wolfgang
___________________________________________________________________________________
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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-01 15:37 ` Wolfgang Schuster
@ 2024-08-01 23:13 ` Gerion Entrup
2024-08-02 5:42 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 17+ messages in thread
From: Gerion Entrup @ 2024-08-01 23:13 UTC (permalink / raw)
To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 3679 bytes --]
Am Donnerstag, 1. August 2024, 17:37:21 MESZ schrieb Wolfgang Schuster:
> Gerion Entrup schrieb am 01.08.2024 um 17:19:
> > Am Donnerstag, 1. August 2024, 16:36:06 MESZ schrieb Wolfgang Schuster:
> >> Gerion Entrup schrieb am 01.08.2024 um 16:20:
> >>> Am Donnerstag, 1. August 2024, 16:13:23 MESZ schrieb Wolfgang Schuster:
> >>>> Gerion Entrup schrieb am 01.08.2024 um 14:28:
> >>>>> Hi,
> >>>>>
> >>>>> I want to make a two sided document with margin notes.
> >>>>> The notes should not be hyphenated and always aligned to the inner text body.
> >>>>> However, I did not get this to work.
> >>>>> It hyphenates and the alignment is only correct at even pages.
> >>>>>
> >>>>> Do you know the correct way?
> >>>>>
> >>>>> Here is a MWE:
> >>>>> ```
> >>>>> \setuppagenumbering[location={footer, right}, alternative=doublesided]
> >>>>>
> >>>>> \definealign[myalign][inner, nothyphenated]
> >>>>> \setupmargindata[inmargin][
> >>>>> location=outer,
> >>>>> style=italic,
> >>>>> % nothing of that seems to have any effect
> >>>>> % align=myalign,
> >>>>> % align=inner,
> >>>>> % align=nothyphentated,
> >>>>> align={inner, nothyphentated},
> >>>>> ]
> >>>> Use \setupmarginframed for the alignment.
> >>>>
> >>>> \setupmarginframed
> >>>> [inmargin]
> >>>> [align={inner,nothyphenated}]
> >>> Does the align parameter of \setupmargindata has any function, then?
> >>> Also, using setupmarginframed leads to other problems:
> >>> - The margin text is bold now(?)
> >>> - All margin nodes are on the left of the page now (this should be only the case for even pages)
> >> The location of the margin block and the style are still controlled by
> >> \setupmargindata and only the alignment has to be changed with
> >> \setupmarginframed.
> >>
> >> \setupmargindata
> >> [inmargin]
> >> [location=outer,
> >> style=italic]
> >>
> >> \setupmarginframed
> >> [inmargin]
> >> [align={inner,nothyphenated}]
> > Thanks, that works for the alignment. It does not change the hyphenation.
> > I would have expected this line breaks in the margin note:
> >
> > significant
> > incredible
> > components
> >
> > Instead, ConTeXt generates:
> >
> > significant in
> > credible com
> > ponents
> >
> > In general:
> > Does the "align" argument in setupmargindata has a meaning at all?
>
> The align key works and the output is correct but the problem in this
> case is a user error.
>
> When you compare mine and your example you should notice a difference in
> the spelling of nothyphenated which has an extra "t" in your case.
Oh, you are right, I made a typo here (I appreciate your diplomatic words ;)).
> > Why is the action to setup margin notes splitted in setupmargindata and setupmarginframed? I find it kind of unintuitive.
>
> There are two different mechanism at work here:
>
> 1. The placement of the texts is controlled with the margindata
> mechanism has style and align options.
>
> 2. In addition to the placement mechanism some of the margin texts make
> use of \framed for the content. Because not all margin texts should make
> use \framed this is optional and controlled with an extra setup-command.
> The separate setup mechanism avoid also problems with keys which have a
> different meaning for the placement of the margin texts, e.g. location
> is an already existing framed-key but it is also used to set the
> horizontal position of the block.
Ok, I think I understand that in principal. Thanks for the explanation.
Can I somehow know in advance that a margin note makes use of \framed?
Gerion
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-01 23:13 ` Gerion Entrup
@ 2024-08-02 5:42 ` Pablo Rodriguez via ntg-context
2024-08-02 12:10 ` Gerion Entrup
0 siblings, 1 reply; 17+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-08-02 5:42 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
On 8/2/24 01:13, Gerion Entrup wrote:
> Ok, I think I understand that in principal. Thanks for the explanation.
> Can I somehow know in advance that a margin note makes use of \framed?
Hi Gerion,
there is an \ifinframed conditional, such as in:
\starttext
\framed{\ifinframed a\else b\fi}
\ifinframed a\else b\fi
\framed{\doiftextelse{\ifinframed a\fi}
{framed}
{not framed}}
\doiftextelse{\ifinframed a\fi}
{framed}
{not framed} \stoptext
This may help to achieve what you want.
Just in case it helps,
Pablo
___________________________________________________________________________________
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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-02 5:42 ` Pablo Rodriguez via ntg-context
@ 2024-08-02 12:10 ` Gerion Entrup
2024-08-02 14:41 ` Wolfgang Schuster
0 siblings, 1 reply; 17+ messages in thread
From: Gerion Entrup @ 2024-08-02 12:10 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
[-- Attachment #1.1: Type: text/plain, Size: 1303 bytes --]
Am Freitag, 2. August 2024, 07:42:29 MESZ schrieb Pablo Rodriguez via ntg-
context:
> On 8/2/24 01:13, Gerion Entrup wrote:
> > Ok, I think I understand that in principal. Thanks for the explanation.
> > Can I somehow know in advance that a margin note makes use of \framed?
>
> Hi Gerion,
>
> there is an \ifinframed conditional, such as in:
> ...
> This may help to achieve what you want.
>
> Just in case it helps,
Thanks for the answer, but we misunderstood. I'll try to formulate it clearer:
If I get it right, to set margin notes, you need to specify \setupmargindata
in any case.
However, on the one hand, there might be notes that follow the style of the
"style" argument within \setupmargindata.
And on the other hand, there might be notes that internally uses \framed and
follow the "style" argument within a separately specified \setupmarginframed.
My question is, whether I have any chance to get in advance (when writing down
the document styling) which style argument my future (not yet written) margin
notes will follow to know if I need to specify a \setupmarginframed at all.
Is it the style argument of \setupmargindata or \setupmarginframed or is it a
good practice to _always_ specify \setupmarginframed with the same style
argument as given to \setupmargindata?
Gerion
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-02 12:10 ` Gerion Entrup
@ 2024-08-02 14:41 ` Wolfgang Schuster
2024-08-02 16:36 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Schuster @ 2024-08-02 14:41 UTC (permalink / raw)
To: mailing list for ConTeXt users, Gerion Entrup; +Cc: Pablo Rodriguez
Gerion Entrup schrieb am 02.08.2024 um 14:10:
> Am Freitag, 2. August 2024, 07:42:29 MESZ schrieb Pablo Rodriguez via ntg-
> context:
>> On 8/2/24 01:13, Gerion Entrup wrote:
>>> Ok, I think I understand that in principal. Thanks for the explanation.
>>> Can I somehow know in advance that a margin note makes use of \framed?
>> Hi Gerion,
>>
>> there is an \ifinframed conditional, such as in:
>> ...
>> This may help to achieve what you want.
>>
>> Just in case it helps,
> Thanks for the answer, but we misunderstood. I'll try to formulate it clearer:
> If I get it right, to set margin notes, you need to specify \setupmargindata
> in any case.
> However, on the one hand, there might be notes that follow the style of the
> "style" argument within \setupmargindata.
> And on the other hand, there might be notes that internally uses \framed and
> follow the "style" argument within a separately specified \setupmarginframed.
>
> My question is, whether I have any chance to get in advance (when writing down
> the document styling) which style argument my future (not yet written) margin
> notes will follow to know if I need to specify a \setupmarginframed at all.
>
> Is it the style argument of \setupmargindata or \setupmarginframed or is it a
> good practice to _always_ specify \setupmarginframed with the same style
> argument as given to \setupmargindata?
I have no idea what your question is but you should use
\setupmarginframed only when the setup
requires it, e.g. to change the alignment for blocks which use the
framed mechanism.
The example below shows which predefined margin blocks rely only on
margindata where
you can change the alignment with \etupmargindata and also the ones
which require \setupmarginframed.
%%%% begin example
\setuppapersize[A4][A3]
\setuplayout[location=middle]
\starttext
\doloopoverlist{
inleftmargin,
inrightmargin,
inoutermargin,
ininnermargin,
inleftedge,
inrightedge,
inouteredge,
ininneredge,
atleftmargin,
atrightmargin,
}
{
\setupmargindata[\recursestring][align=middle]
\title{\tex{\recursestring}}
\samplefile{lorem}
\margindata[\recursestring]{Text in the margin!}
\samplefile{lorem}
}
\doloopoverlist{
inleft,
inright,
inouter,
ininner,
inmargin,
inother,
}
{
%\setupmargindata[\recursestring][align=middle]
\setupmarginframed[\recursestring][align=middle]
\title{\tex{\recursestring}}
\samplefile{lorem}
\margindata[\recursestring]{Text in the margin!}
\samplefile{lorem}
}
\stoptext
%%%% end example
Wolfgang
___________________________________________________________________________________
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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-02 14:41 ` Wolfgang Schuster
@ 2024-08-02 16:36 ` Pablo Rodriguez via ntg-context
2024-08-03 5:55 ` Wolfgang Schuster
0 siblings, 1 reply; 17+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-08-02 16:36 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
On 8/2/24 16:41, Wolfgang Schuster wrote:
> [...]
> The example below shows which predefined margin blocks rely only on
> margindata where
> you can change the alignment with \etupmargindata and also the ones
> which require \setupmarginframed.
>
> %%%% begin example
> \setuppapersize[A4][A3]
Sorry, Wolfgang, but I must be missing something here.
Unless I add the following, inner doesn’t behave as expected (I think it
is always outer without these lines):
\setuppagenumbering[alternative=doublesided]
\setuphead[title][page=yes]
Is that right or am I missing something?
Many thanks for your help,
Pablo
___________________________________________________________________________________
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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-02 16:36 ` Pablo Rodriguez via ntg-context
@ 2024-08-03 5:55 ` Wolfgang Schuster
2024-08-03 19:06 ` Pablo Rodriguez via ntg-context
0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Schuster @ 2024-08-03 5:55 UTC (permalink / raw)
To: mailing list for ConTeXt users, Pablo Rodriguez via ntg-context
Cc: Pablo Rodriguez
Pablo Rodriguez via ntg-context schrieb am 02.08.2024 um 18:36:
> On 8/2/24 16:41, Wolfgang Schuster wrote:
>> [...]
>> The example below shows which predefined margin blocks rely only on
>> margindata where
>> you can change the alignment with \etupmargindata and also the ones
>> which require \setupmarginframed.
>>
>> %%%% begin example
>> \setuppapersize[A4][A3]
> Sorry, Wolfgang, but I must be missing something here.
>
> Unless I add the following, inner doesn’t behave as expected (I think it
> is always outer without these lines):
>
> \setuppagenumbering[alternative=doublesided]
> \setuphead[title][page=yes]
>
> Is that right or am I missing something?
When you have a singlesided document each page is a right side and it
doesn't matter whether it's an even or odd page.
Wolfgang
___________________________________________________________________________________
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] 17+ messages in thread
* [NTG-context] Re: Alignments of margin notes
2024-08-03 5:55 ` Wolfgang Schuster
@ 2024-08-03 19:06 ` Pablo Rodriguez via ntg-context
0 siblings, 0 replies; 17+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-08-03 19:06 UTC (permalink / raw)
To: ntg-context; +Cc: Pablo Rodriguez
On 8/3/24 07:55, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 02.08.2024 um 18:36:
>> [...]
>> Unless I add the following, inner doesn’t behave as expected (I think it
>> is always outer without these lines):
>>
>> \setuppagenumbering[alternative=doublesided]
>> \setuphead[title][page=yes]
>>
>> Is that right or am I missing something?
>
> When you have a singlesided document each page is a right side and it
> doesn't matter whether it's an even or odd page.
Many thanks for your reply, Wolfgang.
Everything is clear now: (default) singlesided may be even or odd page,
but it will only give right pages.
Many thanks for your help,
Pablo
___________________________________________________________________________________
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] 17+ messages in thread
end of thread, other threads:[~2024-08-03 19:09 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-01 12:28 [NTG-context] Alignments of margin notes Gerion Entrup
2024-08-01 12:50 ` [NTG-context] " Taco Hoekwater
2024-08-01 13:08 ` Henning Hraban Ramm
2024-08-01 13:36 ` Hans Hagen
2024-08-01 14:05 ` Gerion Entrup
2024-08-01 14:13 ` Wolfgang Schuster
2024-08-01 14:20 ` Gerion Entrup
2024-08-01 14:36 ` Wolfgang Schuster
2024-08-01 15:19 ` Gerion Entrup
2024-08-01 15:37 ` Wolfgang Schuster
2024-08-01 23:13 ` Gerion Entrup
2024-08-02 5:42 ` Pablo Rodriguez via ntg-context
2024-08-02 12:10 ` Gerion Entrup
2024-08-02 14:41 ` Wolfgang Schuster
2024-08-02 16:36 ` Pablo Rodriguez via ntg-context
2024-08-03 5:55 ` Wolfgang Schuster
2024-08-03 19:06 ` Pablo Rodriguez 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).