Re: [NTG-context] body text invades space for notes

2020-03-04 Thread Philipp A.
Hi Pablo,

Thank you for the help!
I’m not using lists on that page … what I do use is a figure with
location=left, which is probably the culprit, as it ends up pretty close to
the footnote.
Is there any interest in fixing this longstanding bug? It’s the only
feature that’s just consistently broken for me …

Best, Phil

Am Di., 25. Feb. 2020 um 22:15 Uhr schrieb Pablo Rodriguez :

> On 2/18/20 11:17 AM, Philipp A. wrote:
> > For me it’s even worse (in mkiv), a paragraph of body text completely
> > overlaps my footnote.
> >
> > Where are the bottom notes placed? In the footer? Or how does it work?
> > How to debug it?
>
> Hi Philipp,
>
> I’m afraid that this misbehaviour is caused by the use of lists in the
> same page.
>
> Even not using lists, the space before seems not to be honored when
> using \setupnote[footnote].
>
> Note handling seems to have been improved in both LMTX and MkIV. A
> side-effect of this new handling is the random clash between body and
> notes texts when using lists in the same page.
>
> BTW, foonotes cannot be placed in the footer.
>
> \showframe\showgrid
> \setuppapersize[A9]
> \starttext
> \dorecurse{3}{%
> text\footnote{note}\\}
> \stoptext
>
> Sorry, but I’m afraid that I don’t know any way of debugging it.
>
> Pablo
>
>
> > Am Sa., 14. Dez. 2019 um 19:41 Uhr schrieb Pablo Rodriguez:
> >
> > Dear list,
> >
> > I’m afraid to admit that ConTeXt notes are increasily problematic for
> > me. I don’t think this is special to me and I hope we can discuss the
> > general issue.
> >
> > Bottom notes are somewhat tricky in ConTeXt. The user expects that
> these
> > notes (either footnotes, or linenotes) aren’t moved to the next
> page. I
> > mean, no reader expects to find a full footnote in the next page from
> > the one that calls it. (At least, I have never seen that in any book
> > read or paged through.)
> >
> > There may be good reasons for that, but ConTeXt doesn’t enable this
> by
> > default. Both options "split=verystrict" and "scope=text" have to be
> > used in "\setupnote".
> >
> > This translated in wrong space before notes when paragraph form was
> > used. I was very interested to use these (line)notes for critical
> > editions, but sometimes the text run into the notes. I’m afraid that
> > left linenotes extremely problematic to be used.
> >
> > With the arrival of LMTX, space before footnotes is more problematic
> > than before. No paragraph notes, see the attached sample
> (wrong-6.png).
> > In other cases, ConTeXt seems to ignore totally that the page bottom
> > contains footnotes.
> >
> > I cannot provide minimal samples. Consider that if it were so easy to
> > reproduce, problably the issue would have been gone long ago.
> >
> > Even when one avoids the problematic bottom partition (which I did in
> > that case by removing the "before" option from
> "\setupnote[footnote]"),
> > there is clearly an issue with the footnote having its space before
> > remaining blank from the body text (wrong-2.png).
> >
> > My first question is why the bottom notes have problems to preserve
> the
> > space before them (and simultaneously remain in the same page where
> they
> > come from). This applies also for paragraph notes.
> >
> > My second question is what can be improved to achieve what may be
> > considered as a basic typographic feature.
> >
> > Sorry for not providing more than output samples. Bear with me. I may
> > not be an expert user, but I think I’m a frequent ConTeXt user. And I
> > don’t think it is totally wrong to consider this a basic feature that
> > needs to be improved.
> >
> > Many thanks for your help in advance,
> >
> > 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
>
> ___
>
___
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] Customizing \cite alternatives

2020-02-22 Thread Philipp A.
Thank you for the pointer to the options!

- “otherstext” works, yay! (when inserted after “\usebtxdefinitions[apa]”)
- “etallimit” (not “etaldisplay”) is the option for the max number of
authors before they’re replaced by “et al”. (“etaldisplay” controls how
many authors go before “et al” if the list is truncated)

I think I’ll add a more complete example to the wiki, all of this is pretty
complex due to being sensitive to order and overrides and so on.

Best, Philipp

Am Do., 20. Feb. 2020 um 16:11 Uhr schrieb Thomas A. Schmitz <
thomas.schm...@uni-bonn.de>:

> On 20.02.20 14:16, Philipp A. wrote:
> > Makes sense, seems like no default is defined anymore, so it won’t
> > render without using a style.
> > I use apa, and the attached screenshot shows my problem.
>
> If you use APA, you have to set up the APA cite options. The manual is a
> bit on the short side here, but all the options are mentioned. If you
> want to change the way et al. is displayed (for APA, the default is
> \btxcomma\btxlabeltext{others}), you can do this:
>
> \setupbtx [apa:cite] [otherstext={ et al.}]
>
> The number of authors displayed is defined by the key etaldisplay, so
> you would do this:
>
> \setupbtx [apa:cite] [etaldisplay=4]
>
> Thomas
>
> ___
> 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] Customizing \cite alternatives

2020-02-20 Thread Philipp A.
Makes sense, seems like no default is defined anymore, so it won’t render
without using a style.
I use apa, and the attached screenshot shows my problem.

\startbuffer[testbib]
@Article{testone,
  author={Testperson, A. B.},
  title={Thing with one author},
  year={2001},
}
@Article{testtwo,
  author={Testperson, A. B. and Friendperson, C.},
  title={Thing with two authors},
  year={2002},
}
@Article{testmany,
  author={Ah and Bee and Cee and Dee and Ee and Eff and Gee},
  title={Thing with two authors},
  year={2002},
}
\stopbuffer

\definebtxdataset[main]
\usebtxdataset[main][testbib.buffer]
\setupbtx[dataset=main] % make cite use this
\setupbtx[default:cite][alternative=authoryear] % cite style
\usebtxdefinitions[apa] % load and activate list rendering
\definebtxrendering[main][apa][dataset=main, pagestate=start]

\starttext
\cite[authoryear][testone] \cite[authoryear][testtwo]
\cite[authoryear][testmany]

\cite[authoryears][testone] \cite[authoryears][testtwo]
\cite[authoryears][testmany]

\subject{bib}

\placebtxrendering[main][method=global]
\stoptext

Am Mi., 19. Feb. 2020 um 16:35 Uhr schrieb Thomas A. Schmitz <
thomas.schm...@uni-bonn.de>:

> It is difficult to answer your question because we don't know which
> specifications you use for your citations. You will have to provide a
> minimal example that allows us to see what you're doing.
>
> Thomas
>
> On 2/17/20 6:26 PM, Philipp A. wrote:
> > Hi List,
> >
> > I want the comma gone from “et al.” citations, and modify the cite
> > alternatives:
> >
> >   * [authoryear]: (Surname, et al., 2018) → (Surname et al., 2018)
> >   * [authoryears]: Surname, et al. (2018) → Surname et al. (2018)
> >
> > Also I’d like to configure how many names are the maximum before all
> > except the first are replaced by “et al.”
> > i.e. \setupcitething[maxauthors=3]: (One, Two, Three, & Four, 2018) →
> > (One et al., 2018)
> >
> > How can I do this? I didn’t find anything in the publications manual:
> > http://pragma-ade.nl/general/manuals/mkiv-publications.pdf
> >
> > Best, Philipp
>
> ___
> 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] body text invades space for notes

2020-02-18 Thread Philipp A.
For me it’s even worse (in mkiv), a paragraph of body text completely
overlaps my footnote.

Where are the bottom notes placed? In the footer? Or how does it work? How
to debug it?

Am Sa., 14. Dez. 2019 um 19:41 Uhr schrieb Pablo Rodriguez :

> Dear list,
>
> I’m afraid to admit that ConTeXt notes are increasily problematic for
> me. I don’t think this is special to me and I hope we can discuss the
> general issue.
>
> Bottom notes are somewhat tricky in ConTeXt. The user expects that these
> notes (either footnotes, or linenotes) aren’t moved to the next page. I
> mean, no reader expects to find a full footnote in the next page from
> the one that calls it. (At least, I have never seen that in any book
> read or paged through.)
>
> There may be good reasons for that, but ConTeXt doesn’t enable this by
> default. Both options "split=verystrict" and "scope=text" have to be
> used in "\setupnote".
>
> This translated in wrong space before notes when paragraph form was
> used. I was very interested to use these (line)notes for critical
> editions, but sometimes the text run into the notes. I’m afraid that
> left linenotes extremely problematic to be used.
>
> With the arrival of LMTX, space before footnotes is more problematic
> than before. No paragraph notes, see the attached sample (wrong-6.png).
> In other cases, ConTeXt seems to ignore totally that the page bottom
> contains footnotes.
>
> I cannot provide minimal samples. Consider that if it were so easy to
> reproduce, problably the issue would have been gone long ago.
>
> Even when one avoids the problematic bottom partition (which I did in
> that case by removing the "before" option from "\setupnote[footnote]"),
> there is clearly an issue with the footnote having its space before
> remaining blank from the body text (wrong-2.png).
>
> My first question is why the bottom notes have problems to preserve the
> space before them (and simultaneously remain in the same page where they
> come from). This applies also for paragraph notes.
>
> My second question is what can be improved to achieve what may be
> considered as a basic typographic feature.
>
> Sorry for not providing more than output samples. Bear with me. I may
> not be an expert user, but I think I’m a frequent ConTeXt user. And I
> don’t think it is totally wrong to consider this a basic feature that
> needs to be improved.
>
> Many thanks for your help in advance,
>
> 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
>
> ___
>
___
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] Customizing \cite alternatives

2020-02-17 Thread Philipp A.
Hi List,

I want the comma gone from “et al.” citations, and modify the cite
alternatives:

   - [authoryear]: (Surname, et al., 2018) → (Surname et al., 2018)
   - [authoryears]: Surname, et al. (2018) → Surname et al. (2018)

Also I’d like to configure how many names are the maximum before all except
the first are replaced by “et al.”
i.e. \setupcitething[maxauthors=3]: (One, Two, Three, & Four, 2018) → (One
et al., 2018)

How can I do this? I didn’t find anything in the publications manual:
http://pragma-ade.nl/general/manuals/mkiv-publications.pdf

Best, Philipp
___
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] zip downloads / mirror

2020-02-16 Thread Philipp Gesang
2020-02-09 (Sunday), j.ha...@xs4all.nl (Hans Hagen):

> On 2/9/2020 1:07 PM, Philipp Gesang wrote:
> > I take it the “current” vs. “beta” model has been retired?
> 
> indeed, we're always latest now (as 'current' was mostly what ended up on
> tex live)

Thanks for clarifying. I’ve set up the mirror so the “beta”
branch will be continued from “latest”.

> > PS: I’m out of the loop; is the mirror actually still needed or
> >  is there an official repo now?
> Mojca is working on a repository setup for sources (what we have now but
> also including luametatex sources), installation (including binaries taken
> from the compile farm), extras (like modules taken from the garden
> repository) so at some point we can make those official. Till then it's nice
> to have the existing one.

Ok, I’ll keep it running.

Philipp



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] zip downloads / mirror

2020-02-09 Thread Philipp Gesang
Hey guys,

some time during January the git mirror stopped syncing so I went
on pragma-ade.nl and noticed the old download URLs now 404.
Instead there one zip at this location:

http://www.pragma-ade.nl/context/latest/cont-tmf.zip

I take it the “current” vs. “beta” model has been retired?

Cc: me please I’m not on the list, thanks!

Best regards,
Philipp

PS: I’m out of the loop; is the mirror actually still needed or
is there an official repo now?



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] How to approach a ConTeXt language server?

2020-02-05 Thread Philipp A.
Thank you, that’s great information!

What’s the “export XML”?

Am Di., 4. Feb. 2020 um 19:09 Uhr schrieb Henning Hraban Ramm <
te...@fiee.net>:

>
> > Am 2020-02-04 um 16:45 schrieb Philipp A. :
> >
> > Language servers are the new big deal in editor and IDE development:
> https://langserver.org/
> >
> > It would be cool to have a ConTeXt one for autocompletion (for ConTeXt:
> command names, \cite IDs, labels, named parameters, …), go-to-definition,
> hover information (docs about a command) and so on.
> > The way it works is that you have a server process that is the source of
> truth for all this information, and the editor passes requests to it.
> > The editor tells the server when it opens/closes files and when the user
> requests something of the above.
> >
> > The way I’d implement it in ConTeXt is to keep a list of open ConTeXt
> projects in the server (obtained by following \include, \component,
> \product, \environment, \project).
> > Now my questions begin:
> >   • Then I’d make context load the project without compiling it to a
> PDF but make it execute some Lua (how do I do this?)
> >   • I’d need a way to get all available commands with their
> signatures into Lua. I assume this is done here, but how?
> http://www.pragma-ade.nl/general/qrcs/setup-en.pdf
>
> Look for the interface files i-*.xml
>
> >   • Optimally, for hover information and completion, I’d want some
> help/doc text for each command that has some. Is there a way to get it?
>
> No, there isn’t. It could be in the interface files if someone would put
> in the work.
>
> >   • Optimally, for label autocompletion, I’d also like a list of
> defined labels. Since I played around with bibliographies I already know
> how to query the bibliography DB from Lua.
> >   • Optimally I’d also want some parse tree of each document, but I
> assume the way macros work, this doesn’t exist? This would make things
> easier that I’d otherwise have to (imperfectly) parse out of the document
> (due to things like catcode changes, but I guess I can pretend they don’t
> exist and \unprotect is always on)
>
> You could run ConTeXt and use the export XML.
>
> >   • Optimally, for go-to-definition, I’d also want a list of files
> ConTeXt loaded so I can find definitions in it.
> > Can anyone help me, especially with 1-2? To get me started, it would be
> great to have an example script and a command line to invoke it, which
> makes ConTeXt load a main tex file, execute some Lua, and exit without
> creating a document or writing anything else to the channel Lua writes to
> (stdout?).
>
> Look at the .tuc file that’s created in a ConTeXt run, it’s a Lua table
> and contains “all“ the information about the project.
>
>
> Greetlings, Hraban
> ---
> https://www.fiee.net
> http://wiki.contextgarden.net
> https://www.dreiviertelhaus.de
> GPG Key ID 1C9B22FD
>
>
> ___
> 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] Official file ending?

2020-02-05 Thread Philipp A.
Ha, I was just writing about my confusion, thank you for clearing this up.

So how about I add those four to Wikipedia and the ConTeXt wiki?

Am Mi., 5. Feb. 2020 um 10:23 Uhr schrieb Hans Hagen :

> On 2/4/2020 8:27 PM, kaddour kardio wrote:
> > Since ConTeXT is closer to plain TeX than LaTeX, it is more legitimate
> > to got the "dot tex" than latex :)
> >
> > Le mar. 4 févr. 2020 à 17:57, Pablo Rodriguez  > <mailto:oi...@gmx.es>> a écrit :
> >
> > On 2/3/20 3:28 PM, Hans Hagen wrote:
> >  > On 2/3/2020 3:07 PM, Philipp A. wrote:
> >  >> Hi!
> >  >>
> >  >> Most text editors have LaTeX specific syntax highlighting, so it
> > makes
> >  >> sense to give your ConTeXt file a ending it can be distinguished
> > with.
> >  >> Is there a blessed one?
> >  >>
> >  >>   * .ctx: Would mirror the semi-common .ltx, but is used for XML
> > files
> >  >> inside of ConTeXt itself
> >  >
> >  > context ctx files are xml files indeed
> >  >
> >  >>   * .mkiv: Is that just for ConTeXt or all LuaTeX stuff? Would
> > it make
> >  >> sense to give text documents that extension?
> >  >
> >  > you can do that (or mkvi or lmtx or ...)
> >
> > Since there are already *.mkxl files in the ConTeXt distribution, I
> > think it may make sense to name the LMTX version MkXL.
> >
> > In any case, MkXL is simpler and clearer that MkIV with LMTX.
> mkiv (four)   : files that expect mkiv (or lmtx)
> mkvi (six): mkiv (or lmtx) files that pass a filter
> mkxl (fourty) : files that expect lmtx
> mklx (sixty)  : lmtx files that pass a filter
>
> (there are some more, like template files and so)
>
> I suppose that latex syntax highlighting filters support tex and sty and
> maybe suffixes i'm noti aware of. So a context specific highlighter
> could support mkiv, mkvi, mkxk and mkvi. At least that's what I do here.
>
> 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
>
> ___
>
___
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] How to approach a ConTeXt language server?

2020-02-04 Thread Philipp A.
Language servers are the new big deal in editor and IDE development:
https://langserver.org/

It would be cool to have a ConTeXt one for autocompletion (for ConTeXt:
command names, \cite IDs, labels, named parameters, …), go-to-definition,
hover information (docs about a command) and so on.
The way it works is that you have a server process that is the source of
truth for all this information, and the editor passes requests to it.
The editor tells the server when it opens/closes files and when the user
requests something of the above.

The way I’d implement it in ConTeXt is to keep a list of open ConTeXt
projects in the server (obtained by following \include, \component,
\product, \environment, \project).
Now my questions begin:

   1. Then I’d make context load the project without compiling it to a PDF
   but make it execute some Lua (how do I do this?)
   2. I’d need a way to get all available commands with their signatures
   into Lua. I assume this is done here, but how?
   http://www.pragma-ade.nl/general/qrcs/setup-en.pdf
   3. Optimally, for hover information and completion, I’d want some
   help/doc text for each command that has some. Is there a way to get it?
   4. Optimally, for label autocompletion, I’d also like a list of defined
   labels. Since I played around with bibliographies I already know how to
   query the bibliography DB from Lua.
   5. Optimally I’d also want some parse tree of each document, but I
   assume the way macros work, this doesn’t exist? This would make things
   easier that I’d otherwise have to (imperfectly) parse out of the document
   (due to things like catcode changes, but I guess I can pretend they don’t
   exist and \unprotect is always on)
   6. Optimally, for go-to-definition, I’d also want a list of files
   ConTeXt loaded so I can find definitions in it.

Can anyone help me, especially with 1-2? To get me started, it would be
great to have an example script and a command line to invoke it, which
makes ConTeXt load a main tex file, execute some Lua, and exit without
creating a document or writing anything else to the channel Lua writes to
(stdout?).

Best, Philipp
___
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] Official file ending?

2020-02-04 Thread Philipp A.
Thank you all! What is lmtx? Is there any link with infos?

Am Di., 4. Feb. 2020 um 00:53 Uhr schrieb Floris van Manen :

>
>
> On 04-02-2020 00:31, Exp wrote:
> >
> > Mkiv is a good choice for the moment. If there would be no Mkvi and so
> > on, it is good forever.
>
> .tex is used for both tex (as well as latex as well as other wrappers).
>
> how about for the new context era:
> .lmtx
>
>
> .F
>
>
> ___
> 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] Official file ending?

2020-02-03 Thread Philipp A.
Hi!

Most text editors have LaTeX specific syntax highlighting, so it makes
sense to give your ConTeXt file a ending it can be distinguished with.
Is there a blessed one?

   - .ctx: Would mirror the semi-common .ltx, but is used for XML files
   inside of ConTeXt itself
   - .mkiv: Is that just for ConTeXt or all LuaTeX stuff? Would it make
   sense to give text documents that extension?
   - Something else? (.tex doesn’t count, it’s shared with LaTeX files and
   plain TeX files)

Best, Philipp
___
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] context command line interface documentation?

2019-11-19 Thread Philipp A.
That’s pretty cool, overriding that hook allows to build a ConTeXt language
server for editors like VS Code!
https://microsoft.github.io/language-server-protocol/

Sadly I’m still a bit lost: When calling `context file_with_error.tex`, I
see “This is LuaTeX, Version 1.10 … tex error on line … ?” and it waits for
input.
You said that context stops when encountering an error which isn’t the case
for me. Any ideas why?

Best, Philipp

Am Di., 19. Nov. 2019 um 10:34 Uhr schrieb Hans Hagen :

> Concerning errors, one can say
>
> context --directives="system.showerror" somefile
>
> and on an error an html file is generated (old feature) ... i still
> couldn't figure out a way to reliable launch a browser and target the
> same tab (so autolaunch is disabled for now)
>
> 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
>
> ___
>
___
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] context command line interface documentation?

2019-11-18 Thread Philipp A.
Hi Hans,

Very sorry that it was phrased so negatively. I like ConTeXt enough that I
wrote my master’s thesis in it, and am now writing my doctor’s thesis in it.
I had a long day that day and didn’t expect to have to dive so deep to find
out what I want is impossible. I think my language mostly reflected my
thought process going through it, not lack of respect towards your work.
I hope my bug report here is still helpful and provides all information
necessary to improve ConTeXt, and would like to help if there’s an easy way
to contribute (Pull requests?)

context --silent -nostatistics
>

Thank you! I see it’s in the “experts” section in mtx-context.xml. I added
it to the wiki, as it seems the most immediately useful (and non-experty)
among those options.
I think it would be best if the help would just be generated from that file
to reduce the sources of truth in existence.


> context quits at the first error as recovering is (1) seldom useful, (2)
> can interfere badly with tex/mp/lua and make things worse), (3) context
> tries to show a bit more precise location where the erro comes from (not
> always easy in tex) ... some of these modes originate in paper terminal
> times and it's very unlikely that context will change it's current way of
> doing things
>

What you’re describing is the behavior I’m trying to achieve. The error
location reporting works for me, but context will still continue after an
error for me:
If I don’t specify --nonstopmode or so it’ll try to recover, and even when
I specify it, there will be other output after the error.

>  What’s a “list”? comma separated? Do I need string delimiters?
>
> comma separated and only quoted when spaces (as usual with spaces)
>

You mean quoted as in “to prevent my terminal from interpreting it wrong”,
right?
Not that the script actually expects quotes in argv?

grepping for stats will bring you to nostats and nostatistics and "context
> --help --expert" shows that flag too
>

All of which is undocumented. I’d like to help here, so I added it to the
wiki, but it would be useful to mention this in --help, too!

remarks like the last one are very unlikely to trigger people to write
> additional documentation (a manual or wiki page) ... context comes for
> free, support comes for free ... there is not much one can demand i guess
>
> Hans
>

Again, I’m really sorry! I’d like to help, but I don’t have the time
currently for more than drive-by pull requests and wiki edits. I’m doing
the latter and if the former is possible, I’ll try my hand. Is it?

Best, Philipp
___
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] PDF layer links

2019-11-12 Thread Philipp A.
I filed http://tracker.luatex.org/view.php?id=1016

Am Fr., 8. Nov. 2019 um 18:29 Uhr schrieb Philipp A. :

> Thank you, but I want colored text, not a border.
>
> Also bugs should be fixed regardless of workarounds…
>
> Am Mi., 6. Nov. 2019 um 19:17 Uhr schrieb Pablo Rodriguez :
>
>> On 11/6/19 5:07 PM, Philipp A. wrote:
>> > Hi,
>> >
>> > I asked this question some time ago:
>> > https://tex.stackexchange.com/q/354731/2867
>>
>> Hi Philipp,
>>
>> I think this approach is easier to achieve what you want:
>>
>> \setupinteraction
>> [state=start,
>>  style=,
>>  color=,
>>  contrastcolor=,
>>  focus=standard]
>> \enabledirectives[references.border=red]
>> %~ \enabledirectives[references.border]% defaults to grey
>> \define[1]\MyURL{{\tt\goto{\hyphenatedurl{#1}}[url(#1)]}}
>> \starttext
>> \startTEXpage[offset=1em]
>> \MyURL{https://wiki.contextgarden.net}
>> \stopTEXpage
>> \stoptext
>>
>> At least, this works best with Acrobat.
>>
>> I hope it helps,
>>
>> 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
>>
>> ___
>>
>
___
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] context command line interface documentation?

2019-11-12 Thread Philipp A.
Hi,

I want context to shut up, specifically the “mkiv lua stats” at the end are
useless to me and make me scroll up for actual error messages, but better
would be to just stop after the first error.
I consulted the --help docs but found them entirely unhelpful. Also there’s
no examples. As doing it wrong results in no error message or indeed any
kind of effect, I was in the dark.

First I consulted the --help and found: “--silent=list disable logcatgories
(show list with --showlogcategories)”. What’s a “list”? comma separated? Do
I need string delimiters?
Whatever, executing “context --showlogcategories” tells me the log category
“mkiv lua stats” exists, so: “context --silent='mkiv lua stats' doc.tex”
does … nothing, the lua stats are still there mocking me.

OK, let’s do what you do when there’s no documentation; dive in the code:
“grep -C3 'batchmode'
/usr/share/texmf-dist/scripts/context/lua/mtx-context.lua”
This tells me that there’s a “errorstopmode” in luatex but no way to make
the context script invoke “luatex -interaction=errorstopmode”, great.
Diving deeper, “setblocked” in mtxtun.lua checks if --silent=all is
specified, nice! But that affects everything EXCEPT for the “mkiv lua
stats”.

Therefore the two most useful ways to run context (--errorstopmode and
--silent='mkiv lua stats') seem impossible unless one writes a wrapper
script.
Would be cool to have this fixed. And to have actually useful documentation
instead of having to deep-dive into mtxrun.lua.

Best, Philipp

PS: I filed http://tracker.luatex.org/view.php?id=1014 and
http://tracker.luatex.org/view.php?id=1015
___
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] PDF layer links

2019-11-08 Thread Philipp A.
Thank you, but I want colored text, not a border.

Also bugs should be fixed regardless of workarounds…

Am Mi., 6. Nov. 2019 um 19:17 Uhr schrieb Pablo Rodriguez :

> On 11/6/19 5:07 PM, Philipp A. wrote:
> > Hi,
> >
> > I asked this question some time ago:
> > https://tex.stackexchange.com/q/354731/2867
>
> Hi Philipp,
>
> I think this approach is easier to achieve what you want:
>
> \setupinteraction
> [state=start,
>  style=,
>  color=,
>  contrastcolor=,
>  focus=standard]
> \enabledirectives[references.border=red]
> %~ \enabledirectives[references.border]% defaults to grey
> \define[1]\MyURL{{\tt\goto{\hyphenatedurl{#1}}[url(#1)]}}
> \starttext
> \startTEXpage[offset=1em]
> \MyURL{https://wiki.contextgarden.net}
> \stopTEXpage
> \stoptext
>
> At least, this works best with Acrobat.
>
> I hope it helps,
>
> 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
>
> ___
>
___
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] PDF layer links

2019-11-06 Thread Philipp A.
Hi,

I asked this question some time ago:
https://tex.stackexchange.com/q/354731/2867
Today I found out about viewer layers. Sadly they seem to be buggy in the
ConTeXt version in TeXlive 2019.52575
When I compile the following document, the “view” layer seems to gobble up
the rest of the document: Hiding it makes “More text” vanish.
Also, I don’t know if [state=stop,printable=yes] does what I want, i.e.
being visible by default on print media. If not, how to achieve that?

Best, Philipp

\defineviewerlayer[print][state=stop,printable=yes]
\defineviewerlayer[view][state=start,printable=no]

\def\viewcolor#1#2{%
\startviewerlayer[view]\color[#1]{#2}\stopviewerlayer%
\startviewerlayer[print]\llap{#2}\stopviewerlayer%
}

\starttext
Hi!

\viewcolor{red}{This is only red on screen}.

More text.
\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/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] cannot update to latest beta

2016-10-13 Thread Philipp Gesang
·

> On Wed, 12 Oct 2016, Philipp Gesang wrote:
> 
> > It seems fixed now and the most recent commit does indeed have
> > Hans as the author.
> 
> FYI, I have been mirroring your repo to github:
> https://github.com/contextgarden/context-mirror
> 
> If you want, I can give you push access to the github repo and you could 
> push to both bitbucket and github at the same time. Otherwise, I can 
> continue to run a script locally that does the mirroring.

Thanks for the offer but I prefer to keep it as it is. The
star-like topology with a central mirror being pushed to by the
bot and others pulling from it is clean and simple. I’m doing the
same btw. with my cgit mirror https://git.phi-gamma.net/ConTeXt/
which runs on the same server but is completely isolated from the
mirror. (Don’t pull from that one though, it’ll kill my
bandwidth.)

In any case Bitbucket is as reliable as any hoster and in my
experience a good deal less infuriating maintenance wise than
Github.

Best,
Philipp



pgppBhO7SXteh.pgp
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] cannot update to latest beta

2016-10-12 Thread Philipp Gesang
Hey Mohammad,

thanks for your message!

·
> The bitbucket mirror has not gotten updated since September 24.  Is there a
> misconfiguration?

Sort of. I changed the bot after talking to Mojca at Kalenberg to
include Hans as the commit author in order to facilitate the
merging of various repo archives at some point in the future. It
seems though that I messed up parts of the code in the process
and disregarded the notification emails the bot was kept sending
me due to failed commits. Oh my.

It seems fixed now and the most recent commit does indeed have
Hans as the author.

Best,
Philipp





pgpUqGcyxOloZ.pgp
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] cannot update to latest beta

2016-09-21 Thread Philipp Gesang
·

> Dear list,
> 
> although latest beta seems to be from 2016.09.20 21:12, I get updated to
> beta from 2016.09.12 18:27 when I run:

The official download still has the 2016.09.12 timestamp:
http://pragma-ade.nl/download-2.htm How did you get that other
date? I hope the git mirror isn’t scraping the wrong page ;)

Best,
Philipp



pgpfUxP2j0Sn1.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] standalone / setuptex on ARM

2016-08-23 Thread Philipp Gesang
·

> The Raspberry PI returns:
> 
> $ readelf -A /proc/self/exe
> Attribute Section: aeabi
> File Attributes
>   Tag_CPU_name: "6"
>   Tag_CPU_arch: v6
>   Tag_ARM_ISA_use: Yes
>   Tag_THUMB_ISA_use: Thumb-1
>   Tag_FP_arch: VFPv2
>   Tag_ABI_PCS_wchar_t: 4
>   Tag_ABI_FP_rounding: Needed
>   Tag_ABI_FP_denormal: Needed
>   Tag_ABI_FP_exceptions: Needed
>   Tag_ABI_FP_number_model: IEEE 754
>   Tag_ABI_align_needed: 8-byte
>   Tag_ABI_align_preserved: 8-byte, except leaf SP
>   Tag_ABI_enum_size: int
>   Tag_ABI_HardFP_use: SP and DP
>   Tag_ABI_VFP_args: VFP registers
>   Tag_CPU_unaligned_access: v6
> 
> and both tests fail (like they are supposed to).

Yep, I tested on one of my Π’s. ;)

>  That's great, I'll
> patch the scripts, thank you very much. I was a bit frustrated by the
> inability to support both platforms properly.

> I'm now waiting for the code for the 64-bit arm binaries :)

Can’t help with that directly, I have a Π3 but it’s still running
a 32 bit distro.

> I have one in my drawer that I still need to set up.
> 
> > i'll let mojca decide that ... (i just ship what she patches in setuptex)
> 
> I'll apply the patch. Now, setuptex is not problematic, the same patch
> goes there. But mtxrun doing its own guesswork on top of this might
> be. Let's see.
> 
> And then there's the next question: what hardware/software do we need
> if we want to add an additional unit to our (new) build farm? At the
> moment Boris is kindly providing the binaries, but it would be nice to
> add some small piece of hardware into the cellar that just waits and
> starts building automatically whenever there's a need to do so.

I’ve set up a scratchbox [0] cross build env that produces usable
binaries. Maybe if I manage to get that automated I could provide
the soft-float binary. (I’ve only built Luatex so far, not sure
what else is needed.)

> Taco, Philipp just volunteered for a presentation (with workshop) at
> the ConTeXt Meeting.
> Title: Running ConTeXt (and compiling binaries) on my phone.

The hard part is displaying the PDFs. I’ll be glad to answer
questions but I doubt many would be interested on the oddities of
exotic 7 years old hardware =)

Thanks for including the patch,
Philipp

[0] This one: http://www.scratchbox.org/ -- not \box \scratchbox!



pgpUzuHVYRoRZ.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] standalone / setuptex on ARM

2016-08-22 Thread Philipp Gesang
Hi,

when setting up Context for my phone, I noticed the ARM binaries
that come with the Standalone don’t work because the system is
armv7l soft-float:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14' 
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs 
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-4.6 --enable-shared --enable-linker-build-id 
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext 
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object 
--enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv4t 
--with-float=soft --enable-checking=release --build=arm-linux-gnueabi 
--host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14)

Since I’m supplying my own Luatex binary that’s no problem per
se, I just had to modify setuptex a bit.

Could we add a couple lines like the attached patch to the
script? I’m under the impression that “armel” is a Debian
specific term so feel free to change it. Though it might be
better in general to use the “arm-linux-gnueabi” and
“arm-linux-gnueabihf” triplets to separate the platforms.

Best,
Philipp

--- tex/setuptex.orig	2016-08-22 23:51:21.0 +0200
+++ tex/setuptex	2016-08-23 07:44:31.0 +0200
@@ -33,7 +33,26 @@
 			# we need more hacks to fix the situation, this is just a temporary solution
 			mips|mips64|mipsel|mips64el) platform="linux-mipsel" ;;
 			# TODO: probably both wrong and incomplete
-			armv7l) platform="linux-armhf" ;;
+			armv7l)
+platform="linux-armhf"
+	# machine id output by uname(1) is
+	# insufficent to determine whether this
+	# is a soft or hard float system so we
+	# check ourselves.
+	# a) binutils, this should work almost
+	#everywhere
+	if $(which readelf >/dev/null 2>&1); then
+	readelf -A /proc/self/exe | grep -q '^ \+Tag_ABI_VFP_args'
+	if [ ! $? ]; then
+	platform="linux-armel"
+	fi
+	# b) debian-specific fallback
+	elif $(which dpkg >/dev/null 2>&1); then
+	if [ "$(dpkg --print-architecture)" = armel ]; then
+	platform="linux-armel"
+	fi
+	fi # else go with hard fp
+	;;
 			*) platform="unknown" ;;
 		esac ;;
 	# Mac OS X


pgpnCoG4cEQM2.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] [l...@tecgraf.puc-rio.br: [ANN] ltokenp, a token processor for Lua]

2016-05-04 Thread Philipp Gesang
Hi Hans, all,

this was just announced on lua-l. Might be relevant to Context
since the advertised functionality intersects with mtx-package /
util-mrg.lua:

Potential uses include:
- Compressing Lua programs by removing comments and whitespace (strip.lua)
- Removing assertions (assert.lua)
- Adding new syntax sugar (self.lua)
- Experimenting with new syntax without hacking the Lua source 
(reserved.lua)

I especially like the idea of having some kind of a preprocessor.

The original announcement can be found at Gmane in case the
attachment is eaten by the list:

http://thread.gmane.org/gmane.comp.lang.lua.general/121329

Have fun,
Philipp

- Forwarded message from Luiz Henrique de Figueiredo 
<l...@tecgraf.puc-rio.br> -

Date: Wed, 4 May 2016 02:17:22 -0300
From: Luiz Henrique de Figueiredo <l...@tecgraf.puc-rio.br>
To: lu...@lists.lua.org
Subject: [ANN] ltokenp, a token processor for Lua
User-Agent: Mutt/1.5.20 (2009-12-10)

- End forwarded message -
ltokenp is now available at
http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.3/ltokenp.tar.gz

It should work for Lua 5.1, 5.2, and 5.3.

The README is attached. Enjoy. All feedback welcome.
--lhf

ltokenp is a token processor for Lua: it allows you to process the
stream of tokens coming from the Lua lexer.

Potential uses include:
- Compressing Lua programs by removing comments and whitespace (strip.lua)
- Removing assertions (assert.lua)
- Adding new syntax sugar (self.lua)
- Experimenting with new syntax without hacking the Lua source (reserved.lua)

ltokenp accepts Lua scripts to run and files to process.
The scripts and files are executed and processed as seen.
Each script appears as a separate argument after '-s', one '-s' per script.

Scripts typically output the contents of the files with some modifications.
Unfortunately, all comments and whitespace are eaten by the lexer and never
reach the token stream.

A typical usage is
ltokenp -s script.lua [file.lua ...]
but you can also do
ltokenp -s s1.lua f1.lua -s s2.lua f2.lua

A global function named FILTER will be called once for each token seen
in the files. So, scripts typically define FILTER. If no scripts are
given, ltokenp just dumps the token stream with this:

function FILTER(line,token,text,value)
print(line,token,text,value)
end

As can been above, the FILTER function receives 4 arguments from the lexer:
- the line number where the token appears
- the token as a number
- the token as text
- the value of names, numbers, and strings;
  for other tokens, the value is the same as the text.

To try ltokenp, just edit Makefile to reflect your installation of Lua
and then run make. This will build ltokenp and run a simple test. Note
that ltokenp needs inside information from the Lua private headers and
so it needs to be built using a Lua build directory, not just the usual
installation directories.

This code is hereby placed in the public domain.
Please send comments, suggestions, and bug reports to l...@tecgraf.puc-rio.br .



pgpxKNS940IqD.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] font features in math

2016-05-02 Thread Philipp Gesang
·

> Am Sun, 1 May 2016 11:45:02 +0200 schrieb Philipp Gesang:
> 
> >> So somehow in math the +onum is lost in plain and latex but not in
> >> context. What is context doing differently to avoid this?
> > 
> > mode=base
> 
> If context attach mode=base to math, how does it it?

A one would do in Luaotfload: specify base mode when defining the
font. It’s unrelated to math, just the default set of features
that Luaotfload has been applying to every definition for ages.
The reasoning -- by Khaled and others -- was, that the Opentype
standard mandates some defaults so Luaotfload should follow suit.

The defaults can be overridden by setting the appropriate values
in luaotfload.conf(5).

>  How can you
> switch a feature like mode=node to mode=base for every font in math?

Define two fonts: one for use in math mode, another for where you
really, really require node mode.

Philipp



pgp5j7EyuLGpU.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] font features in math

2016-05-01 Thread Philipp Gesang
·

> When I compile this in context all number are oldstyle numbers:
> 
> \starttext
> 
> \font\test= {name:TeX-Gyre-Termes:+onum}
> \test 0123456789
> $\fam0 \textfont0=\test 0123456789$ 
> \stoptext
> 
> When I run a similar plaintex (or latex) example in texlive 2016
> with a new luaotfload then the text numbers are (as wanted) old
> style, but the numbers in math mode are lining numbers (the font is
> correct):
> 
> \input luaotfload.sty
> \font\test= {name:TeX-Gyre-Termes:+onum}
> \test 0123456789
> $\fam0 \textfont0=\test 0123456789$ 
> \bye
> 
> 
> So somehow in math the +onum is lost in plain and latex but not in
> context. What is context doing differently to avoid this?

mode=base

See the issue thread where you got the example from or the
Luaotfload manual.

Philipp



pgpCT9kJ2b60F.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] issue with Junicode font and \input

2016-02-13 Thread Philipp Gesang
·

> Am Sat, 13 Feb 2016 20:26:52 +0100 schrieb Pablo Rodriguez:
> 
> > I have the following sample:
> > 
> > \definefontfamily[mainface][rm][Junicode]
> > \setupbodyfont[mainface]
> > \starttext
> > \input zapf
> > \stoptext
> > 
> > I experience an endless loop (or an unended compilation that I have to
> > kill) if "\input zapf" is selected.
> 
> Perhaps it is the same problem that has been found for latex and
> caused documents to hang:
> https://github.com/lualatex/luaotfload/issues/322

I patched font-otn.lua to disable the “contextpos” features to
get rid of the hang. That’s the old loader, though; no idea where
it hangs with the current one.




pgpPdXbOqnZgs.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [fontloader/old] mixed substitution / ligatures feature

2015-12-20 Thread Philipp Gesang
·
> On 12/18/2015 7:34 AM, Philipp Gesang wrote:
> > in the old loader, defining a feature containing mixed ligature /
> > substitution causes a crash. Here’s an example:
> >
> >  \enabletrackers [otf.loading]
> >  \startluacode
> >fonts.handlers.otf.addfeature ("dunno", {
> >{
> >type  = "substitution",
> >data  = { [0x0022] = 0x201D },
> >prepend   = true,
> >},
> >{
> >type = "ligature",
> >data = { [0x2013] = {0x002D, 0x002D} },
> >prepend  = true,
> >},
> >})
> >fonts.handlers.otf.features.register {
> >name= "dunno",
> >description = "bug demo",
> >}
> >  \stopluacode
> >
> >  \definefontfeature [myfeat] [default] [dunno=yes,liga=yes,mode=node]
> >
> >  \definefont [somefont] [file:cmunrm.otf*myfeat]
> >  \starttext
> >\somefont foo bar " baz
> >  \stoptext
> >
> > This crashes in font-otn on account of a number being indexed.
> > This used to work -- anything that can be done about it?
> 
> i'll see if i can fix it but don't expect all upcoming features in the 
> new loader to work in the old one

Thanks for fixing the crash. However, the substitution doesn’t
work as defined, even if there’s no ligature. It does work with
the TL 2015 version. As it doesn’t seem work with the new loader
either I guess this is related to the “em-dashes not working …”
issue :)

Best,
Philipp



pgpRVRpA2YYGA.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] [fontloader/old] mixed substitution / ligatures feature

2015-12-17 Thread Philipp Gesang
Hi Hans,

in the old loader, defining a feature containing mixed ligature /
substitution causes a crash. Here’s an example:

\enabletrackers [otf.loading]
\startluacode
  fonts.handlers.otf.addfeature ("dunno", {
  {
  type  = "substitution",
  data  = { [0x0022] = 0x201D },
  prepend   = true,
  },
  {
  type = "ligature",
  data = { [0x2013] = {0x002D, 0x002D} },
  prepend  = true,
  },
  })
  fonts.handlers.otf.features.register {
  name= "dunno",
  description = "bug demo",
  }
\stopluacode

\definefontfeature [myfeat] [default] [dunno=yes,liga=yes,mode=node]

\definefont [somefont] [file:cmunrm.otf*myfeat]
\starttext
  \somefont foo bar " baz
\stoptext

This crashes in font-otn on account of a number being indexed.
This used to work -- anything that can be done about it?

Best,
Philipp




pgpQqZnXSG9S_.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] new bets

2015-12-17 Thread Philipp Gesang
·

> I'm going to upload a new beta but this one needs luatex 0.87 which is 
> in the process of being released.

Hmm, traverse_char() … neat!

Philipp



pgpvsEh2HKv57.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Upgrade to 2015.11.19 breaks OTF reader?

2015-12-12 Thread Philipp Gesang
·

> In case this helps anyone else:
> 
> In my case, the LuaTeX error resulted from what appears to be a corrupt font 
> cache. I was getting the error: 
> 
> > !LuaTeX error: cannot find OpenType font file for reading ()
> > ==> Fatal error occurred, no output PDF file produced!
>  
> The solution was to clean the LuaTeX font cache in my ConTeXt standalone 
> directory. Mine was in:
> ` ~/context/tex/texmf-cache/luatex-cache/context/<...>/fonts/otf/ `

You can use ``mtxrun --script cache --erase`` for that.

> (The <…> represents a long string of numbers.)
> 
> I deleted the .tma and .tmc files in that OTF directory. Upon running ConTeXt 
> again, everything worked fine. [The source of this discovery was 
> http://tex.stackexchange.com/questions/65038/luatex-cannot-find-existing-font 
> <http://tex.stackexchange.com/questions/65038/luatex-cannot-find-existing-font>
>  ]

I’ve run my tests explicitly erasing the caches (not only the
fonts one) and rebuilding both the format and the file indices
every time.

Try this:

export OSFONTDIR=~/.fonts
mtxrun --script cache --erase && mtxrun --generate && context --make && 
mtxrun --script fonts --reload && context source.tex

(Adapt the OSFONTDIR path and replace “source.tex” with the name
of your test file.) Make sure there’s no copy of the font in PWD
or the system path.

Best,
Philipp



pgpMuDKFYv2x0.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Upgrade to 2015.11.19 breaks OTF reader?

2015-12-07 Thread Philipp Gesang
·

> On 12/6/2015 10:14 PM, Philipp Gesang wrote:
> > ·
> >
> >> The problem persisted with Courier New, not only Source Sans Pro (SSP).
> >>
> >> The font file for Source Sans Pro came directly from the Google's font 
> >> service.
> >>
> >> The SSP (on my machine) works fine in Inkscape.
> >>
> >> The exact same font was also working before the ConTeXt upgrade.
> >
> > Confirmed, it appears to work if you revert to the old loader in
> > font-lib.mkvi.
> 
> i need a better example of what fails then as it works here


The problem seems to be the “filename” field being written to the
cache from the wrong source. Between the old and the new
fontloader, you get the following picture in the “resources”
record:

+  ["filename"]="Everson_Mono_Bold.ttf",
-  ["filename"]="/tmp/here-be-fonts/Everson_Mono_Bold.ttf",

The attached patch fixes it for me.

Philipp

--- font-otr.lua.orig	2015-12-08 01:18:18.161761832 +0100
+++ font-otr.lua	2015-12-08 01:18:25.901761761 +0100
@@ -1954,7 +1954,7 @@
 hasitalics = fontdata.hasitalics or false,
 },
 resources = {
-filename  = fontdata.filename,
+filename  = filename,
 private   = privateoffset,
 duplicates= fontdata.duplicates  or { },
 features  = fontdata.featuresor { }, -- we need to add these in the loader


pgpPzmq76nuly.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Upgrade to 2015.11.19 breaks OTF reader?

2015-12-06 Thread Philipp Gesang
·

> The problem persisted with Courier New, not only Source Sans Pro (SSP).
> 
> The font file for Source Sans Pro came directly from the Google's font 
> service.
> 
> The SSP (on my machine) works fine in Inkscape.
> 
> The exact same font was also working before the ConTeXt upgrade.

Confirmed, it appears to work if you revert to the old loader in
font-lib.mkvi.



pgpjuf_H01nVk.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Upgrade to 2015.11.19 breaks OTF reader?

2015-12-03 Thread Philipp Gesang
·

> On 12/3/2015 8:27 AM, Philipp Gesang wrote:
> > ·
> >  fonts   > otf loading > loading done
> >  fonts   > otf loading > saving 
> > '/home/phg/.fonts/OTF/adobe-source/SourceSansPro-Regular.otf' in cache
> >  system  > lua > compiling 
> > '/home/phg/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/sourcesanspro-regular.tma'
> >  into 
> > '/home/phg/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/sourcesanspro-regular.tmc'
> >  system  > lua > dumping 
> > '/home/phg/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/sourcesanspro-regular.tma'
> >  into 
> > '/home/phg/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/sourcesanspro-regular.tmc'
> >  stripped
> >  fonts   > otf loading > loading, optimizing, packing and 
> > caching time 0.569
> >  fonts   > defining > source file 'SourceSansPro-Regular.otf' 
> > is not found
> >  …
> >  close source> 2 > 3 > /tmp/ctx/fnt.tex
> >  close source> 1 > 3 > 
> > /home/phg/context/tex/texmf-context/tex/context/base/cont-yes.mkiv
> 
> is there a tma/tmc file?

Apparently:

$ ls 
/home/phg/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/sourcesanspro-regular.tm*

/home/phg/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/sourcesanspro-regular.tma

/home/phg/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/sourcesanspro-regular.tmc

It’s valid Lua, too.

Philipp



pgp9UM3Dnx_nS.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Urdu with NotoNastaliqUrdu-Regular.ttf

2015-11-27 Thread Philipp Gesang
Hi Hans, everybody

there’s a bug report concerning one of the Noto fonts:

https://github.com/lualatex/luaotfload/issues/292

Fonts are freely available: https://www.google.com/get/noto/
Quick link to the example translated to Context:

https://bitbucket.org/phg/lua-la-tex-tests/src/tip/context/cnt-urdu.tex

Those features are what’s applied by Luaotfload by default for
Arabic.

Best,
Philipp




pgpjfdDirjlQG.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Adrian Frutiger

2015-10-04 Thread Philipp A.
yeah, thanks!

since i live next to the olympiadorf (olympic village of 1972), this
reminded me that i wanted to acquire the colors from then and build sth
with them.

hmm, maybe wikipedia’s copy of waldi

is close enough.

Rudolf Bahr  schrieb am So., 4. Okt. 2015 um 11:33 Uhr:

>
> On Thu, Sep 17, 2015 at 10:32:29AM +0200, luigi scarso wrote:
> > http://www.linotype.com/720-34866/adrianfrutigerremembered.html
> >
> Thank you Luigi for pointing to an interesting article!
>
> Rudolf
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Wiki broken: “internal error: pdfcrop failed” for new context/

2015-06-20 Thread Philipp A.
Hi, as you see with the second example here:
http://wiki.contextgarden.net/Multiline_equations#Working_with_equation_numbering

perfectly valid code that isn’t already rendered and cached fails to be
shown.

Someone needs to fix the wiki!

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

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

Re: [NTG-context] Asterisk

2015-06-09 Thread Philipp A.
just copy some symbol from here:
http://en.wikipedia.org/wiki/Asterisk#Encodings

and be sure to use a font containing them.

alternatively define a command which temporarily switches to such a font
in, displays the symbol, and switches back.

Procházka Lukáš Ing. - Pontex s. r. o. l...@pontex.cz schrieb am Di., 9.
Juni 2015 um 09:25 Uhr:

 Hello,

 how to typeset centerd asterisk (*) in Ctx?

 I mean the symbol which is used in the third level of itemization (
 http://wiki.contextgarden.net/Enumerations) or which can be typeset by
 \textasteriskcentered in LaTeX.

 (I cannot find the symbol definition in Ctx itemize-command definition
 (source files) and simple writing \textasteriskcentered doesn't work.)

 Thank you in advance.

 Best regards,

 Lukas


 --
 Ing. Lukáš Procházka | mailto:l...@pontex.cz
 Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
 Bezová 1658
 147 14 Praha 4

 Tel: +420 241 096 751
 Fax: +420 244 461 038


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

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

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

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

[NTG-context] git mirror [was: Re: Sourcemirror at gitorious is closing down, where to find it then?]

2015-06-09 Thread Philipp Gesang
Hey guys,

sorry for the late reply, this kind of got buried in my inbox so
only now I noticed the thread on the ML archives. Nevertheless:

···date: 2015-03-10, Tuesday···from: Hans Hagen···

 On 3/10/2015 5:39 PM, Mojca Miklavec wrote:
  On Tue, Mar 10, 2015 at 4:56 PM, Norbert Melzer wrote:
  - BitBucket used to be hg-only. I see no reason not to have a mirror
  there as well (but I don't see any particular need for yet another
  mirror either). If there are enough people who think that having yet
  another mirror on BitBucket as well would be useful for whatever
  reason, let me know.
 
 indeed, a volunteer using that could also keep it up to date

My Git mirror on Bitbucket still keeps the repo in sync:

  https://bitbucket.org/phg/context-mirror/

Originally based on the Gitorious repo, it has been tracking
Context development for a year or so by now. As a feature over
Marius’s approach it keeps the beta and current in separate
branches and will also pull from the Garden just in case:

  https://bitbucket.org/phg/context-mirror/branches

I’ve been relying on the mirror as my primary source for change
notifications and diffs of the Context source for some time now.

For those interested in setting up a mirror themselves I can
provide the source of the bot. There’s some docs but I took some
shortcuts like hard-coding paths and SSH stuff so it might take
a little effort to get it up to full speed. OTOH doesn’t appear
to be unreliable and should continue working as long as the
Pragma website can be scraped in the same fashion ;)

Best,
Philipp



pgpnu_RqL3g9z.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] \margintext / \inmargin doesn't work as only thing after header

2015-03-19 Thread Philipp A.
example:

\enableregime[utf-8]
\mainlanguage[de]

\starttext

\subject{Works}

1
\margintext{a}

\subject{Doesn’t work}

\margintext{b}

\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/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \margintext / \inmargin doesn't work as only thing after header

2015-03-19 Thread Philipp A.
thank you!

what’s \strut? can’t find it in the wiki…

Hans Hagen pra...@wxs.nl schrieb am Do., 19. März 2015 um 11:52 Uhr:

 On 3/19/2015 11:39 AM, Philipp A. wrote:
  |\enableregime[utf-8]

 ^^^ no need for that

  \mainlanguage[de]
 
  \starttext
 
  \subject{Works}
 
  1
  \margintext{a}
 
  \subject{Doesn’t work}
 
  \margintext{b}

 \margintext{c} \strut

  \stoptext|

 margintexts need to bind to something

 --

 -
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
   | 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in beta from 2014.12.29 10:01

2014-12-31 Thread Philipp Gesang
···date: 2014-12-31, Wednesday···from: Pablo Rodriguez···

 On 12/30/2014 09:08 PM, Philipp Gesang wrote:
  ···date: 2014-12-30, Tuesday···from: Pablo Rodriguez···
  [...]
  I’m still experiencing this with beta from 2014.12.30 09:48.
 
  Could anyone confirm this? (I’m on Fedora 20, using the 32bit version of
  the ConTeXt Suite.)
  
  Nope, doesn’t happen on Linux 3.17.6-1-ARCH / x86_64. ``mtxrunjit
  --find-file mtx-context.lua`` correctly resolves to
  
  /home/phg/context/tex/texmf-context/scripts/context/lua/mtx-context.lua
  
  I don’t have a 32 bit box to test it though. A change I noticed
  that was introduced in a recent-ish commit is lots of messages
  like this:
  
  resolvers   | globbing | confusing filename, name: 'NEWS', lower: 
  'news', already: 'News'
  
  whenever mtxrun does some kind of path lookup.
 
 Many thanks for your reply, Philipp.
 
 I’m afraid I only get two blank lines from mtxrunjit --find-file
 mtx-context.lua. The same happens with mtxrun.

No result means mtxrun can’t find it. What do you get when you
run

find ${contextdir} -type f -name mtx-context.lua

where ``contextdir`` expands to the prefix you installed the
minimals under? If the script is indeed missing then you may have
to reinstall Context.



pgpten29FHlZ2.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] bug in beta from 2014.12.29 10:01

2014-12-30 Thread Philipp Gesang
···date: 2014-12-30, Tuesday···from: Pablo Rodriguez···

 On 12/29/2014 10:33 PM, Pablo Rodriguez wrote:
  Hans,
  
  I have just updated ConTeXt Standalone to beta from 2014.12.29 10:01 and
  I get the following error:
  
  $ contextjit --version
  
  mtxrun  | unknown script 'context.lua' or 'mtx-context.lua'
  
  I’m afraid this seems to be a bug.
 
 I’m still experiencing this with beta from 2014.12.30 09:48.
 
 Could anyone confirm this? (I’m on Fedora 20, using the 32bit version of
 the ConTeXt Suite.)

Nope, doesn’t happen on Linux 3.17.6-1-ARCH / x86_64. ``mtxrunjit
--find-file mtx-context.lua`` correctly resolves to

/home/phg/context/tex/texmf-context/scripts/context/lua/mtx-context.lua

I don’t have a 32 bit box to test it though. A change I noticed
that was introduced in a recent-ish commit is lots of messages
like this:

resolvers   | globbing | confusing filename, name: 'NEWS', lower: 
'news', already: 'News'

whenever mtxrun does some kind of path lookup.

Best,
Philipp



pgpE4gQMXfVY9.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [fontloader] crash in font-otf.lua / actions[reorganize glyph anchors]

2014-12-22 Thread Philipp Gesang
···date: 2014-12-14, Sunday···from: Philipp Gesang···

 this bug was reported a while ago by user Thérèse on
 tex.stackexchange.com [1]. The font “Eadui.ttf” [2] causes the
 fontloader to access a nil value because the “Anchor-1” table is
 sparse (nil at index 3). Test file for Context:
 
 https://bitbucket.org/phg/lua-la-tex-tests/src/tip/cnt-eadui.tex
 
 Patch attached, though I suspect it covers only the symptoms.

Thanks for fixing!

Philipp



pgpvIrypMFNZK.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [fontloader] positioning of diacritics

2014-12-15 Thread Philipp Gesang
···date: 2014-12-15, Monday···from: Hans Hagen···

 On 12/15/2014 8:08 AM, Philipp Gesang wrote:
  Good morning!
 
  This report by Github user SverreStausland has been lingering on
  the Luaotfload tracker for a while: There appears to be a
  difference between how certain faces of the Libertine family
  handle the placement of diacritics.
 
  With Version 5.1.2 of the family [0], the RZI version
  (fullname: “Linux Libertine O Semibold Italic”) shows a different
  behavior than its “RZ” companion (“Linux Libertine O Semibold”).
  Short demonstration in Context:
 
   \definefontfeature [ourfeats] [default] [mode=node]
 
   \starttext
 \start \definedfont [file:LinLibertine_RI.otf*ourfeats]  V\char0306 
  \stop
 \start \definedfont [file:LinLibertine_RZI.otf*ourfeats] V\char0306 
  \stop
   \stoptext
 
  Note the misaligned combining breve above the latter. An
  equivalent test for Plain [1] shows that the correct position
  information is there somewhere in the font, since the Xetex
  engine typesets it correctly.
 
 it's a bug in the font:
 
 uni0306 in the second one has class base while in the first one it has 
 class mark and context checks on that
 
 \enabletrackers[otf.bugs]

Thanks for the reply and for the pointer. That tracker is indeed
pretty handy!

I attempted to open a bug report on the Libertine tracker but
Sourceforge refuses to cooperate :/ Maybe next time.

Best regards,
Philipp



pgpualdFxOdsb.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [fontloader] positioning of diacritics

2014-12-15 Thread Philipp Gesang
···date: 2014-12-15, Monday···from: Herbert Voss···

 Am 15.12.2014 um 21:43 schrieb Philipp Gesang:
 
  \enabletrackers[otf.bugs]
 
  Thanks for the reply and for the pointer. That tracker is indeed
  pretty handy!
 
  I attempted to open a bug report on the Libertine tracker but
  Sourceforge refuses to cooperate :/ Maybe next time.
 
 As far as I know there is no more a development of Libertine

The font is open source to some extent, isn’t it? Any feedback
will be valuable should someone decide to take up maintainance /
development.

Philipp



pgp8701M5t2jE.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [fontloader] node injector / december 3 sync

2014-12-15 Thread Philipp Gesang
···date: 2014-12-14, Sunday···from: Hans Hagen···

 On 12/14/2014 2:45 PM, Philipp Gesang wrote:
  Hi Hans,
 
  from the huge changeset two weeks ago:
 
+texio.write_nl(The font code has been brought in sync with the 
  context version of 2014.12.01 so)
+texio.write_nl(if things don't work out as expected the interfacing 
  needs to be checked. When)
 
  -- Message received ;) First off, thanks for bringing the
  fontloader into sync again. So far I haven’t noticed any
  obviously broken features.
 
  However, something is off with the node injector. We have a bug
  reported by Hironori Kitagawa that occurs with the ``palt``
  feature in node mode:
 
   http://tug.org/pipermail/luatex/2014-November/004976.html
 
  Importing the shiny new font injector into the merged fontloader
  fixes the issue. FWIW here are test files
 
   
  https://bitbucket.org/phg/lua-la-tex-tests/src/tip/cnt-features-12-palt.tex
   
  https://bitbucket.org/phg/lua-la-tex-tests/src/tip/pln-features-12-palt.tex
 
  The Context version runs fine whereas the plain one does so only
  after my “fix”. The same is true for Context itself: replace
  font-inj.lua with node-inj.lua in the format to reproduce the
  issue. Is there a fix to the fontloader, perhaps only temporarily
  until the revised injector becomes ready?
 
 not really as the new injector does more ... also, the new code is kind 
 of beta so it might not be a good idea to use that in latex already ... 

The current goal is to add an option to load the code directly
from Context (TL, minimals). Right now this is non-trivial due to
the extra packaging step involved, so the option will facilitate
testing a lot. Let’s see if anyone is confident enough to test
the fontloader on their own if it becomes easier.

 so, i'd first like to do more tests here; of course you can use the new 
 injector if you want ... (i'm not touching generic now while messing 
 with the context variant)

Just running my tests ;) I’m fairly content with the prospect
that the issue is already addressed in the beta.

Philipp



pgpkr10ge7yCf.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] [fontloader] node injector / december 3 sync

2014-12-14 Thread Philipp Gesang
Hi Hans,

from the huge changeset two weeks ago:

 +texio.write_nl(The font code has been brought in sync with the context 
version of 2014.12.01 so)
 +texio.write_nl(if things don't work out as expected the interfacing 
needs to be checked. When)

-- Message received ;) First off, thanks for bringing the
fontloader into sync again. So far I haven’t noticed any
obviously broken features.

However, something is off with the node injector. We have a bug
reported by Hironori Kitagawa that occurs with the ``palt``
feature in node mode:

http://tug.org/pipermail/luatex/2014-November/004976.html

Importing the shiny new font injector into the merged fontloader
fixes the issue. FWIW here are test files

https://bitbucket.org/phg/lua-la-tex-tests/src/tip/cnt-features-12-palt.tex
https://bitbucket.org/phg/lua-la-tex-tests/src/tip/pln-features-12-palt.tex

The Context version runs fine whereas the plain one does so only
after my “fix”. The same is true for Context itself: replace
font-inj.lua with node-inj.lua in the format to reproduce the
issue. Is there a fix to the fontloader, perhaps only temporarily
until the revised injector becomes ready?

Best,
Philipp




pgpsX1oE9sEkr.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] [fontloader] crash in font-otf.lua / actions[reorganize glyph anchors]

2014-12-14 Thread Philipp Gesang
Hi Hans,

this bug was reported a while ago by user Thérèse on
tex.stackexchange.com [1]. The font “Eadui.ttf” [2] causes the
fontloader to access a nil value because the “Anchor-1” table is
sparse (nil at index 3). Test file for Context:

https://bitbucket.org/phg/lua-la-tex-tests/src/tip/cnt-eadui.tex

Patch attached, though I suspect it covers only the symptoms.

Philipp

[1] http://tex.stackexchange.com/q/195481/14066
[2] Download at http://openfontlibrary.org/font/eadui

diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index 302d8ea..de392a9 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -2010,7 +2010,11 @@ actions[reorganize glyph anchors] = function(data,filename,raw) -- when we rep
 for tag, specification in next, data do
 for i=1,#specification do
 local si = specification[i]
-specification[i] = { si.x or 0, si.y or 0 }
+if si then
+  specification[i] = { si.x or 0, si.y or 0 }
+else
+  specification[i] = {  }
+end
 end
 end
 else


pgp7OErflgPnc.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] [fontloader] positioning of diacritics

2014-12-14 Thread Philipp Gesang
Good morning!

This report by Github user SverreStausland has been lingering on
the Luaotfload tracker for a while: There appears to be a
difference between how certain faces of the Libertine family
handle the placement of diacritics.

With Version 5.1.2 of the family [0], the RZI version
(fullname: “Linux Libertine O Semibold Italic”) shows a different
behavior than its “RZ” companion (“Linux Libertine O Semibold”).
Short demonstration in Context:

\definefontfeature [ourfeats] [default] [mode=node]

\starttext
  \start \definedfont [file:LinLibertine_RI.otf*ourfeats]  V\char0306 \stop
  \start \definedfont [file:LinLibertine_RZI.otf*ourfeats] V\char0306 \stop
\stoptext

Note the misaligned combining breve above the latter. An
equivalent test for Plain [1] shows that the correct position
information is there somewhere in the font, since the Xetex
engine typesets it correctly.

Best regards,
Philipp

[0] MD5 hashes of the files:

4bfd3481c1486f5d1ea13304981df7a6  LinLibertine_RZI.otf
153765bd2b29d6026fb2fa0b198a4995  LinLibertine_RZ.otf

[1] https://bitbucket.org/phg/lua-la-tex-tests/src/tip/pln-diacritics-1.tex



pgpn9cMzY_R_j.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Simplefonts: light font weight?

2014-12-08 Thread Philipp A.
Hi,

simplefonts has the following list of weights: condensed, light, normal,
medium, heavy (source
http://tug.ctan.org/macros/context/contrib/context-simplefonts/tex/context/third/simplefonts/t-simplefonts.mkiv
)

how do i use them as argument for any kind of style named argument, e.g.
`\setuphead[chapter][style=light]` doesn’t work.

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

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

[NTG-context] [garden] git mirror not syncing

2014-12-08 Thread Philipp Gesang
Hi,

the garden repo hasn’t been updated for months:

http://git.contextgarden.net/context/context/commits/master

Maybe a cron job got stuck?

Best,
Philipp



pgptU11xSpZPN.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [garden] git mirror not syncing

2014-12-08 Thread Philipp Gesang
···date: 2014-12-08, Monday···from: Hans Hagen···

 On 12/8/2014 8:18 PM, Philipp Gesang wrote:
  Hi,
 
  the garden repo hasn’t been updated for months:
 
   http://git.contextgarden.net/context/context/commits/master
 
  Maybe a cron job got stuck?
 
 just mojca being away for a while and busy now, so eventually it will be 
 up to date again

Okay, thanks.

 (of course context has been updated a couple of times)

I hope the script that imports files into the repo is still
active.

Best,
Philipp



pgpgT3R05zVui.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Problem with luaotfload and positioning of primes

2014-07-29 Thread Philipp Gesang
···date: 2014-07-29, Tuesday···from: Hans Hagen···

 On 7/29/2014 7:01 AM, Philipp Gesang wrote:
 
  Thanks for the quick fix!
 
 You were just lucky that I saw it pop up as incoming mail message (which 
 I somehow cannot turn off) because normally all mails directed a the 
 luatex list is filtered away to its own bin as it seldom relates to 
 context.

True. Though I put the Context list in the Cc as soon as I was
certain the bug originates in the fontloader.

Best,
Philipp



pgp1qczsYghi1.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Problem with luaotfload and positioning of primes

2014-07-29 Thread Philipp Gesang
···date: 2014-07-29, Tuesday···from: Hans Hagen···

 On 7/29/2014 7:18 PM, Philipp Gesang wrote:
  ···date: 2014-07-29, Tuesday···from: Hans Hagen···
 
  On 7/29/2014 7:01 AM, Philipp Gesang wrote:
 
  Thanks for the quick fix!
 
  You were just lucky that I saw it pop up as incoming mail message (which
  I somehow cannot turn off) because normally all mails directed a the
  luatex list is filtered away to its own bin as it seldom relates to
  context.
 
  True. Though I put the Context list in the Cc as soon as I was
  certain the bug originates in the fontloader.
 
 swap to and cc then (the filter works on to -)

Noted!


pgprVAfCFWxxu.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Problem with luaotfload and positioning of primes

2014-07-28 Thread Philipp Gesang
(CC’ing the Context list.)

···date: 2014-07-28, Monday···from: Jura Pintar···

 Do you have a prediction about how long it will take before a fix is
 released?

No, sorry. What I do have though is the culprit:

  c70b2e466bbb07e976f8684d56ae4e5398169e7d is the first bad commit
  commit c70b2e466bbb07e976f8684d56ae4e5398169e7d
  Author: Hans Hagen pra...@wxs.nl
  Date:   Sat Mar 22 15:31:00 2014 +0100

  beta 2014.03.22 15:31

  ...

See the commit diff [0].

@Hans: Here is a minimal example for Luatex-Plain:


https://bitbucket.org/phg/lua-la-tex-tests/src/8d48db1435bbd70888381a6cacd2281688d0d0b6/pln-math-1-prime.tex

With the last good commit (244a447.. dated 2014.02.14 in the
Garden repo) both primes are typeset correctly. With c70b2e46..
-- which is unfortunately the first snapshot after Marious’
mirror went dark -- the second one doesn’t take the ssty feature
into account.

Best regards,
Philipp

[0] 
https://bitbucket.org/phg/context-mirror/commits/c70b2e466bbb07e976f8684d56ae4e5398169e7d



pgpm3ETHz6muk.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Problem with luaotfload and positioning of primes

2014-07-28 Thread Philipp Gesang
···date: 2014-07-28, Monday···from: Philipp Gesang···

 (CC’ing the Context list.)
 
 ···date: 2014-07-28, Monday···from: Jura Pintar···
 
  Do you have a prediction about how long it will take before a fix is
  released?
 
 No, sorry. What I do have though is the culprit:
 
   c70b2e466bbb07e976f8684d56ae4e5398169e7d is the first bad commit

Seems to be related to the feature precedence code. If I revert
the related changes as in the attached patch, the bug vanishes
(and so does te feature ordering …).

diff --git a/src/luaotfload-fontloader.lua b/src/luaotfload-fontloader.lua
index 293a319..719a1f7 100644
--- a/src/luaotfload-fontloader.lua
+++ b/src/luaotfload-fontloader.lua
@@ -9152,34 +9152,26 @@ local function featuresinitializer(tfmdata,value)
   local language=properties.language
   local basesubstitutions=rawdata.resources.features.gsub
   local basepositionings=rawdata.resources.features.gpos
-  if basesubstitutions or basepositionings then
-local sequences=tfmdata.resources.sequences
-for s=1,#sequences do
-  local sequence=sequences[s]
-  local sfeatures=sequence.features
-  if sfeatures then
-local order=sequence.order
-if order then
-  for i=1,#order do 
-local feature=order[i]
-if features[feature] then
-  local validlookups,lookuplist=collectlookups(rawdata,feature,script,language)
-  if not validlookups then
-  elseif basesubstitutions and basesubstitutions[feature] then
-if trace_preparing then
-  report_prepare(filtering base feature %a for %a,feature,fullname)
-end
-applybasemethod(preparesubstitutions,tfmdata,feature,value,validlookups,lookuplist)
-registerbasefeature(feature,value)
-  elseif basepositionings and basepositionings[feature] then
-if trace_preparing then
-  report_prepare(filtering base feature %a for %a,feature,fullname)
-end
-applybasemethod(preparepositionings,tfmdata,feature,features[feature],validlookups,lookuplist)
-registerbasefeature(feature,value)
-  end
-end
-  end
+  if basesubstitutions then
+for feature,data in next,basesubstitutions do
+  local value=features[feature]
+  if value then
+local validlookups,lookuplist=collectlookups(rawdata,feature,script,language)
+if validlookups then
+  applybasemethod(preparesubstitutions,tfmdata,feature,value,validlookups,lookuplist)
+  registerbasefeature(feature,value)
+end
+  end
+end
+  end
+  if basepositionings then
+for feature,data in next,basepositionings do
+  local value=features[feature]
+  if value then
+local validlookups,lookuplist=collectlookups(rawdata,feature,script,language)
+if validlookups then
+  applybasemethod(preparepositionings,tfmdata,feature,features[feature],validlookups,lookuplist)
+  registerbasefeature(feature,value)
 end
   end
 end


pgpcELknSqgor.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Problem with luaotfload and positioning of primes

2014-07-28 Thread Philipp Gesang
Good morning, Hans!

Thanks for the quick fix!

Best,
Philipp

···date: 2014-07-28, Monday···from: Philipp Gesang···

 ···date: 2014-07-28, Monday···from: Philipp Gesang···
 
  (CC’ing the Context list.)
  
  ···date: 2014-07-28, Monday···from: Jura Pintar···
  
   Do you have a prediction about how long it will take before a fix is
   released?
  
  No, sorry. What I do have though is the culprit:
  
c70b2e466bbb07e976f8684d56ae4e5398169e7d is the first bad commit
 
 Seems to be related to the feature precedence code. If I revert
 the related changes as in the attached patch, the bug vanishes
 (and so does te feature ordering …).
 

 diff --git a/src/luaotfload-fontloader.lua b/src/luaotfload-fontloader.lua
 index 293a319..719a1f7 100644
 --- a/src/luaotfload-fontloader.lua
 +++ b/src/luaotfload-fontloader.lua
 @@ -9152,34 +9152,26 @@ local function featuresinitializer(tfmdata,value)
local language=properties.language
local basesubstitutions=rawdata.resources.features.gsub
local basepositionings=rawdata.resources.features.gpos
 -  if basesubstitutions or basepositionings then
 -local sequences=tfmdata.resources.sequences
 -for s=1,#sequences do
 -  local sequence=sequences[s]
 -  local sfeatures=sequence.features
 -  if sfeatures then
 -local order=sequence.order
 -if order then
 -  for i=1,#order do 
 -local feature=order[i]
 -if features[feature] then
 -  local 
 validlookups,lookuplist=collectlookups(rawdata,feature,script,language)
 -  if not validlookups then
 -  elseif basesubstitutions and basesubstitutions[feature] 
 then
 -if trace_preparing then
 -  report_prepare(filtering base feature %a for 
 %a,feature,fullname)
 -end
 -
 applybasemethod(preparesubstitutions,tfmdata,feature,value,validlookups,lookuplist)
 -registerbasefeature(feature,value)
 -  elseif basepositionings and basepositionings[feature] then
 -if trace_preparing then
 -  report_prepare(filtering base feature %a for 
 %a,feature,fullname)
 -end
 -
 applybasemethod(preparepositionings,tfmdata,feature,features[feature],validlookups,lookuplist)
 -registerbasefeature(feature,value)
 -  end
 -end
 -  end
 +  if basesubstitutions then
 +for feature,data in next,basesubstitutions do
 +  local value=features[feature]
 +  if value then
 +local 
 validlookups,lookuplist=collectlookups(rawdata,feature,script,language)
 +if validlookups then
 +  
 applybasemethod(preparesubstitutions,tfmdata,feature,value,validlookups,lookuplist)
 +  registerbasefeature(feature,value)
 +end
 +  end
 +end
 +  end
 +  if basepositionings then
 +for feature,data in next,basepositionings do
 +  local value=features[feature]
 +  if value then
 +local 
 validlookups,lookuplist=collectlookups(rawdata,feature,script,language)
 +if validlookups then
 +  
 applybasemethod(preparepositionings,tfmdata,feature,features[feature],validlookups,lookuplist)
 +  registerbasefeature(feature,value)
  end
end
  end




 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___



pgpWdobr_Ztis.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] sections without numbering

2014-07-13 Thread Philipp Gesang
Hello Werner!

···date: 2014-07-12, Saturday···from: Werner Hintze···

 I can’t figure out how to change the chapter heading. More important: 
 I have no idea where to find the needed information. What I want to see 
 is for example:
 
 Kapitel: Blablabla

Several unnumbered structures are predefined.

\setuphead [subject] [before=Kapitel~]
\starttext
  \startsubject [title=foo] \input knuth \stopsubject
\stoptext

If you wish for the styles of the label and the title to match,
you’ll have to assign them manually:

\definealternativestyle [subjectstyle] [\italic \tfd]

\setuphead [subject] [
  style=subjectstyle,
  before=\bgroup \subjectstyle Kapitel~\egroup,
]
\starttext
  \startsubject [title=foo] \input knuth \stopsubject
\stoptext

The reason as to why this isn’t as easy as

\setuplabeltext [chapter=Kapitel]
\setuphead [chapter] [number=no]

is that the section label is treated as part of the number.
Consequently, Context exposes no option to typeset the label
independently. However, it can be made work by passing an
appropriate command that omits the number:

\setuplabeltext [chapter=Kapitel]
\setuphead [chapter] [deepnumbercommand=\gobbleoneargument]

\starttext
  \startchapter [title=foo] \input knuth \stopchapter
\stoptext

 Where can I find these informations?

In the manual [0]. The \title and \subject structurals even made the
second place on the “top ten” ladder of important commands
(cf. section 1.10). The numberless versions also feature
promintently on the wiki [1].

PS  Next time you ask a new question, please open a new thread
with an adequate subject to keep the list tidy.

Best regards,
Philipp

[0] http://wiki.contextgarden.net/ConTeXt_reference_manual
[1] http://wiki.contextgarden.net/Titles#Default



pgpAV8cO5Yz87.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] sections without numbering

2014-07-13 Thread Philipp Gesang
···date: 2014-07-13, Sunday···from: Werner Hintze···

 Anayway. Thanks for your response. In the meantime I found another 
 solution:
 
 
   \starttext
 
   \define[2]\MyChapter {#1.\,Kapitel: #2}
   \setuphead [chapter] [command=\MyChapter, page=no]

Yes, that a valid solution as well.

Good luck!
Philipp



pgpne94u5pdEP.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] running PlainTeX from beta

2014-07-11 Thread Philipp Gesang
···date: 2014-07-11, Friday···from: Hans Hagen···

 On 7/11/2014 7:06 PM, Meer, H. van der wrote:
  I have some plaintex code to run from the ConTeXt beta-distribution, 
  because I didn't install the complete TeXp-distribution (and if possible 
  prefer to keep it that way).
 
  I did not fare well with running texexec --make plain and mtxrun 
  --script plain myfile.tex
  The first command does not give a sign of dumping the plain format 
  somewhere, the second command complains I can't find the format file 
  luatex-plain.fmt
 
  It looks if I am on the wrong track for using luatex with plain. Will 
  someone please be so kind to turn me in the right direction?
 
 mtxrun --script plain --make

While you’re at it, could you please report back whether this
succeeds immediately or bombs out like so:

Preloading the plain format: codes, registers, parameters, fonts, more 
fonts,
! Font \preloaded=manfnt not loadable: metric data not found or bad.
to be read again 
\par 

Thanks!
Philipp



pgpoHvjgDYpLG.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] documentation

2014-07-07 Thread Philipp Gesang
···date: 2014-07-07, Monday···from: Yuri Teixeira···

  For some reason (isp/dns/something) the contextgarden.net
 has been unavailiable to me since yesterday even though some verification
 sites show it up and some show it down (http://www.isitdownrightnow.com
 been one of the later).

Confirmed. The wiki server (wiki.contextgarden.net) does not
respond to ICMP requests. I remember having used the wiki only
yesterday so it could be temporary outage. The git server
(git.contextgarden.net) is still running, though.

Best,
Philipp



pgp5Z6_Mq79nB.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] [OT] Twenty Questions for DEK

2014-05-21 Thread Philipp Gesang
http://www.informit.com/articles/article.aspx?p=2213858WT.mc_id=Author_Knuth_20Questions

Quote:

   “The people at MSP wrote special software that converts my TeX
source text into suitable input to other software that
creates pdf files.”

I wonder why using a TeX engine capable of producing PDF output
directly wasn’t an option.

Best,
Philipp



pgp2Ig_FAkMQK.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] LuaTeX-plain OpenType Features Select

2014-05-15 Thread Philipp Gesang
···date: 2014-05-15, Thursday···from: Aíre Funvake···
 On Wed May 14 00:16:54 2014, Philipp Gesang wrote:
  That’s correct. The “color” key triggers a custom callback that
  tints every glyph of the defined font. It’s part of Luaotfload
  solely for compatibility for Xetex. IMO it’s not worth the
  hassle; I recommend using a proper color package instead.
 
 Thank you for the kind advice, Philipp. Is there a color package
 that works with ConTeXt's luatex-plain.fmt that you can suggest?

Never tried that, sorry. Have you searched CTAN? If that leads
nowhere I recommend asking on http://tex.stackexchange.com.

Best,
Philipp



pgpH4kKkkGkRF.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] LuaTeX-plain OpenType Features Select

2014-05-13 Thread Philipp Gesang
···date: 2014-05-13, Tuesday···from: Hans Hagen···

 On 5/13/2014 8:16 PM, Aíre Funvake wrote:
  On Tue May 13 19:56:34 2014, Hans Hagen wrote:
  On 5/13/2014 7:48 PM, Aíre Funvake wrote:
  On Mon May 12 23:12:06 2014, Aíre Funvake wrote:
  On 2014-05-12, 22:59 , Aíre Funvake wrote:
  On Mon May 12 22:52:43 2014, Hans Hagen wrote:
  On 5/12/2014 10:46 PM, Aíre Funvake wrote:
  On Mon May 12 22:01:04 2014, Hans Hagen wrote:
  On 5/12/2014 9:48 PM, Aíre Funvake wrote:
  Hi all,
 
  Trying to select slashed zero and lining figures from a
  font. For Lucida Bright OT, as another example, +scmp works,
  but not for Charter ITC Pro. But the font that concerns me
  the most right now, is TheSansMono Condensed...
 
  Font URL:
  http://www.lucasfonts.com/fonts/thesansmono/thesansmono-condensed/features/
 
 
 
 
  PDF Info:
  https://dl.dropboxusercontent.com/u/6613992/TheSansMonoCd-info.pdf
 
  8---minimal example8
  \newdimen\fntcodesz
  \fntcodesz = 11.5pt
  \font\kwr = name:thesansmonocdw5regular:+lnum;+zero at \fntcodesz
  \kwr
  0123456789
  \bye
  8--8
 
  sometimes you need to select a script/language combination too
  or when
  digits are concerned disable oldstyle
 
  I'm too inexperienced to know what that means, or how to apply that.
 
  there is some info in font manuals and the context wiki
 
  I've opened the font in FontForge, and can see the glyphs I'm
  looking for, but again, it does not carry much applicable meaning
  for me. For example, can I use this information?:
 
  Slash 0, Lining Figures: (0x10120) U+0030 zero.lf.slashed DIGIT
  ZERO
   1, Lining Figures: (0x10121) U+0031 one.lf DIGIT ONE
   ...
  Slash 0, Basic: (0x1012b) U+0030 zero.basic.slashed DIGIT ZERO
   1, Basic: (0x1012c) U+0031 one.basic DIGIT ONE
   ...
 
  so you need to select the lnum feature too
 
  Was this not it?:
  ...
  \font\kwr = name:thesansmonocdw5regular:+lnum;+zero at \fntcodesz
  ...
  But thanks; will keep on reading; if solution found, will add it here.
  Regards,
  Aíre
 
  Solution:
  \font\tt = name:thesansmonocdw5regular:script=latn;+lnum;+zero} at 12pt
  Thank you!
 
 
  Spoke too soon. The zero.slashed is selected, instead of
  zero.lf.slashed,
  so that the zero is smaller than the rest of the lining figure numbers.
  In
  desperation, tried luatex with 'luaotfload.sty' under TeXLive2013, and
  it
  worked fine. `;color=XX` also works with `luaotfload`, but not with
  LuaTeX-plain from ConTeXt.
 
  no, and that is unlikely to show up in context as it makes no sense to
  specify colors that way .. just use the normal color commands
 
  Any ideas would be welcome. Exhausted Google query permutations and most
  font info if for LaTeX, pdfTeX, pdfLaTeX, LuaLaTeX or ConTeXt.
 
  Can I maybe as a hack switch the glyphs, or something?
 
  how about adding
 
 mode=node
 
  in the plain setup (often not needed in context)
 
  Hans
 
  Thanks for the reply. Tried `mode=node`. Read about it, but never
  thought
  of putting it here!? The correct specification then is:
 
  \font\mono = {TheSansMonoCd-W5Regular:%
script=latn;+lnum;+zero;mode=node} at \fntsze
 
  Confused about the color though. Read most of luatexref-t.pdf, and may
  have missed it. The only reference (and it works in `luaotfload` under
  TeXLive2013) is like this:
 
  \font\mono = {TheSansMonoCd-W5Regular:%
script=latn;+lnum;+zero;mode=node;color=336699} at \fntsze
  
 
 so it looks like oftload adds that (or maybe the latex font definition 
 code) but even then, it's probably implemented someplace else in the 
 latex code
 
  Found no other reference to setting color on fonts in LuaTeX-plain (the
  ConTeXt version). Would love a pointer to the information though.
 
 it must be something latex i think (maybe to provide xetex 
 compatibility) but it's definitely not in luatex (nor will be) and also 
 not in context (which has more advanced color support than hex specs 
 anyway)

That’s correct. The “color” key triggers a custom callback that
tints every glyph of the defined font. It’s part of Luaotfload
solely for compatibility for Xetex. IMO it’s not worth the
hassle; I recommend using a proper color package instead.

 if you want color, use context instead of plain

Probably the best suggestion =)

Philipp



pgpSOsd9Oew8I.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] smcp+tlig broken for -- only? -- Libertine

2014-05-12 Thread Philipp Gesang
···date: 2014-05-12, Monday···from: Hans Hagen···

 On 5/11/2014 12:23 PM, Philipp Gesang wrote:
  Hi Hans,
 
  the fontloader appears to have trouble applying fake ligatures
  (“--” - “\endash” and the likes) in conjunction with small
  capitals. Both features work well in isolation. The behavior
  is limited to Libertine (I tested all versions back to 5.0.0).
  Here’s the file I’ve been testing with:
 
   
  https://bitbucket.org/phg/lua-la-tex-tests/src/c2e518e9459ab343fee3d0647c7472c5bf599489/cnt-feature-9-smcp-tlig.tex
 
 (1) for node mode i will shift the feature up front (unless it fails at 
 some point)

Thanks, I’ll keep an eye on that! For now it looks good.

 (2) for base mode we will fall back on regular -- and --- (no fancy 
 adaption)

Fine by me!

Thanks for the quick fix,
Philipp





pgpGV3l8Lmsnn.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] git

2014-04-27 Thread Philipp Gesang
···date: 2014-04-26, Saturday···from: Hans Hagen···

 On 4/26/2014 12:02 PM, Philipp Gesang wrote:
  Hi all,
 
  Marius’ git mirror is not going to be kept in sync anymore. From
  his answer:
 
 Because of security issues I disconnected the server there
 git script was running from the internet and have no plans
 to restore it.
 
  Which I think is quite a loss because it made working with the
  beta *much* easier. Would it be possible to put up something
  similar on the garden? Maybe Hans is already using git and forgot
  to tell everybody ;) ?
 
  If someone has a permanently online machine to spare maybe they
  could set up a cronjob for Marius’s script:
 
 
  https://gitorious.org/context/context/source/d493b9c93ad826044bd17889da2ee099c8ed72d5:context_git_update.pl
 
  Any thoughts?
 
 Mojca already has that running on the garden for a while.

Is there a web interface somewhere? The source links on the wiki
still point to the outdated mirrors that were based on Marius’
bot. E.g.

http://wiki.contextgarden.net/Main_Page#Development
http://wiki.contextgarden.net/ConTeXt_wiki:Editing#Linking_to_source_files

Out of curiosity I pointed my browser to git.contextgarden.net
but all I got was some login form :(

Philipp



pgpdrOPUTNyRU.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] git

2014-04-27 Thread Philipp Gesang
···date: 2014-04-27, Sunday···from: Mojca Miklavec···

 On Sun, Apr 27, 2014 at 10:23 AM, Philipp Gesang wrote:
  ···date: 2014-04-26, Saturday···from: Hans Hagen···
 
  On 4/26/2014 12:02 PM, Philipp Gesang wrote:
   Hi all,
  
   Marius’ git mirror is not going to be kept in sync anymore. From
   his answer:
  
  Because of security issues I disconnected the server there
  git script was running from the internet and have no plans
  to restore it.
  
   Which I think is quite a loss because it made working with the
   beta *much* easier. Would it be possible to put up something
   similar on the garden? Maybe Hans is already using git and forgot
   to tell everybody ;) ?
  
   If someone has a permanently online machine to spare maybe they
   could set up a cronjob for Marius’s script:
  
  
   https://gitorious.org/context/context/source/d493b9c93ad826044bd17889da2ee099c8ed72d5:context_git_update.pl
  
   Any thoughts?
 
  Mojca already has that running on the garden for a while.
 
 Indeed, that was supposed to be an Easter egg.
 (But mostly because it still needs contents and user accounts and ...
 Also the scripts aren't completely reliably working yet.)

The idea is great nonetheless!

  Out of curiosity I pointed my browser to git.contextgarden.net
  but all I got was some login form :(
 
 If you came that far, you should have also noticed the link public projects.

Ha, I did not. Thanks. Though I can’t seem to clone the main
repo:

[10:48:37=phg@acheron= ~/src/context-dev] git clone 
http://git.contextgarden.net/context/context.git context-git-garden
Cloning into 'context-git-garden'...
remote: Counting objects: 55441, done.
remote: Compressing objects: 100% (10041/10041), done.
error: RPC failed; result=18, HTTP code = 200MiB | 1.10 MiB/s 
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

Same for the repo imported from gitorious. Maybe some rate limit
is interfering?

Philipp



pgpGNf5YIxm5p.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] git

2014-04-27 Thread Philipp Gesang
···date: 2014-04-27, Sunday···from: Mojca Miklavec···

 On Sun, Apr 27, 2014 at 10:57 AM, Philipp Gesang wrote:
 
  Though I can’t seem to clone the main
  repo:
 
  [10:48:37=phg@acheron= ~/src/context-dev] git clone 
  http://git.contextgarden.net/context/context.git context-git-garden
  Cloning into 'context-git-garden'...
  remote: Counting objects: 55441, done.
  remote: Compressing objects: 100% (10041/10041), done.
  error: RPC failed; result=18, HTTP code = 200MiB | 1.10 MiB/s
  fatal: The remote end hung up unexpectedly
  fatal: early EOF
  fatal: index-pack failed
 
  Same for the repo imported from gitorious. Maybe some rate limit
  is interfering?
 
 Weird, it works for me.

I get the same error on my freebsd box as well. To make sure it’s
not an out-of-memory situation I also cloned the Linux repo (1.1
GB) -- successfully. So I’m not convinced that it’s caused by a
misconfiguration on my side. If it helps, I’m using git versions
1.9.2 and 1.9.0. Attached is the captured output of the git
session with GIT_CURL_VERBOSE=1.

Philipp

Cloning into 'context-git-garden'...
* Couldn't find host git.contextgarden.net in the .netrc file; using defaults
* Hostname was NOT found in DNS cache
*   Trying 193.2.4.200...
* Connected to git.contextgarden.net (193.2.4.200) port 80 (#0)
 GET /context/context.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.9.2
Host: git.contextgarden.net
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

 HTTP/1.1 200 OK
 Date: Sun, 27 Apr 2014 11:56:14 GMT
* Server Apache is not blacklisted
 Server: Apache
 Status: 200 OK
 Content-Type: application/x-git-upload-pack-advertisement
 Expires: Tue, 01 Jan 1980 00:00:00 GMT
 Pragma: no-cache
 Cache-Control: no-cache, max-age=0, must-revalidate
 Content-Length: 310
 X-Request-Id: 8f7c40a4-7704-4df0-843b-21d9e3b79ca9
 X-Runtime: 0.019148
 
* Connection #0 to host git.contextgarden.net left intact
* Couldn't find host git.contextgarden.net in the .netrc file; using defaults
* Hostname was NOT found in DNS cache
*   Trying 193.2.4.200...
* Connected to git.contextgarden.net (193.2.4.200) port 80 (#1)
 POST /context/context.git/git-upload-pack HTTP/1.1
User-Agent: git/1.9.2
Host: git.contextgarden.net
Accept-Encoding: gzip
Content-Type: application/x-git-upload-pack-request
Accept: application/x-git-upload-pack-result
Content-Length: 202

* upload completely sent off: 202 out of 202 bytes
 HTTP/1.1 200 OK
 Date: Sun, 27 Apr 2014 11:56:14 GMT
* Server Apache is not blacklisted
 Server: Apache
 Status: 200 OK
 Content-Type: application/x-git-upload-pack-result
 Cache-Control: no-cache
 X-Request-Id: 1251ceab-4838-4823-bd98-4c466ff19e81
 X-Runtime: 0.005837
 Transfer-Encoding: chunked
 
* transfer closed with outstanding read data remaining
* Closing connection 1
error: RPC failed; result=18, HTTP code = 200
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed


pgpBPQAKmWdDY.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] git

2014-04-26 Thread Philipp Gesang
Hi all,

Marius’ git mirror is not going to be kept in sync anymore. From
his answer:

  Because of security issues I disconnected the server there
  git script was running from the internet and have no plans
  to restore it.

Which I think is quite a loss because it made working with the
beta *much* easier. Would it be possible to put up something
similar on the garden? Maybe Hans is already using git and forgot
to tell everybody ;) ?

If someone has a permanently online machine to spare maybe they
could set up a cronjob for Marius’s script:

  
https://gitorious.org/context/context/source/d493b9c93ad826044bd17889da2ee099c8ed72d5:context_git_update.pl

Any thoughts?
Philipp


···date: 2014-03-16, Sunday···from: Hans Hagen···

 Hi,
 
 Is Marius git repos still kept up to date?
 
 Hans
 
 -
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
   | 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___


pgpwB7iFFLFMj.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex-plain] disappearing math-on node

2014-04-06 Thread Philipp Gesang
···date: 2014-04-06, Sunday···from: Hans Hagen···

 On 4/5/2014 3:12 PM, Philipp Gesang wrote:
  ···date: 2014-04-03, Thursday···from: Hans Hagen···
 
  On 4/3/2014 6:29 PM, Dohyun Kim wrote:
  This is a bug report based on the issue discussed at
  https://github.com/lualatex/luaotfload/issues/212
 
  \font\tenrm{file:lmroman10-regular.otf:mode=node;script=latn}\tenrm
  \setbox0\vbox{%
  x\penalty-1
  $a$x$a$
  }
  \unvbox0
  \setbox0\lastbox
  \unhbox0
  \end
 
  The plain tex code shown above fails with a lua error:
  luatex-fonts-merged.lua:9616: attempt to index local 'current' (a nil 
  value)
 
  My guess is: as math-on (math-off too) is a discardable item after a
  linebreak, the first math-on node has gone away. So the
  math-on/math-off pair has become broken, by which the behavior of
  node.end_of_math is confused.
 
  mtxrun --script plain test.tex
 
  runs ok here so i need an example that fails with context or luatex-plain
 
  It fails with the luatex-plain format from the minimals as of
  yesterday and Luatex 4972:
 
   error: 
  .../context/tex/texmf-context/tex/context/base/font-ota.lua:144: attempt to 
  index local 'current' (a nil value)
   .
   \bye ^^@-\par
   \vfill \supereject \end
   l.17 \bye
 
  Though the issue arises only in node mode.
 
  normally the font callback is called on a hlist and there are always
  paired math nodes
 
  (what is line 9616 in the current beta?)
 
  Line 9626 with yesterday’s code. Attached are patches for
  font-ota.lua and luatex-fonts-otn.lua that guard all invocations
  of end_of_math() with checks for the subtype.
 
 I think that the removed math node is a bad thing so that will change in 
 a next luatex release (i tested a patch but it will not go in the tl 
 release). (Just like the math node at the end of a line it will have 
 zero surround in order to make the backend happy.)

I’d be interested in testing the patch as well.

 In order to avoid the 'current' issue I'll use an overload of 
 end_of_math in the generic code.
 
 The real solution is to make the built-in end_of_math more strict 
 (trivial patch ready and tested so that can end up in the next luatex).
 
 In the context code i won't intercept it because end_of_math will do 
 that at some point.

Good news. Though I’m a little worried about the fontloader in
Context and the generic format diverging too much.

Thanks for looking into this,
Philipp



pgpTujGgc2Gcn.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex-plain] disappearing math-on node

2014-04-06 Thread Philipp Gesang
···date: 2014-04-06, Sunday···from: Hans Hagen···

 On 4/5/2014 3:12 PM, Philipp Gesang wrote:
  ···date: 2014-04-03, Thursday···from: Hans Hagen···
 
  On 4/3/2014 6:29 PM, Dohyun Kim wrote:
  This is a bug report based on the issue discussed at
  https://github.com/lualatex/luaotfload/issues/212
 
  \font\tenrm{file:lmroman10-regular.otf:mode=node;script=latn}\tenrm
  \setbox0\vbox{%
  x\penalty-1
  $a$x$a$
  }
  \unvbox0
  \setbox0\lastbox
  \unhbox0
  \end
 
  The plain tex code shown above fails with a lua error:
  luatex-fonts-merged.lua:9616: attempt to index local 'current' (a nil 
  value)
 
  My guess is: as math-on (math-off too) is a discardable item after a
  linebreak, the first math-on node has gone away. So the
  math-on/math-off pair has become broken, by which the behavior of
  node.end_of_math is confused.
 
  mtxrun --script plain test.tex
 
  runs ok here so i need an example that fails with context or luatex-plain
 
  It fails with the luatex-plain format from the minimals as of
  yesterday and Luatex 4972:
 
   error: 
  .../context/tex/texmf-context/tex/context/base/font-ota.lua:144: attempt to 
  index local 'current' (a nil value)
   .
   \bye ^^@-\par
   \vfill \supereject \end
   l.17 \bye
 
  Though the issue arises only in node mode.
 
  normally the font callback is called on a hlist and there are always
  paired math nodes
 
  (what is line 9616 in the current beta?)
 
  Line 9626 with yesterday’s code. Attached are patches for
  font-ota.lua and luatex-fonts-otn.lua that guard all invocations
  of end_of_math() with checks for the subtype.
 
 I think that the removed math node is a bad thing so that will change in 
 a next luatex release (i tested a patch but it will not go in the tl 
 release). (Just like the math node at the end of a line it will have 
 zero surround in order to make the backend happy.)
 
 In order to avoid the 'current' issue I'll use an overload of 
 end_of_math in the generic code.
 
 The real solution is to make the built-in end_of_math more strict 
 (trivial patch ready and tested so that can end up in the next luatex).

With experimental revision 4974 the bug is gone. Thanks!
Philipp



pgpWF8OKID9U5.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex-plain] disappearing math-on node

2014-04-05 Thread Philipp Gesang
···date: 2014-04-03, Thursday···from: Hans Hagen···

 On 4/3/2014 6:29 PM, Dohyun Kim wrote:
  This is a bug report based on the issue discussed at
  https://github.com/lualatex/luaotfload/issues/212
 
  \font\tenrm{file:lmroman10-regular.otf:mode=node;script=latn}\tenrm
  \setbox0\vbox{%
 x\penalty-1
 $a$x$a$
  }
  \unvbox0
  \setbox0\lastbox
  \unhbox0
  \end
 
  The plain tex code shown above fails with a lua error:
  luatex-fonts-merged.lua:9616: attempt to index local 'current' (a nil value)
 
  My guess is: as math-on (math-off too) is a discardable item after a
  linebreak, the first math-on node has gone away. So the
  math-on/math-off pair has become broken, by which the behavior of
  node.end_of_math is confused.
 
 mtxrun --script plain test.tex
 
 runs ok here so i need an example that fails with context or luatex-plain

It fails with the luatex-plain format from the minimals as of
yesterday and Luatex 4972:

error: .../context/tex/texmf-context/tex/context/base/font-ota.lua:144: 
attempt to index local 'current' (a nil value)
.
\bye ^^@-\par 
\vfill \supereject \end 
l.17 \bye

Though the issue arises only in node mode.

 normally the font callback is called on a hlist and there are always 
 paired math nodes
 
 (what is line 9616 in the current beta?)

Line 9626 with yesterday’s code. Attached are patches for
font-ota.lua and luatex-fonts-otn.lua that guard all invocations
of end_of_math() with checks for the subtype.

Best,
Philipp

--- luatex-fonts-otn.lua.orig	2014-04-05 15:02:34.711828352 +0200
+++ luatex-fonts-otn.lua	2014-04-05 15:02:36.955171990 +0200
@@ -2375,7 +2375,7 @@
 end
 end
 start = start.next
-elseif id == math_code then
+elseif id == math_code and start.subtype == 0 then
 start = end_of_math(start).next
 else
 start = start.next
@@ -2567,7 +2567,7 @@
 end
 end
 start = start.next
-elseif id == math_code then
+elseif id == math_code and start.subtype == 0 then
 start = end_of_math(start).next
 else
 start = start.next
--- font-ota.lua.orig	2014-04-05 14:55:53.789969704 +0200
+++ font-ota.lua	2014-04-05 14:59:32.487654509 +0200
@@ -137,7 +137,7 @@
 last[a_state] = s_fina
 end
 first, last, n = nil, nil, 0
-if id == math_code then
+if id == math_code and current.subtype == 0 then
 current = end_of_math(current)
 end
 end
@@ -423,7 +423,7 @@
 if first or last then
 first, last = finish(first,last)
 end
-if id == math_code then
+if id == math_code and current.subtype == 0 then
 current = end_of_math(current)
 end
 end


pgpCSlyjCsqyV.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] [fontloader] does base mode support combining substitutions?

2014-04-05 Thread Philipp Gesang
Hi Hans,

when combining e.g. certain number substitutions like onum and
pnum or tnum and lnum, node mode seems to work fine. However,
those do have value in math mode as well which node mode does not
currently support. For comparison, here is a test file:


https://bitbucket.org/phg/lua-la-tex-tests/raw/93745dba31e23febb02191c039dea2de743ce77a/cnt-features-8-combined-num.tex

Is there a way to define a font with the combination of, say tnum
and lnum that will work in math mode? If not, are there plans to
implement it in the future?

Best regards,
Philipp




pgp1MFd4ggd88.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [fontloader] does base mode support combining substitutions?

2014-04-05 Thread Philipp Gesang
···date: 2014-04-05, Saturday···from: Hans Hagen···

 On 4/5/2014 4:37 PM, Philipp Gesang wrote:
  Hi Hans,
 
  when combining e.g. certain number substitutions like onum and
  pnum or tnum and lnum, node mode seems to work fine. However,
  those do have value in math mode as well which node mode does not
  currently support. For comparison, here is a test file:
 
   
  https://bitbucket.org/phg/lua-la-tex-tests/raw/93745dba31e23febb02191c039dea2de743ce77a/cnt-features-8-combined-num.tex
 
  Is there a way to define a font with the combination of, say tnum
  and lnum that will work in math mode? If not, are there plans to
  implement it in the future?
 
 basemode will always be limited because there we create static glyph 
 sets; so. for complex substitutions node mode is the method to use
 
 what do you mean with math mode in this case; in math a digit is 
 different from a digit in text mode; i think that if one uses *num 
 digits we're talking text mode

I’m just relaying a question of a user who wishes to use those
combined lnum+tnum digits in math mode.

 of course in context we can support whatever we want because we're not 
 bound to rules, but the question is: does it make sense;

Ultimately I can’t judge that, the problem description does seem
valid though: http://tex.stackexchange.com/q/165238/14066

Philipp


pgp3Iv5PkWB60.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] \setbreakpoints[compound] in tables

2014-04-04 Thread Philipp A.
hi, when inputting table data using \processdatabasefile, my initial
\setbreakpoints[compound] seems to have no effect.

is there a way to make it work?
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] \placebookmarks only assigns pages for PDF bookmarks for sections that have been referenced

2014-03-28 Thread Philipp A.
title says it.

a section/title/whatever that doesn’t have a \in or \at pointing at it gets
no page assigned.

so i have an outline in the bookmark bar, but only like 3 of the entries
link to a page.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] [font-otn] bug in node mode

2014-03-25 Thread Philipp Gesang
···date: 2014-03-25, Tuesday···from: Hans Hagen···

 On 3/24/2014 8:40 PM, Philipp Gesang wrote:
  Hi Hans,
 
  I’m afraid I have to bother you again with this issue. Consider
  this code:
 
   \font \mainface = file:EBGaramond12-Regular.otf:mode=node
   \mainface foo
   \bye
 
  This breaks with the latest fontloader because in font-otn
 
   local function initialize(sequence,script,language,enabled)
   local features = sequence.features
   if features then
   local order = features.order
   for i=1,#order do --
   ...
 
  the table “features” never has a field “order”; “sequence” has
  one occasionally, though not always.
 
 should be
 
 local function initialize(sequence,script,language,enabled)
  local features = sequence.features
  if features then
  local order = sequence.order
  if order then
  for i=1,#order do
  
  end
  else
  -- can't happen
  end
  end
  return false
 end
 
 went unnoticed as context uses a variant

This time it’s exactly as I patched it =)

Thanks for fixing,
Philipp



pgp_wRqikBeNA.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] what happened to hangaround?

2014-03-24 Thread Philipp Gesang
Hi Henning!

···date: 2014-03-24, Monday···from: Henning Hraban Ramm···

 Hi again,
 I’d like to flow some text around a picture.
 
 There was undocumented \starthangaround (it’s still in cont-new.mkiv in the 
 garden), but it’s unknown in latest beta. 
 Is there a replacement?

Try the hanging environment:

\setupexternalfigures [location=default]
\starttext
  \starthanging{\externalfigure [cow.pdf][width=3.141cm]}
\input ward
  \stophanging
\stoptext

I think it is supposed to be the successor to hangaround.

Best regards,
Philipp



pgpWRYfPrrfSu.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [font-otn] bug in node mode

2014-03-24 Thread Philipp Gesang
Hi Hans,

I’m afraid I have to bother you again with this issue. Consider
this code:

\font \mainface = file:EBGaramond12-Regular.otf:mode=node
\mainface foo
\bye

This breaks with the latest fontloader because in font-otn

local function initialize(sequence,script,language,enabled)
local features = sequence.features
if features then
local order = features.order
for i=1,#order do --
...

the table “features” never has a field “order”; “sequence” has
one occasionally, though not always.

Best,
Philipp


···date: 2014-03-14, Friday···from: Hans Hagen···

 On 3/14/2014 7:48 AM, Philipp Gesang wrote:
  Hi Hans,
 
  at least the Plain format breaks as soon as you define a font in
  node mode:
 
   \font \testfont = lmroman10-regular.otf:mode=node
   \testfont foo
   \bye
 
 no, it's:
 
  local order = features.order
  for i=1,#order do --
  local kind = order[i] --
 
 
 -
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
   | 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___


pgpiX_opg32FN.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Floats to the side of headers

2014-03-19 Thread Philipp A.
Hi, i have a float that happens just to be as high as the page when placed
with location=right.

how do i convince my header to be on the same page (i.e. at the top, with
the top of the floar to the right of it)
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] [font-otn] bug in node mode

2014-03-14 Thread Philipp Gesang
Hi Hans,

at least the Plain format breaks as soon as you define a font in
node mode:

\font \testfont = lmroman10-regular.otf:mode=node
\testfont foo
\bye

Patch attached.

Best regards,
Philipp


--- font-otn.lua.orig	2014-03-14 07:42:18.494017054 +0100
+++ font-otn.lua	2014-03-14 07:42:52.937495772 +0100
@@ -2054,8 +2054,8 @@
 local features = sequence.features
 if features then
  -- for kind, scripts in next, features do
-for i=1,#order do --
-local kind = order[i] --
+for i=1,#features do --
+local kind = features[i] --
 local valid = enabled[kind]
 if valid then
 local scripts = features[kind] --


pgpxgsAvh3VHL.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [font-otn] bug in node mode

2014-03-14 Thread Philipp Gesang
···date: 2014-03-14, Friday···from: Hans Hagen···

 On 3/14/2014 7:48 AM, Philipp Gesang wrote:
  Hi Hans,
 
  at least the Plain format breaks as soon as you define a font in
  node mode:
 
   \font \testfont = lmroman10-regular.otf:mode=node
   \testfont foo
   \bye
 
 no, it's:
 
  local order = features.order
  for i=1,#order do --
  local kind = order[i] --

D’oh. I shouldn’t patch things before breakfast. Thanks!
Philipp



pgpr_YHJvb1DM.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] \cite documentation

2014-03-13 Thread Philipp A.
i know that \cite can be called like \cite[ref], \cite{ref},
\cite[options][ref], and \cite[options]{ref}

is there a difference between curly braces and brackets?

what options apart from “start”, “end”, “data”, and “alternative” does it
know, and how do “data” and “alternative” work?

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

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

Re: [NTG-context] [***SPAM***] ConTeXt Daily Build

2014-03-10 Thread Philipp Gesang
···date: 2014-03-10, Monday···from: hwit...@gmail.com···

 
 Where are there instructions for using the daily build, newest Context code?

http://wiki.contextgarden.net/ConTeXt_Standalone

 [ Is this the same as the standalone version that I've heard of? ]

Yes.

Best regards,
Philipp




pgpYwh7Q3NgDc.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Plain format not building

2014-03-02 Thread Philipp Gesang
Hi Wolfgang!

···date: 2014-03-02, Sunday···from: Wolfgang Schuster···

 Am 19.02.2014 um 19:31 schrieb Philipp Gesang 
 philipp.ges...@alumni.uni-heidelberg.de:
 
  Hi all,
  
  with the most recent Minimals (2014.02.14 17:07) building the
  Luatex Plain format no longer works:
  
 $ mtxrun --script plain --make
  
 ... 
  
 mtx-plain   | running command 'luatex --ini luatex-plain.tex \dump'
 This is LuaTeX, Version beta-0.78.2 (TeX Live 2014/dev) (rev 4746)  
  (INITEX)
  \write18 enabled.
  
 
  (/home/phg/context/tex/texmf-context/tex/generic/context/luatex/luatex-plain.te
 x (/home/phg/context/tex/texmf/tex/plain/base/plain.tex
 Preloading the plain format: codes, registers, parameters, fonts, more 
  fonts,
 ! Font \preloaded=manfnt not loadable: metric data not found or bad.
 to be read again 
 \par 
 l.468 
  
 ? 
  
  Same when building manually. Can anyone reproduce this?
 
 The context suite doesn’t include the manual fonts [1] which are required for 
 the plain TeX format.
 
 [1] http://www.ctan.org/pkg/manual

Yes, I’ve been using the tfm from texlive since. I’m unsure as to
why the file was removed from the Context suite.

Thanks for looking into this!
Philipp



pgp3OptgihCga.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Plain format not building

2014-02-19 Thread Philipp Gesang
Hi all,

with the most recent Minimals (2014.02.14 17:07) building the
Luatex Plain format no longer works:

$ mtxrun --script plain --make

... 

mtx-plain   | running command 'luatex --ini luatex-plain.tex \dump'
This is LuaTeX, Version beta-0.78.2 (TeX Live 2014/dev) (rev 4746)  (INITEX)
 \write18 enabled.


(/home/phg/context/tex/texmf-context/tex/generic/context/luatex/luatex-plain.te
x (/home/phg/context/tex/texmf/tex/plain/base/plain.tex
Preloading the plain format: codes, registers, parameters, fonts, more 
fonts,
! Font \preloaded=manfnt not loadable: metric data not found or bad.
to be read again 
\par 
l.468 

? 

Same when building manually. Can anyone reproduce this?

Best,
Philipp



pgpbQWno8XsmJ.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] ctxluacode inside bTABLE

2013-11-27 Thread Philipp Gesang
Hi Jorge,

···date: 2013-11-27, Wednesday···from: DesdeChaves···

 I try make a table with some random numbers but I found a problem with this
 code:
 
 
 \starttext
 \ctxluacode{v=math.random(400,600)/10;context(%0.1f,v) ;}
 
 \bTABLE
 \bTR\bTD Distance (cm) \eTD\bTD $\Delta t$ (s) \eTD\eTR
 \bTR\bTD[nr=3]  \ctxluacode{v=math.random(400,600)/10;context(%0.1f,v) ;}
  \eTD\bTD t1 \eTD\eTR
 \bTR\bTD t2 \eTD\eTR
 \bTR\bTD t3 \eTD\eTR
 \eTABLE
 
 
 \stoptext
 
 \ctxluacode{v=math.random(400,600)/10;context(%0.1f,v) ;}   don't work
 inside the bTABLE environment.

just wrap the code in a macro. Lua code needs a different catcode
regime and expansion rules that don’t cooperate well with the
table scanner. E.g.

\startluacode
  local mathrandom = math.random
  local context= context
  document.get_random_number = function ()
context (%0.1f, mathrandom (400, 600) / 10)
  end
\stopluacode

\def \getrandomnumber {\ctxluacode {document.get_random_number ()}}

\starttext
  \bTABLE
\bTR \bTD Distance (cm)  \eTD \bTD $\Delta t$ (s) \eTD \eTR
\bTR \bTD[nr=3] \getrandomnumber \eTD \bTD t1 \eTD \eTR
\bTR  \bTD t2 \eTD \eTR
\bTR  \bTD t3 \eTD \eTR
  \eTABLE
\stoptext


Hth,
Philipp



pgpVMnxrZGPeS.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] ctxluacode inside bTABLE

2013-11-27 Thread Philipp Gesang
···date: 2013-11-27, Wednesday···from: DesdeChaves···

 Solved
 
 \getrandomnumber{36}{56}{10}

Or define it monadic:

  \def \getrandomnumber #1{\ctxluacode {document.get_random_number (#1)}}

Now you can use your original syntax:

  \getrandomnumber {23, 42, 10}

Though it blurs the line between TeX and Lua code.

Best,
Philipp




 
 
 2013/11/27 DesdeChaves desdecha...@gmail.com
 
  Is there a way to pass arguments to getrandomnumber() function?
 
  \startluacode
local mathrandom = math.random
local context= context
document.get_random_number = function (min,max,delta)
  context (%0.1f, mathrandom (min, max) / decimal)
end
  \stopluacode
 
  \def \getrandomnumber#1#2#3 {\ctxluacode {document.get_random_number
  (#1,#2,#3)}}
 
  \starttext
\bTABLE
  \bTR \bTD Distance (cm)  \eTD \bTD $\Delta t$ (s) \eTD \eTR
  \bTR \bTD[nr=3] \getrandomnumber{34,56,10} \eTD \bTD t1
\eTD \eTR
  \bTR  \bTD t2 \eTD \eTR
  \bTR  \bTD t3 \eTD \eTR
\eTABLE
  \stoptext
 
 
  2013/11/27 Philipp Gesang philipp.ges...@alumni.uni-heidelberg.de
 
  Hi Jorge,
 
  ···date: 2013-11-27, Wednesday···from: DesdeChaves···
 
   I try make a table with some random numbers but I found a problem with
  this
   code:
  
  
   \starttext
   \ctxluacode{v=math.random(400,600)/10;context(%0.1f,v) ;}
  
   \bTABLE
   \bTR\bTD Distance (cm) \eTD\bTD $\Delta t$ (s) \eTD\eTR
   \bTR\bTD[nr=3]
   \ctxluacode{v=math.random(400,600)/10;context(%0.1f,v) ;}
\eTD\bTD t1 \eTD\eTR
   \bTR\bTD t2 \eTD\eTR
   \bTR\bTD t3 \eTD\eTR
   \eTABLE
  
  
   \stoptext
  
   \ctxluacode{v=math.random(400,600)/10;context(%0.1f,v) ;}   don't work
   inside the bTABLE environment.
 
  just wrap the code in a macro. Lua code needs a different catcode
  regime and expansion rules that don’t cooperate well with the
  table scanner. E.g.
 
  \startluacode
local mathrandom = math.random
local context= context
document.get_random_number = function ()
  context (%0.1f, mathrandom (400, 600) / 10)
end
  \stopluacode
 
  \def \getrandomnumber {\ctxluacode {document.get_random_number ()}}
 
  \starttext
\bTABLE
  \bTR \bTD Distance (cm)  \eTD \bTD $\Delta t$ (s) \eTD
  \eTR
  \bTR \bTD[nr=3] \getrandomnumber \eTD \bTD t1 \eTD
  \eTR
  \bTR  \bTD t2 \eTD
  \eTR
  \bTR  \bTD t3 \eTD
  \eTR
\eTABLE
  \stoptext
 
 
  Hth,
  Philipp
 
 
 
  ___
  If your question is of interest to others as well, please add an entry to
  the Wiki!
 
  maillist : ntg-context@ntg.nl /
  http://www.ntg.nl/mailman/listinfo/ntg-context
  webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
  archive  : http://foundry.supelec.fr/projects/contextrev/
  wiki : http://contextgarden.net
 
  ___
 
 
 
 
  --
  Atentamente
 
  DesdeChaves
 
 
 
 
 -- 
 Atentamente
 
 DesdeChaves

 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___



pgplurss59jv8.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] announcement and call

2013-11-14 Thread Philipp Gesang
Hi Thomas!

···date: 2013-11-14, Thursday···from: Thomas A. Schmitz···

 Dear list,
 
 today, I have an announcement to make and a call for contributions. We 
 have obtained a medium-sized grant at my university to further 
 development of ConTeXt. Specifically, our project wants to facilitate 
 typesetting critical editions after the TEI xml standard and 
 bibliographical data. Luigi will be employed as a full-time developer 
 for the next 6 months (he signed his contract today); Hans will 
 coordinate the work flow.

Great news!

 So this is good news. Now for the call for contributions: we invite you 
 to send in examples in those two areas (critical editions, i.e. 
 linenotes cum suis, and bibliographical data, aka bib-module) which show 
 where ConTeXt could be developed.

What I’d consider the most pressing issue, pertaining both to
Context and to TeX as a whole, would be text streams a.k.a.
parallel typesetting. It was discussed on the list a couple times
already and at one point someone collected examples [1]. Also, I
sketched the current state of parallel texts elsewhere [2].

   so please send examples to the list 
 that show limitations or bugs, ask for new features, etc. if you want 
 new features in the bibliography department, please do not send vague 
 requests

I have a working albeit hackish (manual page-breaking ftw)
implementation for the plain format which I wasn’t able to port
to Context due to the much more complex page model of the latter.
Example output:

https://phi-gamma.net/pdf/example-3.pdf

To minimize the vagueness ;-) I could share the sources but I
doubt it’s of much value in its present state.  Besides, it does
not work with current Luatex due to changed callback signatures.

  (it would be nice if we could have hungarian reference 
 systems) but small examples which show a precise feature and a possible 
 syntax for it.
 
 of course, i can't promise that we will be able to act on all your 
 submissions, but i'm optimistic that this project will make our favorite 
 software better!

Looking forward to status reports! Will the improvements be
directly merged into Context or do you prefer releasing it as a
self-contained module?

Best regards,
Philipp

[1] http://www.ntg.nl/pipermail/ntg-context/2010/051693.html
[2] http://tex.stackexchange.com/a/128574



pgpluhfcb_LFN.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] announcement and call

2013-11-14 Thread Philipp Gesang
···date: 2013-11-14, Thursday···from: Hans Hagen···

 On 11/14/2013 9:40 PM, Philipp Gesang wrote:
 
  What I’d consider the most pressing issue, pertaining both to
  Context and to TeX as a whole, would be text streams a.k.a.
  parallel typesetting. It was discussed on the list a couple times
  already and at one point someone collected examples [1]. Also, I
  sketched the current state of parallel texts elsewhere [2].
 
 Maybe .. i have some ideas on that but might as well do columnsets first 
 (not related to critical editions).

No problem, I wouldn’t have an immediate use for it anyways.

  Looking forward to status reports! Will the improvements be
  directly merged into Context or do you prefer releasing it as a
  self-contained module?
 
 It will be merged into the core but I can imagine a module with tei 
 mapping snippets.

Thanks!
Philipp



pgpBZKfaxU0va.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] [font-syn.lua] remove call to fontloader.to_table()

2013-11-09 Thread Philipp Gesang
Hi all,

calling fontloader.to_table() appears to be redundant when
extracting font names, see the attached patch. On my system I
measured 42 (patched) vs 59 (vanilla) seconds for rebuilding the
entire index:

  mtxrun --script fonts --reload --force

The resulting index is -- except for the uuid, naturally --
identical in both cases.

Best,
Philipp

--- /home/phg/base/font-syn.lua 2013-10-25 00:01:04.0 +0200
+++ font-syn.lua2013-11-09 18:30:33.540364371 +0100
@@ -266,8 +266,21 @@
 function fontloader.fullinfo(...) -- check with taco what we get / could get
 local ff = fontloader.open(...)
 if ff then
-local d = ff and fontloader.to_table(ff)
-d.glyphs, d.subfonts, d.gpos, d.gsub, d.lookups = nil, nil, nil, nil, 
nil
+local fields = table.tohash (fontloader.fields (ff), true)
+local d   = {
+names   = fields.names   and ff.names,
+familyname  = fields.familyname  and ff.familyname,
+fullname= fields.fullnameand ff.fullname,
+fontname= fields.fontnameand ff.fontname,
+weight  = fields.weight  and ff.weight,
+italicangle = fields.italicangle and 
ff.italicangle,
+units_per_em= fields.units_per_emand 
ff.units_per_em,
+design_range_bottom = fields.design_range_bottom and 
ff.design_range_bottom,
+design_range_top= fields.design_range_topand 
ff.design_range_top,
+design_size = fields.design_size and 
ff.design_size,
+italicangle = fields.italicangle and 
ff.italicangle,
+pfminfo = fields.pfminfo and ff.pfminfo,
+}
 fontloader.close(ff)
 return d
 else


pgpACw5YFizX4.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [font-syn.lua] remove call to fontloader.to_table()

2013-11-09 Thread Philipp Gesang
···date: 2013-11-09, Saturday···from: Hans Hagen···

 On 11/9/2013 6:45 PM, Philipp Gesang wrote:
  Hi all,
 
  calling fontloader.to_table() appears to be redundant when
  extracting font names, see the attached patch. On my system I
  measured 42 (patched) vs 59 (vanilla) seconds for rebuilding the
  entire index:
 
 mtxrun --script fonts --reload --force
 
  The resulting index is -- except for the uuid, naturally --
  identical in both cases.
 
 Okay.
 
 In fact this fullinfo was meant as temporary hack because 
 fontloader.info should return these values (and might at some time).
 
 In the meantime delayed loading was introduced which is why:
 
 function fontloader.fullinfo(...) -- lazy loading anyway
  local ff = fontloader.open(...)
  if ff then
  return ff
  else
  return nil, error in loading font
  end
 end
 
 also could work ok (in fact, the explicit glyphs = nil in the current 
 variant assumes the old loader and has the speed impact you notice 
 because it now first loads all glyphs and next discards them)
 
 Okay, in practice we need something like this:
 
 function fontloader.fullinfo(...) -- lazy loading anyway
  local ff = fontloader.open(...)
  if ff then
  local d = { } -- ff is userdata so [1] or # fails on it
  setmetatable(d, { __index = ff })
  return d
  else
  return nil, error in loading font
  end
 end

Aren’t you allocating fonts without freeing them? With this
approach you need fontloader.close() somewhere inside
check_names() which isn’t straightforward if you hide the font
data inside the metatable.  Btw. calling fontloader.info() first
yields a table for ttcs and is unnoticable performance-wise.

Best,
Philipp


pgpDLLknNrBhp.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [font-syn.lua] remove call to fontloader.to_table()

2013-11-09 Thread Philipp Gesang
···date: 2013-11-09, Saturday···from: Philipp Gesang···

 ···date: 2013-11-09, Saturday···from: Hans Hagen···
 
  On 11/9/2013 6:45 PM, Philipp Gesang wrote:
   Hi all,
  
   calling fontloader.to_table() appears to be redundant when
   extracting font names, see the attached patch. On my system I
   measured 42 (patched) vs 59 (vanilla) seconds for rebuilding the
   entire index:
  
  mtxrun --script fonts --reload --force
  
   The resulting index is -- except for the uuid, naturally --
   identical in both cases.
  
  Okay.
  
  In fact this fullinfo was meant as temporary hack because 
  fontloader.info should return these values (and might at some time).
  
  In the meantime delayed loading was introduced which is why:
  
  function fontloader.fullinfo(...) -- lazy loading anyway
   local ff = fontloader.open(...)
   if ff then
   return ff
   else
   return nil, error in loading font
   end
  end
  
  also could work ok (in fact, the explicit glyphs = nil in the current 
  variant assumes the old loader and has the speed impact you notice 
  because it now first loads all glyphs and next discards them)
  
  Okay, in practice we need something like this:
  
  function fontloader.fullinfo(...) -- lazy loading anyway
   local ff = fontloader.open(...)
   if ff then
   local d = { } -- ff is userdata so [1] or # fails on it
   setmetatable(d, { __index = ff })
   return d
   else
   return nil, error in loading font
   end
  end
 
 Aren’t you allocating fonts without freeing them?

Scratch that, I just did some tests and memory consumption seems
to be the same. Thanks for revealing this feature!

Best,
Philipp



pgpjI__CuoJg1.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex-fonts] fontloader/plain format broken in beta

2013-11-01 Thread Philipp Gesang
···date: 2013-11-01, Friday···from: Hans Hagen···

 On 10/31/2013 11:37 PM, Philipp Gesang wrote:
  Hi Hans,
 
  the fontloader (font-otn.lua, line 191) accesses the table
  nodes.disccodes which is not defined in luatex-basics-nod.lua.
 
  If I add that table (as in font-ini.lua), I get a different
  error, basically stating that various LM-fonts can’t be found
  (even if I put them in the current working directory).
 
 fixed
 
 (tested with mtxrun --script plain [--make] )

Thanks for fixing it that quickly!

Best
Philipp



pgpzPWiJbsZii.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] [luatex-fonts] fontloader/plain format broken in beta

2013-10-31 Thread Philipp Gesang
Hi Hans,

the fontloader (font-otn.lua, line 191) accesses the table
nodes.disccodes which is not defined in luatex-basics-nod.lua.

If I add that table (as in font-ini.lua), I get a different
error, basically stating that various LM-fonts can’t be found
(even if I put them in the current working directory).

Regards,
Philipp



pgpNYUwPtHrwk.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Code Called Twice?

2013-10-11 Thread Philipp Gesang
···date: 2013-10-10, Thursday···from: Thangalin···

 
 I noticed something unexpected with the following code:
 
 \enabletrackers[metapost.showlog]
 
 \startuseMPgraphic{heading:ThemeTitleStyle}
   show HEADING:THEMETITLESTYLE;
   show \MPstring{heading:title};
 
   draw textext( \MPstring{heading:title} ) rotated 5
 withcolor blue;
 \stopuseMPgraphic
 
 \defineframed[ThemeTitleStyle][
   background=\useMPgraphic{ThemeTitleStyle},
 ]
 
 \def\processword#1{%
   \setMPtext{heading:title}{#1}%
   \useMPgraphic{heading:ThemeTitleStyle}
 }
 
 \define[1]\ThemeChapterTitle{\applytosplitstringword\processword{#1}}
 \setuphead[chapter][deeptextcommand={\ThemeChapterTitle}]
 
 \starttext
   \startchapter[title=Why Is heading:ThemeTitleStyle Called Twice?]
   \input knuth
   \stopchapter
 \stoptext
 
 It appears as though heading:ThemeTitleStyle is being called twice:
 
 metapost info:
  HEADING:THEMETITLESTYLE
  Why
 metapost info:
  HEADING:THEMETITLESTYLE
  Why
 
 I am trying to produce a random number that is not equal to the
 previous random number. However, if the code is called twice, then I'd
 have to add code to ignore one of the calls.
 
 Any ideas why the code seems to be called twice and what can be done
 to ensure that it is only called once?

Don’t use text ;-) That’s a known issue: as soon as your Metapost
code contains text, it will be processed twice. E.g.:


  \starttext
\setMPtext{heading:title}{foo}
\startMPcode
  show This gets printed twice.;
  draw textext( \MPstring{heading:title} );
\stopMPcode
  \stoptext

Same for labels, {b,e}tex. See also this thread:

  http://www.ntg.nl/pipermail/ntg-context/2011/056047.html

Best regards,
Philipp



pgpClW2rfjEVB.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Bug: Reloading Font

2013-10-11 Thread Philipp Gesang
···date: 2013-10-11, Friday···from: Thangalin···

 FYI,
 
 I didn't know that the font was corrupt. I have over 400 fonts on my
 machine, and had to reload to pick up the new ones. You'll find that
 having a large number of fonts will start to become a common situation
 as more fonts become public (e.g., Google's Free Web Fonts project).
 This increases the chances that some of those fonts will be corrupt.
 
 It is a low priority, but a corrupt font should not cause a program to
 hang or crash. The software should exit gracefully, and perhaps
 strongly suggest to standard error that the user investigate that
 particular font file.

+1

 For my particular application, eventually I will allow users to upload
 custom fonts. If they upload a font that is corrupt (accidentally or
 intentionally), a run-away process would make for a rainy day.

That’s a serious problem with Luatex. The fontforge libraries
used to import font data simply hang with various corrupt fonts.
So far the only viable workaround is to manually create a
blacklist of bad fonts. E.g. this is the current list for
Luaotfload:

  https://github.com/lualatex/luaotfload/blob/master/luaotfload-blacklist.cnf

(Copperplate is going to be added soon.) Unfortunately, Context
does not yet have blacklisting functionality (it’s marked as todo
in the source) so you’re going to have to filter out bad files
from your font directories by hand.

Regards,
Philipp



pgpG9PmgyuKh_.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Code Called Twice?

2013-10-11 Thread Philipp Gesang
···date: 2013-10-11, Friday···from: Hans Hagen···

 On 10/11/2013 1:00 PM, Philipp Gesang wrote:
  ···date: 2013-10-10, Thursday···from: Thangalin···
 
 
  I noticed something unexpected with the following code:
 
  \enabletrackers[metapost.showlog]
 
  \startuseMPgraphic{heading:ThemeTitleStyle}
 show HEADING:THEMETITLESTYLE;
 show \MPstring{heading:title};
 
 draw textext( \MPstring{heading:title} ) rotated 5
   withcolor blue;
  \stopuseMPgraphic
 
  \defineframed[ThemeTitleStyle][
 background=\useMPgraphic{ThemeTitleStyle},
  ]
 
  \def\processword#1{%
 \setMPtext{heading:title}{#1}%
 \useMPgraphic{heading:ThemeTitleStyle}
  }
 
  \define[1]\ThemeChapterTitle{\applytosplitstringword\processword{#1}}
  \setuphead[chapter][deeptextcommand={\ThemeChapterTitle}]
 
  \starttext
 \startchapter[title=Why Is heading:ThemeTitleStyle Called Twice?]
 \input knuth
 \stopchapter
  \stoptext
 
  It appears as though heading:ThemeTitleStyle is being called twice:
 
  metapost info:
  HEADING:THEMETITLESTYLE
  Why
  metapost info:
  HEADING:THEMETITLESTYLE
  Why
 
  I am trying to produce a random number that is not equal to the
  previous random number. However, if the code is called twice, then I'd
  have to add code to ignore one of the calls.
 
  Any ideas why the code seems to be called twice and what can be done
  to ensure that it is only called once?
 
  Don’t use text ;-) That’s a known issue: as soon as your Metapost
  code contains text, it will be processed twice. E.g.:
 
 
 \starttext
   \setMPtext{heading:title}{foo}
   \startMPcode
 show This gets printed twice.;
 draw textext( \MPstring{heading:title} );
   \stopMPcode
 \stoptext
 
  Same for labels, {b,e}tex. See also this thread:
 
 http://www.ntg.nl/pipermail/ntg-context/2011/056047.html
 
 you can check for it:
 
 \enabletrackers[metapost.showlog]
 
 and in the mp code:
 
 message(if mfun_first_run : first run else : final run fi) ;
 message(if mfun_trial_run : trial run else : final run fi) ;
 
 Hans

That’s handy! I added a section on dealing with multi-pass to the
“gotchas” page:

http://wiki.contextgarden.net/Unexpected_behavior#Multipass

There is a subsection about MP at the end.

Btw. the behavior of mfun_trial_run is not very intuitive. I’d
expect it to work like \iftrialtypesetting, but in a single-pass
context it evaluates to true:

\enabletrackers[metapost.showlog]

\starttext
  \startMPcode
if mfun_trial_run :
  show This should be printed during the trial pass.;
else :
  show This should be printed during the final pass.;
fi;
fill unitcircle scaled 1cm withcolor blue;
%label (btex Some label text etex, (0,0));
  \stopMPcode
\stoptext

Uncommenting the label yields two passes, as expected.

Best regards,
Philipp



pgpgZd0xBOdkD.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Bug: Reloading Font

2013-10-11 Thread Philipp Gesang
···date: 2013-10-12, Saturday···from: Hans Hagen···

 On 10/12/2013 12:48 AM, Thangalin wrote:
  Hi
 
  (Copperplate is going to be added soon.) Unfortunately, Context
 
  Keep in mind it was only Copperplate 33 BC. Also note that I could not
  find any version of Copperplate 33 BC online that had the same file
  size as my corrupt version. (I was trying to find the source of the
  corrupt copy.)
 
  Most other copies, I'd imagine, are fine, so don't be too quick to 
  blacklist it.
 
 indeed, and when you don't notice that it's blacklisted, it can happen 
 that this one instance gets unnoticed
 
  does not yet have blacklisting functionality (it’s marked as todo
  in the source) so you’re going to have to filter out bad files
  from your font directories by hand.
 
  Sounds like the real solution is to fix fontforge so that it doesn't hang.
 
 sure, although a crash has the nice advantage of knowing that a font 
 (collection) is crap (which i then can blacklist permanently in my mind)

Sure, but there’s a difference between a crash and a freeze. The
latter can be quite annoying for those who work with strange
editors that run TeX somewhere in the background making it
impossible to kill the process using Ctrl-C.

Philipp



pgpYYsl3noIpe.pgp
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

  1   2   3   4   5   6   7   >