[NTG-context] \setuplanguage[explicitrighthyphenchar=-1] only works for English

2022-12-15 Thread Pablo Rodriguez via ntg-context
Hans,

sorry for insisting again, but I’m still experiencing this issue in
latest current (from less than an hour ago):

  \startluacode
  function document.addfunnyhyphen(tfmdata)
  local underscore = utf.byte("_")
  local char   = tfmdata.characters[underscore]
  if not char then return end
  tfmdata.characters[0xFE000]   = {
  width= 0,
  height   = 0,
  depth= 0,
  commands = {
  { "right", -char.width },
  { "down", char.depth },
  { "slot", 1, underscore },
  }
  }
  end

  utilities.sequencers.appendaction("aftercopyingcharacters",
  "after","document.addfunnyhyphen")
  \stopluacode

  \definehyphenationfeatures
 [underscore]
 [righthyphenchar="FE000]

  \setuphyphenation[method=traditional]%
  \sethyphenationfeatures[underscore]%
  \setuplanguage
[explicitrighthyphenchar=-1]
  \setupinteractionscreen[option=singlesided]
  \starttext
  \doloopoverlist
{es,en,uk,de,nl,pt,fr,it,deo,da,sv,af,no,nb,pl,cs,sk,hr,sl,fi,et,hu}
  {\mainlanguage[\recursestring]
  \startTEXpage[offset=1em, width=5em]
\hsize\zeropoint
\recursestring: \\
\tt
\hyphenatedword{legibility-legible}
  \stopTEXpage}
  \stoptext

pt, hr and et don’t break the line at the hyphen. af breaks the line at
the hyphen adding an underscore just below the hyphen.

Either I’m missing something extremely basic, or
"\setuplanguage[explicitrighthyphenchar=-1]" only works for English.

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://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] indentnext option for \setuplanguage?

2020-07-23 Thread Pablo Rodriguez
Hans,

as Garulfo mentioned in a previous message (https://mailman.ntg.nl’t
/pipermail/ntg-context/2020/098826.html), French may require that all
paragraphs are indented (no matter what comes before the paragraph).
Spanish also requires that.

How about a key for "indentnext" in \setuplanguage? That makes it easier
to have documents that require all "indentnext" keys set to "yes".

I don’t mean changing the default behaviour for any language.

Could the "indentext" option be added to \setuplanguage?

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] font in \setuplanguage

2018-09-19 Thread Pablo Rodriguez
On 9/18/18 5:50 AM, Wolfgang Schuster wrote:
> With the font key you can apply certain font features for a different 
> language but you can’t use it to switch to a different font.
> 
> To switch to a different font for your greek texts use this method:

Many thanks for your reply, Wolfgang.

I wonder whether it would make sense to enable a style option in
\setuplanguage.

Having to use setups is maybe too difficult for newcomers and style is a
common option in other commands.

I agree that font is handy when using different languages using the
Latin script. But style would make sense when dealing with different
scripts.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] font in \setuplanguage

2018-09-17 Thread Wolfgang Schuster
With the font key you can apply certain font features for a different 
language

but you can’t use it to switch to a different font.

To switch to a different font for your greek texts use this method:

\startsetups [greekfont]
  \switchtobodyfont [grcface]
\stopsetups

\setuplanguage[agr][setups=greekfont]

Wolfgang


Pablo Rodriguez schrieb am 17.09.18 um 21:30:

Dear list,

I have the following sample:

 \mainlanguage[es]
 \setuplanguage[agr][font=\grcface]
 \definefontfamily[grcface][rm][DejaVu Sans]
 \definefontfamily[mainface][rm][DejaVu Serif]
 \setupbodyfont[mainface]
 \starttext
 \startTEXpage[offset=1em]
 a {\agr β}
 \stopTEXpage
 \stoptext

I cannot get the Greek fragment using another font.

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

[NTG-context] font in \setuplanguage

2018-09-17 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\mainlanguage[es]
\setuplanguage[agr][font=\grcface]
\definefontfamily[grcface][rm][DejaVu Sans]
\definefontfamily[mainface][rm][DejaVu Serif]
\setupbodyfont[mainface]
\starttext
\startTEXpage[offset=1em]
a {\agr β}
\stopTEXpage
\stoptext

I cannot get the Greek fragment using another font.

Is this a bug or am I missing something?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Bug with setuplanguage

2016-06-05 Thread Aditya Mahajan

On Sun, 5 Jun 2016, Wolfgang Schuster wrote:


Aditya Mahajan <mailto:adit...@umich.edu>
5. Juni 2016 um 00:32
Hi,

I discovered this bug while answering a question on TeX.SX. Consider:

\define\cyrdash{\dontleavehmode\scale[sx=0.80]{---}}
\unprotect
\setuplanguage
  [\s!ru]
  [
\c!midsentence=\cyrdash,
\c!leftsentence=\cyrdash,
\c!rightsentence=\cyrdash,
  ]
\protect


\setupbodyfont[dejavu]

\starttext
Normal text|<|English

\mainlanguage[ru]
Normal text|<|Russian
\stoptext

The pdf shows:

Normal text—English
Normal text„Russian

Why the quote instead of the emdash. The output is okay is if \mainlanguage 
is set before |<| is used for the first time.
When subsentences are nested the inner group uses the leftsubsentence and 
rightsubsentence symbols.


\mainlanguage[ru]

\starttext
outer|<|inner|<|nested|>|inner|>|outer
\stoptext


Ah, thanks!

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Bug with setuplanguage

2016-06-05 Thread Wolfgang Schuster

Aditya Mahajan <mailto:adit...@umich.edu>
5. Juni 2016 um 00:32
Hi,

I discovered this bug while answering a question on TeX.SX. Consider:

\define\cyrdash{\dontleavehmode\scale[sx=0.80]{---}}
\unprotect
\setuplanguage
  [\s!ru]
  [
\c!midsentence=\cyrdash,
\c!leftsentence=\cyrdash,
\c!rightsentence=\cyrdash,
  ]
\protect


\setupbodyfont[dejavu]

\starttext
Normal text|<|English

\mainlanguage[ru]
Normal text|<|Russian
\stoptext

The pdf shows:

Normal text—English
Normal text„Russian

Why the quote instead of the emdash. The output is okay is if 
\mainlanguage is set before |<| is used for the first time.
When subsentences are nested the inner group uses the leftsubsentence 
and rightsubsentence symbols.


\mainlanguage[ru]

\starttext
outer|<|inner|<|nested|>|inner|>|outer
\stoptext

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Bug with setuplanguage

2016-06-04 Thread Aditya Mahajan

Hi,

I discovered this bug while answering a question on TeX.SX. Consider:

\define\cyrdash{\dontleavehmode\scale[sx=0.80]{---}}
\unprotect
\setuplanguage
  [\s!ru]
  [
\c!midsentence=\cyrdash,
\c!leftsentence=\cyrdash,
\c!rightsentence=\cyrdash,
  ]
\protect


\setupbodyfont[dejavu]

\starttext
Normal text|<|English

\mainlanguage[ru]
Normal text|<|Russian
\stoptext

The pdf shows:

Normal text—English
Normal text„Russian

Why the quote instead of the emdash. The output is okay is if 
\mainlanguage is set before |<| is used for the first time.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___