[NTG-context] Re: empty line before typebuffer

2023-07-30 Thread Henning Hraban Ramm

Am 30.07.23 um 21:22 schrieb Wolfgang Schuster:

Henning Hraban Ramm schrieb am 30.07.2023 um 21:14:

Yet another issue:

\typebuffer always starts with a blank line.
Is this a bug, or how can I disable it?

Hraban

MWE:
"""
\starttext

\startbuffer
\samplefile{tufte}
\stopbuffer

\framedtext{\typebuffer[option=tex]}

\stoptext
"""


\framedtext[strut=no]{\typebuffer[option=tex]}

or

\startframedtext
\typebuffer[option=tex]
\stopframedtext


Thank you (also Jacob)!
Seems like I didn’t look in the right place.

Hraban


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

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

[NTG-context] Re: empty line before typebuffer

2023-07-30 Thread Jacob Kauffmann via ntg-context
It comes from framedtext:

\starttext

\startbuffer
\samplefile{tufte}
\stopbuffer

\framedtext[strut=no]{\typebuffer[option=tex]}

\stoptext

Best,
Jacob

> Am 30.07.2023 um 21:14 schrieb Henning Hraban Ramm :
> 
> Yet another issue:
> 
> \typebuffer always starts with a blank line.
> Is this a bug, or how can I disable it?
> 
> Hraban
> 
> MWE:
> """
> \starttext
> 
> \startbuffer
> \samplefile{tufte}
> \stopbuffer
> 
> \framedtext{\typebuffer[option=tex]}
> 
> \stoptext
> """
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___



signature.asc
Description: Message signed with OpenPGP
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Re: empty line before typebuffer

2023-07-30 Thread Wolfgang Schuster

Henning Hraban Ramm schrieb am 30.07.2023 um 21:14:

Yet another issue:

\typebuffer always starts with a blank line.
Is this a bug, or how can I disable it?

Hraban

MWE:
"""
\starttext

\startbuffer
\samplefile{tufte}
\stopbuffer

\framedtext{\typebuffer[option=tex]}

\stoptext
"""


\framedtext[strut=no]{\typebuffer[option=tex]}

or

\startframedtext
\typebuffer[option=tex]
\stopframedtext

Wolfgang

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

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


[NTG-context] empty line before typebuffer

2023-07-30 Thread Henning Hraban Ramm

Yet another issue:

\typebuffer always starts with a blank line.
Is this a bug, or how can I disable it?

Hraban

MWE:
"""
\starttext

\startbuffer
\samplefile{tufte}
\stopbuffer

\framedtext{\typebuffer[option=tex]}

\stoptext
"""
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Reinserting a section title followed by (continued) after a page break

2023-07-30 Thread Calvin Ross
I'm trying to use ConTeXt for playwriting, and I think it would be best to use
sections for dialog. However, if a dialog's text is interrupted by a page
break, it is customary to restate the character name followed by (continued) on
the following page:

--- open ---

John
My name is John, and I seek help with my

--- page break ---

John (cont'd)
typesetting needs...

--- end ---

Maybe what I need is instead a mark? Here's a catch though, I will also need
this to work for simultaneous dialog as well. This kind of dialog is
represented by having dialog sections in columns:

--- open ---

Alice  Bob
John, you fool.John, you imbecile.

--- page break ---

Alice (cont'd)
Don't you know that
everyone uses Word
to typeset their plays?

--- end ---

How can I do this kind of thing in ConTeXt? At the moment, I've been looking
into adding a hook to shipout to prepend a section header with the last custom
mark I've set. Even still, I don't know if this would work, or how to go about
achieving this. If columns would be too difficult to implement, I'd be fine
with living without (continued) support in them since they are pretty rare.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Re: caption for moved sidefloat in the margin

2023-07-30 Thread Henning Hraban Ramm

Am 30.07.23 um 14:46 schrieb Hans Hagen:

On 7/30/2023 2:37 PM, Henning Hraban Ramm wrote:

Hi again,

I’m reading through the details manual and set up some figures as 
sidefloats that are offset to the margin. This works well.


Now I’d like to have their captions in the margin, below the figure.
If I set location=innermargin, then the caption is beside the image, 
i.e. somewhere at the edge. If I don’t, I can’t get it to move to the 
left edge of the image.


How can I do that?

see mikaels bachotex presentation


Well, sorry, but it doesn’t cover my case.

It shows:
* \textwidth floats with caption in the margin
* margin floats with caption below
* \textwidth + margin with caption above or below

but not: side float e.g. 2/3 \textwidth, moved into the margin, text 
flowing around, caption in the margin below the image.


It seems like sidefloat and the desired caption placement exclude each 
other.


Must I resolve to layer trickery?

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

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

[NTG-context] Re: caption for moved sidefloat in the margin

2023-07-30 Thread Henning Hraban Ramm

Am 30.07.23 um 14:46 schrieb Hans Hagen:

On 7/30/2023 2:37 PM, Henning Hraban Ramm wrote:

Hi again,

I’m reading through the details manual and set up some figures as 
sidefloats that are offset to the margin. This works well.


Now I’d like to have their captions in the margin, below the figure.
If I set location=innermargin, then the caption is beside the image, 
i.e. somewhere at the edge. If I don’t, I can’t get it to move to the 
left edge of the image.


How can I do that?

see mikaels bachotex presentation


https://www.gust.org.pl/bachotex/2023-pl/presentations/msundqvist-1-2023.pdf

Thank you, that’s great! I’m learning a lot (should leave the book 
writing to Mikael, I guess).

Didn’t progress to the float placement yet…

Hraban

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

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

[NTG-context] Re: Par Builder Tests

2023-07-30 Thread Keith McKay
Hraban's suggestion works really well. I setup hyphenation rules for the 
underfull boxes of Russian names and reduced the \tolerance to 600.  I'm 
now down to about 20 underfull boxes which to my eyes look fine.


Thanks again Hraban

Best Wishes

Keith

On 28/07/2023 19:20, Keith McKay wrote:


Thanks Hraban, didn't think of that so will give it a try.
Best Wishes
Keith


On Fri, 28 Jul 2023, 17:28 Henning Hraban Ramm,  wrote:

Am 28.07.23 um 17:04 schrieb Keith McKay:
> I played around with the setups for the align:pass:test4 code
below, as
> Hans suggested, and it was changing the \tolerance value which
made the
> difference. Increasing the \tolerance value to 1000 eliminated all
> overfull hboxes but still left 79 underfull hboxes. I continued to
> increase the \tolerance value up to 6600 and was left with two
overfull
> hboxes. One with a badness of 6641 (warAndPeace1.png) and one
with a
> badness of 1097 (warAndPeace2.png). Above the \tolerance of 6600
only
> warAndPeace2.png was left with a badness of 1097. Both of these
> underfull hboxes were at the beginning of a paragraph - "To his
Honor"
> in the first png and "Well, you see," in the second png. I not
sure a
> reader would spot the second png badness but the first is
noticeable to
> my eyes.

Hi Keith,
since both cases are caused by names with accents, did you try to add
hyphenation exceptions for those? Such cases are probably not
covered by
English hyphentation rules.

Hraban


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

maillist : ntg-context@ntg.nl /
https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Re: caption for moved sidefloat in the margin

2023-07-30 Thread Hans Hagen

On 7/30/2023 2:37 PM, Henning Hraban Ramm wrote:

Hi again,

I’m reading through the details manual and set up some figures as 
sidefloats that are offset to the margin. This works well.


Now I’d like to have their captions in the margin, below the figure.
If I set location=innermargin, then the caption is beside the image, 
i.e. somewhere at the edge. If I don’t, I can’t get it to move to the 
left edge of the image.


How can I do that?

see mikaels bachotex presentation


-
  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://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] caption for moved sidefloat in the margin

2023-07-30 Thread Henning Hraban Ramm

Hi again,

I’m reading through the details manual and set up some figures as 
sidefloats that are offset to the margin. This works well.


Now I’d like to have their captions in the margin, below the figure.
If I set location=innermargin, then the caption is beside the image, 
i.e. somewhere at the edge. If I don’t, I can’t get it to move to the 
left edge of the image.


How can I do that?

Hraban


"""
\useMPlibrary[dum]

\setuplayout[
  backspace=5cm,
  width=12cm,
]

\definefloat[marginfigure]
\setupfloat[marginfigure][
  leftmargindistance=-\leftmargintotal,
  rightmargindistance=-\rightmargintotal,
  default={inner,none,low,high},
]
\setupcaption[marginfigure][
  style={\ss\tfx},
  align={flushleft},
  width=\leftmarginwidth,
  %location={innermargin,low},
]

\starttext
\showframe

\startplacemarginfigure[
  location={inner,3*hang},
  title={My caption should be flushleft and aligned with the image.},
]
\externalfigure[dummy][width=.66\textwidth]
\stopplacemarginfigure
\samplefile{lorem}

\stoptext
"""
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Re: combining \definetyping and \definebuffer

2023-07-30 Thread Henning Hraban Ramm

Am 29.07.23 um 23:16 schrieb Hans Hagen:

On 7/29/2023 10:35 PM, Henning Hraban Ramm wrote:


The setup for MyCode is not applied to \typeMyBuffer, and I don’t know 
how it could; something like \typeMyBuffer[MyCode] doesn’t work.


These commands inherit from buffer, so \setupbuffer will work. But as I 
need to prevent you to come up with some ugly hack (after all your 
upcoming book should be hack free) ...


;-D

I’m not sure my book will even go so deep, it’s already too big and will 
never contain everything I’d like it to.
For the code examples therein I used some hacks (getting rid of them one 
by one), but I’m working on a module (more like a LaTeX-style document 
class) for DANTE’s DTK, to be able to write my articles about ConTeXt in 
ConTeXt and have them included as PDFs. For other authors, I’d like the 
syntax to be as simple as possible (using generic ConTeXt macros), so I 
use \setuptyping for the general style with a background box. But that 
conflicts with the setups for special cases like code and result side by 
side.

I guess I’ll also include this in the CGJ setup.

... attached an extension that supports inheritance (via category), 
still honors 'buffer' otherwise and accepts an optional category instead 
of settings. take your choice ...


You can put the patch in cont-new.mkxl assuming you wikify it too.


Thank you! Will do. I guess it’ll be in the next upload, too?

Hraban

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

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