[NTG-context] How to enable Ligatures

2018-08-23 Thread Michael Zhu
Hi all,

Fira Code is Monospaced font with programming ligatures. I don't know
how to enable ligatures feature.

I hope someone can give me an example.

https://github.com/tonsky/FiraCode

Michael
___
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] Emacs + latest beta

2018-08-23 Thread Vladimir Lomov
Hello,
** Fabrice Couvreur [2018-08-23 10:48:42 +0200]:

> Hi,
> Thanks for your help but ...

I checked again and it is fine. May be I was too unspecific. First, I
changed a bit your example to this one:

[test.tex]
 8< 
\setupsynctex[state=start]

\startusableMPgraphic{NumberHead}
  draw outlinetext.f
  ("\bf\namedheadnumber{chapter}")
  (withcolor "lightgray")
  ysized 50pt ;
\stopusableMPgraphic

\unexpanded\def\processMPheadnumber#1%
  {\useMPgraphic{NumberHead}}

\setuphead%
[chapter]%
[command=\HeadTitle,%
 headstyle=\ss,%
 numbercommand=\processMPheadnumber]

\unexpanded\def\HeadTitle#1#2%
{\framed%
  [frame=off,%
bottomframe=on,%
width=broad,
align={broad,nothyphenated,left}]%
{#1\blank[nowhite]#2}}

\starttext
\startchapter[title=First chapter]
  \input ward
\stopchapter
\stoptext

%%% Local Variables:
%%% mode: context
%%% TeX-master: t
%%% End:
 8< 

And second, I tweaked a bit my Emacs configuration:

 8< 
(setenv "TEXMFCNF" nil)
(setenv "TEXROOT" "/usr/local/opt/context/tex")
(setenv "TEXMFCACHE" (format "%s/.cache" (getenv "HOME")))
 8< 

(I have to do that because I have both TeX Live and ConTeXt
Standalone/Suite in parallel, and use mainly LaTeX.)

You should check your Emacs configuration.

This is my Emacs configuration:
https://bitbucket.org/vp1981/scripts/src/master/config/emacs/
and I have
Emacs:  27.0.50 (git)
AUCTEX: 12.1 (git)

[...]

---
WBR, Vladimir Lomov

-- 
Come, you spirits
That tend on mortal thoughts, unsex me here,
And fill me, from the crown to the toe, top-full
Of direst cruelty! make thick my blood,
Stop up the access and passage to remorse
That no compunctious visiting of nature
Shake my fell purpose, not keep peace between
The effect and it! Come to my woman's breasts,
And take my milk for gall, you murdering ministers,
Wherever in your sightless substances
You wait on nature's mischief! Come, thick night,
And pall the in the dunnest smoke of hell,
That my keen knife see not the wound it makes,
Nor heaven peep through the blanket of the dark,
To cry `Hold, hold!'
-- Lady MacBeth


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] Emacs + latest beta

2018-08-23 Thread Vladimir Lomov
Hello,
** Wolfgang Schuster [2018-08-23 20:58:01 +0200]:

> You get an error message because outlinetext doesn’t work.
> 
> \starttext
> 
> \startMPcode
> draw outlinetext.f
> ("A")
> () ;
> \stopMPcode
> 
> \stoptext

The example that Fabrice Couvreur presented works fine on my side,
besides

> Fabrice Couvreur schrieb am 22.08.18 um 13:05:
>> Hello,
>> Sorry to insist, but could anyone help me understand the problem I'm
>> having in using Emacs with standalone context ?
>> The following file compiles perfectly from a terminal :

--^^

[...]

---
WBR, Vladimir Lomov

-- 
No snowflake in an avalanche ever feels responsible.


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] Emacs + latest beta

2018-08-23 Thread Wolfgang Schuster

You get an error message because outlinetext doesn’t work.

\starttext

\startMPcode
draw outlinetext.f
("A")
() ;
\stopMPcode

\stoptext


Wolfgang


Fabrice Couvreur schrieb am 22.08.18 um 13:05:

Hello,
Sorry to insist, but could anyone help me understand the problem I'm 
having in using Emacs with standalone context ?

The following file compiles perfectly from a terminal :

/home/aragorn/texlive/2018/bin/x86_64-linux/context test.tex

/home/aragorn/context/tex/texmf-linux-64/bin/context test.tex (latest 
beta)


With Emacs, it compiles perfectly if you use the 2018 texlive context 
binary.


If I want to use the latest beta context binary, I need to add this to 
my ~/.emacs file :


(setenv "PATH" "/home/aragorn/context/tex/texmf-linux-64/bin/:$PATH" t)

And there, I encounter a compilation problem :

Running `ConTeXt Full' on `pouf' with ``context --purgeall --nonstop 
pouf.tex''resolvers   | trees | analyzing 'home:texmf'
mtx-context | run 1: luatex 
--fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" 
--interaction="nonstopmode" --jobname="pouf" 
--lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" 
--no-parse-first-line --c:currentrun=1 --c:fulljobname="./pouf.tex" 
--c:input="./pouf.tex" --c:kindofrun=1 --c:maxnofruns=9 
--c:nonstopmode --c:purgeall "cont-yes.mkiv"


This is LuaTeX, Version 1.08.0 (TeX Live 2018)
 system commands enabled.

resolvers   > trees > analyzing 'home:texmf'
open source > level 1, order 1, name 
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

job > passes > version mismatch: 1.3 <> 1.31
system >
system  > ConTeXt  ver: 2018.08.20 17:47 MKIV beta fmt: 
2018.8.20  int: english/english

system  >
system > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'/home/aragorn/context/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 
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'


system > files > jobname 'pouf', input './pouf', result 'pouf'
fonts > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/aragorn/pouf.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
structure   > sectioning > chapter @ level 2 : 0.1 -> First chapter
metapost> initializing instance 'metafun:1' using format 
'metafun' and method 'default'
metapost> loading 'metafun' as 
'/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv' 
using method 'default'

metapost> initializing number mode 'scaled'

lua error   > lua error on line 10 in file /home/aragorn/pouf.tex:

...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: 
attempt to call a nil value (global 'getid')

stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: in 
upvalue 'getexpansion'
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:343: in 
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:338>
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:437: in 
local 'boxtomp'
...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1894: in 
function 
<...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1891>

(...tail calls...)

 1
 2 \startusableMPgraphic{NumberHead}
 3  draw outlinetext.f
 4 ("\bf\namedheadnumber{chapter}")
 5  (withcolor "lightgray")
 6   ysized 50pt ;
 7 \stopusableMPgraphic
 8
 9 \unexpanded\def\processMPheadnumber#1%
10 >> {\useMPgraphic{NumberHead}}
11
12 \setuphead
13 [chapter]
14[command=\HeadTitle,
15 headstyle=\ss,
16 numbercommand=\processMPheadnumber,
17 ]
18
19
20 \unexpanded\def\HeadTitle#1#2%


open source > level 3, order 4, name 
'/home/aragorn/context/tex/texmf-context/tex/context/sample/common/ward.tex'
close source> level 3, order 4, name 
'/home/aragorn/context/tex/texmf-context/tex/context/sample/common/ward.tex'
backend > xmp > using file 
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'

pages > flushing realpage 1, userpage 1, subpage 1
close source> level 2, order 4, name '/home/aragorn/pouf.tex'
close source> level 1, order 4, name 
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'


mkiv lua stats  > used config file: 
selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 1 scans 
with scantime 0.000 seconds, 0 shared scans, 31 found files, 

Re: [NTG-context] Emacs + latest beta

2018-08-23 Thread Fabrice Couvreur
Hi,
Thanks for your help but ...

Running `ConTeXt' on `vladimir' with
``PATH=/home/aragorn/context/tex/texmf-linux-64/bin:$PATH context vladimir''
resolvers   | trees | analyzing 'home:texmf'
mtx-context | warning: no (local) file './vladimir', proceeding
mtx-context | run 1: luatex
--fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
--jobname="vladimir"
--lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
--no-parse-first-line --c:currentrun=1 --c:fulljobname="./vladimir"
--c:input="./vladimir" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv"

This is LuaTeX, Version 1.08.0 (TeX Live 2018)
 system commands enabled.

resolvers   > trees > analyzing 'home:texmf'
open source > level 1, order 1, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system  >
system  > ConTeXt  ver: 2018.08.20 17:47 MKIV beta  fmt: 2018.8.20
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/home/aragorn/context/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
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'vladimir', input './vladimir', result
'vladimir'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/aragorn/vladimir.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
structure   > sectioning > chapter @ level 2 : 0.1 -> First chapter
metapost> initializing instance 'metafun:1' using format 'metafun'
and method 'default'
metapost> loading 'metafun' as
'/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
using method 'default'
metapost> initializing number mode 'scaled'

lua error   > lua error on line 10 in file /home/aragorn/vladimir.tex:

...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: attempt to
call a nil value (global 'getid')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: in
upvalue 'getexpansion'
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:343: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:338>
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:437: in
local 'boxtomp'
...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1894: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1891>
(...tail calls...)

 1 \startusableMPgraphic{NumberHead}
 2  draw outlinetext.f
 3  ("\bf\namedheadnumber{chapter}")
 4  (withcolor "lightgray")
 5   ysized 50pt ;
 6 \stopusableMPgraphic
 7
 8 \unexpanded\def\processMPheadnumber#1%
 9   {\useMPgraphic{NumberHead}}
10 >>
11 \setuphead
12[chapter]
13[command=\HeadTitle,
14 headstyle=\ss,
15 numbercommand=\processMPheadnumber,
16]
17
18
19 \unexpanded\def\HeadTitle#1#2%
20   {\framed


?
Fabrice

Le jeu. 23 août 2018 à 08:06, Vladimir Lomov  a écrit :

> Hello,
> ** Fabrice Couvreur [2018-08-22 13:05:31 +0200]:
>
> > Hello,
> > Sorry to insist, but could anyone help me understand the problem I'm
> having
> > in using Emacs with standalone context ?
>
> Check environment variables both in terminal and Emacs.
>
> > The following file compiles perfectly from a terminal :
> >
> > /home/aragorn/texlive/2018/bin/x86_64-linux/context  test.tex
> >
> > /home/aragorn/context/tex/texmf-linux-64/bin/context  test.tex (latest
> beta)
> >
> > With Emacs, it compiles perfectly if you use the 2018 texlive context
> > binary.
> >
> > If I want to use the latest beta context binary, I need to add this to my
> > ~/.emacs file :
> >
> > (setenv "PATH" "/home/aragorn/context/tex/texmf-linux-64/bin/:$PATH" t)
>
> Instead of this I use this (in my ~/.emacs):
>
> (eval-after-load "context"
>   '(setq TeX-command-list
>  (cons '("ConTeXt"
> "PATH=/usr/local/opt/context/tex/texmf-linux-64/bin:$PATH context %s"
>TeX-run-command nil t :help "Run context (MarkIV)")
> TeX-command-list))
> )
>
> > And there, I encounter a compilation problem :
>
> and I don't see any errors (note, that in my case the "target" in
> "ConTeXt", not "ConTeXt Full").
>
> > Running `ConTeXt Full' on `pouf' with ``context --purgeall --nonstop
> > pouf.tex''resolvers   | trees | analyzing 'home:texmf'
> > mtx-context | run 1: luatex
> >
> --fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
> > 

Re: [NTG-context] Emacs + latest beta

2018-08-23 Thread Vladimir Lomov
Hello,
** Fabrice Couvreur [2018-08-22 13:05:31 +0200]:

> Hello,
> Sorry to insist, but could anyone help me understand the problem I'm having
> in using Emacs with standalone context ?

Check environment variables both in terminal and Emacs.

> The following file compiles perfectly from a terminal :
> 
> /home/aragorn/texlive/2018/bin/x86_64-linux/context  test.tex
> 
> /home/aragorn/context/tex/texmf-linux-64/bin/context  test.tex (latest beta)
> 
> With Emacs, it compiles perfectly if you use the 2018 texlive context
> binary.
> 
> If I want to use the latest beta context binary, I need to add this to my
> ~/.emacs file :
> 
> (setenv "PATH" "/home/aragorn/context/tex/texmf-linux-64/bin/:$PATH" t)

Instead of this I use this (in my ~/.emacs):

(eval-after-load "context"
  '(setq TeX-command-list
 (cons '("ConTeXt" 
"PATH=/usr/local/opt/context/tex/texmf-linux-64/bin:$PATH context %s"
   TeX-run-command nil t :help "Run context (MarkIV)") TeX-command-list))
)

> And there, I encounter a compilation problem :

and I don't see any errors (note, that in my case the "target" in
"ConTeXt", not "ConTeXt Full").

> Running `ConTeXt Full' on `pouf' with ``context --purgeall --nonstop
> pouf.tex''resolvers   | trees | analyzing 'home:texmf'
> mtx-context | run 1: luatex
> --fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
> --interaction="nonstopmode" --jobname="pouf"
> --lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
> --no-parse-first-line --c:currentrun=1 --c:fulljobname="./pouf.tex"
> --c:input="./pouf.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:nonstopmode
> --c:purgeall "cont-yes.mkiv"
[...]

---
WBR, Vladimir Lomov

-- 
Old timer, n.:
One who remembers when charity was a virtue and not an organization.


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
___