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: signature.asc
Description: This is a digitally signed message part.

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to