Re: [NTG-context] Basic font question (Optima, but no bold, no italics)

2020-04-23 Thread Vladimir Lomov
Hello,
** Gerben Wierda  [2020-04-23 23:57:26 +0200]:

>> On 23 Apr 2020, at 19:18, Henning Hraban Ramm  wrote:
>> 
>>> 
>>> Am 23.04.2020 um 16:42 schrieb Gerben Wierda :
>>> 
 
 On 23 Apr 2020, at 16:34, Henning Hraban Ramm  wrote:
 

[...]

 What do you get from
 mtxrun --script=fonts --list --all --pattern=Optima
>>> 
>>> hermione:Export and Metapost gerben$ mtxrun --script fonts --list --all 
>>> --pattern=optima
>>> identifier familyname   fontname   filename 
>>>   subfont   instances
>>> 
>>> optimablackoptima   optimaextrablack   
>>> /System/Library/Fonts/Optima.ttc   5
>>> optimabold optima   optimabold 
>>> /System/Library/Fonts/Optima.ttc   2
>>> optimabolditalic   optima   optimabolditalic   
>>> /System/Library/Fonts/Optima.ttc   4
>>> optimaextrablack   optima   optimaextrablack   
>>> /System/Library/Fonts/Optima.ttc   5
>>> optimaitalic   optima   optimaitalic   
>>> /System/Library/Fonts/Optima.ttc   3
>>> optimanormal   optima   optimaregular  
>>> /System/Library/Fonts/Optima.ttc   1
>>> optimaregular  optima   optimaregular  
>>> /System/Library/Fonts/Optima.ttc   1
>> 
>> Hm. Here, ConTeXt only found subfont #5 until I rebuilt the font cache, then 
>> it looked like yours.
>> 
>> And the minimal example (plus \starttext ... \stoptext) worked.
>> 
>> (Latest ConTeXt on MacOS Mojave.)

> No such luck for me. Any help welcome. I did remove the macOS font cache
> with sudo atsutil databases -remove and I rebooted. I am running an up to
> date macOS Mojave.

I think Henning Hraban Ramm meant not OS font cache (but may be including it,
I'm not a Mac OS user) but context font cache. Run

$ mtxrun --script fonts --reload --force

and try above '--list --all ...' command again and your example:

> \starttext
> \definefontfamily[mainface][rm][Optima]
> \setupbodyfont[mainface,10pt]

> {\bf Bold} and {\it Italic} and {\rm Regular} text.
> \stoptext

Hope this will resolve you issue.

[...]

---
WBR, Vladimir Lomov

-- 
Practically perfect people never permit sentiment to muddle their thinking.
-- Mary Poppins


signature.asc
Description: PGP signature
___
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] Basic font question (Optima, but no bold, no italics)

2020-04-23 Thread kaddour kardio
It's noticed that Optima is a Sans Serif font.
Maybe it conflicts with MacOS way to handle fonts.


Le ven. 24 avr. 2020 à 01:10, Vladimir Lomov  a écrit :

> Hello,
> ** Gerben Wierda  [2020-04-23 23:57:26 +0200]:
>
> >> On 23 Apr 2020, at 19:18, Henning Hraban Ramm  wrote:
> >>
> >>>
> >>> Am 23.04.2020 um 16:42 schrieb Gerben Wierda :
> >>>
> 
>  On 23 Apr 2020, at 16:34, Henning Hraban Ramm  wrote:
> 
>
> [...]
>
>  What do you get from
>  mtxrun --script=fonts --list --all --pattern=Optima
> >>>
> >>> hermione:Export and Metapost gerben$ mtxrun --script fonts --list
> --all --pattern=optima
> >>> identifier familyname   fontname   filename
>subfont   instances
> >>>
> >>> optimablackoptima   optimaextrablack
>  /System/Library/Fonts/Optima.ttc   5
> >>> optimabold optima   optimabold
>  /System/Library/Fonts/Optima.ttc   2
> >>> optimabolditalic   optima   optimabolditalic
>  /System/Library/Fonts/Optima.ttc   4
> >>> optimaextrablack   optima   optimaextrablack
>  /System/Library/Fonts/Optima.ttc   5
> >>> optimaitalic   optima   optimaitalic
>  /System/Library/Fonts/Optima.ttc   3
> >>> optimanormal   optima   optimaregular
> /System/Library/Fonts/Optima.ttc   1
> >>> optimaregular  optima   optimaregular
> /System/Library/Fonts/Optima.ttc   1
> >>
> >> Hm. Here, ConTeXt only found subfont #5 until I rebuilt the font cache,
> then it looked like yours.
> >>
> >> And the minimal example (plus \starttext ... \stoptext) worked.
> >>
> >> (Latest ConTeXt on MacOS Mojave.)
>
> > No such luck for me. Any help welcome. I did remove the macOS font cache
> > with sudo atsutil databases -remove and I rebooted. I am running an up to
> > date macOS Mojave.
>
> I think Henning Hraban Ramm meant not OS font cache (but may be including
> it,
> I'm not a Mac OS user) but context font cache. Run
>
> $ mtxrun --script fonts --reload --force
>
> and try above '--list --all ...' command again and your example:
>
> > \starttext
> > \definefontfamily[mainface][rm][Optima]
> > \setupbodyfont[mainface,10pt]
>
> > {\bf Bold} and {\it Italic} and {\rm Regular} text.
> > \stoptext
>
> Hope this will resolve you issue.
>
> [...]
>
> ---
> WBR, Vladimir Lomov
>
> --
> Practically perfect people never permit sentiment to muddle their thinking.
> -- Mary Poppins
>
> ___
> 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] useexternaldocument with custom file type

2020-04-23 Thread Jan U. Hasecke
Hi Wolfgang,

thanks for the fast reply.

Am 23.04.20 um 12:06 schrieb Wolfgang Schuster:
> Jan U. Hasecke schrieb am 23.04.2020 um 11:54:
>> Hi,
>>
>> can I link to a file with custom file type eg. OpenDocument with
>> \useexternaldocument?
>>
>> This does not work.
>>
>> \useexternaldocument[test][test.ods][A test document]
>>
>> As the PDF viewer is opened first, it does not recognize the file type.
> 
> The \useexternaldocument is used to access referecens from other ConTeXt
> documents.

Ok. No way to link to other file types from the pdf?

> https://mailman.ntg.nl/pipermail/ntg-context/2019/095564.html

I must confess that I don't understand this utilitydata-Thread.


juh
___
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] useexternaldocument with custom file type

2020-04-23 Thread Vladimir Lomov
Hello,
** Jan U. Hasecke  [2020-04-23 12:21:27 +0200]:

> Hi Wolfgang,

> thanks for the fast reply.

> Am 23.04.20 um 12:06 schrieb Wolfgang Schuster:
>> Jan U. Hasecke schrieb am 23.04.2020 um 11:54:
>>> Hi,
>>>
>>> can I link to a file with custom file type eg. OpenDocument with
>>> \useexternaldocument?
>>>
>>> This does not work.
>>>
>>> \useexternaldocument[test][test.ods][A test document]
>>>
>>> As the PDF viewer is opened first, it does not recognize the file type.
>> 
>> The \useexternaldocument is used to access referecens from other ConTeXt
>> documents.

> Ok. No way to link to other file types from the pdf?

May be you after this one 
https://wiki.contextgarden.net/Command/goto
?

Otherwise could you describe what exactly you want to achive?

>> https://mailman.ntg.nl/pipermail/ntg-context/2019/095564.html

> I must confess that I don't understand this utilitydata-Thread.


> juh

---
WBR, Vladimir Lomov

-- 
He asked me if I knew what time it was -- I said yes, but not right now.
-- Steven Wright


signature.asc
Description: PGP signature
___
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] useexternaldocument with custom file type

2020-04-23 Thread Jan U. Hasecke
Hi,

can I link to a file with custom file type eg. OpenDocument with
\useexternaldocument?

This does not work.

\useexternaldocument[test][test.ods][A test document]

As the PDF viewer is opened first, it does not recognize the file type.

juh
___
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] useexternaldocument with custom file type

2020-04-23 Thread Wolfgang Schuster

Jan U. Hasecke schrieb am 23.04.2020 um 11:54:

Hi,

can I link to a file with custom file type eg. OpenDocument with
\useexternaldocument?

This does not work.

\useexternaldocument[test][test.ods][A test document]

As the PDF viewer is opened first, it does not recognize the file type.


The \useexternaldocument is used to access referecens from other ConTeXt 
documents.


https://mailman.ntg.nl/pipermail/ntg-context/2019/095564.html

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] Indic scripts/languages (was: lmtx & lohit-devanagari fonts)

2020-04-23 Thread Henning Hraban Ramm

> Am 22.04.2020 um 11:49 schrieb Arthur Reutenauer 
> :
> 
> On Wed, Apr 22, 2020 at 08:16:32AM +0200, Henning Hraban Ramm wrote:
>> Does that mean that indic scripts/languages are now fully supported? (Or 
>> maybe just scripts, not languages?
> 
>  Devanagari support was added a while ago.  The layout engine was
> according to reports working for at least one other Indic script
> (Bengali, I think), but not for others (Oriya?  Can’t remember).  I
> wouldn’t expect a renderer for Devanagari to do a very good job on Tamil
> or Malayalam, for example.
> 
>> Do Hindi or Urdu need hyphenation patterns?)
> 
>  Hindi uses hyphenation, Urdu doesn’t.  We have patterns for Hindi in
> TeX-Hyphen: 
> https://github.com/hyphenation/tex-hyphen/tree/master/hyph-utf8/tex/generic/hyph-utf8/patterns/tex/hyph-hi.tex

Thank you!

In scripts/context/lua/mtx-patterns.lua Hindi and several other languages are 
commented, what does that mean?

Best, 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] Text editors don't execute ConTeXt standalone

2020-04-23 Thread Jairo A. del Rio
I've recently installed the ConTeXt standalone following the instructions
listed below:

https://www.contextgarden.net/Ubuntu

However, commands as "context" and "mtxrun" only work when executed from
terminal. When I specify these commands in a text editor (TeXstudio,
Textadept), they just don't work, even with a full path specified. On the
contrary, commands as "tex" or "latex" from TeX Live are visible to
editors. How to fix that?
___
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] Best way to create a large number of documents from database

2020-04-23 Thread Mojca Miklavec
On Fri, 17 Apr 2020 at 21:11, Hans Hagen wrote:
> On 4/17/2020 4:37 PM, Mojca Miklavec wrote:
>
> > One of the interesting statistics.
> > I used a bunch of images (the same png images in all documents; cca.
> > 290k in total).
>
> It can actually make a difference what kind of png image you use. Some
> png images demand a conversion (or split of map etc) to the format
> supported by pdf. Often converting the png to pdf and include those is
> faster.

Thanks for the hint. But I tested it and it hardly makes any difference.
I had to make another batch for the archive (creating a single
document with 4k+ pages), and the full process ran in 10 minutes
(compared to cca. 2,5 hours to create individual documents). Just for
a test run I completely **removed** all the images and it only
accounted for some 10 or 20 seconds speedup. So the biggest overhead
still seems to be in warming up the machinery (which includes my share
of overhead for reading in the 1,3 MB lua table with all data entries)
and Taco's hint of using an external tool for splicing would have
probably scored best :)

I need to add that I'm extremely happy about the resource reuse
(mostly images). As I already mentioned before, individual documents
were 1,5 GB in total, and a badly written software would have created
an equally bad cumulative PDF, while ConTeXt generates a merely 17 MB
file with 4k+ pages. It's really impressive.

Mojca
___
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] Is there a 'sized' command equivalent to \colored?

2020-04-23 Thread Gerben Wierda
Answering my own question: \switchtobodyfont

> On 23 Apr 2020, at 16:45, Gerben Wierda  wrote:
> 
> I can directly colour a text in rgb by doing 
> \colored[r=0.8,b=0.6,c=0.4]{Text}. Suppose I want to hard code a piece of 
> text as 12.8pt, is there a simple way to do that directly like with \colored 
> for colour?
> 
> G
> ___
> 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] useexternaldocument with custom file type

2020-04-23 Thread Jan U. Hasecke
Am 23.04.20 um 16:10 schrieb Vladimir Lomov:
> Please see the page about '\goto' command, it was written for a reason!

Ok, with \goto{linkname}[program(target.doc)] it works.

"works" means some PDF Viewers opens the right program.


juh
___
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] useexternaldocument with custom file type

2020-04-23 Thread Vladimir Lomov
Hello,
** Jan U. Hasecke  [2020-04-23 15:35:54 +0200]:

> Am 23.04.20 um 14:22 schrieb Vladimir Lomov:

>> Otherwise could you describe what exactly you want to achive?

> This works:

> \setupinteraction[state=start]
> \setupcolors[state=start]
> \starttext
> \goto{linkname}[file(target.pdf)]
> \stoptext

> This does not work:

> \setupinteraction[state=start]
> \setupcolors[state=start]
> \starttext
> \goto{linkname}[file(target.doc)]
> \stoptext

What do you mean "work" and "not work"?

Do you what to open a file by clicking on text in viewer? What application
should be used to open a file? Take a look on page I linked in previous
message.

> The PDF Viewer does not support the file type.

What "PDF Viewer"?

For example, I use different viewers: mupdf, zathura-pdf-mupdf (zathura with
mupdf pdf backend), okular, pdf-tools (emacs major mode). Some of application
(okular, for example) could preview many file types (ps, pdf, odt), while
other can't do that. It is up to application what to do (or actually, PDF
backend) on link.

Please see the page about '\goto' command, it was written for a reason!

> TIA
> juh

---
WBR, Vladimir Lomov

-- 
Virtue is not left to stand alone.  He who practices it will have neighbors.
-- Confucius


signature.asc
Description: PGP signature
___
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] Basic font question

2020-04-23 Thread Henning Hraban Ramm

> Am 23.04.2020 um 16:22 schrieb Gerben Wierda :
> 
> 
> 
>> On 23 Apr 2020, at 16:16, Vladimir Lomov  wrote:
>> 
>> Hello,
>> ** Gerben Wierda  [2020-04-23 16:00:34 +0200]:
>> 
>>> On my Mac, I am trying:
>> 
>>> \definefontfamily[mainface][rm][Optima]
>>> \setupbodyfont[mainface,10pt]
>> 
>>> {\bf Bold} and {\it Italic} and {\rm Regular} text.
>> 
>> https://wiki.contextgarden.net/Font_Switching
>> 
>>> What do I need to do to get actual bold and italics in my output?
>> 
>> \bi == \bf\it
>> 
>> Or by "actual bold" you mean something different?
> 
> Yes, in my output everything is regular, there is no bold or italics text, 
> even when I use \bf or \it

What do you get from
mtxrun --script=fonts --list --all --pattern=Optima
?

Best, 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] Basic font question

2020-04-23 Thread Gerben Wierda

> On 23 Apr 2020, at 16:34, Henning Hraban Ramm  wrote:
> 
>> 
>> Am 23.04.2020 um 16:22 schrieb Gerben Wierda :
>> 
>> 
>> 
>>> On 23 Apr 2020, at 16:16, Vladimir Lomov  wrote:
>>> 
>>> Hello,
>>> ** Gerben Wierda  [2020-04-23 16:00:34 +0200]:
>>> 
 On my Mac, I am trying:
>>> 
 \definefontfamily[mainface][rm][Optima]
 \setupbodyfont[mainface,10pt]
>>> 
 {\bf Bold} and {\it Italic} and {\rm Regular} text.
>>> 
>>> https://wiki.contextgarden.net/Font_Switching
>>> 
 What do I need to do to get actual bold and italics in my output?
>>> 
>>> \bi == \bf\it
>>> 
>>> Or by "actual bold" you mean something different?
>> 
>> Yes, in my output everything is regular, there is no bold or italics text, 
>> even when I use \bf or \it
> 
> What do you get from
> mtxrun --script=fonts --list --all --pattern=Optima

hermione:Export and Metapost gerben$ mtxrun --script fonts --list --all 
--pattern=optima
identifier familyname   fontname   filename 
  subfont   instances

optimablackoptima   optimaextrablack   
/System/Library/Fonts/Optima.ttc   5
optimabold optima   optimabold 
/System/Library/Fonts/Optima.ttc   2
optimabolditalic   optima   optimabolditalic   
/System/Library/Fonts/Optima.ttc   4
optimaextrablack   optima   optimaextrablack   
/System/Library/Fonts/Optima.ttc   5
optimaitalic   optima   optimaitalic   
/System/Library/Fonts/Optima.ttc   3
optimanormal   optima   optimaregular  
/System/Library/Fonts/Optima.ttc   1
optimaregular  optima   optimaregular  
/System/Library/Fonts/Optima.ttc   1

> ?
> 
> Best, 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
> ___

___
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] Basic font question

2020-04-23 Thread Gerben Wierda


> On 23 Apr 2020, at 16:16, Vladimir Lomov  wrote:
> 
> Hello,
> ** Gerben Wierda  [2020-04-23 16:00:34 +0200]:
> 
>> On my Mac, I am trying:
> 
>> \definefontfamily[mainface][rm][Optima]
>> \setupbodyfont[mainface,10pt]
> 
>> {\bf Bold} and {\it Italic} and {\rm Regular} text.
> 
> https://wiki.contextgarden.net/Font_Switching
> 
>> What do I need to do to get actual bold and italics in my output?
> 
> \bi == \bf\it
> 
> Or by "actual bold" you mean something different?

Yes, in my output everything is regular, there is no bold or italics text, even 
when I use \bf or \it

G

> 
>> Thx,
> 
>> G
> 
> ---
> WBR, Vladimir Lomov
> 
> -- 
> There has been an alarming increase in the number of things you know
> nothing about.
> ___
> 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] problem using LMTX

2020-04-23 Thread Charles Doherty
The print-out below is from two runs on a Newsletter that I produce. Taco 
kindly told me to add  \loadmarkfile{page-mul}
to my input file some months ago to solve a problem with footnotes. I use an 
engine in TeXShop and I get the result 1) below (which is what I want) in the 
first example. I am happy to keep using this version of ConTeXt.

However, as a matter of interest, I installed LTMX in a separate folder and 
used a different TeXShop engine directed to that installation and when I do I 
get the bottom result 2). As you can see there is a lot of white space between 
the end of the text and the footnotes in that run. This happens with the 
articles in my newsletter that have footnotes. Can this be fixed?
Very best wishes and thanks for past help.
Charlie

1)

mtx-context | run 1: luatex 
--fmt="/Users/charlesdoherty/OLDcontext-osx-64/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
 --jobname="Newsletter2019-20" 
--lua="/Users/charlesdoherty/OLDcontext-osx-64/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
 --c:autopdf --c:currentrun=1 --c:fulljobname="./Newsletter2019-20.tex" 
--c:input="./Newsletter2019-20.tex" --c:kindofrun=1 --c:maxnofruns=9 
--c:purgeall 
--c:texmfbinpath="/Users/charlesdoherty/OLDcontext-osx-64/tex/texmf-osx-64/bin" 
"cont-yes.mkiv"

This is LuaTeX, Version 1.10.1 (TeX Live 2019) 
 system commands enabled.


2)

resolvers   | formats | executing runner 'run luametatex format': 
/Users/charlesdoherty/context-osx-64/tex/texmf-osx-64/bin/luametatex 
--jobname="Newsletter2019-20" 
--fmt=/Users/charlesdoherty/context-osx-64/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/Users/charlesdoherty/context-osx-64/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 cont-yes.mkiv --c:autopdf --c:currentrun=1 --c:directives="system.showerror" 
--c:fulljobname="./Newsletter2019-20.tex" --c:input="./Newsletter2019-20.tex" 
--c:kindofrun=1 --c:maxnofruns=9 --c:purgeall 
--c:texmfbinpath="/Users/charlesdoherty/context-osx-64/tex/texmf-osx-64/bin"
This is LuaMetaTeX, Version 2.05.01 


___
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] useexternaldocument with custom file type

2020-04-23 Thread Jan U. Hasecke
Am 23.04.20 um 14:22 schrieb Vladimir Lomov:
> Otherwise could you describe what exactly you want to achive?

This works:

\setupinteraction[state=start]
\setupcolors[state=start]
\starttext
\goto{linkname}[file(target.pdf)]
\stoptext

This does not work:

\setupinteraction[state=start]
\setupcolors[state=start]
\starttext
\goto{linkname}[file(target.doc)]
\stoptext

The PDF Viewer does not support the file type.

TIA
juh
___
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] Basic font question

2020-04-23 Thread Gerben Wierda
On my Mac, I am trying:

\definefontfamily[mainface][rm][Optima]
\setupbodyfont[mainface,10pt]

{\bf Bold} and {\it Italic} and {\rm Regular} text.

What do I need to do to get actual bold and italics in my output?

Thx,

G___
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] Basic font question

2020-04-23 Thread Vladimir Lomov
Hello,
** Gerben Wierda  [2020-04-23 16:00:34 +0200]:

> On my Mac, I am trying:

> \definefontfamily[mainface][rm][Optima]
> \setupbodyfont[mainface,10pt]

> {\bf Bold} and {\it Italic} and {\rm Regular} text.

https://wiki.contextgarden.net/Font_Switching

> What do I need to do to get actual bold and italics in my output?

\bi == \bf\it

Or by "actual bold" you mean something different?

> Thx,

> G

---
WBR, Vladimir Lomov

-- 
There has been an alarming increase in the number of things you know
nothing about.


signature.asc
Description: PGP signature
___
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] Setting up macvim in mac os catalina to work with LMTX

2020-04-23 Thread Nicola
On 2020-04-22, Jan-Erik Hägglöf  wrote:
> Output from :messages
>
>   
>   
> [ConTeXt] Typesetting...  
> Fel upptäcktes vid bearbetning av function 
> context#typeset[6]..39_typeset[2
> ]..context#callback[1]..39_callback:
> rad   17:
> E40: Kan inte öppna felfil /Users/janneman/Documents/CTX/GNUPLOT/test3.log

FYI, that error means that test3.log was not found - I guess, as that's
not a language I understand :-) - which likely means that your command
somehow failed without producing a log file (e.g., because the command
name was misspelled).

You seem to have fixed your issue, but, should you bump into further
issues, first make sure that your ConTeXt installation works properly
from the command line. Also, keep in mind that your shell environment
may be different from the environment in which ConTeXt is executed
inside Vim, so you may need to explicitly set some environment variables
(e.g., inside g:context_mtxrun) to make things sail smoothly.

Global variables (whose names start with `g:`) may be set in your vimrc,
which is typically located at $HOME/.vim/vimrc (note that the filename
does *not* start with a dot, only the directory's name does).

Good ConTeXt typesetting in Vim!
Nicola


___
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] Is there a 'sized' command equivalent to \colored?

2020-04-23 Thread Gerben Wierda
I can directly colour a text in rgb by doing \colored[r=0.8,b=0.6,c=0.4]{Text}. 
Suppose I want to hard code a piece of text as 12.8pt, is there a simple way to 
do that directly like with \colored for colour?

G
___
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] Hyphentation/Linebreak after x characters inside \WORD?

2020-04-23 Thread Rik Kabel


On 4/23/2020 15:01, Benjamin Buchmuller wrote:

Sorry, I have just realized that the problem might not be \WORD{} actually, so 
this one hyphenates:

\define[2]\mycommand{
\startxrow
\startxcell o#1 \stopxcell
\startxcell \tt\WORD #2 \stopxcell
\stopxrow
}

Whereas these ones don’t:


\define[2]\mycommand{
\startxrow
\startxcell o#1 \stopxcell
\startxcell \tt\WORD #2-3' \stopxcell
\stopxrow
}

\define[2]\mycommand{
\startxrow
\startxcell o#1 \stopxcell
\startxcell 5'-\tt\WORD #2 \stopxcell
\stopxrow
}

Assuming that this has to do with the presence of “-“ which will be the 
preferred breakpoint. So, I guess the questions boils down to how to define the 
second argument of

\definebreakpoint[mybreaks][][nright=12,nleft=12,type=1]

in this case or how to “deactivate” the default \setbreakpoints[compound]?



On 23 Apr 2020, at 20:46, Benjamin Buchmuller  
wrote:

Hi again,

I am reading a CSV file into ConTeXt which contains long DNA sequences (>> 40 
characters) to place in xtables. So far, this works fine. However, I need to 
uppercase the entries and need to \tt them. When I do this inside \WORD however, they 
don’t hyphenate any more.

I’m using:

\defineseparatedlist
[mylist]
[
separator={,}, quotechar={"},
command=\mycommand
]

\define[2]\mycommand{
\startxrow
\startxcell o#1 \stopxcell
\startxcell 5’-{\tt\WORD{#2}}-3' \stopxcell
\stopxrow
}

Since I don’t have access to each entry, I cant place hyphenation marks 
directly. Is there a way to tell ConTeXt to hyphenate after say, 12 characters?

Thanks for your help.


Benjamin


The following works for me:

   \define[2]\mycommanda{
    \startxrow
    \startxcell o#1 \stopxcell
    \startxcell \tt\WORD #2 \stopxcell
    \stopxrow
    }

   \define[2]\mycommandb{
    \startxrow
    \startxcell o#1 \stopxcell
    \startxcell \tt\WORD #2-3' \stopxcell
    \stopxrow
    }

   \define[2]\mycommandc{
    \startxrow
    \startxcell o#1 \stopxcell
    \startxcell 5'-\tt\WORD #2 \stopxcell
    \stopxrow
    }

   \definebreakpoint[mybreaks][][nright=12,nleft=12,type=1]
   \setbreakpoints[mybreaks]

   \starttext

   \setupxtable[width=5cm]
   \startxtablex
   \mycommanda{A}{lsfkgjfkgshgkhigewhgajkdkfkalhfdklahfkhaakfakfh}
   \mycommandb{B}{lsfkgjfkgshgkhigewhgajkdkfkalhfdklahfkhaakfakfh}
   \mycommandc{C}{lsfkgjfkgshgkhigewhgajkdkfkalhfdklahfkhaakfakfh}
   \stopxtable

   \stoptext

Producing:

Indeed, it produces the same when nleft and nright are both set to 1 or 
12 or 100, but not when setbreakpoints is removed.


If you are trying to do something else, please provide an MWE.
___
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] useexternaldocument with custom file type

2020-04-23 Thread Jan U. Hasecke
Am 23.04.20 um 19:25 schrieb Henning Hraban Ramm:
> 
>> Am 23.04.2020 um 16:36 schrieb Jan U. Hasecke :
>>
>> Am 23.04.20 um 16:10 schrieb Vladimir Lomov:
>>> Please see the page about '\goto' command, it was written for a reason!
>>
>> Ok, with \goto{linkname}[program(target.doc)] it works.
>>
>> "works" means some PDF Viewers opens the right program.
> 
> 
> In the beginning, you could even start programs with program(...), but Adobe 
> recognized soon this might be a security problem.
> 
> Nowadays, the “best” behaviour is when the viewer asks you if you really want 
> to open such a link but then hands control to the OS.
> 
> Last time I checked, Adobe Reader even let you open hidden files from 
> arbitrary paths.
> 
> Several other viewers just do nothing.

Yes this is not bullet proofed but I need it for internal usage. I think
we'll have many okular users.

juh

___
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] Hyphentation/Linebreak after x characters inside \WORD?

2020-04-23 Thread Benjamin Buchmuller
Hi again,

I am reading a CSV file into ConTeXt which contains long DNA sequences (>> 40 
characters) to place in xtables. So far, this works fine. However, I need to 
uppercase the entries and need to \tt them. When I do this inside \WORD 
however, they don’t hyphenate any more.

I’m using:

\defineseparatedlist
[mylist]
[
separator={,}, quotechar={"},
command=\mycommand
]

\define[2]\mycommand{
\startxrow
\startxcell o#1 \stopxcell
\startxcell 5’-{\tt\WORD{#2}}-3' \stopxcell
\stopxrow
}

Since I don’t have access to each entry, I cant place hyphenation marks 
directly. Is there a way to tell ConTeXt to hyphenate after say, 12 characters?

Thanks for your help.


Benjamin
___
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] useexternaldocument with custom file type

2020-04-23 Thread Henning Hraban Ramm

> Am 23.04.2020 um 16:36 schrieb Jan U. Hasecke :
> 
> Am 23.04.20 um 16:10 schrieb Vladimir Lomov:
>> Please see the page about '\goto' command, it was written for a reason!
> 
> Ok, with \goto{linkname}[program(target.doc)] it works.
> 
> "works" means some PDF Viewers opens the right program.


In the beginning, you could even start programs with program(...), but Adobe 
recognized soon this might be a security problem.

Nowadays, the “best” behaviour is when the viewer asks you if you really want 
to open such a link but then hands control to the OS.

Last time I checked, Adobe Reader even let you open hidden files from arbitrary 
paths.

Several other viewers just do nothing.

Best, 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] Basic font question

2020-04-23 Thread Henning Hraban Ramm

> Am 23.04.2020 um 16:42 schrieb Gerben Wierda :
> 
>> 
>> On 23 Apr 2020, at 16:34, Henning Hraban Ramm  wrote:
>> 
>>> 
>>> Am 23.04.2020 um 16:22 schrieb Gerben Wierda :
>>> 
>>> 
>>> 
 On 23 Apr 2020, at 16:16, Vladimir Lomov  wrote:
 
 Hello,
 ** Gerben Wierda  [2020-04-23 16:00:34 +0200]:
 
> On my Mac, I am trying:
 
> \definefontfamily[mainface][rm][Optima]
> \setupbodyfont[mainface,10pt]
 
> {\bf Bold} and {\it Italic} and {\rm Regular} text.
 
 https://wiki.contextgarden.net/Font_Switching
 
> What do I need to do to get actual bold and italics in my output?
 
 \bi == \bf\it
 
 Or by "actual bold" you mean something different?
>>> 
>>> Yes, in my output everything is regular, there is no bold or italics text, 
>>> even when I use \bf or \it
>> 
>> What do you get from
>> mtxrun --script=fonts --list --all --pattern=Optima
> 
> hermione:Export and Metapost gerben$ mtxrun --script fonts --list --all 
> --pattern=optima
> identifier familyname   fontname   filename   
> subfont   instances
> 
> optimablackoptima   optimaextrablack   
> /System/Library/Fonts/Optima.ttc   5
> optimabold optima   optimabold 
> /System/Library/Fonts/Optima.ttc   2
> optimabolditalic   optima   optimabolditalic   
> /System/Library/Fonts/Optima.ttc   4
> optimaextrablack   optima   optimaextrablack   
> /System/Library/Fonts/Optima.ttc   5
> optimaitalic   optima   optimaitalic   
> /System/Library/Fonts/Optima.ttc   3
> optimanormal   optima   optimaregular  
> /System/Library/Fonts/Optima.ttc   1
> optimaregular  optima   optimaregular  
> /System/Library/Fonts/Optima.ttc   1

Hm. Here, ConTeXt only found subfont #5 until I rebuilt the font cache, then it 
looked like yours.

And the minimal example (plus \starttext ... \stoptext) worked.

(Latest ConTeXt on MacOS Mojave.)

Best, 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] Hyphentation/Linebreak after x characters inside \WORD?

2020-04-23 Thread Benjamin Buchmuller
Sorry, I have just realized that the problem might not be \WORD{} actually, so 
this one hyphenates:

\define[2]\mycommand{
\startxrow
\startxcell o#1 \stopxcell
\startxcell \tt\WORD #2 \stopxcell
\stopxrow
}

Whereas these ones don’t: 


\define[2]\mycommand{
\startxrow
\startxcell o#1 \stopxcell
\startxcell \tt\WORD #2-3' \stopxcell
\stopxrow
}

\define[2]\mycommand{
\startxrow
\startxcell o#1 \stopxcell
\startxcell 5'-\tt\WORD #2 \stopxcell
\stopxrow
}

Assuming that this has to do with the presence of “-“ which will be the 
preferred breakpoint. So, I guess the questions boils down to how to define the 
second argument of

\definebreakpoint[mybreaks][][nright=12,nleft=12,type=1]

in this case or how to “deactivate” the default \setbreakpoints[compound]?


> On 23 Apr 2020, at 20:46, Benjamin Buchmuller  
> wrote:
> 
> Hi again,
> 
> I am reading a CSV file into ConTeXt which contains long DNA sequences (>> 40 
> characters) to place in xtables. So far, this works fine. However, I need to 
> uppercase the entries and need to \tt them. When I do this inside \WORD 
> however, they don’t hyphenate any more.
> 
> I’m using:
> 
> \defineseparatedlist
>   [mylist]
>   [
>   separator={,}, quotechar={"},
>   command=\mycommand
>   ]
> 
> \define[2]\mycommand{
>   \startxrow
>   \startxcell o#1 \stopxcell
>   \startxcell 5’-{\tt\WORD{#2}}-3' \stopxcell
>   \stopxrow
>   }
> 
> Since I don’t have access to each entry, I cant place hyphenation marks 
> directly. Is there a way to tell ConTeXt to hyphenate after say, 12 
> characters?
> 
> Thanks for your help.
> 
> 
> Benjamin

___
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] Hyphentation/Linebreak after x characters

2020-04-23 Thread Rik Kabel


On 4/23/2020 17:50, Wolfgang Schuster wrote:

Benjamin Buchmuller schrieb am 23.04.2020 um 23:16:

Hi Rik,

Thanks for the fast reply! Your example works indeed nicely. However, 
within this solution my problem has shifted now (fully) towards 
breaking after the same number of characters, which seems to work for 
your sample string, but not for the sequences that I need to place.


What I would like to achieve is something like:

5’-GATTGCTTACTCCTGGTTGG
TCTTACATTCTGTCGCCTC
CTACTAGAGCCGGCATATT
CTAGAAGGGCCGCCTTCATGTGG
etc.

(There might be hyphens or not, this is not so much important to me.)

But what I get is currently:

5'-GATTGCTTACTCCTG-
GTTGGTCTTACATTCT-
GTCGCCTCCTACTA-
GAGCCGGCATATTCTA-
GAAGGGCCGCCTTCATGTGGC-
etc.

Which looks ragged with \tt. Certainly, this is because ConTeXt 
applies the default hyphenation pattern. But I guess, there might be 
no “no language” pattern or is there? Also, I agree, it’s a bit odd 
that nright/nleft seem to make no difference towards the result.


Hans posted a solution for a similar problem a few years ago [1]
which can be adapted to your problem.

\startluacode

 local shared = {
 start  = 1,
 length = 1,
 before = nil,
 after  = nil,
 left   = false,
 right  = false,
 }

 local all = table.setmetatableindex({ }, function(t,k)
 return shared
 end)

 languages.hyphenators.traditional.installmethod("dna",
 function(dictionary,word,n)
 return all
 end
 )
\stopluacode

\definehyphenationfeatures
  [dna]
  [characters=all,
   alternative=dna]

\starttext

\startframedtext[width=6cm,style=mono]
  \sethyphenationfeatures[dna]
  \setuphyphenation[method=traditional]
  GATTGCTTACTCCTGGTTGG%
  TCTTACATTCTGTCGCCTC%
  CTACTAGAGCCGGCATATT%
  CTAGAAGGGCCGCCTTCATGTGG%
\stopframedtext

\stoptext

[1] https://mailman.ntg.nl/pipermail/ntg-context/2017/089106.html

Wolfgang


And without lua, just two lines of ConTeXt with a bit of TeX:

   \define[1]\DNA{\handletokens #1\with\DNAspacer}
   \define[1]\DNAspacer{#1\hskip 2.3pt plus .1pt}
   \define[2]\mycommandc{
    \startxrow
    \startxcell o#1 \stopxcell
    \startxcell {\tt\WORD{\DNA{5'-#2}}}\stopxcell
    \stopxrow
    }
   \starttext
   \setupxtable[width=5cm]
   \startxtable
   
\mycommandc{C}{gattgcttactcctggttggtcttacattctgtcgcctcctactagagccggcatattctagaagggccgccttcatgtggcctagggcaccatcgcgtacgagggcaatgagtttaccgctgcgaagtctctacgtcacggccaaccacagtcctgctcccaacgaaatttagacgctgtcgtgaaacctgaattcgaggataagccgcgtcatgaagagtctactg}
   \stopxtable
   \stoptext

Modify the skip as you see fit.

--
Rik

___
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] Hyphentation/Linebreak after x characters

2020-04-23 Thread Benjamin Buchmuller
Hi Rik,

Thanks for the fast reply! Your example works indeed nicely. However, within 
this solution my problem has shifted now (fully) towards breaking after the 
same number of characters, which seems to work for your sample string, but not 
for the sequences that I need to place.

What I would like to achieve is something like:

5’-GATTGCTTACTCCTGGTTGG
TCTTACATTCTGTCGCCTC
CTACTAGAGCCGGCATATT
CTAGAAGGGCCGCCTTCATGTGG
etc.

(There might be hyphens or not, this is not so much important to me.)

But what I get is currently:

5'-GATTGCTTACTCCTG- 
GTTGGTCTTACATTCT- 
GTCGCCTCCTACTA- 
GAGCCGGCATATTCTA- 
GAAGGGCCGCCTTCATGTGGC- 
etc.

Which looks ragged with \tt. Certainly, this is because ConTeXt applies the 
default hyphenation pattern. But I guess, there might be no “no language” 
pattern or is there? Also, I agree, it’s a bit odd that nright/nleft seem to 
make no difference towards the result.

This is the MWE based on your solution:

\define[2]\mycommandc{
\startxrow
\startxcell o#1 \stopxcell
\startxcell \tt\WORD{5'-#2} \stopxcell
\stopxrow
}

\definebreakpoint[mybreaks][][nright=100,nleft=100,type=1]
\setbreakpoints[mybreaks]

\starttext

\setupxtable[width=5cm]
\startxtable
\mycommandc{C}{GATTGCTTACTCCTGGTTGGTCTTACATTCTGTCGCCTCCTACTAGAGCCGGCATATTCTAGAAGGGCCGCCTTCATGTGGCCTAGGGCACCATCGCGTACGAGGGCAATGAGTTTACCGCTGCGAAGTCTCTACGTCACGGCCAACCACAGTCCTGCTCCCAACGAAATTTAGACGCTGTCGTGAAACCTGAATTCGAGGATAAGCCGCGTCATGAAGAGTCTACTG}
\stopxtable

\stoptext

> On 23 Apr 2020, at 22:02, ntg-context-requ...@ntg.nl wrote:
> 
> Send ntg-context mailing list submissions to
>   ntg-context@ntg.nl
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   https://mailman.ntg.nl/mailman/listinfo/ntg-context
> or, via email, send a message with subject or body 'help' to
>   ntg-context-requ...@ntg.nl
> 
> You can reach the person managing the list at
>   ntg-context-ow...@ntg.nl
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ntg-context digest..."
> Today's Topics:
> 
>   1. Re: Hyphentation/Linebreak after x characters inside \WORD?
>  (Rik Kabel)
> 
> From: Rik Kabel 
> Subject: Re: [NTG-context] Hyphentation/Linebreak after x characters inside 
> \WORD?
> Date: 23 April 2020 at 21:46:59 CEST
> To: ntg-context@ntg.nl, benjamin.buchmul...@gmail.com
> 
> 
> 
> 
> On 4/23/2020 15:01, Benjamin Buchmuller wrote:
>> Sorry, I have just realized that the problem might not be \WORD{} actually, 
>> so this one hyphenates:
>> 
>> \define[2]\mycommand{
>>  \startxrow
>>  \startxcell o#1 \stopxcell
>>  \startxcell \tt\WORD #2 \stopxcell
>>  \stopxrow
>>  }
>> 
>> Whereas these ones don’t: 
>> 
>> 
>> \define[2]\mycommand{
>>  \startxrow
>>  \startxcell o#1 \stopxcell
>>  \startxcell \tt\WORD #2-3' \stopxcell
>>  \stopxrow
>>  }
>> 
>> \define[2]\mycommand{
>>  \startxrow
>>  \startxcell o#1 \stopxcell
>>  \startxcell 5'-\tt\WORD #2 \stopxcell
>>  \stopxrow
>>  }
>> 
>> Assuming that this has to do with the presence of “-“ which will be the 
>> preferred breakpoint. So, I guess the questions boils down to how to define 
>> the second argument of
>> 
>> \definebreakpoint[mybreaks][][nright=12,nleft=12,type=1]
>> 
>> in this case or how to “deactivate” the default \setbreakpoints[compound]?
>> 
>> 
>> 
>>> On 23 Apr 2020, at 20:46, Benjamin Buchmuller 
>>> 
>>>  wrote:
>>> 
>>> Hi again,
>>> 
>>> I am reading a CSV file into ConTeXt which contains long DNA sequences (>> 
>>> 40 characters) to place in xtables. So far, this works fine. However, I 
>>> need to uppercase the entries and need to \tt them. When I do this inside 
>>> \WORD however, they don’t hyphenate any more.
>>> 
>>> I’m using:
>>> 
>>> \defineseparatedlist
>>> [mylist]
>>> [
>>> separator={,}, quotechar={"},
>>> command=\mycommand
>>> ]
>>> 
>>> \define[2]\mycommand{
>>> \startxrow
>>> \startxcell o#1 \stopxcell
>>> \startxcell 5’-{\tt\WORD{#2}}-3' \stopxcell
>>> \stopxrow
>>> }
>>> 
>>> Since I don’t have access to each entry, I cant place hyphenation marks 
>>> directly. Is there a way to tell ConTeXt to hyphenate after say, 12 
>>> characters?
>>> 
>>> Thanks for your help.
>>> 
>>> 
>>> Benjamin
>>> 
> The following works for me: 
> 
> \define[2]\mycommanda{
> \startxrow
> \startxcell o#1 \stopxcell
> \startxcell \tt\WORD #2 \stopxcell
> \stopxrow
> }
> 
> \define[2]\mycommandb{
> \startxrow
> \startxcell o#1 \stopxcell
> \startxcell \tt\WORD #2-3' \stopxcell
> \stopxrow
> }
> 
> \define[2]\mycommandc{
> \startxrow
> \startxcell o#1 \stopxcell
> \startxcell 5'-\tt\WORD #2 \stopxcell
> \stopxrow
> }
> 
> \definebreakpoint[mybreaks][][nright=12,nleft=12,type=1]
> \setbreakpoints[mybreaks]
> 
> \starttext
> 
> \setupxtable[width=5cm]
> \startxtablex
> 

Re: [NTG-context] Basic font question (Optima, but no bold, no italics)

2020-04-23 Thread Gerben Wierda

> On 23 Apr 2020, at 19:18, Henning Hraban Ramm  wrote:
> 
>> 
>> Am 23.04.2020 um 16:42 schrieb Gerben Wierda :
>> 
>>> 
>>> On 23 Apr 2020, at 16:34, Henning Hraban Ramm  wrote:
>>> 
 
 Am 23.04.2020 um 16:22 schrieb Gerben Wierda :
 
 
 
> On 23 Apr 2020, at 16:16, Vladimir Lomov  wrote:
> 
> Hello,
> ** Gerben Wierda  [2020-04-23 16:00:34 +0200]:
> 
>> On my Mac, I am trying:
> 
>> \definefontfamily[mainface][rm][Optima]
>> \setupbodyfont[mainface,10pt]
> 
>> {\bf Bold} and {\it Italic} and {\rm Regular} text.
> 
> https://wiki.contextgarden.net/Font_Switching
> 
>> What do I need to do to get actual bold and italics in my output?
> 
> \bi == \bf\it
> 
> Or by "actual bold" you mean something different?
 
 Yes, in my output everything is regular, there is no bold or italics text, 
 even when I use \bf or \it
>>> 
>>> What do you get from
>>> mtxrun --script=fonts --list --all --pattern=Optima
>> 
>> hermione:Export and Metapost gerben$ mtxrun --script fonts --list --all 
>> --pattern=optima
>> identifier familyname   fontname   filename  
>>  subfont   instances
>> 
>> optimablackoptima   optimaextrablack   
>> /System/Library/Fonts/Optima.ttc   5
>> optimabold optima   optimabold 
>> /System/Library/Fonts/Optima.ttc   2
>> optimabolditalic   optima   optimabolditalic   
>> /System/Library/Fonts/Optima.ttc   4
>> optimaextrablack   optima   optimaextrablack   
>> /System/Library/Fonts/Optima.ttc   5
>> optimaitalic   optima   optimaitalic   
>> /System/Library/Fonts/Optima.ttc   3
>> optimanormal   optima   optimaregular  
>> /System/Library/Fonts/Optima.ttc   1
>> optimaregular  optima   optimaregular  
>> /System/Library/Fonts/Optima.ttc   1
> 
> Hm. Here, ConTeXt only found subfont #5 until I rebuilt the font cache, then 
> it looked like yours.
> 
> And the minimal example (plus \starttext ... \stoptext) worked.
> 
> (Latest ConTeXt on MacOS Mojave.)


No such luck for me. Any help welcome. I did remove the macOS font cache with 
sudo atsutil databases -remove and I rebooted. I am running an up to date macOS 
Mojave.

\starttext
\definefontfamily[mainface][rm][Optima]
\setupbodyfont[mainface,10pt]

{\bf Bold} and {\it Italic} and {\rm Regular} text.
\stoptext

results in



Gerben Wierda
Chess and the Art of Enterprise Architecture 
Mastering ArchiMate 
Architecture for Real Enterprises 
 at InfoWorld
On Slippery Ice  at EAPJ

Console:

$ context test.tex

resolvers   | formats | executing runner 'run luametatex format': 
/usr/local/context-osx-64/tex/texmf-osx-64/bin/luametatex --jobname="test" 
--fmt=/usr/local/context-osx-64/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/usr/local/context-osx-64/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./test.tex" 
--c:input="./test.tex" --c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/usr/local/context-osx-64/tex/texmf-osx-64/bin"
This is LuaMetaTeX, Version 2.05.01 
open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2020.04.03 10:31 MKIV beta  fmt: 2020.4.7  int: 
english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'/usr/local/context-osx-64/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name 
'/usr/local/context-osx-64/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'test', input './test', result 'test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name './test.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
backend > xmp > using file 
'/usr/local/context-osx-64/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 2, order 3, name './test.tex'
close source> level 1, order 3, name 'cont-yes.mkiv'

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
/usr/local/context-osx-64/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.006 seconds, 0 scans with 
scantime 0.000 seconds, 0 shared scans, 12 found files, scanned paths: 
mkiv lua stats 

Re: [NTG-context] Hyphentation/Linebreak after x characters

2020-04-23 Thread Wolfgang Schuster

Benjamin Buchmuller schrieb am 23.04.2020 um 23:16:

Hi Rik,

Thanks for the fast reply! Your example works indeed nicely. However, within 
this solution my problem has shifted now (fully) towards breaking after the 
same number of characters, which seems to work for your sample string, but not 
for the sequences that I need to place.

What I would like to achieve is something like:

5’-GATTGCTTACTCCTGGTTGG
TCTTACATTCTGTCGCCTC
CTACTAGAGCCGGCATATT
CTAGAAGGGCCGCCTTCATGTGG
etc.

(There might be hyphens or not, this is not so much important to me.)

But what I get is currently:

5'-GATTGCTTACTCCTG-
GTTGGTCTTACATTCT-
GTCGCCTCCTACTA-
GAGCCGGCATATTCTA-
GAAGGGCCGCCTTCATGTGGC-
etc.

Which looks ragged with \tt. Certainly, this is because ConTeXt applies the 
default hyphenation pattern. But I guess, there might be no “no language” 
pattern or is there? Also, I agree, it’s a bit odd that nright/nleft seem to 
make no difference towards the result.


Hans posted a solution for a similar problem a few years ago [1]
which can be adapted to your problem.

\startluacode

 local shared = {
 start  = 1,
 length = 1,
 before = nil,
 after  = nil,
 left   = false,
 right  = false,
 }

 local all = table.setmetatableindex({ }, function(t,k)
 return shared
 end)

 languages.hyphenators.traditional.installmethod("dna",
 function(dictionary,word,n)
 return all
 end
 )
\stopluacode

\definehyphenationfeatures
  [dna]
  [characters=all,
   alternative=dna]

\starttext

\startframedtext[width=6cm,style=mono]
  \sethyphenationfeatures[dna]
  \setuphyphenation[method=traditional]
  GATTGCTTACTCCTGGTTGG%
  TCTTACATTCTGTCGCCTC%
  CTACTAGAGCCGGCATATT%
  CTAGAAGGGCCGCCTTCATGTGG%
\stopframedtext

\stoptext

[1] https://mailman.ntg.nl/pipermail/ntg-context/2017/089106.html

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] Hyphentation/Linebreak after x characters

2020-04-23 Thread Benjamin Buchmuller
Thanks Wolfgang, this works perfectly. I will add this hint tomorrow to the 
Wiki.

> On 23 Apr 2020, at 23:50, Wolfgang Schuster 
>  wrote:
> 
> Benjamin Buchmuller schrieb am 23.04.2020 um 23:16:
>> Hi Rik,
>> Thanks for the fast reply! Your example works indeed nicely. However, within 
>> this solution my problem has shifted now (fully) towards breaking after the 
>> same number of characters, which seems to work for your sample string, but 
>> not for the sequences that I need to place.
>> What I would like to achieve is something like:
>> 5’-GATTGCTTACTCCTGGTTGG
>> TCTTACATTCTGTCGCCTC
>> CTACTAGAGCCGGCATATT
>> CTAGAAGGGCCGCCTTCATGTGG
>> etc.
>> (There might be hyphens or not, this is not so much important to me.)
>> But what I get is currently:
>> 5'-GATTGCTTACTCCTG-
>> GTTGGTCTTACATTCT-
>> GTCGCCTCCTACTA-
>> GAGCCGGCATATTCTA-
>> GAAGGGCCGCCTTCATGTGGC-
>> etc.
>> Which looks ragged with \tt. Certainly, this is because ConTeXt applies the 
>> default hyphenation pattern. But I guess, there might be no “no language” 
>> pattern or is there? Also, I agree, it’s a bit odd that nright/nleft seem to 
>> make no difference towards the result.
> 
> Hans posted a solution for a similar problem a few years ago [1]
> which can be adapted to your problem.
> 
> \startluacode
> 
> local shared = {
> start  = 1,
> length = 1,
> before = nil,
> after  = nil,
> left   = false,
> right  = false,
> }
> 
> local all = table.setmetatableindex({ }, function(t,k)
> return shared
> end)
> 
> languages.hyphenators.traditional.installmethod("dna",
> function(dictionary,word,n)
> return all
> end
> )
> \stopluacode
> 
> \definehyphenationfeatures
>  [dna]
>  [characters=all,
>   alternative=dna]
> 
> \starttext
> 
> \startframedtext[width=6cm,style=mono]
>  \sethyphenationfeatures[dna]
>  \setuphyphenation[method=traditional]
>  GATTGCTTACTCCTGGTTGG%
>  TCTTACATTCTGTCGCCTC%
>  CTACTAGAGCCGGCATATT%
>  CTAGAAGGGCCGCCTTCATGTGG%
> \stopframedtext
> 
> \stoptext
> 
> [1] https://mailman.ntg.nl/pipermail/ntg-context/2017/089106.html
> 
> 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
___