weird \inlinetypebuffer interaction
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
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
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
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
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
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
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
participants (2)
-
Pablo Rodriguez
-
Wolfgang Schuster