ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] weird \inlinetypebuffer interaction
@ 2024-05-06 18:06 Pablo Rodriguez via ntg-context
  2024-05-06 20:45 ` [NTG-context] " Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-05-06 18:06 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Pablo Rodriguez

Dear list,

I have the following sample:

  \definefontfamily[mainface][tt][TeX Gyre Termes]
  \setupbodyfont[mainface]
  \starttext
  \startbuffer
  context --purgeall
  \stopbuffer
  inline \typeinlinebuffer

  block:
  \typebuffer
  \stoptext

As long as there is no defined font family for mono, \typeinlinebuffer
doesn’t convert -- into an en-dash (the same way as \typebuffer behaves).

But as in the sample above, when a font is defined for mono (at least
with \definefontfamily), \typeinlinebuffer converts -- into en-dashes
(different from \typebuffer).

Sorry, but how could I fix this \typeinlinebuffer?

This is important for me, since two hyphens is one of the most common
ways to marks options when invoking programs (which I try to explain to
others).

BTW, \sciteinlinebuffer seems have the same problem (in the scite module).

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] 8+ messages in thread

* [NTG-context] Re: weird \inlinetypebuffer interaction
  2024-05-06 18:06 [NTG-context] weird \inlinetypebuffer interaction Pablo Rodriguez via ntg-context
@ 2024-05-06 20:45 ` Wolfgang Schuster
  2024-05-07 17:40   ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2024-05-06 20:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez via ntg-context
  Cc: Pablo Rodriguez

Pablo Rodriguez via ntg-context schrieb am 06.05.2024 um 20:06:
> Dear list,
> 
> I have the following sample:
> 
>    \definefontfamily[mainface][tt][TeX Gyre Termes]

Apply the none feature when you set the monospace font, i.e.

\definefontfamily[...][tt][...][features=none]

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] 8+ messages in thread

* [NTG-context] Re: weird \inlinetypebuffer interaction
  2024-05-06 20:45 ` [NTG-context] " Wolfgang Schuster
@ 2024-05-07 17:40   ` Pablo Rodriguez via ntg-context
  2024-05-07 20:37     ` Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-05-07 17:40 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 5/6/24 22:45, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 06.05.2024 um 20:06:
>> Dear list,
>>
>> I have the following sample:
>>
>>    \definefontfamily[mainface][tt][TeX Gyre Termes]
>
> Apply the none feature when you set the monospace font, i.e.
>
> \definefontfamily[...][tt][...][features=none]

Many thanks for your reply, Wolfgang.

This solves the issue, but I have two questions.

Why is this only required for \inlinetypebuffer and not for \typebuffer?

Which is the exact font feature that does the hyphen ligatures?

I’m interested in not disabling hz and hanging.

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] 8+ messages in thread

* [NTG-context] Re: weird \inlinetypebuffer interaction
  2024-05-07 17:40   ` Pablo Rodriguez via ntg-context
@ 2024-05-07 20:37     ` Wolfgang Schuster
  2024-05-08 16:05       ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2024-05-07 20:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez via ntg-context
  Cc: Pablo Rodriguez

Pablo Rodriguez via ntg-context schrieb am 07.05.2024 um 19:40:
> On 5/6/24 22:45, Wolfgang Schuster wrote:
>> Pablo Rodriguez via ntg-context schrieb am 06.05.2024 um 20:06:
>>> Dear list,
>>>
>>> I have the following sample:
>>>
>>>     \definefontfamily[mainface][tt][TeX Gyre Termes]
>> Apply the none feature when you set the monospace font, i.e.
>>
>> \definefontfamily[...][tt][...][features=none]
> Many thanks for your reply, Wolfgang.
>
> This solves the issue, but I have two questions.
>
> Why is this only required for \inlinetypebuffer and not for \typebuffer?
>
> Which is the exact font feature that does the hyphen ligatures?
>
> I’m interested in not disabling hz and hanging.

\typebuffer disables automatic \endash and \emdash with the 
\nohyphencollapsing command
but the command isn't used for \typeinlinebuffer.

\starttext

\type{--} = --

\nohyphencollapsing

\type{--} = --

\dohyphencollapsing

\type{--} = --

\stoptext

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] 8+ messages in thread

* [NTG-context] Re: weird \inlinetypebuffer interaction
  2024-05-07 20:37     ` Wolfgang Schuster
@ 2024-05-08 16:05       ` Pablo Rodriguez via ntg-context
  2024-05-09 10:57         ` Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-05-08 16:05 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 5/7/24 22:37, Wolfgang Schuster wrote:
> [...]
> \typebuffer disables automatic \endash and \emdash with the
> \nohyphencollapsing command
> but the command isn't used for \typeinlinebuffer.
Many thanks for your explanation, Wolfgang.

Since \type doesn’t collapse hyphens, wouldn’t it be possible to add
\nohyphencollapsing to \typeinlinebuffer just for the sake of output
consistency?

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] 8+ messages in thread

* [NTG-context] Re: weird \inlinetypebuffer interaction
  2024-05-08 16:05       ` Pablo Rodriguez via ntg-context
@ 2024-05-09 10:57         ` Wolfgang Schuster
  2024-05-09 13:18           ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2024-05-09 10:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez via ntg-context
  Cc: Pablo Rodriguez

Pablo Rodriguez via ntg-context schrieb am 08.05.2024 um 18:05:
> On 5/7/24 22:37, Wolfgang Schuster wrote:
>> [...]
>> \typebuffer disables automatic \endash and \emdash with the
>> \nohyphencollapsing command
>> but the command isn't used for \typeinlinebuffer.
> Many thanks for your explanation, Wolfgang.
> 
> Since \type doesn’t collapse hyphens, wouldn’t it be possible to add
> \nohyphencollapsing to \typeinlinebuffer just for the sake of output
> consistency?

You can make \typeinlinebuffer behave like \type by adding a second 
initializer which besides other things prevents hyphen collapsing.


buff-ver.mkxl:

\protected\def\buff_verbatim_type_buffer_indeed_inline#1#2%
   {\cdef\currenttype{#1}%
    \buff_verbatim_initialize_type_one
+  \buff_verbatim_initialize_type_two
    \dostarttaggedchained\t!verbatim\currenttype\??type
    \clf_typebuffer
      name   {#2}%
      strip  {\v!yes}%
      regime {\currentregime}%
      method {\p_buff_option}%
      nature {inline}% is default anyway
    \relax
    \dostoptagged}

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] 8+ messages in thread

* [NTG-context] Re: weird \inlinetypebuffer interaction
  2024-05-09 10:57         ` Wolfgang Schuster
@ 2024-05-09 13:18           ` Pablo Rodriguez via ntg-context
  2024-05-14 14:07             ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-05-09 13:18 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 5/9/24 12:57, Wolfgang Schuster wrote:
> Pablo Rodriguez via ntg-context schrieb am 08.05.2024 um 18:05:
>> [...]
>> Since \type doesn’t collapse hyphens, wouldn’t it be possible to add
>> \nohyphencollapsing to \typeinlinebuffer just for the sake of output
>> consistency?
>
> You can make \typeinlinebuffer behave like \type by adding a second
> initializer which besides other things prevents hyphen collapsing.
>
> buff-ver.mkxl:
>
> \protected\def\buff_verbatim_type_buffer_indeed_inline#1#2%
>    {\cdef\currenttype{#1}%
>     \buff_verbatim_initialize_type_one
> +  \buff_verbatim_initialize_type_two

Many thanks for your improvement, Wolfgang.

It would be great to have it included in standard ConTeXt.

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] 8+ messages in thread

* [NTG-context] Re: weird \inlinetypebuffer interaction
  2024-05-09 13:18           ` Pablo Rodriguez via ntg-context
@ 2024-05-14 14:07             ` Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; 8+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-05-14 14:07 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 5/9/24 15:18, Pablo Rodriguez via ntg-context wrote:
> [...]
> Many thanks for your improvement, Wolfgang.
>
> It would be great to have it included in standard ConTeXt.

Hans,

many thanks for having added this to current latest (2024.05.13 19:19).

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] 8+ messages in thread

end of thread, other threads:[~2024-05-14 14:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-06 18:06 [NTG-context] weird \inlinetypebuffer interaction Pablo Rodriguez via ntg-context
2024-05-06 20:45 ` [NTG-context] " Wolfgang Schuster
2024-05-07 17:40   ` Pablo Rodriguez via ntg-context
2024-05-07 20:37     ` Wolfgang Schuster
2024-05-08 16:05       ` Pablo Rodriguez via ntg-context
2024-05-09 10:57         ` Wolfgang Schuster
2024-05-09 13:18           ` Pablo Rodriguez via ntg-context
2024-05-14 14:07             ` 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).