Re: [NTG-context] Text overflowing on a figure included in a float

2018-04-09 Thread Fabrice Couvreur
Hi Hans,
It's true I wanted to talk about style and not class.
I added  \mainlanguage [fr].
Fabrice

2018-04-09 19:44 GMT+02:00 Hans Hagen :

> On 4/9/2018 6:33 PM, Fabrice Couvreur wrote:
>
>> Hi Hans,
>> The solution you propose fixes the problem with the attached file, thanks.
>> However, the problem is not solved if I use the class you created for the
>> document
>> ​ fonts-mkiv.​
>>
> class? you mean the style? well, it's for that manual so for english ...
> which means that you need to set the language
>
> 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/list
> info/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] Build for Alpine Linux

2018-04-09 Thread Arthur Reutenauer
> A few notes:
> a.) On some platforms fgrep has been deprecated (in favour of `grep -F`) so
> it's not future-proof

  I don’t think the aliases fgrep and egrep have ever been supposed to
be portable.  POSIX has grep -F and grep -E, and that’s what we should
use.

> b.) The caret (^) passed to `grep -F` will not be interpreted as a regex,
> since -F forces non-regexp, meaning the '^' will be interpreted literally
> (and the string "^musl" is not in the ldd output).

  The caret in itself was not the problem, only that it was not escaped
for the shell.  Testing a regexp, with -E of course, is just as robust,
and allows us to be more specific about what we test.

> if command -v ldd >/dev/null && ldd --version 2>&1 | grep -Fq 'musl' > 
> /dev/null

  grep -E '^musl' works just as well; and as I explained, -q may return
0 even if there are errors, so should be avoided.

Best,

Arthur
___
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] Build for Alpine Linux

2018-04-09 Thread Brian Hunt
Here are a couple experimental observations.

1. Detecting musl.

-- Alpine Linux/sh --
$ ldd --version 2>&1 | grep -F musl
musl libc (x86_64)
$? = 0

-- Debian/bash --
$ ldd --version 2>&1 | grep -F musl
 (nothing; $? = 1)

-- Debian/zsh --
$ ldd --version 2>&1 | grep -F musl
(nothing; $? = 1)

A few notes:
a.) On some platforms fgrep has been deprecated (in favour of `grep -F`) so
it's not future-proof
b.) The caret (^) passed to `grep -F` will not be interpreted as a regex,
since -F forces non-regexp, meaning the '^' will be interpreted literally
(and the string "^musl" is not in the ldd output).
c.) It's likely safe to assume that the string 'musl' will only occur in
`ldd --version` where musl is installed
d.) I did not test a case Arthur described here
https://mailman.ntg.nl/pipermail/ntg-context/2018/091123.html, but the use
of -F ought to avoid the zsh EXTENDED_GLOB  problem

Based on this, a reasonably portable detection of musl in first-setup.sh
and tex/setuptex might be:

if command -v ldd >/dev/null && ldd --version 2>&1 | grep -Fq 'musl' >
/dev/null


2. Running /context/first-setup.sh the link /context/bin/texlua did not
exist and first-setup.sh fails.
Once symlinked to `luatex` in the same directory, first-setup.sh will run
rsync.

3. Similarly /context/tex/texmf-linuxmusl-64/bin/texlua does not exist, so
setuptex fails.
Once symlinked `luatex -> texlua` then setuptex can be executed (bearing in
mind `setuptex` needs to be updated with the same musl detection test as
first-setup.sh)

4. setuptex needs to be called with an explicit directory otherwise it
complains with

""/bin" is not a valid TEXROOT path.
(There is no file "/bin/texmf/tex/plain/base/plain.tex")
provide a proper tex root (like '. setuptex /something/tex')"

Running this will run setuptex variables:

$ . /context/tex/setuptex /context/tex
Setting "/context/tex" as ConTeXt root.

5. Running context exits with:
mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'

That's as far as I have gotten for now, but I thought this enough to report.

6. I am happy to take direction and report, but it is also straightforward
to reproduce with Docker via the Dockerfile:

FROM python:3.6-alpine3.7
RUN apk --no-cache add rsyncWORKDIR /context

Then running docker:

$ docker build -t context .

$ docker run -ti context /bin/sh

Then in the docker container shell, run:

$ cd /context

$ wget http://minimals.contextgarden.net/setup/first-setup.sh \$ sh
./first-setup.sh --modules=all --engine=luatex

(please pardon the formatting - some copying and pasting here).

I hope this is helpful.

Cheers,
Brian


On Sun, 8 Apr 2018 at 20:52 Henri Menke  wrote:

> On Sun, 2018-04-08 at 22:50 +0200, Mojca Miklavec wrote:
> > Dear Brian,
> >
> > On 8 April 2018 at 16:56, Brian Hunt wrote:
> > >
> > > Hello everyone,
> > >
> > > Per this question on tex.StackOverflow, I am having trouble getting
> ConTeXt
> > > (LuaTeX specifically) to run on Alpine Linux:
> > >
> > > https://tex.stackexchange.com/questions/425463
> > >
> > > Specifically, the build from ConTeXt standalone has a LuaTeX that
> seems not
> > > to run against the musl libc6 library.
> > We have a "nearly working" one. At least all the binaries should be
> > there, see for example:
> > http://distribution.contextgarden.net/setup/linuxmusl-64/
> >
> > There are two to three remaining problems:
> >
> > 1.) I disabled automatic musl recognition (short after enabling it)
> > after this bug report:
> > https://mailman.ntg.nl/pipermail/ntg-context/2018/091094.html
> > I need to finish "parsing"
> > https://mailman.ntg.nl/pipermail/ntg-context/2018/091123.html
> > and a few other posts in that thread and maybe make some additional
> > testing. There was some "oh no, it has to be the other way around"
> > discussion where I no longer followed and I need some more time to
> > read everything more carefully (no time for that right now).
> >
> > 2.) Most likely a patch in mtxrun is still needed (but I admit that I
> > didn't check) for proper platform recognition. The fact that we are
> > struggling in shell doesn't really help doing this part either :)
> >
> > 3.) Ideally we need to set up some automated LuaTeX builds to be able
> > to get the latest LuaTeX binaries in the future.
>
> Similar to TeX live I have set up an automated Travis CI build, which can
> deploy
> binaries to GitHub releases.
> https://github.com/hmenke/luatex/blob/master/.travis.yml
>
> However, I just forked Adam's mirror and I am not planning to keep mine
> updated.
> It would be nice to have some sort of “official” LuaTeX mirror on GitHub
> for
> that.  Nevertheless, it might be worthwhile to check the '.travis.yml' I
> posted
> above into the LuaTeX SVN.
>
> >
> > >
> > > Has anyone run ConTeXt on Alpine?
> > At the moment it should work if you install TeX Live 2018 pretest with
> > the ConTeXt scheme or if you fiddle a bit with the installation (you
> > need to hardcode the 

Re: [NTG-context] double followtokens?

2018-04-09 Thread Pablo Rodriguez
On 04/08/2018 11:17 PM, Hans Hagen wrote:
> On 4/8/2018 8:10 PM, Pablo Rodriguez wrote:
>> [...]
>> \reversedtext is undefined (I’m using beta from 2018.04.04 00:51).
> 
> of course it is ... it's basically the lua snippet i sent a few mails ago

Now I know which one it was.

>> But even commenting that second command, \followtokens seems to require
>> that path is named RotPath to be used the text. I get the standard line.
> 
> sure, that's how it works (at least with that module ... that trickery 
> dates from mkii)
> 
>> What am I doing wrong here?
> 
> probably using a mechanism in a way that is a bit over the top
> 
> (so you can wait till the embedded variant shows up)

I’ll wait until MP includes it.

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] Text overflowing on a figure included in a float

2018-04-09 Thread Hans Hagen

On 4/9/2018 6:33 PM, Fabrice Couvreur wrote:

Hi Hans,
The solution you propose fixes the problem with the attached file, thanks.
However, the problem is not solved if I use the class you created for 
the document

​ fonts-mkiv.​
class? you mean the style? well, it's for that manual so for english ... 
which means that you need to set the language


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] Text overflowing on a figure included in a float

2018-04-09 Thread Fabrice Couvreur
Hi Hans,
The solution you propose fixes the problem with the attached file, thanks.
However, the problem is not solved if I use the class you created for the
document
​ fonts-mkiv.​
Fabrice

2018-04-08 11:54 GMT+02:00 Hans Hagen :

> On 4/8/2018 11:08 AM, Fabrice Couvreur wrote:
>
>> Hello,
>> Sorry if the example is not minimal but otherwise it would be difficult
>> to explain the problem. The text overflows on the figure and I do not know
>> how to correct this.
>>
>
> By choosing the right language:
>
> \mainlanguage[fr]
>
> or increasing the tolerance:
>
> % \setuptolerance[stretch,verytolerant]
>
>
> Thank you
>> Fabrice
>>
>>
>> \usemodule[pgfplots]
>>
>> \pgfplotsset{compat=newest}
>>
>> \starttext
>> \placefigure[right,none]{}{
>> \hbox{\framed{\switchtobodyfont[8pt]
>> \starttikzpicture[/pgf/declare function={g(\x)=3*\x +7;},/pgf/declare
>> function={f(\x)=-4*\x +1;},/pgf/declare function={h(\x)=2*\x -5;}]
>> \startaxis[
>>   restrict x to domain=-20:20, xmax=20, xmin=-20,
>>   restrict y to domain=-25:30, ymax=30, ymin=-25,
>>   x=0.1cm,
>>   y=0.1cm,
>>   axis x line = middle,
>>   axis y line = middle,
>>   axis line style =  thick,
>>   major grid style=gray,
>>   minor grid style=gray,
>>   tickwidth=0.1cm,
>>   xtick align=outside,
>>   ytick align=outside,
>>   grid=both,
>>   xtick={-15,-10,...,15},
>>   ytick={-20,-15,...,25},
>>   xticklabels={\empty,\empty,\empty,\empty,5,\empty,\empty,\empty},
>>   yticklabels={\empty,\empty,\empty,\empty,\empty,5,\empty,\
>> empty,\empty,\empty,\empty,\empty},
>>   extra x ticks={-20,20},
>>   extra x tick label={\null},
>>   extra y ticks={-25,30},
>>   extra y tick label={\null},
>>   extra tick style={tick style={draw=none}},
>>   every tick/.style={
>>  black,
>>  thick,
>>},
>>   y tick label style={
>> /pgf/number format/1000 sep={}
>> },
>>   xlabel=$x$,ylabel=$y$,
>>   every axis x label/.style={
>>  at={(ticklabel* cs:1.01)},
>>  anchor=west,
>> },
>> every axis y label/.style={
>>  at={(ticklabel* cs:1.01)},
>>  anchor=south,
>> },
>>   samples=2000,
>>   >=stealth,
>> ]
>>
>> \addplot [smooth,domain=-20:20,thick,darkblue] {f(x)} ;
>> \addplot [smooth,domain=-20:20,thick,darkred] {g(x)} ;
>> \addplot [smooth,domain=-20:20,thick,yellow] {h(x)} ;
>>
>> \draw[thick,darkgreen](5,-25)--(5,30) ;
>>
>> \node[below left=2pt] at (-0.1,-0.1,0) {\math{0}} ;
>>
>> \stopaxis
>> \stoptikzpicture}}}
>>\startitemize[n]
>>\item On considère les droites \math{{\cal D}\,\colon x=5} et
>> \math{{\cal D'}\,\colon y=3x+7}.
>>
>>  \startitemize[a]
>>  \item Que vaut l'abscisse du point d'intersection de \math{{\cal D}}
>> et \math{{\cal D'}} ?
>>  \item Calculer alors son ordonnée.
>>  \item Interpréter graphiquement le résultat sur le graphique.
>>  \stopitemize
>>\item On considère les droites \math{\Delta \,\colon y=-4x+1} et
>> \math{\Delta '\,\colon y=2x-5}.
>>
>>  \startitemize[a]
>>  \item Résoudre l'équation \math{-4x+1=2x-5}.
>>  \item Donner une interprétation graphique de la solution obtenue.
>>  \item Donner les coordonnées du point d'intersection de
>> \math{\Delta} et \math{\Delta '}.
>>  \item Interpréter graphiquement le résultat sur le graphique.
>>  \stopitemize
>>\stopitemize
>> \stoptext
>>
>>
>> 
>> ___
>> 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/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> 
>> ___
>>
>>
>
> --
>
> -
>   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/list
> info/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 / 

Re: [NTG-context] how to change the colour of the footnote marker

2018-04-09 Thread Hans Hagen

On 4/9/2018 12:18 PM, Robert Zydenbos wrote:

On 09.04.2018 09:45, Hans Hagen wrote:


On 4/9/2018 12:33 AM, Robert Zydenbos wrote:
[…] (I need to use Mk II because I need the functionality of XeTeX.)



just curious: what do you mis in mkiv / luatex


Support for Indic scripts / fonts. (I think we had a little bit of 
correspondence on this mailing list three or four years ago about this, 
and we were not able to convert and use the TrueType fonts I required.)

Which specific indic scripts?

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] how to change the colour of the footnote marker

2018-04-09 Thread Robert Zydenbos

On 09.04.2018 09:45, Hans Hagen wrote:


On 4/9/2018 12:33 AM, Robert Zydenbos wrote:
[…] (I need to use Mk II because I need the functionality of XeTeX.)



just curious: what do you mis in mkiv / luatex


Support for Indic scripts / fonts. (I think we had a little bit of 
correspondence on this mailing list three or four years ago about this, 
and we were not able to convert and use the TrueType fonts I required.)


Robert
___
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] how to change the colour of the footnote marker

2018-04-09 Thread Robert Zydenbos

On 09.04.2018 00:49, Wolfgang Schuster wrote:

Mk II does not have setupnotation[footnote] yet, and when I 
'translated' it to setupfootnotes (which ordinarily ought to work in Mk 
II), it unfortunately did not work. (I need to use Mk II because I need 
the functionality of XeTeX.)



1. setupnotation is the new command name for setupnotedefinition



2. Which language do you use in your document?


Kannada. This is one of the world's larger languages, belonging to the 
Dravidian language family, spoken in the southern Indian state of 
Karnataka (its capital city Bangalore / Bengaluru is known outside India 
mainly as the centre of India's IT industry).


I am about to finish writing the first comprehensive modern teaching 
manual of the language for non-Indian learners, and this is the kind of 
book that one can hardly leave to typesetters. First I was thinking of 
producing the ready-to-print PDF in XeLaTeX, but… oh, well, we're among 
ourselves here, so I think I need not go into the details of why I 
prefer to do it in ConTeXt. :-)


Robert

--

Prof. Dr. Robert J. Zydenbos
Institute of Indology and Tibetology
Department of Asian Studies
Ludwig-Maximilians-Universität München (University of Munich – LMU)
Germany
___
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] how to change the colour of the footnote marker

2018-04-09 Thread Hans Hagen

On 4/9/2018 12:33 AM, Robert Zydenbos wrote:

Greetings, Tomáš,

On 08.04.2018 17:41, Tomas Hala wrote:


Hi Robert,

I don't understand if you need solution for MkII, or
if you tried something from MkII.

For MkIV you can use this:

defmycmd#1{startcolor[kleur]#1stopcolor}
setupnotation[footnote][numbercommand=mycmd]

(But I don't know whether it will work witk MkII.)


Thank you for the proffered help – but I found a very similar snippet of 
code in a message to this list from 2015 and tried it.


Mk II does not have \setupnotation[footnote] yet, and when I 
'translated' it to \setupfootnotes (which ordinarily ought to work in Mk 
II), it unfortunately did not work. (I need to use Mk II because I need 
the functionality of XeTeX.)


just curious: what do you mis in mkiv / luatex

However, Wolfgang gave the solution! I do not know why that is the 
solution :-), but it works.



The best,


Robert




--

-
  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] Macro to write the euro symbol

2018-04-09 Thread Fabrice Couvreur
Hi Hans,
Thank you for the clarification.
Fabrice

2018-04-08 11:50 GMT+02:00 Hans Hagen :

> On 4/8/2018 9:09 AM, Otared Kavian wrote:
>
>> Hi Fabrice,
>>
>> I don't know about the \symbol[EUR], but you can use directly the €
>> symbol as in:
>>
>> \unexpanded\def\euros#1{#1\,€}
>> \starttext
>>
>> \euros{100}
>> \stoptext
>>
> most fonts nowadays have a properly matched euro
>
> \usesymbols[mvs] % has your EUR
>
> \starttext
>
> \unexpanded\def\euros#1{#1\,€}
>
> \euros{100}
>
> \unexpanded\def\euros#1{#1\,\symbol[europe][EUR]}
>
> \euros{100}
>
> \stoptext
>
> We don't load these symbol sets by default. Soon the tex gyre fonts will
> contain many more symbols which means that we will also get away from some
> currently traditional symbols taken from math fonts.
>
> 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/list
> info/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
___