Re: [NTG-context] Beamer --> ConTeXt (sample)

2020-10-09 Thread Aditya Mahajan
> recently I ha dto quickly put together few presentations for online meetings
> and not knowing better (aka quicker) way, I took/installed LyX on my Fedora
> machine. The process is not so smooth and end result is OK if we forgive
> ourselves that all Beamer presentations are looking almost the same.

Agreed. I find that all beamer presentations look the same and it can be 
difficult to change the look and feel of beamer presentations.

> However, I'm not into diving deep into Beamer package studying/learning it
> more thoroughly  anticipating that soon I'd have to do the same thing with
> some other package. :-)
> 
> Otoh, ConTeXt is a different league and learning it will pay for itself in the
> long run.
> 
> However, in order to be at least somewhat productive, I need some help so I
> can have some starter and not postponing learning ConTeXt ad infinitum, so I'm
> attaching small Beamer sample and wonder if someone can help by providing
> somewhat similar thing for ConText? (no need for all the graphic - I'm more
> concerned with proper overlays and having content in more than single column).

A presentation is just a regular document with small margins and some color :-)
Here is an old blog post on how to get to a decent presentation layout 
step-by-step. 

https://adityam.github.io/context-blog/post/presentation-40-commits-redux/

I also extensively use layers for absolute placement of content, which is more 
powerful than the simple two columns which beamer provides. 

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \doifelse not working, \doiftextelse breaking

2020-10-09 Thread Pablo Rodriguez
On 10/9/20 5:10 PM, Wolfgang Schuster wrote:
> Pablo Rodriguez schrieb am 09.10.2020 um 16:31:
>> [...]
>> Which are the improvements to the command added by \do*argument?
>
> You can add a space between both arguments. You version expects this
>
>      \startswith [...][...]
>
> while the extended code allows this
>
>      \startswith [...] [...]

Many thanks for your explanation, Wolfgang.

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
___


[NTG-context] Hyphenation again

2020-10-09 Thread Denis Maier

Hi,
another weird thing:
In this example I use  \startexceptions to set hyphenation exceptions:

```
\mainlanguage[en]

\startexceptions[en]

appli-ca​ble

obli-gated

\stopexceptions


\setuplayout[width=1cm]


\starttext

\currentmainlanguage


\currentlanguage


\hyphenatedword{applicable}


applicable


\hyphenatedword{obligated}


obligated

\stoptext

```


What am I missing?


Best,

Denis



___
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] Beamer --> ConTeXt (sample)

2020-10-09 Thread Henning Hraban Ramm

> Am 09.10.2020 um 19:01 schrieb Saša Janiška :

> I'm attaching small Beamer sample and wonder if someone can help by providing 
> somewhat similar thing for ConText?

If you need columns, look into columnsets: 
https://wiki.contextgarden.net/Columns#Column_Sets

Read https://wiki.contextgarden.net/Layers and play around with layers.
(But your example doesn’t need layers at all.)

Here’s an example of the drop shadow:
https://wiki.contextgarden.net/Drop_shadows

Also, there’s a number of presentation styles in the distribution.
The wiki page https://wiki.contextgarden.net/Presentation_Styles is outdated 
but might give you some hints.
Feel free to update it.

Hraban
___
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] Beamer --> ConTeXt (sample)

2020-10-09 Thread Saša Janiška

Hello,

recently I ha dto quickly put together few presentations for online 
meetings and not knowing better (aka quicker) way, I took/installed LyX 
on my Fedora machine. The process is not so smooth and end result is OK 
if we forgive ourselves that all Beamer presentations are looking almost 
the same.


However, I'm not into diving deep into Beamer package studying/learning 
it more thoroughly  anticipating that soon I'd have to do the same thing 
with some other package. :-)


Otoh, ConTeXt is a different league and learning it will pay for itself 
in the long run.


However, in order to be at least somewhat productive, I need some help 
so I can have some starter and not postponing learning ConTeXt ad 
infinitum, so I'm attaching small Beamer sample and wonder if someone 
can help by providing somewhat similar thing for ConText? (no need for 
all the graphic - I'm more concerned with proper overlays and having 
content in more than single column).



Sincerely,
Gour


--
A self-realized man has no purpose to fulfill in the discharge
of his prescribed duties, nor has he any reason not to perform
such work. Nor has he any need to depend on any other living being.


beamer.pdf
Description: Adobe PDF document
___
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] Hyphenation patterns

2020-10-09 Thread Denis Maier

Am 09.10.2020 um 14:48 schrieb Hans Hagen:

On 10/9/2020 9:01 AM, Denis Maier wrote:

[...]
I see. I've noticed lang-us.lua has a list of exceptions in it:
  ["exceptions"]={
   ["characters"]="abcdefghijlmnoprstuyz",
   ["data"]="as-so-ciate as-so-ciates dec-li-na-tion oblig-a-tory 
phil-an-thropic present presents project projects reci-procity 
re-cog-ni-zance ref-or-ma-tion ret-ri-bu-tion ta-ble",

   ["length"]=168,
   ["n"]=14,
  },

Would it be possible to add more exceptions to that list as they come 
up? Or is that inappropriate?

you can add your own runtime in a style:

\hyphenation {fo-ob-ar} \hsize 1mm foobar


Sure. I use \startexceptions[en] for that. I just thought everyone might 
benefit...


Denis
___
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] Disappearing characters with nolig-german-wordlist

2020-10-09 Thread Denis Maier

Arg, it's getting uglier...

I've been playing around with the replacement patterns.

```
\replaceword[replace][auff][au{ff}]

\replaceword[replace][Aufl][Au{fl}]

\replaceword[replace][aufl][au{fl}]


\setreplacements[replace]


\starttext

auffasste


auffasse


Auflage


aufliegen


auffliegen

\stoptext

```


Now it's fine for the auffasste case, but both "aufliegen" and 
"auffliegen" result in "aufliegen",  i.e. the second f is being swallowed.



Best,

Denis



Am 09.10.2020 um 12:05 schrieb Denis Maier:

Next try,

the compact syntax gives the same weird result:

```
\replaceword[replace][au{ff}asse au{ff}asst]


\setreplacements[replace]


\starttext

auffasste


auffasse

\stoptext

```


I would really like to have correct ligatures. What can I do to help 
finding the reason for this? (Or is it obvious, and I'm just not 
seeing it?



Best,

Denis



Am 08.10.2020 um 15:15 schrieb Denis Maier:

Ok,
I've commented the whole nolig-german-wordlist out piece by piece, 
and it looks like it comes down to this:


```
\replaceword[eka][auffasse][au{ff}asse]
\replaceword[eka][auffasst][au{ff}asst]

\setreplacements[eka]

\starttext
auffasste
auffasse
\stoptext
```

Uncommenting one of the \replacewords makes the wrong replacement 
disappear.
But I don't see why "auffasste" should trigger an replacement. What 
is happening here?


Best,
Denis
___ 

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
___ 




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


___
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] Disappearing characters with nolig-german-wordlist

2020-10-09 Thread Hans Hagen

On 10/8/2020 3:15 PM, Denis Maier wrote:

Ok,
I've commented the whole nolig-german-wordlist out piece by piece, and 
it looks like it comes down to this:


```
\replaceword[eka][auffasse][au{ff}asse]
\replaceword[eka][auffasst][au{ff}asst]

\setreplacements[eka]

\starttext
auffasste
auffasse
\stoptext
```

Uncommenting one of the \replacewords makes the wrong replacement 
disappear.
But I don't see why "auffasste" should trigger an replacement. What is 
happening here?


i will look into it ... so patience is needed

-
  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 / 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] \doifelse not working, \doiftextelse breaking

2020-10-09 Thread Wolfgang Schuster

Pablo Rodriguez schrieb am 09.10.2020 um 16:31:

To improve your command and allow a space between both arguments you can use

\unexpanded\def\startswith
{\dodoubleargument\dostartswith}

\def\dostartswith[#1][#2]%
{...}

Now I see with \dosingleargument, \dodoubleargument and
\dotripleargument are there.

Which are the improvements to the command added by \do*argument?


You can add a space between both arguments. You version expects this

    \startswith [...][...]

while the extended code allows this

    \startswith [...] [...]

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Hyphenation again

2020-10-09 Thread Denis Maier

Am 09.10.2020 um 16:49 schrieb Rik Kabel:

Denis

You have a hex 200b after ca below.

On 10/9/2020 10:38, Denis Maier wrote:

appli-ca​ble


Thanks, that was it.
You shall never copy from a website ... You shall never copy from a 
website... etc.


___
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] \doifelse not working, \doiftextelse breaking

2020-10-09 Thread Pablo Rodriguez
On 10/9/20 4:08 PM, Wolfgang Schuster wrote:
> [..]
> You need a % at the end of the definition, otherwise TeX expects a space
> after the second argument to end the command.
>
> \unexpanded\def\startswith[#1][#2]%
>{...}

Many thanks for your ultra-fast reply, Wolfgang.

Now I see muy mistake. In my previous command definitions with two
arguments, the opening brace was right after the second argument.

> To improve your command and allow a space between both arguments you can use
>
> \unexpanded\def\startswith
>{\dodoubleargument\dostartswith}
>
> \def\dostartswith[#1][#2]%
>{...}

Now I see with \dosingleargument, \dodoubleargument and
\dotripleargument are there.

Which are the improvements to the command added by \do*argument?

> or just add a dummy parameter and use #1 and #3 to pass the arguments
>
> \unexpanded\def\startswith[#1]#2[#3]%
>{...}

This is shorter, but it looks to creepy (even for my code).

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] \doifelse not working, \doiftextelse breaking

2020-10-09 Thread Wolfgang Schuster



Pablo Rodriguez schrieb am 09.10.2020 um 15:58:

Dear list,

I have the following sample:

 \starttext
 \startluacode
 function document.starts_with(str, start)
   if str:sub(1, #start) == start then
 context(start)
   end
 end
 \stopluacode

 \unexpanded\def\startswith[#1][#2]
 {\cldcontext{document.starts_with("#1", "#2")}}



You need a % at the end of the definition, otherwise TeX expects a space 
after the second argument to end the command.


\unexpanded\def\startswith[#1][#2]%
  {...}


To improve your command and allow a space between both arguments you can use

\unexpanded\def\startswith
  {\dodoubleargument\dostartswith}

\def\dostartswith[#1][#2]%
  {...}

or just add a dummy parameter and use #1 and #3 to pass the arguments

\unexpanded\def\startswith[#1]#2[#3]%
  {...}


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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Disappearing characters with nolig-german-wordlist

2020-10-09 Thread Denis Maier

Next try,

the compact syntax gives the same weird result:

```
\replaceword[replace][au{ff}asse au{ff}asst]


\setreplacements[replace]


\starttext

auffasste


auffasse

\stoptext

```


I would really like to have correct ligatures. What can I do to help 
finding the reason for this? (Or is it obvious, and I'm just not seeing it?



Best,

Denis



Am 08.10.2020 um 15:15 schrieb Denis Maier:

Ok,
I've commented the whole nolig-german-wordlist out piece by piece, and 
it looks like it comes down to this:


```
\replaceword[eka][auffasse][au{ff}asse]
\replaceword[eka][auffasst][au{ff}asst]

\setreplacements[eka]

\starttext
auffasste
auffasse
\stoptext
```

Uncommenting one of the \replacewords makes the wrong replacement 
disappear.
But I don't see why "auffasste" should trigger an replacement. What is 
happening here?


Best,
Denis
___ 

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
___ 



___
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] \doifelse not working, \doiftextelse breaking

2020-10-09 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\starttext
\startluacode
function document.starts_with(str, start)
  if str:sub(1, #start) == start then
context(start)
  end
end
\stopluacode

\unexpanded\def\startswith[#1][#2]
{\cldcontext{document.starts_with("#1", "#2")}}

\startswith[getjobid764572121][getjobid]

yes:
\doifelse{\startswith[getjobid764572121][getjobid]}{getjobid}
{yes}{no}

no:
\doifelse{\startswith[getjobid764572121][getjobid]}{}
{yes}{no}

%% \doiftextelse{\startswith[getjobid764572121][getjobid]}
% {yes}{no}
\stoptext

I don’t know why comparing doesn’t work with \doifelse.

I’m surprised that \doiftextelse breaks when \startswidth if inside.

How could i make \startswith work inside \doiftext?

Or how could I catch positives when command contents start with a given
string?

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] Hyphenation patterns

2020-10-09 Thread Hans Hagen

On 10/9/2020 9:01 AM, Denis Maier wrote:

Am 09.10.2020 um 08:57 schrieb Taco Hoekwater:



On 9 Oct 2020, at 08:52, Denis Maier  wrote:

Am 08.10.2020 um 19:05 schrieb Henning Hraban Ramm:

\starttext

{EN: \en\hyphenatedcoloredword{applicable}}

{DE: \de\hyphenatedcoloredword{applicable}}

\stoptext

Wow, that's super helpful. The English pattern seems to be 
"ap-plic-a-ble"

According to Meriam-Webster it should just be "ap·​pli·​ca·​ble".

{EN: \en\hyphenatedcoloredword{obligate}} gives me "ob-lig-ate"
According to Meriam-Webster it should be "ob·​li·​gate".

I've had a look at the files mentioned by Tomáš, but as these are not 
just wordlists I can not really tell what is happening.


So, is that a bug?
Not really. hyphenation patterns are a bit like applying JPEG 
compression to
a dictionary. It makes the data size smaller by recognising patterns 
while

ignoring outliers.

Occasional errors are to be expected, which is why \hyphenation exists.



I see. I've noticed lang-us.lua has a list of exceptions in it:
  ["exceptions"]={
   ["characters"]="abcdefghijlmnoprstuyz",
   ["data"]="as-so-ciate as-so-ciates dec-li-na-tion oblig-a-tory 
phil-an-thropic present presents project projects reci-procity 
re-cog-ni-zance ref-or-ma-tion ret-ri-bu-tion ta-ble",

   ["length"]=168,
   ["n"]=14,
  },

Would it be possible to add more exceptions to that list as they come 
up? Or is that inappropriate?

you can add your own runtime in a style:

\hyphenation {fo-ob-ar} \hsize 1mm foobar

-
  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 / 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] Hyphenation patterns

2020-10-09 Thread Denis Maier

Am 08.10.2020 um 19:05 schrieb Henning Hraban Ramm:

\starttext

{EN: \en\hyphenatedcoloredword{applicable}}

{DE: \de\hyphenatedcoloredword{applicable}}

\stoptext

Wow, that's super helpful. The English pattern seems to be "ap-plic-a-ble"
According to Meriam-Webster it should just be "ap·​pli·​ca·​ble".

{EN: \en\hyphenatedcoloredword{obligate}} gives me "ob-lig-ate"
According to Meriam-Webster it should be "ob·​li·​gate".

I've had a look at the files mentioned by Tomáš, but as these are not 
just wordlists I can not really tell what is happening.


So, is that a bug?

Best,
Denis
___
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] Hyphenation patterns

2020-10-09 Thread Hans Hagen

On 10/9/2020 10:15 AM, Henning Hraban Ramm wrote:




Am 09.10.2020 um 08:52 schrieb Denis Maier :

Am 08.10.2020 um 19:05 schrieb Henning Hraban Ramm:

\starttext

{EN: \en\hyphenatedcoloredword{applicable}}

{DE: \de\hyphenatedcoloredword{applicable}}

\stoptext


Wow, that's super helpful.


BTW \hyphenatedword works the same. I didn’t see anything colored.
There are some more commands like this, even \hyphenatedfile, see
https://source.contextgarden.net/tex/context/base/mkiv/supp-box.mkiv?search=hyphenated

Usually Arthur’s (hail the emperor of hyphenation and protector of the 
patterns) patterns are flawless, so I guess it’s not a bug but an exception of 
the rules.

ancient secret features:

>mtxrun --script patterns --hyphenate applicable --language=gb
hyphenator  |
hyphenator  | . a p p l i c a b l e .   . a p p l i c a b l e .
hyphenator  |  2a0p0 2 0 0 0 0 0 0 0 0 0 0
hyphenator  |4p1p2   2 4 1 2 0 0 0 0 0 0 0
hyphenator  |  0p2l2 2 4 1 2 2 0 0 0 0 0 0
hyphenator  |  1a0b0 2 4 1 2 2 0 1 0 0 0 0
hyphenator  |2b0l2   2 4 1 2 2 0 1 2 0 2 0
hyphenator  |  4l0e0.0   2 4 1 2 2 0 1 2 4 2 0
hyphenator  | .2a4p1p2l2i0c1a2b4l2e0.   . a p-p l i c-a b l e .
hyphenator  |
mtx-patterns| gb 3 3 : applicable : applic-able

>mtxrun --script patterns --hyphenate applicable --language=us
hyphenator  |
hyphenator  | . a p p l i c a b l e .   . a p p l i c a b l e .
hyphenator  |4p1p0   0 4 1 0 0 0 0 0 0 0 0
hyphenator  |  1p2l2 0 4 1 2 2 0 0 0 0 0 0
hyphenator  |  0p0l0i2c1a0b0 0 4 1 2 2 2 1 0 0 0 0
hyphenator  |1c0a0   0 4 1 2 2 2 1 0 0 0 0
hyphenator  |0c0a1b0l0   0 4 1 2 2 2 1 1 0 0 0
hyphenator  |0b2l2   0 4 1 2 2 2 1 1 2 2 0
hyphenator  |0b4l0e0.0   0 4 1 2 2 2 1 1 4 2 0
hyphenator  | .0a4p1p2l2i2c1a1b4l2e0.   . a p-p l i c-a-b l e .
hyphenator  |
mtx-patterns| us 3 3 : applicable : applic-a-ble

not the kind of stuff one wants to expose a new user to

Hans

-
  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 / 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] Hyphenation patterns

2020-10-09 Thread Hans Hagen

On 10/8/2020 7:05 PM, Henning Hraban Ramm wrote:



Am 08.10.2020 um 17:41 schrieb Denis Maier :

where can I find the hyphenation patterns used by ConTeXt? I have two wrongly 
hyphenated words, and I want to check whether this is due to incorrect 
patterns. (I tried the source browser... not much luck so far.) The words are:
1. applicable => hyphenated as applic-able
2. obligated => hyphenated as oblig-ated

I know I can use \hyphenation to correct that, but I wanted to check the 
patterns nevertheless.


I guess it’s just a valid option.
You can check possible hyphenations like this:

\starttext

{EN: \en\hyphenatedcoloredword{applicable}}

{DE: \de\hyphenatedcoloredword{applicable}}

\stoptext

americans and brits hyphnetate differently

\starttext
{\language[usenglish]  {\tt US \number\normallanguage}: 
\hyphenatedcoloredword{applicable}}\par
{\language[ukenglish]  {\tt UK \number\normallanguage}: 
\hyphenatedcoloredword{applicable}}\par

\stoptext

syllable vs stem (but I bet Arthur can explain better)

hans

-
  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 / 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] Hyphenation patterns

2020-10-09 Thread Henning Hraban Ramm


> Am 09.10.2020 um 08:52 schrieb Denis Maier :
> 
> Am 08.10.2020 um 19:05 schrieb Henning Hraban Ramm:
>> \starttext
>> 
>> {EN: \en\hyphenatedcoloredword{applicable}}
>> 
>> {DE: \de\hyphenatedcoloredword{applicable}}
>> 
>> \stoptext
>> 
> Wow, that's super helpful.

BTW \hyphenatedword works the same. I didn’t see anything colored.
There are some more commands like this, even \hyphenatedfile, see
https://source.contextgarden.net/tex/context/base/mkiv/supp-box.mkiv?search=hyphenated

Usually Arthur’s (hail the emperor of hyphenation and protector of the 
patterns) patterns are flawless, so I guess it’s not a bug but an exception of 
the rules.

Hraban
___
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] Disappearing characters with nolig-german-wordlist

2020-10-09 Thread Henning Hraban Ramm


> Am 08.10.2020 um 13:04 schrieb Hans Hagen :
> 
> On 10/8/2020 12:02 PM, Denis Maier wrote:
>> Hi,
>> I do as adviced on the Wiki and input the nolig-german-wordlist.tex to 
>> suppress wrong ligatures. However, I'm seeing strange results:
>> ```
>> \input nolig-german-wordlist.tex
>> \starttext
>> auffasste
>> auffasse
>> \stoptext
>> ```
>> gives me "auffasse auffasse" (see attachment.)
>> I don't really understand what is happening here. Why is the t disappearing.
> 
> who knows ... i don't have that file

It was from my projects (eka = Edition Kritische Ausgabe, a series by Verlag 
Dreiviertelhaus).

(I didn’t remember I uploaded it to the wiki, tried to send it here, but it was 
too big.)


>> ```
>> \replaceword[eka][auffasse][au{ff}asse]
>> \replaceword[eka][auffasste][au{ff}asste]
>> \setreplacements[eka]
>> \starttext
>> auffasste
>> auffasse
>> \stoptext
>> ```
>> This example gives correct results.
> so we're okay

Good luck!

Hraban

___
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] Local custom notes affect regular footnotes

2020-10-09 Thread Henning Hraban Ramm
If I use local notes, regular footnotes disappear in the following example:


\definenote[testnote]

\starttext

\startlocalnotes[testnote]

Test\testnote{Custom note}

Other text inbetween with normal footnotes.\footnote{Footnote}

Test\testnote{Another custom note}

Other text afterwards with normal footnotes.\footnote{Other Footnote}

:::\placelocalnotes[testnote] :::

---\placelocalnotes[footnote] --- % just to be sure, no output
%\stoplocalnotes % a NOP?

\stoptext


(LMTX or MkIV 2020.09.20 23:02)

The use case is a commented edition of historical letters. Footnotes of letter 
contents should be local and numbered per letter, while general footnotes 
should behave as usual and are numbered by text.
(This setup works otherwise, no need to explain.)
Actually, the “normal text” part appears only after a letter, but before 
\placelocalnotes.


The logical structure would be:

\startlocalnotes[testnote]

\startnarrower
\input lorem\testnote{bla bla}

\input lorem\testnote{bla bla}
\stopnarrower

\stoplocalnotes % forgets local notes

\input knuth\footnote{Donald dixit}

\placelocalnotes[testnote] % nothing


In the MWE, the footnotes just disappear. In the actual project the problem is 
different, but I couldn’t reproduce it in a MWE. I guess the interference of 
different note types is the cause of both problems.

I tried using the same custom note for the last comment as a workaround, but it 
gets placed twice: once at the bottom of the current page (i.e. like a normal 
footnote, out of order) and once after the other custom notes.
(The letter is in a delimitedtext environment.)



Hraban
___
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] Fine tuning an index

2020-10-09 Thread Duncan Hothersall
Just a note to add, that \showinjector doesn't seem to do anything unless
you also have a \setinjector command, which is a bit counterintuitive since
probably the first thing you want to do is see the ID of each line in your
list/register before you know what \setinjector command you need.

I've worked around it by adding

\setinjector[register][1][\relax]

after \showinjector.

On Fri, 9 Oct 2020 at 07:25, Duncan Hothersall  wrote:

> Brilliant, thanks, I didn't know about that one. Much appreciated.
>
> Duncan
>
> On Thu, 8 Oct 2020 at 21:36, jbf  wrote:
>
>> Duncan, have you looked at
>> https://wiki.contextgarden.net/Command/setinjector?
>> 
>>
>> You might also need \showinjector. But it should work for indexes
>> (register).
>>
>> Julian
>> On 9/10/20 2:58 am, Duncan Hothersall wrote:
>>
>> Fine tuning column and page breaking in an index. This is tricky, because
>> there are usually very few "good" places to break an index, and automatic
>> breaking seems to alter slightly depending on whether interactions are set
>> up or not, but is there a way to manually insert a column or page break
>> into the register before or after a certain entry, the way there is for a
>> table of contents?
>>
>>
___
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] Hyphenation patterns

2020-10-09 Thread Denis Maier

Am 09.10.2020 um 08:57 schrieb Taco Hoekwater:



On 9 Oct 2020, at 08:52, Denis Maier  wrote:

Am 08.10.2020 um 19:05 schrieb Henning Hraban Ramm:

\starttext

{EN: \en\hyphenatedcoloredword{applicable}}

{DE: \de\hyphenatedcoloredword{applicable}}

\stoptext


Wow, that's super helpful. The English pattern seems to be "ap-plic-a-ble"
According to Meriam-Webster it should just be "ap·​pli·​ca·​ble".

{EN: \en\hyphenatedcoloredword{obligate}} gives me "ob-lig-ate"
According to Meriam-Webster it should be "ob·​li·​gate".

I've had a look at the files mentioned by Tomáš, but as these are not just 
wordlists I can not really tell what is happening.

So, is that a bug?

Not really. hyphenation patterns are a bit like applying JPEG compression to
a dictionary. It makes the data size smaller by recognising patterns while
ignoring outliers.

Occasional errors are to be expected, which is why \hyphenation exists.



I see. I've noticed lang-us.lua has a list of exceptions in it:
 ["exceptions"]={
  ["characters"]="abcdefghijlmnoprstuyz",
  ["data"]="as-so-ciate as-so-ciates dec-li-na-tion oblig-a-tory 
phil-an-thropic present presents project projects reci-procity 
re-cog-ni-zance ref-or-ma-tion ret-ri-bu-tion ta-ble",

  ["length"]=168,
  ["n"]=14,
 },

Would it be possible to add more exceptions to that list as they come 
up? Or is that inappropriate?


Denis
___
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] Hyphenation patterns

2020-10-09 Thread Taco Hoekwater


> On 9 Oct 2020, at 08:52, Denis Maier  wrote:
> 
> Am 08.10.2020 um 19:05 schrieb Henning Hraban Ramm:
>> \starttext
>> 
>> {EN: \en\hyphenatedcoloredword{applicable}}
>> 
>> {DE: \de\hyphenatedcoloredword{applicable}}
>> 
>> \stoptext
>> 
> Wow, that's super helpful. The English pattern seems to be "ap-plic-a-ble"
> According to Meriam-Webster it should just be "ap·​pli·​ca·​ble".
> 
> {EN: \en\hyphenatedcoloredword{obligate}} gives me "ob-lig-ate"
> According to Meriam-Webster it should be "ob·​li·​gate".
> 
> I've had a look at the files mentioned by Tomáš, but as these are not just 
> wordlists I can not really tell what is happening.
> 
> So, is that a bug? 

Not really. hyphenation patterns are a bit like applying JPEG compression to 
a dictionary. It makes the data size smaller by recognising patterns while
ignoring outliers. 

Occasional errors are to be expected, which is why \hyphenation exists.

Best wishes,
Taco

___
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] Fine tuning an index

2020-10-09 Thread Duncan Hothersall
Brilliant, thanks, I didn't know about that one. Much appreciated.

Duncan

On Thu, 8 Oct 2020 at 21:36, jbf  wrote:

> Duncan, have you looked at
> https://wiki.contextgarden.net/Command/setinjector?
> 
>
> You might also need \showinjector. But it should work for indexes
> (register).
>
> Julian
> On 9/10/20 2:58 am, Duncan Hothersall wrote:
>
> Fine tuning column and page breaking in an index. This is tricky, because
> there are usually very few "good" places to break an index, and automatic
> breaking seems to alter slightly depending on whether interactions are set
> up or not, but is there a way to manually insert a column or page break
> into the register before or after a certain entry, the way there is for a
> table of contents?
>
>
___
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
___