Re: [NTG-context] SILE typesetter and other projects

2021-01-03 Thread Rudolf Bahr
Am Sat, Jan 02, 2021 at 10:17:18AM + schrieb denis.ma...@ub.unibe.ch:
> Hi
> I just came across the SILE typesetter (https://sile-typesetter.org), which 
> looks quite interesting and somehow similar to ConTeXt in some ways (e.g. 
> lua), apart from the fact that it does not use TeX at all. ;-) Another 
> project seems to be Patoline. Just out of curiosity: Has anyone some 
> experience with these tools?
> Best
> Denis


Hello Denis,

thank you for this interesting link "SILE"!

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


Re: [NTG-context] A Spanish introduction to ConTeXt Mark IV

2020-10-14 Thread Rudolf Bahr
On Wed, Oct 14, 2020 at 06:27:30AM +0200, Joaquín Ataz López wrote:
> Sorry. By mistake I sent the message as a reply to another one, when in fact
> I was trying to start a new thread with it. I'm sending it again (I think
> I'll do it right now):
> 
> -
> 
> Good morning to everyone.
> 
> Although I guess it will not be of interest to most of the list members, I
> wanted to communicate that I have written an introduction to ConTeXt Mark IV
> in Spanish, which can be downloaded at
> https://webs.um.es/jal/docs/introCTX.pdf. Its title is "An Introduction (not
> too short) to ConTeXt Mark IV".
> 
> ConTeXt is a wonderful document composition system, but there is not much
> literature to help you get into it, hence my initiative. The problem is that
> I've only been using ConTeXt for a short time and still have many doubts, so
> it's possible that the introduction may contain errors. As it has been
> written in Spanish I don't think many of you will be able to read it, but I
> would appreciate, of course, any suggestions for improvement. The document
> is, on the other hand, free and anyone who wants to include it in any
> ConTeXt distribution can, of course, do so. Also, if anyone wants the source
> files, I have no problem providing them.
> 
> I have not based my introduction on LMTX because I think that for beginners
> a more stable system, like LuaTeX, is preferable.
> 
> Finally, I apologize for my bad English level. I read it reasonably well,
> but expressing myself in it is much harder for me.
> 
> -- 
> Joaquín Ataz López
> Derecho Civil
> Universidad de Murcia
>

Holà, Joaquín,

thank you for your nice and well done introduction! It is really more than a
simple introduction. "Mucho trabajo", is that good Spanish? :-)
Even when one doesn't read Spanish fluently, it is very useful!

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


Re: [NTG-context] wrong page for annotation and \pagenumber

2020-06-15 Thread Rudolf Bahr
On Mon, Jun 15, 2020 at 02:52:49PM +0200, Pablo Rodriguez wrote:
> Dear list,
> 
> I have the following number with wrong annotation placement and wrong
> page number, which would be both on the second page:
> 
>   \setupinteraction[state=start]
>   \definelayer[pgnumber]
>   \setupbackgrounds[page][background=pgnumber]
>   \starttext
>   \placelist[section][alternative=d]
>   \dorecurse{16}{\section{Section}}
>   \pagenumber/\lastpagenumber
>   \setlayer[pgnumber]
> {\comment{\pagenumber}}
>   \stoptext
> 
> Could anyone confirm the issue?
> 
> Many thanks for your help,
> 
> Pablo


Hi Pablo,

I fear I don't understand what issue you mean, therefore I append my output 
here.

I'm using:
LuaMetaTeX, Version 2.04.02
ConTeXt  ver: 2020.02.17 19:36 MKIV beta  fmt: 2020.2.23

Best wishes,
Rudolf


annotation-u-pagenumber.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Proposal to update the "Manuals" wiki page

2020-05-20 Thread Rudolf Bahr
On Tue, May 19, 2020 at 03:22:47PM +0200, Garulfo wrote:
> Hi,
> 
> I hope you're all doing well.
> 
> Please, you will find a proposal to update the Manuals page on the wiki:
> https://wiki.contextgarden.net/ManualsGallery
> 
> 2 objectives:
> 1/ to make something more visual, to help the user identify the different
> documents, their organization, their date of release.
> 2/ to gather all the updated documents in one place
> 
> Sources were :
> - http://www.pragma-ade.com/overview.htm
> - https://wiki.contextgarden.net/Manuals, and wiki snippets here and there.
> - https://github.com/hmenke/context-examples/blob/master/GUIDE.md
> 
> Depending on your comments, and if there is an interest, I would be happy to
> improve it (correct errors, change document segmentation, better colors
> choice, additional data such as authors, number of pages).
> 
> It's mainly built from cvs table + script.
> 
> Finally, if you approve this update, I can arrange to clean up some pages of
> the wiki about the manuals.
> 
> 
> Best,
> 

Hi Garulfo,

thank you very much for your excellent work! It will be of great help.

Best wishes,

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


Re: [NTG-context] Passing the parameters of a frame in an environment \startMPcode ... \stopMPcode

2020-04-20 Thread Rudolf Bahr
On Mon, Apr 20, 2020 at 09:21:41AM +0200, Wolfgang Schuster wrote:
> Fabrice Couvreur schrieb am 19.04.2020 um 22:55:
> > Hi,
> > I try to reproduce the figure as faithfully as possible. I tried for the
> > rounded corners to put the key corner = round, but it does not work.
> 
> 1. To create a new framed-instance you need \defineframe, \setupframed isn't
> enough to set the values.
> 
>I guess you assumed this works similar to xtables but this mechanism sets
> a few values to assure \setupxtable is enough in certain cases but even here
> you need \definextable in certain cases.
> 
>When you create a new instance you have to use the name of the new
> instance as command name, e.g. \frameletter or use the \placeframed command
> which takes the name as argument, e.g. \placeframed[frameletter].
> 
> 2. You can't pass the name of a framed-instance to \framed (backwards
> compatibility, performance ...), this is only possible with \startframed.
> 
> 3. ConTeXt uses different mechanism to draw rectangular (unless you draw a
> closed frame) and rounded frame and the mechanism for rounded frames doesn't
> work with outlinetext.
> 
> 4. To achieve the desired result you can now a) use MetaPost to draw the
> complete card (letter plus frame) or b) use only TeX to put the letter in a
> frame and rotate it.
> 
>  begin tex example
> \usecolors[svg]
> 
> \defineframed
>   [frameletter]
>   [width=1.25em,
>height=1.75em,
>foregroundstyle=\ssbfc,
>corner=round,
>radius=0.1\bodyfontsize,
>rulethickness=1pt]
> 
> \starttext
> 
> \startTEXpage[offset=\linewidth]
> \dontleavehmode
> \rotate [rotation=5] {\color[darkred]   {\frameletter{A}}}
> \rotate [rotation=-5]{\color[green] {\frameletter{L}}}
> \rotate [rotation=5] {\color[mediumblue]{\frameletter{E}}}
> \rotate [rotation=-5]{\color[darkviolet]{\frameletter{A}}}
> \stopTEXpage
> 
> \stoptext
>  end tex example
> 
> Wolfgang


Nice Example and good explanation, Wolfgang. But why did you use the command
"dontleavehmode"? It doesn't seem to be necessary in this example.

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


Re: [NTG-context] Introducing myself

2020-04-19 Thread Rudolf Bahr

On Sat, Apr 18, 2020 at 05:37:07PM +0200, David van Diepen wrote:
> Dear everybody,
> 
> I don't have a particular question for the moment but I thought it
> would be nice to introduce myself as I have just joined the email list.
> 
> My name is David van Diepen, 49 years old. I am a process engineer. I
> have two children.
> 
> A few months ago my son had to prepare his thesis and that's when I
> thought latex would be applicable. Very many years ago I learned to
> work with latex during my education, so I thought that it wouldn't be
> too hard to help him out with that. At the end of the day it actually
> was hard work to get to grisps again but after 10 days we had prepared
> a very good-looking thesis and that's what counts.
> 
> In the line of my work I regularly have to prepare technical documents.
> So I thought it's perhaps a good idea to start using latex for that
> too. My teamleader has given me some space to do that even though latex
> is completely unsupported at work, so I'm doing all that from home. The
> first document was recieved quite wel actually. 
> 
> As you'll probably understand my collegues have difficulty appreciating
> the value of a properly designed document. Everybody seems to agree to
> a similar and often poor appearance. I am the son of a graphic
> designer, so maybe that's why I do care what the documents I produce
> look like. For instance, I have a couple of nice books with examples of
> typefaces (letterproeven) lying about that I inherited, these are an
> inspiration too. Also I think a well designed document conveys the
> content better. So I'm glad that I am allowed start with this
> development even though the benefits are very abstract still.
> 
> That's when I thought whether it would be a good idea to continue
> investing time in latex, or whether it would be better to go with the
> new developments, that being the luatex/context combination. So I
> thought I should at least give it a try. 
> 
> That try was actually harder than I expected. On hindsight I think it
> could have been easier if I had found the right channels to
> documentation sooner. There is a lot of information on context to be
> found but that includes a lot of information that's already superseded.
> So a couple of times it took me quite some time before I realized there
> was a newer and easier method. Anyway I'm well on my way now with my
> first technical ducument in context. The thing I like most about
> context is that the structure makes good sense. In latex there have
> been so many additions troughout the years that it has become quite
> messy really. In the longer run I think the greater array of
> possibilities is going to pay off for my purposes too.
> 
> So I would like to thank you all for allowing me to use this great
> software. I expect that I may post questions in the future because I am
> planning to try more things. For now it's maybe a good idea if I put
> some contributions in the wiki. As a newby I have struggled at some
> points and maybe some howto's with that perspective can be helpful for
> other newcomers.
> 
> For now, thanks again, yours faithfully, David
> 


Hello David!

Thank you for introducing yourself!
It's indeed so, as you pointed out, a lot of information about ConTeXt
is a bit outdated. But, as every programmer knows, it's hard after finishing
a program to find the time to document it. And ConTeXt is developing quickly.

For the same reason as you I left LaTeX four or five years ago and began
to use ConTeXt. And peu à peu I changed even all my elder LaTeX-programs
to ConTeXt.

If you have trouble to find a solution to a problem ask the list. There
are very friendly and highly experienced people and you certainly will be
astonished how quick you shall get an answer in most cases. But always
send a so called MWE (Minimal Working Example) along with your question. 

Good luck with ConTeXt and give it more than just a try!

Best wishes,

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


Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-25 Thread Rudolf Bahr
Sorry, I forgot the mentioned pdf-file.

Rudolf


dowithnextbox-2.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-25 Thread Rudolf Bahr
On Tue, Mar 24, 2020 at 07:29:26PM +0100, Wolfgang Schuster wrote:
> 
> When you need the height for the layer offset you can use \dowithnextbox
> because it hides \setbox etc.
> 
> \definelayer[TextBox]
> 
> \showframe[text][text]
> 
> \starttext
> 
> \dowithnextbox
>   {\setlayer
>  [TextBox]
>  [x=\the\dimexpr(\textwidth -\nextboxwd)/3\relax,
>   y=\the\dimexpr(\textheight-\nextboxht)/3\relax]
>  {\flushnextbox}}
>   \hbox{\framed[width=300pt,align=normal]{\samplefile{ward}}}
> 
> \flushlayer[TextBox]
> 
> \stoptext


Thank you! I played with the example a bit, all works well with one exception:
When I replace "align=normal" by "align=left" the frame gets too wide at it's
left edge. I append this pdf-file. But "align=right" works well and that's what
I'm using most. Your Example is well suited to be used in page design!


> > > 
> > > \starttexdefinition NextboxDimension
> > >\starttabulate
> > >\NC Width  \EQ \the\nextboxwd \NC\NR
> > >\NC Height \NC \the\nextboxht \NC\NR
> > >\stoptabulate
> > > \stoptexdefinition
> > > 
> > > \starttext
> > > 
> > > \dowithnextboxcs
> > >\NextboxDimension
> > >\vbox
> > >  {\samplefile{ward}}
> > > 
> > > \dowithnextboxcs
> > >\NextboxDimension
> > >\vbox
> > >  {\setupalign[flushright]
> > >   \samplefile{ward}}
> > > 
> > > \dowithnextboxcs
> > >\NextboxDimension
> > >\vbox
> > >  {\hsize=200pt
> > >   \samplefile{ward}}
> > > 
> > > \dowithnextboxcs
> > >\NextboxDimension
> > >\vbox
> > >  {\hsize=200pt
> > >   \setupalign[flushright]
> > >   \samplefile{ward}}
> > > 
> > > \stoptext
> >

> The \dowithnextbox command stores the passed argument in the named box
> \nextbox and performs the content of the first argument (or the command when
> you use \dowithnextbox*cs*).
> 
> The get the width and height of the box you can use \wd\nextbox or the
> wrapper \nextboxwd. The content of the box can be flushed with \flushnextbox
> but when you need only a copy of it you have to use \copy\nextbox.
> 
> Wolfgang
> 

Thank you very much for the example and the explanation therefore! It should
be well suitable to evaluate width and height of boxes and to pass them to
luacode programs by 'tokens.getters.macro("...")' for instance.
Thank you again!

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


Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-24 Thread Rudolf Bahr
On Tue, Mar 24, 2020 at 11:36:30AM -0400, Aditya Mahajan wrote:
> 
> You can do:
> 
> 
> \definelayer[LAY]
> 
> \starttext
> 
> \setbox\scratchbox=\vbox{\framed[width=300pt, align=flushleft]{\input
> ward\relax}}
> The height of the box is \the\ht\scratchbox; the width is
> \the\wd\scratchbox.
> \unvbox\scratchbox
> 
> \setlayerframed[LAY][x=0pt, y=20pt][width=300pt, align=flushleft]{\input
> ward\relax}
> \flushlayer[LAY]
> 
> \stoptext
> 
> Aditya

Yes, that's essentially the same method I used, but I must have done a
mistake with serious consequences concerning flushleft align text. And so
I wrote to the list with my question.

Thank you for your effort, Aditya!

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


Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-24 Thread Rudolf Bahr
On Tue, Mar 24, 2020 at 04:43:17PM +0100, Wolfgang Schuster wrote:
> > \setbox0=\vbox{... somehow flushed text ...} wount work, i.e \wd0 or \ht0
> > will both result in 0. With "unflushed" text this means will work perfectly.
> 
> I have no idea where you get 0 (0pt?).

Nor do I, in the meantime. Sorry for my noise, I don't know what sort of
mistakes I did to get "0.0pt".
Corona? :-)

This is my test, which is essentially the same what Aditya suggests:
-
\starttext

\setbox0=\vbox{\hsize=300pt\input ward }
\copy0

wd0=\the\wd0, ht0=\the\ht0

\vskip12pt

\startalign[flushleft]
\setbox1=\vbox{\hsize=300pt\input ward }
\stopalign
\copy1

wd1=\the\wd1, ht1=\the\ht1

\stoptext
-
The .pdf-file is appended


Now to your proposal, Wolfgang:
> 
> \starttexdefinition NextboxDimension
>   \starttabulate
>   \NC Width  \EQ \the\nextboxwd \NC\NR
>   \NC Height \NC \the\nextboxht \NC\NR
>   \stoptabulate
> \stoptexdefinition
> 
> \starttext
> 
> \dowithnextboxcs
>   \NextboxDimension
>   \vbox
> {\samplefile{ward}}
> 
> \dowithnextboxcs
>   \NextboxDimension
>   \vbox
> {\setupalign[flushright]
>  \samplefile{ward}}
> 
> \dowithnextboxcs
>   \NextboxDimension
>   \vbox
> {\hsize=200pt
>  \samplefile{ward}}
> 
> \dowithnextboxcs
>   \NextboxDimension
>   \vbox
> {\hsize=200pt
>  \setupalign[flushright]
>  \samplefile{ward}}
> 
> \stoptext

Up to now I cannot say anything about it, because there are some
commands which are new to me. I have to study them first.
Thank you for your effort!

Rudolf


setbox---2.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to calculate the height of text of a certain width?

2020-03-24 Thread Rudolf Bahr
On Tue, Mar 24, 2020 at 03:56:18PM +0100, Wolfgang Schuster wrote:
> Rudolf Bahr schrieb am 24.03.2020 um 12:19:
> > Hello dear All,
> > 
> > the following MWE works best:
> > 
> > 
> > \definelayer[LAY]
> > \starttext
> > 
> > \setlayerframed[LAY]
> >[x=0pt,y=20pt]
> >[frame=on,
> > width=300pt,
> > align={right,}]   % tolerant}]
> >{\input ward }
> > \flushlayer[LAY]
> > \stoptext
> > 
> > 
> > Now, it could have a favourable effect on designing a page if the height of 
> > a text
> > of certain width could be calculated in advance, depending of the font.
> > Is there a way?
> > 
> > As I fear, TeX's means "\setbox" woun't work with aligned texts.
> 
> Can you give more details, I have no idea what you mean with aligned texts
> (layers?).
> 
> Wolfgang


Hi Wolfgang,

With "aligned texts" I thought of "align={right,}]" in the above example or
text which is "flushed right":

\setbox0=\vbox{... somehow flushed text ...} wount work, i.e \wd0 or \ht0
will both result in 0. With "unflushed" text this means will work perfectly.

Sorry for the inconvinience to having been not very clear.

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


[NTG-context] How to calculate the height of text of a certain width?

2020-03-24 Thread Rudolf Bahr
Hello dear All,

the following MWE works best:


\definelayer[LAY]
\starttext

\setlayerframed[LAY]
  [x=0pt,y=20pt]
  [frame=on,
   width=300pt,
   align={right,}]   % tolerant}]
  {\input ward }
 
\flushlayer[LAY]
\stoptext


Now, it could have a favourable effect on designing a page if the height of a 
text
of certain width could be calculated in advance, depending of the font.
Is there a way?

As I fear, TeX's means "\setbox" woun't work with aligned texts.

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


Re: [NTG-context] mtxrun

2020-02-14 Thread Rudolf Bahr
On Fri, Feb 14, 2020 at 08:59:57PM +0100, Luca Donetti wrote:
> > > So I run explicitly the second one:
> > >   ~/context-lmtx/bin/mtxrun --generate
> > > but I got the same error.
> >
> > This is the wrong binary. As Hans said (and also what I wrote in my
> > message) is that you have to run the one in
> > ~/context-lmtx/tex/texmf-linux-64/bin/



Hi Luca,

> 1) always writing the full path of the correct executable,

I don't know which operating system you're using. On linux instead of writing
the full path I'm using the command "alias" in my ".bashrc" file. So, Adityas
proposal on mtxrun (Date: Wed, 12 Feb 2020 00:24:21 -0500 (EST)) becomes:

alias context='~/context-lmtx/tex/texmf-linux-64/bin/mtxrun --autogenerate 
--script
  context'
with 'context-lmtx' being the directory, where I installed context.
With this you invoke your context file with "context your-file.tex"
I cancelled all context stuff in my PATH variable. Don't forget to 'source 
~/.bashrc'
afterwards. 

> 2) avoid putting [lmtx path]/bin in PATH,

Yes, this could be a solution too, in my opinion.

> 3) putting [lmtx path]/bin _after_ [lmtx path]/tex/texmf-linux-64/bin in
> the PATH
> 
> I'm asking here because option 1 is correct but not very handy, while 2)
> and 3) are different from what the installer says and they seemed to give
> other problems when I tried them.

I hope this helps you! At least in the case you're using linux.

Best wishes,

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


Re: [NTG-context] mtxrun

2020-02-12 Thread Rudolf Bahr
On Wed, Feb 12, 2020 at 12:24:21AM -0500, Aditya Mahajan wrote:
> On Wed, 12 Feb 2020, Rudolf Bahr wrote:
> 
> > On Tue, Feb 11, 2020 at 01:39:54PM -0500, Aditya Mahajan wrote:
> > 
> > > What is the output of
> > > 
> > > ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun --generate
> > > 
> > > (please paste the complete output; your previous message did not show if
> > > SELFAUTOPARENT was being set correctly).
> > 
> > 
> > Hi Aditya!
> > 
> > Thank you for your answer!
> > 
> > The output of ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun --generate is 
> > big,
> > so I append it here by the file "Aditya-I".
> > It's made by
> >   LuaMetaTeX, Version 2.03.15
> >   ConTeXt  ver: 2020.02.11 16:41 MKIV beta  fmt: 2020.2.11
> 
> That shows that texmfcnf.lua file was found and resolved. So, `context
> filename` should work now. Just to be sure, you can try:
> 
> ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun --autogenerate --script context
> filename
> 
> where filename is the name of a sample tex file.
> 
> Aditya

Hi Aditya!

Thank you for your hint and your help in general!

When you wrote before:
   "This is the wrong binary. As Hans said (and also what I wrote in my 
message) 
   is that you have to run the one in ~/context-lmtx/tex/texmf-linux-64/bin/",
I noticed having misunderstood Hans what he meant with:
   "i assume that you run the last one in this list, ..."
I thought he pointed to my error and didn't understand I should try the last one
in the list instead.

Anyway, thanks to you, Taco, Pablo and Hans for helping me to solve my problem!

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


Re: [NTG-context] mtxrun

2020-02-11 Thread Rudolf Bahr
On Tue, Feb 11, 2020 at 03:57:27PM -0500, Aditya Mahajan wrote:
> On Tue, 11 Feb 2020, Rudolf Bahr wrote:
> 
> > 
> > On Tue, Feb 11, 2020 at 07:38:54PM +0100, Hans Hagen wrote:
> > > On 2/11/2020 6:26 PM, Rudolf Bahr wrote:
> > > 
> > > > "whereis mtxrun" gives:
> > > > ~/context-lmtx/bin/mtxrun.lua
> > > > ~/context-lmtx/bin/mtxrun
> > > > ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun.lua
> > > > ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun
> > > i assume that you run the last one in this list, which is a copy of or 
> > > link
> > > to the luametatex binary in the texmf-linux-64/bin path
> > 
> > 
> > Hans, thank you for your answer!
> > 
> > So I run explicitly the second one:
> >   ~/context-lmtx/bin/mtxrun --generate
> > but I got the same error.
> 
> This is the wrong binary. As Hans said (and also what I wrote in my message)
> is that you have to run the one in ~/context-lmtx/tex/texmf-linux-64/bin/
> 
> > Sorry, "~/context-lmtx/bin/mtxrun --generate" again resulted in:
> >   resolvers   | resolving | variable 'SELFAUTOLOC' set to 'bin'
> >   resolvers   | resolving | variable 'SELFAUTODIR' set to '.'
> >   resolvers   | resolving | variable 'SELFAUTOPARENT' set to '..'
> 
> I would suggest that you run these commands from outside the ~/context-lmtx
> directory, so that the above variables show the full path rather than the
> relative path.
> 
> > "mtxrun --generate" run outside the installation directory gets the same 
> > result:
> >   resolvers   | resolving | variable 'SELFAUTOLOC' set to 
> > '/home/sam/context-lmtx/bin'
> >   resolvers   | resolving | variable 'SELFAUTODIR' set to 
> > '/home/sam/context-lmtx'
> >   resolvers   | resolving | variable 'SELFAUTOPARENT' set to '/home/sam'
> >   resolvers   | resolving | variable 'TEXMFCNF' set to ''
> >   resolvers   | resolving | variable 'TEXMF' set to ''
> >   resolvers   | resolving | variable 'TEXOS' set to 'context-lmtx'
> 
> This shows that the wrong binary is being used. You are using the binary in
> /home/sam/context-lmtx/bin when you should use
> /home/sam/context-lmtx/tex/texmf-linux-64/bin.
> 
> Aditya


Thanks to Hans and Aditya!

Using the binaries in /context-lmtx/tex/texmf-linux-64/bin/ instead of
~/context-lmtx/bin/mtxrun brings the awaited result!

Remains the question why has it been possible to use the wrong binaries? How 
could
a context user know where the "good" binaries reside?
I put the PATH sequence of the official installation process as proposed into
my PATH variable and was using "mtxrun".

I shall eliminate the error causing context parts in my PATH variable. I'd 
suggest
to correct the proposed completion of PATH variable at the end of the 
installation
process. The knowledge about that has only been possible after a series of 
mails with
Pablo, Hans and Aditya.

Thanks again!

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


Re: [NTG-context] mtxrun

2020-02-11 Thread Rudolf Bahr
On Tue, Feb 11, 2020 at 01:39:54PM -0500, Aditya Mahajan wrote:

> What is the output of
> 
> ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun --generate
> 
> (please paste the complete output; your previous message did not show if
> SELFAUTOPARENT was being set correctly).


Hi Aditya!

Thank you for your answer!

The output of ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun --generate is big,
so I append it here by the file "Aditya-I".
It's made by
   LuaMetaTeX, Version 2.03.15
   ConTeXt  ver: 2020.02.11 16:41 MKIV beta  fmt: 2020.2.11

Just for fun (but perhaps it will help anyway) I append the corresponding 
output of
~/context-luatex/tex/texmf-linux-64/bin/mtxrun --generate
as the file "Aditya-II".
This is made by
   luatex version of context 2020.01.30 14:13

Best wishes,

Rudolf
sam@nan:~$ ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun --generate
resolvers   | resolving | variable 'SELFAUTOLOC' set to 
'/home/sam/context-lmtx/tex/texmf-linux-64/bin'
resolvers   | resolving | variable 'SELFAUTODIR' set to 
'/home/sam/context-lmtx/tex/texmf-linux-64'
resolvers   | resolving | variable 'SELFAUTOPARENT' set to 
'/home/sam/context-lmtx/tex'
resolvers   | resolving | variable 'TEXMFCNF' set to ''
resolvers   | resolving | variable 'TEXMF' set to ''
resolvers   | resolving | variable 'TEXOS' set to 'texmf-linux-64'
resolvers   | resolving |
resolvers   | resolving | using configuration specification 
'home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c'
resolvers   | resolving |
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context-lmtx/tex/texmf-local/web2c' from specification 
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context-lmtx/tex/texmf-context/web2c' from specification 
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context-lmtx/tex/texmf-dist/web2c' from specification 
'selfautoparent:/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context-lmtx/tex/texmf/web2c' from specification 
'selfautoparent:/texmf/web2c'
resolvers   | resolving | found regular configuration file 
'/home/sam/context-lmtx/tex/texmf/web2c/texmfcnf.lua'
resolvers   | resolving |
resolvers   | resolving | loading configuration file 
'selfautoparent:/texmf/web2c/texmfcnf.lua'
resolvers   | resolving |
resolvers   | resolving | locating list of 'home:texmf' (runtime) 
(tree:///home:texmf)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'tree', argument 'tree:///home:texmf'
resolvers   | trees | locator 'home:texmf' not found
resolvers   | resolving | locating list of 'selfautoparent:texmf-project' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument 'selfautoparent:texmf-project'
resolvers   | files | file locator 'selfautoparent:texmf-project' found as 
'/home/sam/context-lmtx/tex/texmf-project'
resolvers   | resolving | hash 'selfautoparent:texmf-project' appended
resolvers   | resolving | locating list of 'selfautoparent:texmf-fonts' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument 'selfautoparent:texmf-fonts'
resolvers   | files | file locator 'selfautoparent:texmf-fonts' found as 
'/home/sam/context-lmtx/tex/texmf-fonts'
resolvers   | resolving | hash 'selfautoparent:texmf-fonts' appended
resolvers   | resolving | locating list of 'selfautoparent:texmf-local' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument 'selfautoparent:texmf-local'
resolvers   | files | file locator 'selfautoparent:texmf-local' found as 
'/home/sam/context-lmtx/tex/texmf-local'
resolvers   | resolving | hash 'selfautoparent:texmf-local' appended
resolvers   | resolving | locating list of 'selfautoparent:texmf-modules' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument 'selfautoparent:texmf-modules'
resolvers   | files | file locator 'selfautoparent:texmf-modules' found as 
'/home/sam/context-lmtx/tex/texmf-modules'
resolvers   | resolving | hash 'selfautoparent:texmf-modules' appended
resolvers   | resolving | locating list of 'selfautoparent:texmf-context' 
(cached)
resolvers   | methods | resolving, method 'locators', how 'uri', handler 
'file', argument 'selfautoparent:texmf-context'
resolvers   | files | file locator 'selfautoparent:texmf-context' found as 

Re: [NTG-context] mtxrun

2020-02-11 Thread Rudolf Bahr

On Tue, Feb 11, 2020 at 07:38:54PM +0100, Hans Hagen wrote:
> On 2/11/2020 6:26 PM, Rudolf Bahr wrote:
> 
> > "whereis mtxrun" gives:
> > ~/context-lmtx/bin/mtxrun.lua
> > ~/context-lmtx/bin/mtxrun
> > ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun.lua
> > ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun
> i assume that you run the last one in this list, which is a copy of or link
> to the luametatex binary in the texmf-linux-64/bin path


Hans, thank you for your answer!

So I run explicitly the second one:
   ~/context-lmtx/bin/mtxrun --generate
but I got the same error.

Now I wiped totally my directory "~/context-lmtx/" and made a new installation
by a newly loaded zip-file from "http://pragma-ade.nl/install.htm; (64 bit 
Linux),
I canceled the context concerning parts of the PATH variable in .bashrc and 
took over
the suggested PATH of installation process with a following "source .bashrc" of 
course:
   LuaMetaTeX, Version 2.03.15
   ConTeXt  ver: 2020.02.11 16:41 MKIV beta  fmt: 2020.2.11

Sorry, "~/context-lmtx/bin/mtxrun --generate" again resulted in:
   resolvers   | resolving | variable 'SELFAUTOLOC' set to 'bin'
   resolvers   | resolving | variable 'SELFAUTODIR' set to '.'
   resolvers   | resolving | variable 'SELFAUTOPARENT' set to '..'
   resolvers   | resolving | variable 'TEXMFCNF' set to ''
   resolvers   | resolving | variable 'TEXMF' set to ''
   resolvers   | resolving | variable 'TEXOS' set to '.'
   ...
   ...
   resolvers   | resolving | warning: no lua configuration files found
   resolvers   | resolving | no texmf paths are defined (using TEXMF)

"mtxrun --generate" run outside the installation directory gets the same result:
   resolvers   | resolving | variable 'SELFAUTOLOC' set to 
'/home/sam/context-lmtx/bin'
   resolvers   | resolving | variable 'SELFAUTODIR' set to 
'/home/sam/context-lmtx'
   resolvers   | resolving | variable 'SELFAUTOPARENT' set to '/home/sam'
   resolvers   | resolving | variable 'TEXMFCNF' set to ''
   resolvers   | resolving | variable 'TEXMF' set to ''
   resolvers   | resolving | variable 'TEXOS' set to 'context-lmtx'
   ...
   ...
   resolvers   | resolving | warning: no lua configuration files found
   resolvers   | resolving | no texmf paths are defined (using TEXMF)
   

I assume, as the last line indicates, the error is here: variable 'TEXMF' set 
to ''.
Am I right in that this variable has nothing to do with an environment variable?

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


Re: [NTG-context] mtxrun

2020-02-11 Thread Rudolf Bahr
On Tue, Feb 11, 2020 at 04:57:15PM +0100, Pablo Rodriguez wrote:
> On 2/11/20 4:23 PM, Rudolf Bahr wrote:
> >
> > How should it be possible to mix mkiv and lmtx, when I install "LuaMetaTeX 
> > 2.03.15"
> > and "ConTeXt 2020.02.10 MKIV beta" in my linux directory "~/context-lmtx", 
> > correct
> > the PATH variable after installation, do not forget a "source" on ".bashrc" 
> > and then
> > invoke in my directory "context-lmtx" following programs:
> >
> > mtxrun --generate
> 
> Hi Rudolf,
> 
> how did you install ConTeXt? Did you download the proper file from
> http://pragma-ade.nl/install.htm?
> 
> What is the output from "whereis mtxrun && whereis context"?
> 
> Try adding "export PATH=$PATH:~/context/tex/texmf-linux-64/bin/"
> (correct the path where required) and try again.
> 
> I’m on Linux64 and I’m not experiencing these issues. And I remove the
> contents of tex/texmf-cache/ regularly (I only invoke "mtxrun
> --generate" after that).
> 
> > BTW, if it's important, "~/context-lmtx/tex/texmf-cache/" contains only
> > "luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e".
> 
> This is what I have there. These seem to be the standard cache contents.
> 
> Just in case it helps,
> 
> Pablo


Hello Pablo!

Thank you for your answer!

"whereis mtxrun" gives:
   ~/context-lmtx/bin/mtxrun.lua
   ~/context-lmtx/bin/mtxrun
   ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun.lua
   ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun

and "whereis context":
   ~/context-lmtx/tex/texmf-linux-64/bin/context.lua
   ~/context-lmtx/tex/texmf-linux-64/bin/context

I think, you'll get similar results. These are the informations according to
my PATH variable. And in that PATH there are no links to "~/context-luatex",
my directory of the other context installation.

And as so often I wiped again "texmf-cache":
   cd ~/context-lmtx/tex/
   rm -r texmf-cache/*
So, only the empty directory "texmf-cache/" remains.

And now:
   mtxrun --generate
gives again the error statements as written earlier.

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


Re: [NTG-context] mtxrun

2020-02-11 Thread Rudolf Bahr
On Tue, Feb 11, 2020 at 01:07:23PM +0100, Hans Hagen wrote:
> On 2/11/2020 11:56 AM, Rudolf Bahr wrote:
> > On Mon, Feb 10, 2020 at 01:03:38PM +0100, Bahr Rudolf wrote:
> > > On Mon, Feb 10, 2020 at 11:54:49AM +0100, Bahr Rudolf wrote:
> > > > 
> > > > Hello ConTeXters!
> > > > 
> > > > LuaMetaTeX, Version 2.03.15
> > > > ConTeXt  ver: 2020.02.07 18:36 MKIV beta  fmt: 2020.2.10
> > > > works well doing my usual tasks.
> > > > 
> > > > Now, I put an .otf-font into ".../tex/texmf-local/", and made
> > > > mtxrun --generate
> > > > mtxrun --script fonts --reload
> > > > mtxrun --script fonts --list --all --pattern=,
> > > > but didn't get the expected information on the new font from the last
> > > > command.
> > > > 
> > > > So I investigated the output of the first two commands in more detail
> > > > and found:
> > > > 
> > > > 1. mtxrun --generate:
> > > > resolvers   | resolving | warning: no lua configuration files 
> > > > found
> > > > resolvers   | resolving | no texmf paths are defined (using 
> > > > TEXMF)
> > > > 
> > > > By the way, "TEXMF" seems to be a mtxrun variable and hasn't 
> > > > directly
> > > > to do with the environmental variable "TEXMF" which gets 
> > > > extinguished.
> > > > 
> > > > 2. mtxrun --script fonts --reload:
> > > > mtxrun  | the resolver databases are not present or outdated
> > > > mtxrun  | unknown script 'fonts.lua' or 'mtx-fonts.lua'
> > > > 
> > > > 
> > > > Please, what is to be done?
> > > > 
> > > 
> > > 
> > > In context luatex, current version: 2020.01.30 14:13, I'm getting the 
> > > awaited
> > > information!
> > 
> > 
> > 
> > With
> > LuaMetaTeX, Version 2.03.15
> > ConTeXt  ver: 2020.02.10 18:37 MKIV beta  fmt: 2020.2.11
> > I'm getting the same results:
> > 
> > 1. mtxrun --generate:
> > resolvers   | resolving | variable 'TEXMFCNF' set to ''
> > resolvers   | resolving | variable 'TEXMF' set to ''
> > 
> > resolvers   | resolving | warning: no lua configuration files found
> > resolvers   | resolving | no texmf paths are defined (using TEXMF)
> > 
> > 2. mtxrun --script fonts --reload
> > resolvers   | resolving | warning: no lua configuration files found
> > resolvers   | resolving | no texmf paths are defined (using TEXMF)
> > 
> > mtxrun  | the resolver databases are not present or outdated
> > mtxrun  | unknown script 'fonts.lua' or 'mtx-fonts.lua'
> > 
> > 
> > BTW, running "context --make" after wiping "~/context-lmtx/tex/texmf-cache"
> > and running "mtxrun --generate" gives:
> > mtxrun  | unknown script 'mtx-context.lua' or 
> > 'mtx-mtx-context.lua'

> Are you mixing mkiv and lmtx?
> ...
> ... 
> so it's either one or the other incarnation of the mtxrun file


Sorry, I don't understand what you mean.

How should it be possible to mix mkiv and lmtx, when I install "LuaMetaTeX 
2.03.15"
and "ConTeXt 2020.02.10 MKIV beta" in my linux directory "~/context-lmtx", 
correct
the PATH variable after installation, do not forget a "source" on ".bashrc" and 
then
invoke in my directory "context-lmtx" following programs:

mtxrun --generate
mtxrun --script fonts --reload

with the above presented errors?

BTW, if it's important, "~/context-lmtx/tex/texmf-cache/" contains only
"luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e".

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


Re: [NTG-context] mtxrun

2020-02-11 Thread Rudolf Bahr
On Mon, Feb 10, 2020 at 01:03:38PM +0100, Bahr Rudolf wrote:
> On Mon, Feb 10, 2020 at 11:54:49AM +0100, Bahr Rudolf wrote:
> > 
> > Hello ConTeXters!
> > 
> > LuaMetaTeX, Version 2.03.15
> > ConTeXt  ver: 2020.02.07 18:36 MKIV beta  fmt: 2020.2.10
> > works well doing my usual tasks.
> > 
> > Now, I put an .otf-font into ".../tex/texmf-local/", and made
> >mtxrun --generate
> >mtxrun --script fonts --reload
> >mtxrun --script fonts --list --all --pattern=,
> > but didn't get the expected information on the new font from the last
> > command.
> > 
> > So I investigated the output of the first two commands in more detail
> > and found:
> > 
> > 1. mtxrun --generate:
> >resolvers   | resolving | warning: no lua configuration files found
> >resolvers   | resolving | no texmf paths are defined (using TEXMF)
> > 
> >By the way, "TEXMF" seems to be a mtxrun variable and hasn't directly
> >to do with the environmental variable "TEXMF" which gets extinguished.
> > 
> > 2. mtxrun --script fonts --reload:
> >mtxrun  | the resolver databases are not present or outdated
> >mtxrun  | unknown script 'fonts.lua' or 'mtx-fonts.lua'
> > 
> > 
> > Please, what is to be done?
> > 
> 
> 
> In context luatex, current version: 2020.01.30 14:13, I'm getting the awaited
> information!



With
LuaMetaTeX, Version 2.03.15
ConTeXt  ver: 2020.02.10 18:37 MKIV beta  fmt: 2020.2.11
I'm getting the same results:

1. mtxrun --generate:
   resolvers   | resolving | variable 'TEXMFCNF' set to ''
   resolvers   | resolving | variable 'TEXMF' set to ''

   resolvers   | resolving | warning: no lua configuration files found
   resolvers   | resolving | no texmf paths are defined (using TEXMF)

2. mtxrun --script fonts --reload
   resolvers   | resolving | warning: no lua configuration files found
   resolvers   | resolving | no texmf paths are defined (using TEXMF)

   mtxrun  | the resolver databases are not present or outdated
   mtxrun  | unknown script 'fonts.lua' or 'mtx-fonts.lua'


BTW, running "context --make" after wiping "~/context-lmtx/tex/texmf-cache"
and running "mtxrun --generate" gives:
   mtxrun  | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'
   
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] mtxrun

2020-02-10 Thread Rudolf Bahr
On Mon, Feb 10, 2020 at 11:54:49AM +0100, Bahr Rudolf wrote:
> 
> Hello ConTeXters!
> 
> LuaMetaTeX, Version 2.03.15
> ConTeXt  ver: 2020.02.07 18:36 MKIV beta  fmt: 2020.2.10
> works well doing my usual tasks.
> 
> Now, I put an .otf-font into ".../tex/texmf-local/", and made
>mtxrun --generate
>mtxrun --script fonts --reload
>mtxrun --script fonts --list --all --pattern=,
> but didn't get the expected information on the new font from the last
> command.
> 
> So I investigated the output of the first two commands in more detail
> and found:
> 
> 1. mtxrun --generate:
>resolvers   | resolving | warning: no lua configuration files found
>resolvers   | resolving | no texmf paths are defined (using TEXMF)
> 
>By the way, "TEXMF" seems to be a mtxrun variable and hasn't directly
>to do with the environmental variable "TEXMF" which gets extinguished.
> 
> 2. mtxrun --script fonts --reload:
>mtxrun  | the resolver databases are not present or outdated
>mtxrun  | unknown script 'fonts.lua' or 'mtx-fonts.lua'
> 
> 
> Please, what is to be done?
> 


In context luatex, current version: 2020.01.30 14:13, I'm getting the awaited
information!

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


Re: [NTG-context] mtxrun

2020-02-10 Thread Rudolf Bahr
On Mon, Feb 10, 2020 at 12:06:43PM +0100, Taco Hoekwater wrote:
> Hi,
> 
> > On 10 Feb 2020, at 11:54, Rudolf Bahr  wrote:
> > 
> > Please, what is to be done?
> 
> This usually happens when the mtxrun script you call is not in its ’normal'
> tree location. It uses its own location to find the rest of its files.
> 
> For example, one of my context trees has mtxrun in:
> 
>   ~/elvenkind/tex_2014/tex/texmf-osx-64/bin/mtxrun
> 
> and then it works fine. But If I were to move it to e.g. 
> 
>   ~/bin/mtxrun
> 
> it would (likely) fail to find any files.
> 
> Best wishes,
> Taco
> 
> Taco Hoekwater
> Elvenkind BV
>

Hi Taco,

thank you for your quick answer!

I didn't change at all the location of mtxrun. It "resides" in
   ~/context-lmtx/bin/mtxrun.lua
   ~/context-lmtx/bin/mtxrun
   ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun.lua
   ~/context-lmtx/tex/texmf-linux-64/bin/mtxrun
These are similar locations as you are using.

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


[NTG-context] mtxrun

2020-02-10 Thread Rudolf Bahr

Hello ConTeXters!

LuaMetaTeX, Version 2.03.15
ConTeXt  ver: 2020.02.07 18:36 MKIV beta  fmt: 2020.2.10
works well doing my usual tasks.

Now, I put an .otf-font into ".../tex/texmf-local/", and made
   mtxrun --generate
   mtxrun --script fonts --reload
   mtxrun --script fonts --list --all --pattern=,
but didn't get the expected information on the new font from the last
command.

So I investigated the output of the first two commands in more detail
and found:

1. mtxrun --generate:
   resolvers   | resolving | warning: no lua configuration files found
   resolvers   | resolving | no texmf paths are defined (using TEXMF)

   By the way, "TEXMF" seems to be a mtxrun variable and hasn't directly
   to do with the environmental variable "TEXMF" which gets extinguished.

2. mtxrun --script fonts --reload:
   mtxrun  | the resolver databases are not present or outdated
   mtxrun  | unknown script 'fonts.lua' or 'mtx-fonts.lua'


Please, what is to be done?

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


Re: [NTG-context] Moving horizontally a whole ensemble of layers in the same run?

2019-12-18 Thread Rudolf Bahr
On Wed, Dec 18, 2019 at 06:13:51PM +0100, Wolfgang Schuster wrote:
> Rudolf Bahr schrieb am 18.12.2019 um 15:13:
> > On Tue, Dec 17, 2019 at 07:30:49PM +0100, Hans Hagen wrote:
> > 
> > > you need to make a MWE to show what you mean
> > > 
> > > normally
> > > 
> > > \hbox to {\hss\hss}
> > > 
> > > is good enough for centering
> > Here is my MWE. Think of a photo album. To make it interesting the pages 
> > should
> > all be different. To this purpose layers are a good means. I'd like to 
> > centre
> > the layers on their page without doing so manually and without changig the 
> > distances
> > between them. Using luacode one can calculate the distance d between the 
> > leftmost
> > and the rightmost edge. Half the difference (\textwidth - d) is the amount 
> > to move
> > the whole layer ensemble.
> > 
> > My question is now: Does in context exist a possibility to move all layers 
> > jointly
> > without correcting all their x-values subsequently?
> 
> 1. You can use hoffset and voffset to shift all layers.
> 
> 2. You can use \setlayerframed to put paragraphs in a layer.
> 
> 
> \setuppapersize[A4,landscape]
> 
> \setupexternalfigures[location=default]
> 
> \definelayer[LAY]
> 
> \starttext
> 
> \startbuffer
> 
> \setlayerframed
>   [LAY]
>   [x=0pt,
>    y=-8pt]
>   [frame=off,
>    width=.35\textwidth,
>    align={normal,tolerant}]
>   {\externalfigure[cow][width=\hsize]
>    \blank[line]
>    \input tufte\par}
> 
> \setlayerframed
>   [LAY]
>   [x=225pt,
>    y=0pt]
>   [orientation=90,
>    foregroundstyle={\definedfont[Serif at 82pt]}]
>   {JOURNEY}
> 
> \setlayerframed
>   [LAY]
>   [x=360pt,
>    y=50pt]
>   [frame=off,
>    width=200pt,
>    align={normal,tolerant}]
>   {\input ward
>    \blank[line]
>    \externalfigure[hacker][height=.4\textheight]}
> 
> \flushlayer[LAY]
> 
> \stopbuffer
> 
> \getbuffer
> 
> \page
> 
> \setuplayer[LAY][hoffset=4cm,voffset=-2cm]
> 
> \getbuffer
> 
> \stoptext
> 
> Wolfgang
> 

Thank you very much, Wolfgang! That is exactly what I need
and what I was looking for! Very nice coding indeed!

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


Re: [NTG-context] Moving horizontally a whole ensemble of layers in the same run?

2019-12-18 Thread Rudolf Bahr

On Tue, Dec 17, 2019 at 07:30:49PM +0100, Hans Hagen wrote:

> you need to make a MWE to show what you mean
> 
> normally
> 
> \hbox to {\hss\hss}
> 
> is good enough for centering

Here is my MWE. Think of a photo album. To make it interesting the pages should
all be different. To this purpose layers are a good means. I'd like to centre
the layers on their page without doing so manually and without changig the 
distances
between them. Using luacode one can calculate the distance d between the 
leftmost
and the rightmost edge. Half the difference (\textwidth - d) is the amount to 
move
the whole layer ensemble.

My question is now: Does in context exist a possibility to move all layers 
jointly
without correcting all their x-values subsequently?
I append the pdf-file of my MWE.

Rudolf

-- MWE 
-

\setuppapersize[A4,landscape]
\setupexternalfigures[location={default}]

\starttext

\definelayer[LAY]%

\setlayer[LAY][x=0pt,y=-8pt]%
   {%
   \vbox
{%
\hsize=.35\textwidth
\externalfigure[cow][width=\hsize]%

\vskip\lineheight

\input tufte
}
   }

\setlayer[LAY][x=210pt,y=0pt]%
   {%
   \definedfont[Serif at 82pt]
   \rotate[rotation=90,frame=on,offset=2pt]{\hbox{JOURNEY}}
   }

\setlayer[LAY][x=360pt,y=50pt]%
   {%
   \vbox
{%
\hsize=200pt
\input ward
\vskip\lineheight
\externalfigure[hacker][height=.4\textheight]%
}
   }

\flushlayer[LAY]
\page

\definelayer[LAY]%

\setlayer[LAY][x=0pt,y=0pt]%
   {\externalfigure[mill][height=.4\textheight]}

\setlayer[LAY][x=150pt,y=0pt]%
   {\externalfigure[hacker][height=.4\textheight]}

\setlayer[LAY][x=0pt,y=200pt]%
   {\externalfigure[cow][width=.5\textwidth]}

\setlayer[LAY][x=\dimexpr.65\textwidth+40pt\relax,y=0pt]%
   {%
   \vbox
{%
\hsize=.2\textwidth
\startalignment[flushleft]
\input ward
\vskip\lineheight
\input ward
\stopalignment
}
   }

\flushlayer[LAY]

\stoptext




mwe-komprimiert.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Moving horizontally a whole ensemble of layers in the same run?

2019-12-17 Thread Rudolf Bahr

Hi Hans,

assume we fixed between "\definelayer" and "\flushlayer" a whole ensemble
of layers on a page. And by calculating per luacode we determined the leftmost
and the rightmost edge of the ensemble and would now like to horizontally centre
the ensemble. We don't know the rightmost edge before we placed the last layer.
By luacode we can calculate how much the centring movement should be, because we
know "\textwidth", but we cannot save the calculated centring value in the 
context
program for another run. Saving the luacode values of hundred of pages in 
flattened
lua tables would be possible, but rather awkward; the problem of relating pages 
to
tables would arise, especially when pages are taken out or additional pages are
inserted.

Do you know a way to settle the centring in the same context run in which the 
layers
are placed? Could "\flushlayer" perform it somehow?

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


Re: [NTG-context] "error not related to input file"

2019-12-16 Thread Rudolf Bahr
On Sat, Dec 14, 2019 at 10:31:20PM +0100, Hans Hagen wrote:
> On 12/14/2019 5:43 PM, Rudolf Bahr wrote:
> > 
> > Hello All,
> > 
> > In:
> > LuaMetaTeX, Version 2.03.3
> > ConTeXt  ver: 2019.12.12 19:35 MKIV beta  fmt: 2019.12.12  int: 
> > english/english
> > I get the following error message:
> > 
> > tex error   > error not related to input file:
> > tex error   >   tex: ! Emergency stop
> > tex error   >   lua: ?
> > tex error   >   mps: -
> >
> > In LuaTeX ... I get a "*" instead of the error message above.
> > And again my program does all what it should, but a grey pdf-page too.
> >
> > Sorry, no MWE available.


On Sat, Dec 14, 2019 at 07:27:34PM +0100, Otared Kavian wrote:
> 
> Since I have also suffered somewhat from the cryptic (and often useless…) 
> error messages, I understand your frustration :-)
> Now, maybe if you do 
>   context --directives="system.showerror" myfile.tex
> then you get a file named « myfile-status.html » which is more helpful.


On Sat, Dec 14, 2019 at 10:31:20PM +0100, Hans Hagen wrote:
>
> normally an * means: waiting for input  and no message is then involved
> as in principle there is no real error, apart from waiting for input


Otared and Hans, thank you for your answers and Otared especially for your
sympathy! :-)

In the meantime I could get rid of "! Emergency stop" and "*" by changing
a \def-command which calls a luacode subprogram; see further down in my MWE.

My program run now looks essentially better, but 
"--directives="system.showerror" 
and "-status.html" still report an error: "! Undefined control 
sequence"
without telling which control sequence is undefined. How reliable is this error
message? I don't know of control sequences in luacode or what does this error 
message
mean?

Here is a MWE which shows my program structure. Sorry, this MWE works really :-)
During my attempts to find the error I got for a short time the message: 
"Invalid
\starttext ... \stoptext structure" which I don't understand.

--- MWE 
---
\def\projectpath{/home/sam/trip-2019/}

\startluacode
   userdata = userdata or {}
   u = userdata

   function u.table_save ( tab, file )
  local tab   = tab
  local file  = file

  dofile ("table_save_u_table_load.lua")
  table.save(tab, file)
   end


   function u.Init ( col )

  local col  = col 
  local ppth = tokens.getters.macro("projectpath")
  local xO   = tokens.getters.macro("xO")
  local yO   = tokens.getters.macro("yO")

  local I = {}  -- Table of initial values
  I ["projectpath"] = ppth
  I ["column"]  = {}
  I ["column"][col] = {}
  I ["column"][col]["layerpos"] = {}
  I ["column"][col]["layerpos"] ["xO"] = xO
  I ["column"][col]["layerpos"] ["yO"] = yO

  u.table_save(I,"I-Table.lua") 
   end
   
\stopluacode

%\def\Init #1 {\ctxlua {u.Init ([==[#1]==]) }}% --the blanks produced my "! 
Emergency stop"
\def\Init#1{\ctxlua{u.Init([==[#1]==])}}%   --in this form the command 
works 

\starttext
   \def\Column{A}%
   \def\xO{0}%  in pt
   \def\yO{20}% in pt

   \Init{\Column}%%
\stoptext
---
For those possibly interested in running this MWE I append 
"table_save_u_table_load.lua",
a lua program to save and reload lua tables, found in the lua homepage. Anyway, 
the
resulting flattened table "I" is here:

return {
-- Table: {1}
{
   ["column"]={2},
   ["projectpath"]="/home/sam/trip-2019/",
},
-- Table: {2}
{
   ["A"]={3},
},
-- Table: {3}
{
   ["layerpos"]={4},
},
-- Table: {4}
{
   ["yO"]="20",
   ["xO"]="0",
},
}



I think nobody will be able to help me in this case, I myself have to try again 
and 
again to finally find the error. If so, this would be the nicest christmas gift 
to me :-)

Best regards,

Rudolf


--[[
Save Table to File
Load Table from File
v 1.0

Lua 5.2 compatible

Only Saves Tables, Numbers and Strings
Insides Table References are saved
Does not save Userdata, Metatables, Functions and indices of these

table.save( table , filename )

on failure: returns an error msg


table.load( filename or stringtable )

  

Re: [NTG-context] "error not related to input file"

2019-12-14 Thread Rudolf Bahr

On Sat, Dec 14, 2019 at 05:43:45PM +0100, Bahr Rudolf wrote:
> 
> Hello All,
> 
> In:
> LuaMetaTeX, Version 2.03.3
> ConTeXt  ver: 2019.12.12 19:35 MKIV beta  fmt: 2019.12.12  int: 
> english/english
> I get the following error message:
> 
> tex error   > error not related to input file:
> tex error   >   tex: ! Emergency stop
> tex error   >   lua: ?
> tex error   >   mps: -
> 
> Sorry, no MWE available.
> What does this message mean? [1] shows only an empty page.
> To this point my programm does all what it should with the exception of 
> creating
> a grey pdf-file-page. My pdf-programs are okular and xpdf.
> 
> In:
> LuaTeX, Version 1.11.2 (TeX Live 2020/dev)
> ConTeXt  ver: 2019.12.12 19:23 MKIV beta  fmt: 2019.12.13  int: 
> english/english
> I get a "*" instead of the error message above. And again my program does all 
> what
> it should, but a grey pdf-page too.
> 
> Shure, there must be an error in my program. But where should I look for it?
> I tried several MWEs, but they all worked at their best.
> 
> Please, any ideas?
> 
> Best wishes,
> Rudolf
> 
> 
> [1] https://wiki.contextgarden.net/error_not_related_to_input_file
> 


Sorry, I forgot:
My program uses up to now mainly \startluacode ... \stopluacode.

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


[NTG-context] "error not related to input file"

2019-12-14 Thread Rudolf Bahr

Hello All,

In:
LuaMetaTeX, Version 2.03.3
ConTeXt  ver: 2019.12.12 19:35 MKIV beta  fmt: 2019.12.12  int: english/english
I get the following error message:

tex error   > error not related to input file:
tex error   >   tex: ! Emergency stop
tex error   >   lua: ?
tex error   >   mps: -

Sorry, no MWE available.
What does this message mean? [1] shows only an empty page.
To this point my programm does all what it should with the exception of creating
a grey pdf-file-page. My pdf-programs are okular and xpdf.

In:
LuaTeX, Version 1.11.2 (TeX Live 2020/dev)
ConTeXt  ver: 2019.12.12 19:23 MKIV beta  fmt: 2019.12.13  int: english/english
I get a "*" instead of the error message above. And again my program does all 
what
it should, but a grey pdf-page too.

Shure, there must be an error in my program. But where should I look for it?
I tried several MWEs, but they all worked at their best.

Please, any ideas?

Best wishes,
Rudolf


[1] https://wiki.contextgarden.net/error_not_related_to_input_file

___
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] Exchangeing content of variables between luacode and context

2019-11-20 Thread Rudolf Bahr
On Wed, Nov 20, 2019 at 09:24:44AM +0100, Hans Hagen wrote:
> you can store info in the tuc file (there are examplex on the wiki and in
> the test suite) or you cam create a table, save it at the end of the run and
> load it at the start
> 
> (assuming that you cannot just recalculate the values each run, but i assume
> that you have a reason for not doing that)



Hraban and Hans, I thank you for your answers!

Recalculating the results of invoked Luacode functions might be the best
and simplest choice, because finding a good hash key for a lua table which
must be created by the ConTeXt/Luacode program page itself could become rather
difficult (one could get into devil's kitchen, as we say). On the other side
one single lua table only for the current run, similar to .tuc files, is helpful
and necessary to have a look onto the results of the used luacode functions.
Sometimes they are the only help in error finding.

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


Re: [NTG-context] Exchangeing content of variables between luacode and context

2019-11-19 Thread Rudolf Bahr
On Tue, Nov 19, 2019 at 04:55:15PM +0100, Wolfgang Schuster wrote:
> 
> Can you make a minimal example of your actual problem.


No, sorry, I can't.

My 'actual problem' is more or less a design problem: Should in a book project
ConTeXt be the master and Luacode the slave or vice versa? Both seems possible.

The task to solve is to set a photo album with say 300 DIN A4 landscape pages.
On every page there should be 1 to 4 columns filled with photos and texts mostly
defined in layers.

Up to now I made all in ConTeXt manually by trying, for instance::
- To estimate the width of layers, if neighboured layers should contain photos 
of
  same height with respect to center horizontally all columns at end of page.
- To complete abbreviations of long picture names; it's rather annoying doing
  this by copy and paste with hundreds of photo names; instead I'd like to type
  a short code and Luacode should complete it to the full name.
- To estimate the shift amount of all columns together in order to horizontally
  get them centered on the page.

All of these tasks can be made best by Luacode functions. And I'd like to save
their results in the ConTeXt program permanently. With 'tokens.setters.macro()'
it's possible only in the same, Luacode calling ConTeXt run. In the following
run, the macro shows its original value again and the Luacode program must be
called again to alter it.

So I've to think about making Luacode the master and ConTeXt the slave. Then 
it'd
be possible to embody Luacode's results permanently in the ConTeXt code. Vice 
versa
a solution could be to store Luacode's results in a flattened Lua table on disc.
But the perfect relating to their ConTeXt page remains difficult when inserting
or deleting of pages in an ensemble of 300 pages should become necessary. 
Another
much simpler solution would be the proposal above, namely, to copy the ConTeXt
program step by step and page by page to another file and introducing the 
Luacode
results simultaneously. 

In [1] there is a chapter with "stepper" commands, but I didn't understand that,
so I can't say, whether they are suitable for this issue.

Rudolf

[1] Hans Hagen, "ConTeXt Lua Documents", January 12, 2018, 3.4, page 30
___
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] Exchangeing content of variables between luacode and context

2019-11-19 Thread Rudolf Bahr
Hello All!

To send variable contents from context to luacode I can put them into the
function invocation or use 'tokens.getters.macro("TestA")',
an interesting and very nice possibility to let luacode itself getting
contents of context macros. The (only?) way back, from luacode to context,
could be done by 'tokens.setters.macro("TestA","a")' [1] .

Now, to store Luacode's variable contents permanently in context programs
I could Luacode let copy my ConTeXt program to another place on disk with
a newly defined macro inside. But, does somebody know (by chance) of another,
more elegant possibility? I think giving back a value by "return" won't work.

Best wishes,
Rudolf


[1] Hans Hagen, "ConTeXt Lua Documents", January 12, 2018, 7.4, page 63
___
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] Luacode: Data File to Table

2019-10-24 Thread Rudolf Bahr
On Thu, Oct 24, 2019 at 05:11:50PM +0200, Taco Hoekwater wrote:
> Here is the problem:
>   
> > context ( 'function Rosi():   b.smrk = ', b.smrk )
> 
> 
> That should be:
> 
>context ( 'function Rosi():   b.smrk = ' .. b.smrk )
> 
> since the context() function does not support variable argument lists (not 
> not like print())
> 
> Best wishes,
> Taco


Yes, that's ok now! It works. Thank you, Taco!

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


[NTG-context] Luacode: Data File to Table

2019-10-24 Thread Rudolf Bahr

Hi All!

LuaMetaTeX, Version 2.00.0
ConTeXt  ver: 2019.10.10 18:15 MKIV beta  fmt: 2019.10.19  int: english/english

I'd like to transfer the entries in a data file to a Lua table according to [1].

Here a MWE of my data file, appended as file Rosi.lua:
--
Rosi{
  smrk = "00-003",
  picture_file = "/home/sam/pictures/",
  picture_name = "00-003---1981---Provence.png",
  width_px = "394",
  height_px= "481",
}

Rosi{
  smrk = "00-006",
  picture_file = "/home/sam/pictures/",
  picture_name = "00-006---1986---Eire.png",
  width_px = "392",
  height_px= "479",
}

And here is my MWE in Luacode:
--
\startluacode

   userdata = userdata or {}
   u = userdata

   function u.Hugo ( )

  local S = {}
  
  function Rosi (b)
 S [ b.smrk ] = {
   [ "smrk" ] = b.smrk,
   [ "picture_file" ] = b.picture_file,
   [ "picture_name" ] = b.picture_name,
   [ "width_px" ] = b.width_px,
   [ "height_px" ]= b.height_px,
}

 context ( 'function Rosi():   b.smrk = ', b.smrk )
 context.par()
 
  end
  
  require ("Rosi")

   end

\stopluacode


\starttext

   \currenttime

   \def\Heidi%
  {\ctxlua{u.Hugo()}}
  
   \Heidi
   
\stoptext

The entries in Rosi.lua aren't recognized in Luacode! The output pdf is appended
as well.


Now the essential part of the MWE above in pure Lua. Here it works! Strange.
---

   userdata = userdata or {}
   u = userdata

   function u.Hugo ( )
  
  S = {}
  function Rosi (b)

 S [ b.smrk ] = {
   [ "smrk" ] = b.smrk,
   [ "picture_file" ] = b.picture_file,
   [ "picture_name" ] = b.picture_name,
   [ "width_px" ] = b.width_px,
   [ "height_px" ]= b.height_px,
}

 print ( "b.smrk = " .. b.smrk )

  end
  
  require ("Rosi")

  print ( S["00-003"]["width_px"], S["00-003"]["height_px"] )
  print ( S["00-006"]["width_px"], S["00-006"]["height_px"] )

   end

   u.Hugo ()



Please, what could be done?

Best wishes,
Rudolf


[1] Roberto Ierusalimschy: Programming in Lua, Fourth edition, chapter 15.1 
Data FilesRosi{
  smrk = "00-003",
  picture_file = "/home/sam/pictures/",
  picture_name = "00-003---1981---Provence.png",
  width_px = "394",
  height_px= "481",
}

Rosi{
  smrk = "00-006",
  picture_file = "/home/sam/pictures/",
  picture_name = "00-006---1986---Eire.png",
  width_px = "392",
  height_px= "479",
}



Hugo-test.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] LMTX distorts PDF aspect

2019-10-19 Thread Rudolf Bahr
On Sat, Oct 19, 2019 at 07:40:32PM +0200, Bahr Rudolf wrote:
> On Sat, Oct 19, 2019 at 12:07:03PM +0200, Pablo Rodriguez wrote:
> > Dear list,
> > 
> > using the document attached to this message with the following sample
> > gives different outputs:
> > 
> > \setuppapersize[A3, landscape]
> > \starttext
> > \externalfigure[fc-first.pdf]
> > \stoptext
> > 
> > 1. LuaTeX inserts the document fine.
> > 
> > 2. LMTX inserts the document distorting its aspect.
> > 
> > I’m afraid this might be a bug in LMTX.
> > 
> > Could anyone confirm the issue?
> > 
> > BTW, the PDF document is uncompressed (so it’s easier to analyze it).
> > 
> > Many thanks for your help,
> > 
> > Pablo
> > --
> > http://www.ousia.tk
> 
> 
> Hi Pablo,
> 
> My context-LMTX, this morning installed from pragma-ade.nl/install.htm (64 
> bit Linux),
> works fine and shows up the pdf file, so I cannot confirm the issue.
> 
> I used:
> LuaMetaTeX, Version 2.00.0
> ConTeXt  ver: 2019.10.10 18:15 MKIV beta  fmt: 2019.10.19  int: 
> english/english
> 
> I hope, this helps,
> Rudolf

Hi Pablo,

sorry, I have to correct my message after running

LuaTeX, Version 1.10.1 (TeX Live 2019) 
ConTeXt  ver: 2019.10.11 15:47 MKIV beta  fmt: 2019.10.19  int: english/english

The output of LMTX is compressed in the height whereas LuaTex isn't.

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


Re: [NTG-context] LMTX distorts PDF aspect

2019-10-19 Thread Rudolf Bahr
On Sat, Oct 19, 2019 at 12:07:03PM +0200, Pablo Rodriguez wrote:
> Dear list,
> 
> using the document attached to this message with the following sample
> gives different outputs:
> 
> \setuppapersize[A3, landscape]
> \starttext
> \externalfigure[fc-first.pdf]
> \stoptext
> 
> 1. LuaTeX inserts the document fine.
> 
> 2. LMTX inserts the document distorting its aspect.
> 
> I’m afraid this might be a bug in LMTX.
> 
> Could anyone confirm the issue?
> 
> BTW, the PDF document is uncompressed (so it’s easier to analyze it).
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk


Hi Pablo,

My context-LMTX, this morning installed from pragma-ade.nl/install.htm (64 bit 
Linux),
works fine and shows up the pdf file, so I cannot confirm the issue.

I used:
LuaMetaTeX, Version 2.00.0
ConTeXt  ver: 2019.10.10 18:15 MKIV beta  fmt: 2019.10.19  int: english/english

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


[NTG-context] ConTeXt HTML

2019-10-19 Thread Rudolf Bahr

Hi,

thank you! Installing ConTeXt HTML from "pragma-ade.nl/install.htm"
(64 bit Linux) works now!

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


Re: [NTG-context] mtxrun --generate: "warning: no lua configuration files found"

2019-10-17 Thread Rudolf Bahr
On Thu, Oct 17, 2019 at 06:23:23PM +0200, Hans Hagen wrote:
> On 10/17/2019 5:40 PM, Rudolf Bahr wrote:
> > 
> > On Thu, Oct 17, 2019 at 05:21:27PM +0200, Hans Hagen wrote:
> > > On 10/17/2019 5:02 PM, Rudolf Bahr wrote:
> > > > 
> > > > Hi All,
> > > > 
> > > > after a new First-setup from "https://www.contextgarden.net/First-setup;
> > > > I added new fonts to "~/context/tex/texmf-local/fonts", then run: 
> > > > "mtxrun --generate"
> > > > and got
> i just installed the windows version from scratch and that works ok (done
> twice to be sure)
> 
> Hans


I'm running linux-64 and lua5.3. Sorry, I forgot to tell you.

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


Re: [NTG-context] mtxrun --generate: "warning: no lua configuration files found"

2019-10-17 Thread Rudolf Bahr

On Thu, Oct 17, 2019 at 05:21:27PM +0200, Hans Hagen wrote:
> On 10/17/2019 5:02 PM, Rudolf Bahr wrote:
> > 
> > Hi All,
> > 
> > after a new First-setup from "https://www.contextgarden.net/First-setup;
> > I added new fonts to "~/context/tex/texmf-local/fonts", then run: "mtxrun 
> > --generate"
> > and got
> > 
> > "resolvers   | resolving | warning: no lua configuration files found"
> > 
> > 
> > Please, what is to be done in this case?
> > 
> > status_of_update.lua: ["date"]="2019-10-17 13:16:50",
> does
> 
>   mtxrun --generate
> 
> something useful?
> 
> Hans


I append the output of mtxrun --generate here.
I hope it's doing something useful.

The next step: mtxrun --script fonts --reload
writes one line:

"mtxrun  | unknown script 'fonts.lua' or 'mtx-fonts.lua'"

Rudolf
sam@nanu:~/context$ mtxrun --generate
resolvers   | resolving | variable 'SELFAUTOLOC' set to 
'/home/sam/context/bin'
resolvers   | resolving | variable 'SELFAUTODIR' set to '/home/sam/context'
resolvers   | resolving | variable 'SELFAUTOPARENT' set to '/home/sam'
resolvers   | resolving | variable 'TEXMFCNF' set to ''
resolvers   | resolving | variable 'TEXMF' set to 
'/home/sam/context/tex/texmf'
resolvers   | resolving | variable 'TEXOS' set to 'context'
resolvers   | resolving |
resolvers   | resolving | using configuration specification 
'home:texmf/web2c;{selfautoloc:,selfautoloc:/share/texmf-local/web2c,selfautoloc:/share/texmf-dist/web2c,selfautoloc:/share/texmf/web2c,selfautoloc:/texmf-local/web2c,selfautoloc:/texmf-dist/web2c,selfautoloc:/texmf/web2c,selfautodir:,selfautodir:/share/texmf-local/web2c,selfautodir:/share/texmf-dist/web2c,selfautodir:/share/texmf/web2c,selfautodir:/texmf-local/web2c,selfautodir:/texmf-dist/web2c,selfautodir:/texmf/web2c,$SELFAUTOGRANDPARENT/texmf-local/web2c,selfautoparent:,selfautoparent:/share/texmf-local/web2c,selfautoparent:/share/texmf-dist/web2c,selfautoparent:/share/texmf/web2c,selfautoparent:/texmf-local/web2c,selfautoparent:/texmf-dist/web2c,selfautoparent:/texmf/web2c}'
resolvers   | resolving |
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on weird path 
'/home/sam/context/bin' from specification 'selfautoloc:'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context/bin/share/texmf-local/web2c' from specification 
'selfautoloc:/share/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context/bin/share/texmf-dist/web2c' from specification 
'selfautoloc:/share/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context/bin/share/texmf/web2c' from specification 
'selfautoloc:/share/texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context/bin/texmf-local/web2c' from specification 
'selfautoloc:/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context/bin/texmf-dist/web2c' from specification 
'selfautoloc:/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context/bin/texmf/web2c' from specification 
'selfautoloc:/texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on weird path 
'/home/sam/context' from specification 'selfautodir:'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context/share/texmf-local/web2c' from specification 
'selfautodir:/share/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context/share/texmf-dist/web2c' from specification 
'selfautodir:/share/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context/share/texmf/web2c' from specification 
'selfautodir:/share/texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context/texmf-local/web2c' from specification 
'selfautodir:/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context/texmf-dist/web2c' from specification 
'selfautodir:/texmf-dist/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'/home/sam/context/texmf/web2c' from specification 'selfautodir:/texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given path 
'$SELFAUTOGRANDPARENT/texmf-local/web2c' from specification 
'$SELFAUTOGRANDPARENT/texmf-local/web2c'
resolvers   | resolving | look

[NTG-context] mtxrun --generate: "warning: no lua configuration files found"

2019-10-17 Thread Rudolf Bahr

Hi All,

after a new First-setup from "https://www.contextgarden.net/First-setup;
I added new fonts to "~/context/tex/texmf-local/fonts", then run: "mtxrun 
--generate"
and got

"resolvers   | resolving | warning: no lua configuration files found"


Please, what is to be done in this case?

status_of_update.lua: ["date"]="2019-10-17 13:16:50",

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


Re: [NTG-context] \ctxlua and \startluacode ... \stopluacode

2019-10-16 Thread Rudolf Bahr
On Tue, Oct 15, 2019 at 10:15:34AM +0200, Hans Hagen wrote:
> On 10/15/2019 10:04 AM, Taco Hoekwater wrote:
> > Hi Rudolf,
> > 
> > > On 15 Oct 2019, at 00:50, Rudolf Bahr  wrote:
> > > 
> > > Now to your suggestion not to use "assert ()". Indeed it's a solution! My 
> > > program
> > > works! I append again its output (again just for fun!). Did you really 
> > > try it or
> > > has it been just an idea?
> > 
> > First, let me say that embedded lua versions are typically a little bit 
> > different
> > from standalone. Just how much different depends on the embedding program. 
> > Luatex
> > is actually pretty close to standalone lua. Luatex adds a bunch of 
> > extension libraries,
> > but it changes very little of the core language. And all those changes are 
> > documented
> > in the luatex manual. None of those changes affect your minimal example, 
> > except
> > that lua errors are handled a little differently.
> > 
> > Note that standalone lua *also* produces an error, as that is what assert() 
> > is
> > supposed to do. And when lua runs into an error, it ignores the rest of the 
> > current
> > chunk:
> > 
> >“... whenever an error occurs, Lua ends the current chunk and returns
> >to the application.” (from lua.org)
> > 
> > Standalone lua typically sees only one chunk (the file you pass on the 
> > command
> > line) but embedded lua implementation often see (sometimes many) more 
> > chunks.
> > In luatex’s case, each \directlua is a separate chunk (in ConTeXt, that 
> > means every
> > \startluacode block and every \ctxlua call is a separate chunk).
> > 
> > The only unusual thing here is that standalone lua silently quits and 
> > returns a
> > non-zero exit code to the shell, whereas luatex gives you the typical 
> > TeX-style
> > error prompt. The rationale for that is: lua errors can happen in many 
> > places in
> > your input file, and if they were silently ignored, your typeset pages 
> > could be
> > wrong without you realising it.
> > 
> > 
> > And to answer your question above: I did not have to try or guess. I know 
> > about
> > how assert() works because it is documented in the lua manual (and as it 
> > closely
> > mimics the assert() C function, that is easy for me to remember).
> as you say, it's all normal lua behaviour:
> 
> if you do:
> 
>   print(io.open("crap.crap"))
> 
> one gets
> 
>   nil crap.crap: No such file or directory2
> 
> and i think that assert then returns the second returned argument
> 
> but if one does
> 
>   context(io.open("crap.crap") and "yes" or "no")
> 
> then the first argument is checked against
> 
> Hans


Hi Hans, hi Taco!

For your answers and patient explanations I want to thank you, not to forget
[1], [2], [3] for instance! Now it gets clearer to me what the distinctive
features could be which one can encounter when using a combination of even so
wunderful programming languages as ConTeXt and Lua are!

Best wishes,

Rudolf

[1] https://wiki.contextgarden.net/Programming_in_LuaTeX
[2] http://www.luatex.org/svn/trunk/manual/luatex.pdf
[3] http://www.pragma-ade.com/general/manuals/cld-mkiv.pdf

___
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] \ctxlua and \startluacode ... \stopluacode

2019-10-14 Thread Rudolf Bahr
On Mon, Oct 14, 2019 at 09:26:58PM +0200, Taco Hoekwater wrote:
> Hi,
> 
> > On 14 Oct 2019, at 21:08, Rudolf Bahr  wrote:
> > 
> > 
> > 2. But in the case of an not existing file (BBB.lua) the known error 
> > message comes up
> >   again:
> >   "token call, execute: [ctxlua]:8: /home/sam/context-tests/BBB.lua: No 
> > such file or 
> >directory".
> >This, of course, is true, but shouldn't be mentioned in an error message!
> 
> If you do not want the error message, don’t use assert(). You can just do 
> 
> f = io.open(...)
> If f then ... else ... end
> 
> Best wishes,
> Taco


Hi Taco!

Thank you again for your message!

My wish isn't to avoid error messages, if they are justified! In the case of my 
MWE
I want to have a decision in my \startluacode ... \stopluacode environment, 
whether
a certain file exists or not. With this decision I want to branch in my program 
and
with an error message I cannot do it.

Lua is a wonderfull programming language and I'm appreciative to get a way to 
exit
ConTeXt, run Lua code and enter the ConTeXt program at the same location again! 
On
the other side, in the last days I spent some time to eliminate errors in my
\startluacode ...\stopluacode program to change code which causes no error 
messages
in pure Lua.

Now to your suggestion not to use "assert ()". Indeed it's a solution! My 
program
works! I append again its output (again just for fun!). Did you really try it or
has it been just an idea? The MWE is now as follows:

===
\startluacode

userdata = userdata or {}

function userdata.file_exists (name)

   local name = name
   local f= io.open ( name, "r" )

   if f then
  f:close ()
  context ( name )
  context ( "  exists!" )
   else
  context ( name )
  context ( "  doesn't exist!" )
   end
end

\stopluacode


\starttext

\def\lookupfile#1%
{\ctxlua{userdata.file_exists([==[#1]==])}}

\lookupfile{/home/sam/context-tests/AAA.lua}% "AAA.lua" intentionally does 
exist

\par

\lookupfile{/home/sam/context-tests/BBB.lua}% "BBB.lua" intentionally 
doesn't exist

\stoptext
===

R. Ierusalimschy encourages the use of "assert()". But it is apparantly better 
not to
use it under certain circumstances as in \startluacode ... \stopluacode as I've 
learnt
now.
Can I avoid therefore Hans' prefix resolvers code?

Best wishes,
Rudolf


is-file.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \ctxlua and \startluacode ... \stopluacode

2019-10-14 Thread Rudolf Bahr
On Mon, Oct 14, 2019 at 07:19:53PM +0200, Hans Hagen wrote:
> On 10/14/2019 6:50 PM, Rudolf Bahr wrote:
 
> > THis MWE must be faulty, but where is the error?
> > 
> > 
> > 
> > \startluacode
> > 
> > userdata = userdata or {}
> > 
> > function userdata.file_exists (name)
> > 
> > local name = name
> > local f= assert ( io.open ( name, "r" ))
> > 
> > if f then
> >f:close ()
> >context ( name )
> >context ( "  exists!" )
> > else
> >context ( name )
> >context ( "  doesn't exist!" )
> > end
> > end
> > 
> > \stopluacode
> > 
> > 
> > \starttext
> > 
> > \def\lookupfile#1%
> > {\ctxlua{userdata.file_exists([==[#1]==])}}
> > 
> > \lookupfile{"$HOME/context-tests/AAA.lua"}  % "AAA.lua" intentionally does  
> >   exist
> > \lookupfile{"$HOME/context-tests/BBB.lua"}  % "BBB.lua" intentionally 
> > doesn't exist
> > 
> > \stoptext
> > 
> > 
> > 
> > It makes no difference in commenting out the first or the second 
> > "\lookupfile" command.
> > The error message eventually is always nearly the same:
> > 
> > token call, execute: [ctxlua]:8: "$HOME/context-tests/AAA.lua": No such 
> > file or directory
> > token call, execute: [ctxlua]:8: "$HOME/context-tests/BBB.lua": No such 
> > file or directory


Joseph, Taco and Hans, I thank you very much for your quick answers!
I shall try Hans' interesting suggestion on prefix resolvers after I've studied 
it,
for which I certainly need some time!

But before doing so I've a comment:
Your answers, Joseph, Taco and Hans, could  lead to the impression, that giving 
up
"double quotes as part of file names" and/or "$HOME" in the MWE would be the 
solution.
And indeed, not using "double quotes" and "expanding $HOME" by hand partly 
brings success:

1. In the case of an existing file (AAA.lua) the MWE works without error 
message!
   I will append the output-pdf-file here (just for fun!).

2. But in the case of an not existing file (BBB.lua) the known error message 
comes up
   again:
   "token call, execute: [ctxlua]:8: /home/sam/context-tests/BBB.lua: No such 
file or 
directory".
This, of course, is true, but shouldn't be mentioned in an error message!

Within \startluacode ... \stopluacode it seems one has to abandon the normal 
lua world,
at least partly. Are there other "special features"?

Rudolf


is-file.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] \ctxlua and \startluacode ... \stopluacode

2019-10-14 Thread Rudolf Bahr

Dear List!

THis MWE must be faulty, but where is the error?



\startluacode

userdata = userdata or {}

function userdata.file_exists (name)

   local name = name
   local f= assert ( io.open ( name, "r" ))

   if f then
  f:close ()
  context ( name )
  context ( "  exists!" )
   else
  context ( name )
  context ( "  doesn't exist!" )
   end
   
end

\stopluacode


\starttext

\def\lookupfile#1%
{\ctxlua{userdata.file_exists([==[#1]==])}}

\lookupfile{"$HOME/context-tests/AAA.lua"}  % "AAA.lua" intentionally does  
  exist
\lookupfile{"$HOME/context-tests/BBB.lua"}  % "BBB.lua" intentionally 
doesn't exist

\stoptext



It makes no difference in commenting out the first or the second "\lookupfile" 
command.
The error message eventually is always nearly the same:

token call, execute: [ctxlua]:8: "$HOME/context-tests/AAA.lua": No such file or 
directory
token call, execute: [ctxlua]:8: "$HOME/context-tests/BBB.lua": No such file or 
directory

I'm using:
LuaMetaTeX, Version 2.00.0 
ConTeXt  ver: 2019.10.10 18:15 MKIV beta  fmt: 2019.10.12  int: english/english

Please, any ideas?

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


Re: [NTG-context] PDF viewer poll

2019-10-13 Thread Rudolf Bahr
On Sun, Oct 13, 2019 at 12:43:14PM +0200, Henning Hraban Ramm wrote:

> Hi, I’d like to update my list of (usable!) PDF viewers.
> Which one do you use? (Current version?)
> What are its pros and cons?
> Is it free (open source, freeware)?
> Does it work on Win/Lin/Mac?
> Does it have a localized interface? (I don’t care, but I work with people who 
> don’t understand a lot of English.)
> Can it handle comments, attachments?
> Can it handle forms with or without JavaScript?
> Does it support SyncTeX? (Who uses that anyway?)
> Does it update changed PDFs on its own (or does it even block overwriting)?
> Which other features are essential for your choice?
> 
> E.g. I’m working with:
> - Preview.app (Mac)
>   Default on MacOS, fast & easy. No JS, bad forms support, updates 
> "sometimes". Usable as a previewer, not as a PDF toolbox.
> - Adobe Reader DC (Mac)
>   I use it only to check forms or as reference. Unusable GUI.
> - Acrobat Pro 9 (Mac)
>   Was my workhorse, but works on MacOS Mojave only partly; slow & 
> crash-prone; no updates. Can check PDF/X<4 and convert colors.
> - PDF Studio Pro (on Mac & Linux)
>   Bought to replace AcroPro9; JS support broken; slow startup; no updates. 
> Can check PDF/X, A, UA and convert colors.
>   Ok with forms, but doesn’t support LiveCycle forms (deprecated, but used by 
> German boards).
> - Qpdfview (Linux)
>   Fast and easy; reliably updates.
> - PDF.js (Browser or Atom)
>   Is said to do SyncTeX (never tried). Easy, but slow. Updates.
> 
> 
> Curious: Hraban


Hello Hraban,

I'm working with only 2 pdf-viewers, "okular" and "xpdf". My main-viewer is 
"okular", but
at the moment it doesn't work with my context-pdfs, I don't know why, but I 
don't care.
Then it's good to have "xpdf" which is simpler than "okular" but works 
especially in
this case. And before sending pdf-data to a printing-house I use "qpdf" not to 
view,
but to transform my pdf files as rotate them to get them binded at a book side 
not
offered by printers.

All 3 programs are open source on Linux and because I'm updating regularly my 
OS, those
programs are regularly updated too.
JS? Form support? PDF/X/A/UA? Convert colors? SyncTex? Handle comments? I'm not 
using
any of these. To some of them I can't say anything, because I dont't even know, 
what they
are good for. So, I'm sorry not to be able to say more to those possible 
properties
of my used programs:

"okular": 
version: 1.6.3
Manual in German

"xpdf":
version: 3.04
Manual in English

"qpdf":
version: 8.4.0
Manual in English

Best wishes,

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


Re: [NTG-context] passing variables/data between context and lua

2019-10-08 Thread Rudolf Bahr

On Tue, Oct 08, 2019 at 08:55:30AM -0400, Aditya Mahajan wrote:
 
> So, everytime \setvariables is call, the value of the `set` key is executed.


Hello Aditya,

this is the key sentence to understand better what "reset" and "set" are good 
for!
I had to read your explanation thrice :-) and run your examples which are 
really good!
Now I have an idea how to use "\setvariables" in a context project.

Thank you very much!

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


Re: [NTG-context] passing variables/data between context and lua

2019-10-08 Thread Rudolf Bahr
On Sun, Oct 06, 2019 at 10:44:12PM +0200, Wolfgang Schuster wrote:
 
> While it is true that you're free to choose the name for the keys there are
> two keys with a special meaning, these two keys are "reset" and "set". The
> value of the "reset" key is used before the values in \setvariables are
> stored while "set" is used after the values are stored.

Hello Wolfgang,

thank you very much for your detailed answer and your two examples!

Concerning the two keys with a special meaning, "reset" and "set", remains a 
question
to me. For what are they good? Does "reset" clear a data area, namespace 
perhaps,
before new data are stored there? If they are keys, what is there value or are 
they
commands?

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


Re: [NTG-context] passing variables/data between context and lua

2019-10-05 Thread Rudolf Bahr
> A solution which uses only existing commands in the document.
> 
> \startsetups [martin]
> \startlua
> local points = tonumber(\getvariable{martin}{question}) or 0 ;
>   points = points * 92 ;
> local answer = 42 ;
> context.setvariable("martin","points",points) ;
> context.setvariable("martin","answer",answer) ;
> \stoplua
> \stopsetups
> 
> \setvariable{martin}{set}{\directsetup{martin}}
> 
> \starttext
> 
> \setvariables [martin] [question=44]
> 
> Points: \getvariable{martin}{points}
> 
> The answer is \getvariable{martin}{answer}.
> 
> \stoptext



Hello Wolfgang,

what exactly does the command
"\setvariable{martin}{set}{\directsetup{martin}}"?

I don't understand it. Has it something to do with "Command/datasetvariable"?
Especially what does "\directsetup"?

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


Re: [NTG-context] [OT] rasperry 4

2019-06-25 Thread Rudolf Bahr
On Tue, Jun 25, 2019 at 03:33:00PM +0200, luigi scarso wrote:
> On Tue, Jun 25, 2019 at 3:31 PM Rudolf Bahr  wrote:
> 
> > On Tue, Jun 25, 2019 at 10:15:29AM +1200, Henri Menke wrote:
> > > On 25/06/19 12:30 AM, luigi scarso wrote:
> > > > just seen
> > > > https://www.raspberrypi.org/products/raspberry-pi-4-model-b/
> > > >
> > > > I would like to know your impressions
> > >
> > > Does it still need proprietary binary blobs in the kernel?  Probably
> > > yes, so it is as useless as all the models before because it can only
> > > run their custom Raspbian distro.
> >
> >
> >
> > To this I asked my linux group in Freiburg and got following answer
> > in German from Tomas (tuxteam.de):
> >
> > --
> > Die Antwort darauf ist komplizierter, als es einem lieb sein kann :-)
> >
> > "Blob" hat da nämlich unterschiedliche Bedeutungen (vermutlich lässt
> > sich die Liste verlängern):
> >
> >  (1) zum einen, nicht-freie Treiber, die direkt im Adressraum des Linux
> >kernels ausgeführt werden (strenggenommen verletzen sie die GPL,
> >aber die Linux-community ist da... "tolerant" [1]
> >
> >  (2) dann ist die eng verwandte "Cousine", die im Kernel zwar einen
> >freien "Treiber" hat, der aber nur eine Hülle ist, die die eigentliche
> >Arbeit an ein Programm in user space delegiert, das proprietär ist
> >
> >  (3) schliesslich ist es so, dass der Broadcom BCM28xx (oder BCM27xx) [2]
> >nicht "nur eine ARM CPU" ist, sondern ganz viele verschiedene
> >Subsysteme umfasst (im Jargon ist das ein SoC, ein "System on a Chip").
> >Jedes dieser Subsysteme hat vielleicht einen, vielleicht mehrere
> >Prozessoren, am prominentesten beim Raspi ist wohl der
> > Grafik-Coprozessor
> >(VideoCore IV), der auch zum Booten des ganzen Systems zuständig ist.
> >Auch die wollen Code, der auch als Blobs in Erscheinung treten kann,
> >die der Linux-Kernel einfach nur durchreicht.
> >
> > Also: ohne (3) gibt es beim Raspi nicht mal Booten ;-)
> >
> > Meines Wissens ist Raspi in (1) und (2) weitgehend "sauber" (Korrekturen
> > erwünscht!), (3) ist allerdings weitaus schwieriger (es gibt m.W. aber
> > auch Leute, die an dessen reverse engineering dran sind).
> >
> > Broadcom selbst scheint, nach anfänglichem Zögern, diesen Anstrengungen
> > freundlich gegenüberzustehen.
> >
> > Dies alles mit etwas Fehlermarge, da ich schon lange nicht mehr
> > reingeschaut habe. Ergänzungen also willkommen (dann lerne ich auch
> > was bei ;-)
> >
> > lg
> >
> > [1] Ein Thema für sich, an dem, wie mensch sich das auch denken
> >kann, so einige Kontroversen entstehen.
> >
> > [2] https://en.wikipedia.org/wiki/Raspberry_Pi
> > -
> >
> > If anybody is interested I would try to translate it.
> >
> >
> 
> 
> sure
> 
> -- 
> luigi


Here, Luigi, my translation:

-
The answer is more complicated as one could want :-)

"Blob" has quite different meanings (the list could be 
prolongated probably):

   (1) first, non-free drivers which are executed in the 
 address-room of linux kernel (strictly spoken they 
 offend against GPL, but the Linux-community with
 respect to this is ... "tolerant") [1]

   (2) then, there is a nearly related "cousin" who admittedly
 has a free "driver" but this one is only a cover which
 delegates the real work to a propriatary program in user 
 space

   (3) eventually it is so that Broadcom BCM28xx (or BCM27xx) [2]
 isn't "only an ARM CPU" but contains a bunch of many
 different subsystems (in jargon a SoC, a "system on a Chip").
 Everyone of these subsystems has possibly one, possibly 
 several processors. Presumably the most prominent with the
 Raspi is the grafic-coprocessor (Videocore IV) which is
 responsible for booting the whole system too. Also these
 have code which might become evident as blobs which the
 linux kernel simply hands through.

Consequently: without (3) Raspi wount boot ;-)

As far as I know (Tomas, tuxteam.de) with concern to (1) and (2)
Raspi to a large extend is "clean" (corrections are welcome!),
though (3) is much more difficult (there a

[NTG-context] [OT] rasperry 4

2019-06-25 Thread Rudolf Bahr
On Tue, Jun 25, 2019 at 10:15:29AM +1200, Henri Menke wrote:
> On 25/06/19 12:30 AM, luigi scarso wrote:
> > just seen
> > https://www.raspberrypi.org/products/raspberry-pi-4-model-b/
> > 
> > I would like to know your impressions
> 
> Does it still need proprietary binary blobs in the kernel?  Probably
> yes, so it is as useless as all the models before because it can only
> run their custom Raspbian distro.



To this I asked my linux group in Freiburg and got following answer
in German from Tomas (tuxteam.de):

--
Die Antwort darauf ist komplizierter, als es einem lieb sein kann :-)

"Blob" hat da nämlich unterschiedliche Bedeutungen (vermutlich lässt
sich die Liste verlängern):

 (1) zum einen, nicht-freie Treiber, die direkt im Adressraum des Linux
   kernels ausgeführt werden (strenggenommen verletzen sie die GPL,
   aber die Linux-community ist da... "tolerant" [1]

 (2) dann ist die eng verwandte "Cousine", die im Kernel zwar einen
   freien "Treiber" hat, der aber nur eine Hülle ist, die die eigentliche
   Arbeit an ein Programm in user space delegiert, das proprietär ist

 (3) schliesslich ist es so, dass der Broadcom BCM28xx (oder BCM27xx) [2]
   nicht "nur eine ARM CPU" ist, sondern ganz viele verschiedene
   Subsysteme umfasst (im Jargon ist das ein SoC, ein "System on a Chip").
   Jedes dieser Subsysteme hat vielleicht einen, vielleicht mehrere
   Prozessoren, am prominentesten beim Raspi ist wohl der Grafik-Coprozessor
   (VideoCore IV), der auch zum Booten des ganzen Systems zuständig ist.
   Auch die wollen Code, der auch als Blobs in Erscheinung treten kann,
   die der Linux-Kernel einfach nur durchreicht.

Also: ohne (3) gibt es beim Raspi nicht mal Booten ;-)

Meines Wissens ist Raspi in (1) und (2) weitgehend "sauber" (Korrekturen
erwünscht!), (3) ist allerdings weitaus schwieriger (es gibt m.W. aber
auch Leute, die an dessen reverse engineering dran sind).

Broadcom selbst scheint, nach anfänglichem Zögern, diesen Anstrengungen
freundlich gegenüberzustehen.

Dies alles mit etwas Fehlermarge, da ich schon lange nicht mehr
reingeschaut habe. Ergänzungen also willkommen (dann lerne ich auch
was bei ;-)

lg

[1] Ein Thema für sich, an dem, wie mensch sich das auch denken
   kann, so einige Kontroversen entstehen.

[2] https://en.wikipedia.org/wiki/Raspberry_Pi
-

If anybody is interested I would try to translate it.

Best wishes,

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


Re: [NTG-context] Strange behavior concerning pdf-output of .png-externalfigures

2019-05-23 Thread Rudolf Bahr
On Tue, May 21, 2019 at 10:07:01AM +0200, Hans Hagen wrote:
> On 5/17/2019 10:23 AM, Rudolf Bahr wrote:
> > 
> > On Thu, May 16, 2019 at 02:40:07PM +0200, Hans Hagen wrote:
> > > On 5/16/2019 12:21 PM, Rudolf Bahr wrote:
> > > > The problem with artefacts in .png images is still unsolved for me.
> > > > I can circumvent it by using .jpg or .tiff images instead of .png images
> > > > as long as no transparent areas in the images are needed. As far as I 
> > > > know
> > > > .jpg and .tiff formats cannot handle transparancy, do they?
> > > > 
> > > > Now in .log files messages like
> > > > "luatex warning  > pdfe: invalid 11 0 R object at offset 223611"
> > > > can be seen. Please, what do they mean?
> > 
> > > Does that come from an pdf generated by image magick>? If so, the problem 
> > > is
> > > there ... the last years I've seen lots of converted files with bogus pdf
> > > objects. (Kind of harmless but still.)
> > > 
> > > Hans
> > 
> > 
> > No. I never use neither ImageMagick nor GraphicsMagick to generate images in
> > .pdf-format. Even with my scanner software I produce always .jpg-images 
> > though it
> > is capable to produce .pdf-output too. The only .pdf-files I'm doing are 
> > made by
> > ConTeXt-LMTX!
> > 
> > I shall append another, interesting MWE. There is a .png-image which is, as 
> > it
> > occasionally happens, represented as it should, by ConTeXt. And then the 
> > same .png-image
> > to which I added a red frame by GIMP2.10. This one shows artefacts in 
> > ConTeXt!
> > 
> > I'm adding the .log-file too. There again is a luatex-warning, as I could 
> > observe them
> > often in ConTeXt-LMTX:
> the second image has a mask which is split off (an all 0xFF mask btw) .. it
> shows ok in acrobat so maybe gimp is at fault here?
> 
> Hans



In the mean time I had some more tries with another OS and even with MKIV. 
Unfortunatly
I changed to OS "LinuxMint" at the same time LMTX came out. Now after going to
"Fedora 30" there are no problems left in this respect up to now. So I agree 
with you,
GIMP could have been the cause. Not GIMP in general, but possibly only 
"LinuxMint"-GIMP's
png-part.

I'm sorry because of the trouble, my fault!
Thanks to All who answered to this problem and contributed to a solution!

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


Re: [NTG-context] https://wiki.contextgarden.net/Fraktur_fonts

2019-05-22 Thread Rudolf Bahr
On Wed, May 22, 2019 at 07:40:12PM +0200, Willi Egger wrote:
> Hi Rudolf,
> 
> I looked at your work on the wiki. It looks very nice, well-structured.
> 
> I wanted to try to upload the pictures. However if I understand the help 
> correctly, then one needs privileges to upload files?
> 
> Kind regards
> 
> Willi


Hello Willi,

thank you for your message!

I remember having read somewhere that after wiki-login one should have those 
privileges
to upload pictures to the wiki server.
But I don't know whether I'm right. In any case I hadn't any success and gave up
(for a couple of weeks, at least :)

Best wishes,

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


[NTG-context] Strange behavior concerning pdf-output of .png-externalfigures

2019-05-21 Thread Rudolf Bahr

On Thu, May 16, 2019 at 02:40:07PM +0200, Hans Hagen wrote:
> On 5/16/2019 12:21 PM, Rudolf Bahr wrote:
> > The problem with artefacts in .png images is still unsolved for me.
> > I can circumvent it by using .jpg or .tiff images instead of .png images
> > as long as no transparent areas in the images are needed. As far as I know
> > .jpg and .tiff formats cannot handle transparancy, do they?
> > 
> > Now in .log files messages like
> > "luatex warning  > pdfe: invalid 11 0 R object at offset 223611"
> > can be seen. Please, what do they mean?

> Does that come from an pdf generated by image magick>? If so, the problem is
> there ... the last years I've seen lots of converted files with bogus pdf
> objects. (Kind of harmless but still.)
> 
> Hans


No. I never use neither ImageMagick nor GraphicsMagick to generate images in
.pdf-format. Even with my scanner software I produce always .jpg-images though 
it
is capable to produce .pdf-output too. The only .pdf-files I'm doing are made by
ConTeXt-LMTX!

I shall append another, interesting MWE. There is a .png-image which is, as it
occasionally happens, represented as it should, by ConTeXt. And then the same 
.png-image
to which I added a red frame by GIMP2.10. This one shows artefacts in ConTeXt!

I'm adding the .log-file too. There again is a luatex-warning, as I could 
observe them
often in ConTeXt-LMTX:

-
luatex warning  > pdfe: invalid 11 0 R object at offset 41603
-
Please, what does mean it? I fear there is something wrong with the 
.png-handling
of ConTeXt/luatex.

The outputs of
feh imagered-frame.png
gm display imagered-frame.png
are looking ok. And GIMP2.10 has produced all image-files.

Rudolf


PS.:
echo $PATH
/home/sam/Android/platform-tools:/bin:/usr/bin:/home/sam/context-lmtx/tex/texmf-linux-64/bin:/home/sam/context-lmtx/bin:/home/sam/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

The .tiff-image is always too big for this forums upper limit
\starttext

\midaligned{
  \externalfigure[image-no-red-frame.png][width=15mm,height=25mm] \hskip12pt

  \externalfigure[imagered-frame.png][width=15mm,height=25mm] \hskip12pt

  \externalfigure[imagered-frame.jpg][width=15mm,height=25mm] \hskip12pt

  \externalfigure[imagered-frame.tiff][width=15mm,height=25mm]
}

\stoptext
open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2019.05.12 19:40 MKIV beta  fmt: 2019.5.14  
int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name 
'/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > files > jobname 'Artefakte', input './Artefakte', result 
'Artefakte'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name './Artefakte.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
luatex warning  > pdfe: invalid 11 0 R object at offset 41603
backend > xmp > using file 
'/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 2, order 3, name './Artefakte.tex'
close source> level 1, order 3, name 'cont-yes.mkiv'

system  > start used files

system  > text: Artefakte

system  > stop used files


system  > start used files

system  >1: filename=char-prv.lua filetype=tex format=tex 
foundname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/char-prv.lua
 
fullname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/char-prv.lua
 usedmethod=database
system  >2: filename=cont-yes.mkiv filetype=tex format=tex 
foundname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv
 
fullname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv
 usedmethod=database
system  >3: filename=publ-imp-default.lua filetype=scripts 
foundname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua
 
fullname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua
 usedmethod=database
system  >4: filename=cont-new.mkiv filetype=tex 
foundname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv

Re: [NTG-context] Strange behavior concerning pdf-output of externalfigures

2019-05-16 Thread Rudolf Bahr
The problem with artefacts in .png images is still unsolved for me.
I can circumvent it by using .jpg or .tiff images instead of .png images
as long as no transparent areas in the images are needed. As far as I know
.jpg and .tiff formats cannot handle transparancy, do they?

Now in .log files messages like
"luatex warning  > pdfe: invalid 11 0 R object at offset 223611"
can be seen. Please, what do they mean?

Rudolf

PS.:
LinuxMint 64bit

This is LuaMetaTeX, Version 2.00.0 
open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2019.05.12 19:40 MKIV beta  fmt: 2019.5.14  
int: english/english

___
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] https://wiki.contextgarden.net/Special:Upload

2019-05-08 Thread Rudolf Bahr
When trying to upload an image I get following error message:

"Could not open lock file for 
"mwstore://local-backend/local-public/c/c2/wiki-yfrak-mtxrun-pattern.png". Make 
sure your upload directory is configured correctly and your web server has 
permission to write to that directory."

I have been logged in my wiki page "Fraktur fonts". Please, can I do anything 
else than
filling in the asked question boxes of 
"https://wiki.contextgarden.net/Special:Upload;?

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


Re: [NTG-context] How to write a wiki page?

2019-05-01 Thread Rudolf Bahr
On Wed, May 01, 2019 at 04:51:11PM +0200, Henning Hraban Ramm wrote:
> Am 2019-04-30 um 13:12 schrieb Rudolf Bahr :
> 
> > When will next issue of ConTeXt journal be published? Could you send your 
> > article
> > to me in advance?
> 
> Should have been published for a while, but I didn’t work on it as I promised.
> Shame on me, but still no schedule, on one hand I fortunately got a load of 
> paid work, on the other it’s more fun working at my own books...
> 
> Willi’s presentation is here: 
> https://meeting.contextgarden.net/2018/talks/willi-unifraktur/presentation-unifraktur.pdf
> 
> Greetlings, Hraban
> ---
> https://www.fiee.net
> http://wiki.contextgarden.net
> https://www.dreiviertelhaus.de
> GPG Key ID 1C9B22FD


I know that feeling well, when all gets too much!
Thanks to you, Hraban, and Willi!

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


Re: [NTG-context] Strange behavior concerning pdf-output of externalfigures

2019-04-30 Thread Rudolf Bahr
On Mon, Apr 29, 2019 at 04:32:07PM -0600, Alan Braslau wrote:
> On Mon, 29 Apr 2019 13:18:04 +0200
> Hans Hagen  wrote:
> 
> > anyway, as the png test suite passes ok the question is what makes your 
> > image different ... here it looks ok when included on windows64 bit and 
> > linux 64 bit
> 
> Your very own .png image and MWE works fine here on OSX, freeBSD, and linux.
> 
> Alan
> 


Thank you, Alan! I converted this image and its comrades which showed artefacts 
to
.tiff-images and so they all work at their very best.

My conTeXt-version is:
This is LuaMetaTeX, Version 2.00.0
ConTeXt  ver: 2019.04.29 09:02 MKIV beta  fmt: 2019.4.29

But the .log-file contains following strange lines:

[...]
luatex warning  > pdfe: ?
luatex warning  > pdfe: ?
luatex warning  > pdfe: ?
luatex warning  > pdfe: ?
luatex warning  > pdfe: ?
luatex warning  > pdfe: ?
pages   > flushing realpage 2, userpage 2, subpage 2
luatex warning  > pdfe: ?
luatex warning  > pdfe: ?
luatex warning  > pdfe: ?
pages   > flushing realpage 3, userpage 3, subpage 3
[...]

There are 6 such .tiff-images on page 2 (without any other images) and 3 on 
page 3.
On page 3 there are 5 other .png-images without any problems. I don't know what 
"pdfe"
means. The 9 .tiff-images are few years older than the .png-images on page 3. 
This
means they have been generated in a slightly other way than the newer .png-files
on page 3, for instance by an older context-mkiv and GIMP 2.8 on debian 8 
(Jessie) or
later debian 9 (Stretch), wheras now I'm using context-lmtx on LinuxMint and 
GIMP2.10.

But, as I pointed out, this .tiff-workaround is ok for me, because the artefact 
effect
seems to be limited to those images on page 2 and 3 in my new book. Strange is, 
that
the artefacts (with the same images which haven't been changed in any way) 
didn't crop
up with older context-mkiv.

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


Re: [NTG-context] How to write a wiki page?

2019-04-30 Thread Rudolf Bahr
On Mon, Apr 29, 2019 at 05:07:06PM +0200, Willi Egger wrote:
> Hello Rudolf,
> 
> the ConTeXt wiki kan be extended by everybody. What you should do is make 
> your account and then you can start. 
> 
> I would be glad to be involved in this page, because I have written an 
> article, which will be published in the next issue of the ConTexT journal. It 
> is dealing with the Maguntia font.
> 
> Kind regards
> 
> Willi


Hi Willi!

Welcome on board! I'd be very glad, if we could do that together!

Up to now I had only 2 topics: Maguntia and Leipziger font. The account is made:
wiki.contextgarden.net/Fraktur_fonts.

When will next issue of ConTeXt journal be published? Could you send your 
article
to me in advance?

Best wishes,

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


Re: [NTG-context] How to write a wiki page?

2019-04-29 Thread Rudolf Bahr
On Mon, Apr 29, 2019 at 05:55:14PM +0200, Henning Hraban Ramm wrote:
> Hi Rudolf,
> 
> it’s a wiki, i.e. you write directly into the system.
> You’re welcome to announce the new page here, then someone can look over it.
> 
> First you need to register an account:
> https://wiki.contextgarden.net/index.php?title=Special:CreateAccount
> 
> Then you can create a new page, e.g. 
> https://wiki.contextgarden.net/index.php?title=Fraktur_fonts=edit
> 
> Some hints about wiki syntax etc. you can find here:
> https://wiki.contextgarden.net/ConTeXt_wiki:Editing
> 
> Greetlings, Hraban
> ---
> https://www.fiee.net
> http://wiki.contextgarden.net
> https://www.dreiviertelhaus.de
> GPG Key ID 1C9B22FD
> 



Hello Hraban!

Not only a very good introduction, but you even began to install the first step 
to my
future wiki page. Thank you!

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


Re: [NTG-context] Strange behavior concerning pdf-output of externalfigures

2019-04-29 Thread Rudolf Bahr
On Mon, Apr 29, 2019 at 01:18:04PM +0200, Hans Hagen wrote:
> On 4/29/2019 10:52 AM, Rudolf Bahr wrote:
> 
> > Sorry, but even after updating to
> > ConTeXt  ver: 2019.04.29 09:02 MKIV beta  fmt: 2019.4.29
> > I'm experiencing the same artefacts as before.
> > 
> > Please, what means "different inclusion code"?
> all in lua
> 
> anyway, as the png test suite passes ok the question is what makes your
> image different ... here it looks ok when included on windows64 bit and
> linux 64 bit
> 
> >gm identify input.png
> input.png PNG 334x168+0+0 DirectClass 8-bit 29.6Ki 0.000u 0m:0.00s
> gm identify: iCCP: CRC error (input.png).
> 
> maybe a bad image?


Perhaps. Or generated by older software. Though my GraphicsMagick (1.3.28):
"gm identify input.png" doesn't tell me anything about a "CRC error":
input.png PNG 334x168+0+0 DirectClass 8-bit 29.6Ki 0.000u 0m:0.03s

Anyway, at the beginning of a new book there are 10 of such images with 
artefacts.
I can handle the problem by converting them to .tiff-pictures. As long as I 
shall
have enough storage in my host :-), for me all will be ok.

Thank you!

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


Re: [NTG-context] Strange behavior concerning pdf-output of externalfigures

2019-04-29 Thread Rudolf Bahr
On Mon, Apr 29, 2019 at 10:52:59AM +0200, Bahr Rudolf wrote:
> On Sun, Apr 28, 2019 at 11:12:43PM +0200, Hans Hagen wrote:
> > On 4/28/2019 8:10 PM, Rudolf Bahr wrote:
> > > 
> > > Dear list,
> > > 
> > > I'm getting unexplainable artefacts in the pdf-output.
> > > 
> > > My MWE is:
> > > 
> > > --
> > > \starttext
> > > 
> > > \externalfigure
> > >  [input.png]
> > >  [width=100mm]
> > > 
> > > \stoptext
> > > --
> > > 
> > > I append the output "MWE.pdf" and the input-figure "input.png" for 
> > > comparison.
> > > 
> > > I'm experiencing the artefacts with some figures which are all several 
> > > years old.
> > > Until now it never happened in conTeXt programs. Because I installed a 
> > > new OS
> > > (LinuxMint) on my workstation at the same time I tried 3 pdfviewers 
> > > (okular,
> > > evince, xpdf) all with the same result.
> > 
> > different inclusion code
> > 
> > > I'm using LuaMetaTeX, Version 2.00.0,
> > > ConTeXt  ver: 2019.04.13 17:25 MKIV beta  fmt: 2019.4.15
> > > 
> > > Please, do you have any idea what could be the reason?
> > no problems here .. can you update?
> > 
> > Hans
> 
> 
> Sorry, but even after updating to
> ConTeXt  ver: 2019.04.29 09:02 MKIV beta  fmt: 2019.4.29
> I'm experiencing the same artefacts as before.
> 
> Please, what means "different inclusion code"?
> 


Interesting news!
After having changed the png-Format of the external figure to ".tiff"-Format by
gimp2.10 the artefacts have gone!

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


Re: [NTG-context] Strange behavior concerning pdf-output of externalfigures

2019-04-29 Thread Rudolf Bahr
On Sun, Apr 28, 2019 at 11:12:43PM +0200, Hans Hagen wrote:
> On 4/28/2019 8:10 PM, Rudolf Bahr wrote:
> > 
> > Dear list,
> > 
> > I'm getting unexplainable artefacts in the pdf-output.
> > 
> > My MWE is:
> > 
> > --
> > \starttext
> > 
> > \externalfigure
> >  [input.png]
> >  [width=100mm]
> > 
> > \stoptext
> > --
> > 
> > I append the output "MWE.pdf" and the input-figure "input.png" for 
> > comparison.
> > 
> > I'm experiencing the artefacts with some figures which are all several 
> > years old.
> > Until now it never happened in conTeXt programs. Because I installed a new 
> > OS
> > (LinuxMint) on my workstation at the same time I tried 3 pdfviewers (okular,
> > evince, xpdf) all with the same result.
> 
> different inclusion code
> 
> > I'm using LuaMetaTeX, Version 2.00.0,
> > ConTeXt  ver: 2019.04.13 17:25 MKIV beta  fmt: 2019.4.15
> > 
> > Please, do you have any idea what could be the reason?
> no problems here .. can you update?
> 
> Hans


Sorry, but even after updating to
ConTeXt  ver: 2019.04.29 09:02 MKIV beta  fmt: 2019.4.29
I'm experiencing the same artefacts as before.

Please, what means "different inclusion code"?

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


[NTG-context] Strange behavior concerning pdf-output of externalfigures

2019-04-28 Thread Rudolf Bahr

Dear list,

I'm getting unexplainable artefacts in the pdf-output.

My MWE is:

--
\starttext

\externalfigure
[input.png]
[width=100mm]

\stoptext
--

I append the output "MWE.pdf" and the input-figure "input.png" for comparison.

I'm experiencing the artefacts with some figures which are all several years 
old.
Until now it never happened in conTeXt programs. Because I installed a new OS
(LinuxMint) on my workstation at the same time I tried 3 pdfviewers (okular,
evince, xpdf) all with the same result.

I'm using LuaMetaTeX, Version 2.00.0,
ConTeXt  ver: 2019.04.13 17:25 MKIV beta  fmt: 2019.4.15

Please, do you have any idea what could be the reason?

Best wishes,

Rudolf


MWE.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] How to write a wiki page?

2019-04-24 Thread Rudolf Bahr

Hello All!

I'd like to write a wiki page on special Fraktur fonts, but I don't know how to 
begin
technically. Are there rules? Certanly, but where? To whom would I send the 
result to
correct it with respect to format, ConTeXt commands, English language, bringing 
it into
the ConTeXt wiki and so on?

Greetings,

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


Re: [NTG-context] Fraktur font to use in ConTeXt lmtx

2019-04-23 Thread Rudolf Bahr
On Mon, Apr 22, 2019 at 11:48:43PM +0200, Henning Hraban Ramm wrote:
> Am 2019-04-22 um 15:26 schrieb Rudolf Bahr :
> 
> > I'd enjoy making a wiki page. Do we have a program to print caracter code 
> > tables
> > or font tables? If not, I'd use a bundle of single \char commands to show 
> > which
> > characters there are in a special Fraktur font.
> 
> Are you a DANTE member? Then have a look at my German translation of Taco’s 
> article about installing fonts for ConTeXt in the latest DTK.
> (The original is still unpublished – my fault, sorry guys...)
> 
> Try \showfont
> or
> 
> \usemodule[fnt-10]
> \starttext
> \ShowCompleteFont{name:Unifraktur}{20pt}{1}
> \stoptext
> 
> There aren’t a lot of good fraktur text fonts around, and most of those are 
> commercial. (I don’t know and didn’t check if Linotype published their old 
> Dfr fonts as OpenType at all.)
> 
> Unifraktur Maguntia is probably the best (technically) you can get.
> 
> Maybe try something from http://www.steffmann.de/wordpress/test-2/, but they 
> don’t have any OpenType features.



Hello Henning!

Yes, I'm a DANTE member and of course I read Taco's Article translated by you. 
It helped
me installing Fraktur-test-fonts.

Thank you for your other hints!

There must be somewhere in contxtgarden.net or wiki.contextgarden.net an 
article/page
on making "wiki pages". Do you know where it is? I can't find it again.

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


Re: [NTG-context] Error concerning "pdfmapline"; Fraktur font to use in ConTeXt lmtx

2019-04-22 Thread Rudolf Bahr

> > In the meantime I had a look at different Fraktur fonts. Both suggested 
> > fonts [1]
> > and [2] were not acceptable to me for various reasons.
> > 
> > [1] has no gaps between words and many other errors. Horrible.
> 
> Afaiks that font is rather bugged indeed. I tried it, even made sure the
> space (which is unspecified in the afm) is set to some value but then it
> seems to use maybe some ligatures which are also unspecified. Old crap.
> 
> > [2] is far too fat to be printed in a book. The reason could be that the 
> > developers
> > wanted to make a font suitable for internet presences where the resolution 
> > of screens
> > is far below of that of printing machines. The good thing with [2] is that 
> > there is an
> > extended and interesting set of orthography rules and their changes over 
> > various
> > centuries beginning in 1600 up to today. But unfortunately the internet 
> > presence of [2]
> > seems to be dead, the newest entry in member's forum I saw has been from 
> > beginning of
> > 2017.
> 
> You can tweak it a bit:
> 
> \starttext
> 
> \definefontfeature[thinned-10][effect={width=-0.10,auto=yes}]
> 
> \definefont[ufa][unifrakturmaguntia*default]
> \definefont[ufb][unifrakturmaguntia*default,thinned-10]
> 
> \ufa test\par
> \ufb test\par
> 
> \stoptext
> 
> I'm a bit puzzled by the 'dead' remark. When a project is finished, should
> the author create bogus entries each year to make it look like something new
> is done?
> 
> > [3] I found the Leipzig-Fraktur-Font, a real Easter gift :-) It's 
> > comparable to Yannis
> > Haralambous' nice fraktur font I used for years, but in ".otf"-format. It 
> > has the slim
> > high "s" for use at the beginning of words and within words as well as the 
> > small round
> > "s" at the end of syllabs and words. Ok, there seems to be no "!" (Instead 
> > I use "rm !")
> > and the sharp "ß" I had to construct by "s\hskip-1pt z". But German umlauts 
> > can be printed,
> > for instance 'ä' by '\"a', and different ligatures, for instance 'ch', 
> > 'st', 'tz', and
> > others exist.
> > So, most of my necessary conditions to a Fraktur font in ConTeXt-lmtx are 
> > fulfilled.
> > As an example is appended "Leipzig-Fraktur-Example.pdf".
> 
> ok
> 
> > I thank Hans and Wolfgang for helping me.
> 
> Best make a wiki page for this (summrizing).
> 
> > [1] https://ctan.org/tex-archive/fonts/ps-type1/yfonts
> > [2] http://unifraktur.sourceforge.net/
> > [3] https://www.chip.de/downloads/Leipzig-Fraktur-Font_36248614.html
> Hans
> 


I'd enjoy making a wiki page. Do we have a program to print caracter code tables
or font tables? If not, I'd use a bundle of single \char commands to show which
characters there are in a special Fraktur font.

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


Re: [NTG-context] Error concerning "pdfmapline"; Fraktur font to use in ConTeXt lmtx

2019-04-22 Thread Rudolf Bahr
On Fri, Apr 19, 2019 at 09:22:03PM +0200, Bahr Rudolf wrote:
> On Fri, Apr 19, 2019 at 09:19:24AM +0200, Hans Hagen wrote:
> > On 4/18/2019 8:37 PM, Wolfgang Schuster wrote:
> > 
> > > 2. Use a font in Truetype/Opentype format:
> > > http://unifraktur.sourceforge.net/
> > Which is actually a quite nice and even readable fraktur.
> > 
> > Hans
> 
> 
> Yes, perhaps. In the next days I will have a look at it. What do you mean with
> "even readable"? Of course the font should be readable, not only to me.
> 
> During the last days I tried "1. Use the Type1 version of the fonts: [1], 
> proposed by
> Wolfgang. There a pair of .afm and .pfb files is needed by "new" ConTeXt and 
> I got
> an "even unreadable" fraktur with plenty of errors. See appended 
> "Fraktur-afm-pfb.pdf". 
> 
> 
> Now, in the meantime, I had also a look into your book [2]
> There is to be read: 
> 
> "Most natural is to use OpenType or Type1 fonts. In the case of Type1 a 
> matching pair
> of afm and pfb files is needed. However, there can be situations where there 
> is only
> a tfm and pfb file (or not even that: just a bitmap file)."
> 
> What do you mean with that? Will "new" ConTeXt be capable in mastering a 
> situation with 
> "only a tfm and pfb file" as "old" ConTeXt did? 
> With "old" ConTeXt I had with "yfrak.mf, yfrak.pfb, yfrak.tfm", a wonderfull 
> Fraktur,
> without errors.
> 
> Rudolf
> 
> [1] https://ctan.org/tex-archive/fonts/ps-type1/yfonts
> [2] http://pragma-ade.com/general/manuals/fonts-mkiv.pdf, page 60, chapter 
> 4.6 
> ("Old fuzzy fonts")




In the meantime I had a look at different Fraktur fonts. Both suggested fonts 
[1]
and [2] were not acceptable to me for various reasons. 

[1] has no gaps between words and many other errors. Horrible. 

[2] is far too fat to be printed in a book. The reason could be that the 
developers 
wanted to make a font suitable for internet presences where the resolution of 
screens 
is far below of that of printing machines. The good thing with [2] is that 
there is an 
extended and interesting set of orthography rules and their changes over 
various 
centuries beginning in 1600 up to today. But unfortunately the internet 
presence of [2]
seems to be dead, the newest entry in member's forum I saw has been from 
beginning of 
2017. 

[3] I found the Leipzig-Fraktur-Font, a real Easter gift :-) It's comparable to 
Yannis 
Haralambous' nice fraktur font I used for years, but in ".otf"-format. It has 
the slim 
high "s" for use at the beginning of words and within words as well as the 
small round 
"s" at the end of syllabs and words. Ok, there seems to be no "!" (Instead I 
use "rm !") 
and the sharp "ß" I had to construct by "s\hskip-1pt z". But German umlauts can 
be printed, 
for instance 'ä' by '\"a', and different ligatures, for instance 'ch', 'st', 
'tz', and 
others exist. 
So, most of my necessary conditions to a Fraktur font in ConTeXt-lmtx are 
fulfilled.
As an example is appended "Leipzig-Fraktur-Example.pdf".

I thank Hans and Wolfgang for helping me.

Rudolf


[1] https://ctan.org/tex-archive/fonts/ps-type1/yfonts
[2] http://unifraktur.sourceforge.net/
[3] https://www.chip.de/downloads/Leipzig-Fraktur-Font_36248614.html

Leipzig-Fraktur-Example.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Error concerning "pdfmapline"

2019-04-19 Thread Rudolf Bahr
On Fri, Apr 19, 2019 at 09:19:24AM +0200, Hans Hagen wrote:
> On 4/18/2019 8:37 PM, Wolfgang Schuster wrote:
> 
> > 2. Use a font in Truetype/Opentype format:
> > http://unifraktur.sourceforge.net/
> Which is actually a quite nice and even readable fraktur.
> 
> Hans


Yes, perhaps. In the next days I will have a look at it. What do you mean with
"even readable"? Of course the font should be readable, not only to me.

During the last days I tried "1. Use the Type1 version of the fonts: [1], 
proposed by
Wolfgang. There a pair of .afm and .pfb files is needed by "new" ConTeXt and I 
got
an "even unreadable" fraktur with plenty of errors. See appended 
"Fraktur-afm-pfb.pdf". 

My MWE to this has been:


\definefontsynonym [Fraktur] [name:yfrakregular] [features=default]

\definefont [BalladenFont]  [Fraktur at 12pt] [.75]

\def\b{\hskip3pt}

\starttext

{\BalladenFont
\char 020, \char 021, \char 022, \char 023, \char 024, \char 025, \char 026, 
\char 027, \char 028, \char 029,\\
\char 030, \char 031, \char 032, \char 033, \char 034, \char 035, \char 036, 
\char 037, \char 038, \char 039,\\
\char 040, \char 041, \char 042, \char 043, \char 044, \char 045, \char 046, 
\char 047, \char 048, \char 049,\\
\char 050, \char 051, \char 052, \char 053, \char 054, \char 055, \char 056, 
\char 057, \char 058, \char 059,\\
\char 060, \char 061, \char 062, \char 063, \char 064, \char 065, \char 066, 
\char 067, \char 068, \char 069,\\
\char 070, \char 071, \char 072, \char 073, \char 074, \char 075, \char 076, 
\char 077, \char 078, \char 079,\\
\char 080, \char 081, \char 082, \char 083, \char 084, \char 085, \char 086, 
\char 087, \char 088, \char 089,\\
\char 090, \char 091, \char 092, \char 093, \char 094, \char 095, \char 096, 
\char 097, \char 098, \char 099,\\
\char 100, \char 101, \char 102, \char 103, \char 104, \char 105, \char 106, 
\char 107, \char 108, \char 109,\\
\char 110, \char 111, \char 112, \char 113, \char 114, \char 115, \char 116, 
\char 117, \char 118, \char 119,\\
\char 120, \char 121, \char 122, \char 123, \char 124, \char 125, \char 126, 
\char 127, \char 128, \char 129,\\

\vskip2\lineheight

Victor's: Sohn jagt zw*olf Boxk*ampfer quer *uber den Sylter Deich.

\vskip\lineheight

Victor's\b Sohn\b jagt\b zw\"olf\b Boxk\"ampfer\b quer\b \"uber\b den\b 
Sylter\b Deich.
}

\stoptext




Now, in the meantime, I had also a look into your book [2]
There is to be read: 

"Most natural is to use OpenType or Type1 fonts. In the case of Type1 a 
matching pair
of afm and pfb files is needed. However, there can be situations where there is 
only
a tfm and pfb file (or not even that: just a bitmap file)."

What do you mean with that? Will "new" ConTeXt be capable in mastering a 
situation with 
"only a tfm and pfb file" as "old" ConTeXt did? 
With "old" ConTeXt I had with "yfrak.mf, yfrak.pfb, yfrak.tfm", a wonderfull 
Fraktur,
without errors.

Rudolf

[1] https://ctan.org/tex-archive/fonts/ps-type1/yfonts
[2] http://pragma-ade.com/general/manuals/fonts-mkiv.pdf, page 60, chapter 4.6 
("Old fuzzy fonts")


Fraktur-afm-pfb.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Error concerning "pdfmapline"

2019-04-18 Thread Rudolf Bahr
On Tue, Apr 16, 2019 at 01:54:21PM +0200, Hans Hagen wrote:
> On 4/16/2019 12:04 PM, Rudolf Bahr wrote:
> > Hello All!
> > 
> > Using:
> > LuaMetaTeX, Version 2.00.0
> > ConTeXt  ver: 2019.04.13 17:25 MKIV beta  fmt: 2019.4.15
> > 
> > with following MWE:
> > 
> > --
> > \pdfmapline {yfrak  > \definefont [ToggenburgFont][yfrak at 10pt] [.75]
> > 
> > \starttext
> > 
> > %\ToggenburgFont Hallo!
> > Maar had ik dit kunnen weten?
> > 
> > \stoptext
> > --
> > 
> > I'm getting now following errors:
> > 
> > fatal error > unsupported cs \pdfmapline
> > mtx-context | fatal error: return code: 256
> > 
> > I'm using the above "\pdfmapline" command since years.
> > Now it gives an error even when it isn't used in the text.
> > "yfrak.pfb" is in the same directory.
> > Are there any hints, please?
> because it is not needed in mkiv (never really was as it was ignored) ..
> most \pdf* commands are no-ops and most will go (i need to figure out what
> the bare minimum is that tikz needs) .. they are not user commands in
> context
> 
> actually, there is (as part of the typescript interface):
> 
> \loadmapline
> \loadmapfile
> 
> not that they are needed either
> 
> Hans




Thank you for the information.

Now, for going another way in order to print Fraktur texts I downloaded various
"yfonts" from ctan [1] again and stored them in 
"~/context-lmtx/tex/texmf-local":

yfrak.tfm,
yfrak.mf  for instance.

"mtxrun --script fonts --reload" and
"mtxrun --script fonts --list --all --pattern=yfrak"

are in vain. The downloaded fonts aren't recognized. This is strange, because
fonts with extensions ".mf" and ".tmf" are fonts how Knuth developed them. There
are no files with other Fraktur file extensions in CTAN.

Please, how to continue with ConTeXt? I'd like to continue to use exactly the
same fonts because of a standard nature with my older Fraktur texts.

Happy Easter!
Rudolf


[1] https://www.ctan.org/tex-archive/fonts/gothic/yfrak
___
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] Error concerning "pdfmapline"

2019-04-16 Thread Rudolf Bahr
Hello All!

Using:
LuaMetaTeX, Version 2.00.0
ConTeXt  ver: 2019.04.13 17:25 MKIV beta  fmt: 2019.4.15

with following MWE:

--
\pdfmapline {yfrak  unsupported cs \pdfmapline
mtx-context | fatal error: return code: 256

I'm using the above "\pdfmapline" command since years.
Now it gives an error even when it isn't used in the text.
"yfrak.pfb" is in the same directory.
Are there any hints, please?

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


Re: [NTG-context] Welcome to LMTX

2019-04-02 Thread Rudolf Bahr
On Tue, Apr 02, 2019 at 01:43:09PM +0200, Mojca Miklavec wrote:
> Off-list: please try to remove the old/regular installation from path,
> just for the test; it's probably interfering and you get one
> executable from one path and the other one from another.

Success!
Yes, both executables must have interfered. Now it works with the long command 
as well with the
short "context" one.

Thank you Hans and Mojca!

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


Re: [NTG-context] Welcome to LMTX

2019-04-02 Thread Rudolf Bahr
On Tue, Apr 02, 2019 at 01:38:15PM +0200, Hans Hagen wrote:
> > 
> > "ls -l ./context-lmtx/tex/texmf-linux-64/bin/" gives the following:
> > 
> > lrwxrwxrwx 1 sam sam  10 Apr  2 09:15 context -> luametatex
> > -rw-r--r-- 1 sam sam1315 Apr  2 09:15 context.lua
> > -rwxr--r-- 1 sam sam 2798240 Apr  2 09:15 luametatex
> > lrwxrwxrwx 1 sam sam  10 Apr  2 09:15 mtxrun -> luametatex
> > -rw-r--r-- 1 sam sam  684787 Apr  2 09:15 mtxrun.lua


> what happens if you just copy luametatex to mtxrun and context
> 

Doing so, "ls -l /home/sam/context-lmtx/tex/texmf-linux-64/bin" now shows:

-rwxr--r-- 1 sam sam 2798240 Apr  2 14:23 context
-rw-r--r-- 1 sam sam1315 Apr  2 09:15 context.lua
-rwxr--r-- 1 sam sam 2798240 Apr  2 09:15 luametatex
-rwxr--r-- 1 sam sam 2798240 Apr  2 14:23 mtxrun
-rw-r--r-- 1 sam sam  684787 Apr  2 09:15 mtxrun.lua

You can see, that "context" and "mtxrun" both have the same length (2798240).

"/home/sam/context-lmtx/tex/texmf-linux-64/bin/mtxrun --autogenerate --script 
context --autopdf ABCD-Helmstedt-Lauf.tex" still gives:


mtx-context | run 1: luametatex 
--fmt="/home/sam/context-lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en"
 --jobname="ABCD-Helmstedt-Lauf" 
--lua="/home/sam/context-lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui"
 --c:autopdf --c:currentrun=1 --c:fulljobname="./ABCD-Helmstedt-Lauf.tex" 
--c:input="./ABCD-Helmstedt-Lauf.tex" --c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="/home/sam/context-lmtx/tex/texmf-linux-64/bin" "cont-yes.mkiv"

sh: 1: luametatex: not found
mtx-context | fatal error: return code: 32512
-

and "context ABCD-Helmstedt-Lauf.tex" runs the old mkiv context. That is ok.

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


Re: [NTG-context] Welcome to LMTX

2019-04-02 Thread Rudolf Bahr
On Tue, Apr 02, 2019 at 12:11:00PM +0200, Thomas A. Schmitz wrote:
> On 02.04.19 11:34, Rudolf Bahr wrote:
> > whereis mtxrun gives:
> > mtxrun: /home/sam/context/tex/texmf-linux-64/bin/mtxrun
> > 
> > whereis context gives:
> > context: /usr/local/context /home/sam/context/tex/texmf-linux-64/bin/context
> 
> Hmm - you're still using your old context, it should say
> /home/sam/context-lmtx/tex/texmf-linux-64/bin/mtxrun
> 
> Which shell are you running?


I'm running "bash" shell.

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


Re: [NTG-context] Welcome to LMTX

2019-04-02 Thread Rudolf Bahr
On Tue, Apr 02, 2019 at 12:50:40PM +0200, Hans Hagen wrote:
> i assume that you have an independent install, i.e. not write lmtx over an
> existing one .. your bin path should only have
> 
> luametatex
> mtxrun  -> luametatex
> context -> luametatex
> mtxrun.lua
> context.lua
> 
> nothing more (in non lmtx installations mtxrun is actually a copy of
> mtxrun.lua)
> 
> Hans
> 


Yes, independent installation!

"ls -l ./context-lmtx/tex/texmf-linux-64/bin/" gives the following:

lrwxrwxrwx 1 sam sam  10 Apr  2 09:15 context -> luametatex
-rw-r--r-- 1 sam sam1315 Apr  2 09:15 context.lua
-rwxr--r-- 1 sam sam 2798240 Apr  2 09:15 luametatex
lrwxrwxrwx 1 sam sam  10 Apr  2 09:15 mtxrun -> luametatex
-rw-r--r-- 1 sam sam  684787 Apr  2 09:15 mtxrun.lua

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


Re: [NTG-context] Welcome to LMTX

2019-04-02 Thread Rudolf Bahr
On Tue, Apr 02, 2019 at 11:41:08AM +0200, Hans Hagen wrote:
> On 4/2/2019 11:34 AM, Rudolf Bahr wrote:
> 
> > Could it have something to do with the lack of lua5.4 in my PC? lua5.3 and 
> > lua5.2
> > are installed.
> No, there are no such depencies. All is built in the binary. (The whole idea
> is to be independent of what eslse is installed.)
> 
> Does it work in a console?
> 
> Hans
>

What do you mean exactly? All my context invoking is done in a console (and not 
within an
editor or whatelse).

BTW, what will be the short command in invoking lmtx-context? When I do 
"context prog.tex"
I'm still invoking my mkiv context.

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


Re: [NTG-context] Welcome to LMTX

2019-04-02 Thread Rudolf Bahr
> > On Mon, Apr 01, 2019 at 04:55:11PM +0200, Hans Hagen wrote:
> > >   http://www.pragma-ade.nl/install.htm
> > > 
> > /home/sam/context-lmtx/tex/texmf-linux-64/bin/mtxrun --autogenerate 
> > --script context --autopdf ABCD-Helmstedt-Lauf.tex
> > 
> > and got:
> > 
> > sh: 1: luametatex: not found
> > mtx-context | fatal error: return code: 32512

> Did you use the installer? I assume so. What happens if you just add
> /home/sam/context-lmtx/tex/texmf-linux-64/bin to your path?
> 
> There is a rather fundamental difference between a regular luatex/mkiv setup
> and luametatex/lmtx:
> 
> - in lmtx we only have one program, nothing else gets installed, there is no
> jit variant (and there will never be as we move on with lua: we use lua 5.4
> here)
> 
> - mtxrun and context are both (on all platforms) symlinks to luametatex (can
> you check that? the installer should manage that)
> 
> - when installing there are no dependencies on other programs so missing
> programs cannot be a reason for a failed install
> 
> (Mojca will set up the garden and that will then be the primary source; the
> installer which is also the updater already know this.)
> 
> Hans

Hi Hans,

thank you for your response.

Yes, I did use the installer and followed the advice under "Linux 64 bit".

After having 

export 
PATH="/home/sam/context-lmtx/tex/texmf-linux-64/bin:/home/sam/context/tex/texmf-linux-64/bin:$PATH"
 as well as

export 
PATH="/home/sam/context-lmtx/tex/texmf-linux-64/bin:/home/sam/context-lmtx/bin:/home/sam/context-lmtx/tex/texmf-linux-64/bin:"

in my .bashrc and not forgotten "source ~/.bashrc" ofcourse :-)

my (old) mkiv context runs well:

context ABCD-Helmstedt-Lauf.tex

but

/home/sam/context-lmtx/tex/texmf-linux-64/bin/mtxrun --autogenerate --script 
context --autopdf ABCD-Helmstedt-Lauf.tex

fails still with

sh: 1: luametatex: not found
mtx-context | fatal error: return code: 32512


Could it have something to do with the lack of lua5.4 in my PC? lua5.3 and 
lua5.2
are installed.

whereis mtxrun gives:
mtxrun: /home/sam/context/tex/texmf-linux-64/bin/mtxrun

whereis context gives:
context: /usr/local/context /home/sam/context/tex/texmf-linux-64/bin/context

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


Re: [NTG-context] Welcome to LMTX

2019-04-02 Thread Rudolf Bahr
On Mon, Apr 01, 2019 at 04:55:11PM +0200, Hans Hagen wrote:
>  http://www.pragma-ade.nl/install.htm
> 
> Of course you should keep your current installation too. We're sure that
> there will be issues so when you run into unexpected surprises, you can
> blame us ...

Hello All,

I run cautiously the full path

/home/sam/context-lmtx/tex/texmf-linux-64/bin/mtxrun --autogenerate --script 
context --autopdf ABCD-Helmstedt-Lauf.tex

and got:

sh: 1: luametatex: not found
mtx-context | fatal error: return code: 32512

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


Re: [NTG-context] When newsizing an external figure by [width=], what will be its height in pt and viceversa?

2019-02-27 Thread Rudolf Bahr
On Wed, Feb 27, 2019 at 09:55:07AM +0100, Henning Hraban Ramm wrote:
> Am 2019-02-24 um 09:11 schrieb Rudolf Bahr :
> 
> > Yes, "~" was the reason for my failure. Its use seems to be linux specific 
> > only.
> 
> No, it’s not Linux specific, but ConTeXt doesn’t expand shell variables.
> 
> Greetlings, Hraban


Aha! Thank you.

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


Re: [NTG-context] When newsizing an external figure by [width=], what will be its height in pt and viceversa?

2019-02-24 Thread Rudolf Bahr
On Sun, Feb 24, 2019 at 07:38:42AM +0900, Jeong Dal wrote:
> Dear Rudolf,
> 
> It is working for me.
> Using my figure, I got 
> (45126287sp,31048991sp) 
> 
> (1372,944) 
> 
> 
> As Hans said, either change ~ to some path or set the directory of 
> externalfigure.
> 
> Best regards,
> 
> Dalyoung

Hello Dalyoung,

thank you for your message!

Yes, "~" was the reason for my failure. Its use seems to be linux specific only.

If you convert your sp-sizes into pt-sizes (1pt = 65536sp) you will get:
(45126287sp,31048991sp) = (688.5725pt,473.7700pt)

What do you think, are these pt-values ok to you? In my opinion they seem to be 
too
small. How are they calculated?

Cheers,

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


Re: [NTG-context] externalfigure broken with 20190222 beta

2019-02-23 Thread Rudolf Bahr
On Sat, Feb 23, 2019 at 11:10:42AM -0500, Rik Kabel wrote:
> With the following example, I get:
> 
>...eXt/tex/texmf-context/tex/context/base/mkiv/grph-inc.lua:238: attempt 
> to call upvalue 'imgwrap' (a nil value)
> 
> with the current (20190222) beta.
> 
>\setupexternalfigures[location=default]
>\starttext
>\externalfigure[cow.pdf]
>\stoptext
> 
> Down for just me, or for everyone?
> 
> --
> Rik


My context exits normally (ConTeXt  ver: 2018.03.16 22:20 MKIV beta  fmt: 
2018.3.21),
but cow.pdf state: unknown.

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


Re: [NTG-context] When newsizing an external figure bei [width=], what will be its height in pt and viceversa?

2019-02-23 Thread Rudolf Bahr
On Sat, Feb 23, 2019 at 11:56:32AM +0100, Hans Hagen wrote:
> On 2/23/2019 11:08 AM, Rudolf Bahr wrote:
> > On Fri, Feb 22, 2019 at 12:59:55PM +0100, Peter Münster wrote:
> > > On Fri, Feb 22 2019, Rudolf Bahr wrote:
> > > 
> > > > The picture sizes in px One gets by invoking for instance graphics 
> > > > Magick's identify
> > > > in a lua program:
> > > 
> > > Or just img.scan():
> > > 
> > > \startluacode
> > >local image = img.scan{filename = "my-image.jpg"}
> > >logs.report("xsize", image.xsize)
> > >logs.report("ysize", image.ysize)
> > > \stopluacode
> > > 
> > > -- 
> > > Peter
> > 
> > Hi Peter,
> > 
> > thank you for pointing to img.scan{}! It's indeed shorter than to invoke 
> > Graphics Magick
> > in Lua. Remains the conversion of image sizes into pt. There is an example 
> > in the chapter
> > "Calculations in Lua" in "https://wiki.contextgarden.net/Image_Placement; 
> > (a work in
> > progress). According to there it's necessary to know the resolution in 
> > order to convert
> > image sizes from px to pt which at least I don't know. Mostly I can preset 
> > one size of
> > a picture (say the width in pt) to be able to place it on a page and 
> > assuming
> > x-resolution = y-resolution and keeping width-to-height ratio I calculate 
> > the missing
> > size (here the height in pt) in Lua by
> > 
> >  
> > picture-height-in-px
> > asked-picture-height-in-pt = preset-picture-width-in-pt  *  
> > 
> > 
> > picture-width-in-px
> > 
> > This is simple and normally it suffices for me.
> Better use the built-in methods:
> 
> \starttext
> 
> \getfiguredimensions[t:/sources/mill.png]
> 
> (\figurewidth,\figureheight)
> 
> (\figurexsize,\figureysize)
> 
> \stoptext
> 
> as it prevents opening the files multiple times. It's also more futureproof.
> 
> Hans
> 

Hi Hans,

I fear it doesn't work. I used the above code with a test-picture of mine
(in .png and .jpg version) and got:

(0sp,0sp)
(0,0)

Now I'm baffled what the explanation could be. Are "mill" or "cow" somehow
specially prepared? I used:

ConTeXt  ver: 2018.03.16 22:20 MKIV beta  fmt: 2018.3.21 and
getfiguredimensions[~/my-test-picture.png]

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


Re: [NTG-context] When newsizing an external figure bei [width=], what will be its height in pt and viceversa?

2019-02-23 Thread Rudolf Bahr
On Fri, Feb 22, 2019 at 12:59:55PM +0100, Peter Münster wrote:
> On Fri, Feb 22 2019, Rudolf Bahr wrote:
> 
> > The picture sizes in px One gets by invoking for instance graphics Magick's 
> > identify
> > in a lua program:
> 
> Or just img.scan():
> 
> \startluacode
>   local image = img.scan{filename = "my-image.jpg"}
>   logs.report("xsize", image.xsize)
>   logs.report("ysize", image.ysize)
> \stopluacode
> 
> -- 
>Peter

Hi Peter,

thank you for pointing to img.scan{}! It's indeed shorter than to invoke 
Graphics Magick
in Lua. Remains the conversion of image sizes into pt. There is an example in 
the chapter
"Calculations in Lua" in "https://wiki.contextgarden.net/Image_Placement; (a 
work in
progress). According to there it's necessary to know the resolution in order to 
convert
image sizes from px to pt which at least I don't know. Mostly I can preset one 
size of
a picture (say the width in pt) to be able to place it on a page and assuming
x-resolution = y-resolution and keeping width-to-height ratio I calculate the 
missing
size (here the height in pt) in Lua by

picture-height-in-px
asked-picture-height-in-pt = preset-picture-width-in-pt  *  
picture-width-in-px

This is simple and normally it suffices for me.

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


Re: [NTG-context] When newsizing an external figure bei [width=], what will be its height in pt and viceversa?

2019-02-22 Thread Rudolf Bahr
On Tue, Feb 19, 2019 at 10:48:38AM +0100, Bahr Rudolf wrote:
> Hi All,
> 
> from an external figure I normally know its width and height in px. 
> But I don't know its exact sizes in pt. When newsizing the figure 
> in a document (by the same width-to-height-ratio), I'll do that as 
> some part of textwidth or textheight, in pt or mm, but not in px, 
> i.e. by means of [width=]. 
> Sometimes it would be interesting to know its new height in pt, 
> and viceversa. 
> 
> Is there a variable or something else containing its new size in pt?
> 
> Regards,
> Rudolf




Hi All,

up to now Nobody answered to my question, perhaps it might have been
too simple.

Indeed One could normally assume:


picture-width-in-px  preset-picture-width-in-pt
  =  --
picture-height-in-px asked-picture-height-in-pt


And according to Adam Riese One gets:

 preset-picture-width-in-pt  *  picture-height-in-px
asked-picture-height-in-pt = ---
 picture-width-in-px


-
The picture sizes in px One gets by invoking for instance graphics Magick's 
identify
in a lua program:

local file = assert ( io.popen ( 'gm identify ' .. picture_name, 'r' ))
local output = file:read ( '*all' )
file:close ()

local words = {}
for w in string.gmatch ( output, "%g+" ) do
words [ #words + 1 ] = w
end

-- Width and height are found in words[3]: i.e. 5407x3544+0+0
local dims = {}
for d in string.gmatch ( words [ 3 ], "%d+" ) do
dims [ #dims + 1 ] = d
end

local px_width  = dims [ 1 ]
local px_height = dims [ 2 ]
-

It's a solution at least as long as your Lua supports "io.popen". There might be
shorter solutions.

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


[NTG-context] When newsizing an external figure bei [width=], what will be its height in pt and viceversa?

2019-02-19 Thread Rudolf Bahr
Hi All,

from an external figure I normally know its width and height in px. 
But I don't know its exact sizes in pt. When newsizing the figure 
in a document (by the same width-to-height-ratio), I'll do that as 
some part of textwidth or textheight, in pt or mm, but not in px, 
i.e. by means of [width=]. 
Sometimes it would be interesting to know its new height in pt, 
and viceversa. 

Is there a variable or something else containing its new size in pt?

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


[NTG-context] Article on: How to install a font in ConTeXt?

2019-02-17 Thread Rudolf Bahr
Yesterday I got dante's revue and read Taco Hoekwater's
article translated into German by Henning Hraban Ramm:
"dante, Die TEXnische Komödie, 1/2019: 'Wie installiere 
ich eine Schrift für ConTeXt?'"

Many thanks to both, its really good and thoroughly 
written!

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


Re: [NTG-context] Google Search in ConTeXt Garden

2018-03-18 Thread Rudolf Bahr
On Sun, Mar 18, 2018 at 01:13:35PM +0100, Pablo Rodriguez wrote:
> Dear list,
> 
> when I use Google to search the wiki, such as in:
> 
>   http://wiki.contextgarden.net/google/new2.html?q=xmldoifelseempty
> 
> I get the following error message:
> 
>   Unauthorized access to internal API. Please refer to
>   https://support.google.com/customsearch/answer/4542055
> 
> Can anyone confirm this?
> 
> Many thanks for your help,
> 
> Pablo
> 
> -- 
> http://www.ousia.tk


Yes, me too, I can confirm this.

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

Re: [NTG-context] Sending data from lua to context and back to lua

2018-02-08 Thread Rudolf Bahr
On Thu, Feb 08, 2018 at 04:26:16PM +0100, Henning Hraban Ramm wrote:
> Am 2018-02-08 um 15:34 schrieb Rudolf Bahr <qu...@quasi.de>:
> 
> > On Thu, Feb 08, 2018 at 09:30:48AM +0100, Thomas A. Schmitz wrote:
> >> On 02/07/2018 06:39 PM, Rudolf Bahr wrote:
> >>> Sometimes the necessity could arise to send data from lua to context
> >>> and answers back to lua. I tried this by using "read" and
> >>> "immediate\write" commands in context. These commands are described
> >>> in chapter 21 and 22 of Donald E. Knuth's "The TeXbook".
> >>> 
> >>> My question is: Do there exist better and more simple solutions?
> >> 
> >> You can print (typeset) information from inside lua code with the "context"
> >> function. Have you seen the manual cld-mkiv.pdf? It's in the minimals.
> >> 
> >> Thomas
> > 
> > Yes, thank you. I tried "context()" several times, but without success.
> > Could be, that I have a false meaning how to use it: If I transfer data
> > from context to lua and vice versa then in my imagination there must be 
> > variables in both languages  where the sent data is to be found.
> > 
> > With the use of "\immediate\write" and "\read" in context and the read and 
> > write
> > functions in lua I know exactly from where to where the data goes. How to 
> > do 
> > the same with "context()"?

 
> \startluacode
> 
> function SomeFunction()
>   context("Value")
> end
> 
> \stopluacode
> 
> \def\MyVar{\ctxlua{SomeFunction()}}
> 

YES! That's what I needed to get back data from lua to context!
Many thanks to Hraban, Hans and Thomas for your help!

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

Re: [NTG-context] Sending data from lua to context and back to lua

2018-02-08 Thread Rudolf Bahr
On Thu, Feb 08, 2018 at 09:30:48AM +0100, Thomas A. Schmitz wrote:
> On 02/07/2018 06:39 PM, Rudolf Bahr wrote:
> > Sometimes the necessity could arise to send data from lua to context
> > and answers back to lua. I tried this by using "read" and
> > "immediate\write" commands in context. These commands are described
> > in chapter 21 and 22 of Donald E. Knuth's "The TeXbook".
> > 
> > My question is: Do there exist better and more simple solutions?
> 
> You can print (typeset) information from inside lua code with the "context"
> function. Have you seen the manual cld-mkiv.pdf? It's in the minimals.
> 
> Thomas

Yes, thank you. I tried "context()" several times, but without success.
Could be, that I have a false meaning how to use it: If I transfer data
from context to lua and vice versa then in my imagination there must be 
variables in both languages  where the sent data is to be found.

With the use of "\immediate\write" and "\read" in context and the read and write
functions in lua I know exactly from where to where the data goes. How to do 
the same with "context()"?

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

Re: [NTG-context] Sending data from lua to context and back to lua

2018-02-07 Thread Rudolf Bahr
On Wed, Feb 07, 2018 at 06:39:53PM +0100, Bahr Rudolf wrote:
> 
> Hello Contexteers!
> 
> Sometimes the necessity could arise to send data from lua to context
> and answers back to lua. I tried this by using "read" and
> "immediate\write" commands in context. These commands are described
> in chapter 21 and 22 of Donald E. Knuth's "The TeXbook".
> 
> My question is: Do there exist better and more simple solutions?
> Here is my WE which is admittedly a little bit ugly, but it works.
> Appended the pdf-output:
> 
> 
> \starttext
> 
> \startluacode
> 
> tex.print("Here is lua.")
> tex.print(" ")
> tex.print("I'm sending some picture names to Context in order to get back 
> their sizes.")
> 
> local imageA = "2007-01-01---Intro.png"
> local imageB = "2007-01-01---Neujahrsballade---1.png"
> local imageC = "2007-01-01---Neujahrsballade---2.png"
> 
> local f = assert(io.open("contextin.txt", "w"))
> f:write(imageA .. "\n" .. imageB .. "\n" .. imageC)
> f:close()
> 
> \stopluacode
> 
> % -
> 
> \openin15=contextin.txt
> 
> \read15 to \zeileA
> \read15 to \zeileB
> \read15 to \zeileC
> 
> \closein15
> 
> \vskip\lineheight
> =
> \vskip\lineheight
> Here is \CONTEXT\ and what I got from Lua:
> \vskip\lineheight
> 
> \zeileA \\
> \zeileB \\
> \zeileC
> 
> \vskip\lineheight
> Now I'm working ... and write my answers to a file for lua: \\
> 
> \zeileA\ width=3000pt height=2000pt \\
> \zeileB\ width=1200pt height=900pt  \\
> \zeileC\ width=1600pt height=1200pt \\
> 
> \immediate\openout7=contextout.txt
> 
> \immediate\write7{\zeileA\ width=3000pt height=2000pt \\}
> \immediate\write7{\zeileB\ width=1200pt height=900pt  \\}
> \immediate\write7{\zeileC\ width=1600pt height=1200pt \\}
> 
> \immediate\closeout7
> 
> \vskip\lineheight
> =
> \vskip\lineheight
> 
> % -
> 
> \startluacode
> 
> tex.print("Here is lua again and what I got back from Context:")
> tex.print(" ")
> tex.print(" ")
> 
> local f = assert(io.open("contextout.txt", "r"))
> local contexts_answer = f:read("*a")
> f:close()
> 
> tex.print(contexts_answer)
> 
> \stopluacode
> 
> 
> \stoptext
> 
> 
> 
> Best regards,
> 
> Rudolf
> 

Sorry, Donald E. Knuth's macros aren't in chapters 21 and 22, but in
chapters 20 and 21!

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

[NTG-context] Sending data from lua to context and back to lua

2018-02-07 Thread Rudolf Bahr

Hello Contexteers!

Sometimes the necessity could arise to send data from lua to context
and answers back to lua. I tried this by using "read" and
"immediate\write" commands in context. These commands are described
in chapter 21 and 22 of Donald E. Knuth's "The TeXbook".

My question is: Do there exist better and more simple solutions?
Here is my WE which is admittedly a little bit ugly, but it works.
Appended the pdf-output:


\starttext

\startluacode

tex.print("Here is lua.")
tex.print(" ")
tex.print("I'm sending some picture names to Context in order to get back their 
sizes.")

local imageA = "2007-01-01---Intro.png"
local imageB = "2007-01-01---Neujahrsballade---1.png"
local imageC = "2007-01-01---Neujahrsballade---2.png"

local f = assert(io.open("contextin.txt", "w"))
f:write(imageA .. "\n" .. imageB .. "\n" .. imageC)
f:close()

\stopluacode

% -

\openin15=contextin.txt

\read15 to \zeileA
\read15 to \zeileB
\read15 to \zeileC

\closein15

\vskip\lineheight
=
\vskip\lineheight
Here is \CONTEXT\ and what I got from Lua:
\vskip\lineheight

\zeileA \\
\zeileB \\
\zeileC

\vskip\lineheight
Now I'm working ... and write my answers to a file for lua: \\

\zeileA\ width=3000pt height=2000pt \\
\zeileB\ width=1200pt height=900pt  \\
\zeileC\ width=1600pt height=1200pt \\

\immediate\openout7=contextout.txt

\immediate\write7{\zeileA\ width=3000pt height=2000pt \\}
\immediate\write7{\zeileB\ width=1200pt height=900pt  \\}
\immediate\write7{\zeileC\ width=1600pt height=1200pt \\}

\immediate\closeout7

\vskip\lineheight
=
\vskip\lineheight

% -

\startluacode

tex.print("Here is lua again and what I got back from Context:")
tex.print(" ")
tex.print(" ")

local f = assert(io.open("contextout.txt", "r"))
local contexts_answer = f:read("*a")
f:close()

tex.print(contexts_answer)

\stopluacode


\stoptext



Best regards,

Rudolf



input-test.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] image file resolver in Lua?

2018-02-05 Thread Rudolf Bahr
On Sun, Feb 04, 2018 at 01:06:08PM +0100, Hans Hagen wrote:
> On 2/3/2018 7:57 AM, Rudolf Bahr wrote:
> > On Fri, Feb 02, 2018 at 04:17:32PM +0100, Henning Hraban Ramm wrote:
> > > Am 2018-02-02 um 12:08 schrieb Rudolf Bahr <qu...@quasi.de>:
> > > 
> > > > On Fri, Feb 02, 2018 at 08:40:08AM +0100, Henning Hraban Ramm wrote:
> > > > > Ahoi,
> > > > > 
> > > > > I’m using a Lua function to calculate image sizes, cropping etc.
> > > > > This snippet:
> > > > > 
> > > > > local filename = figures.current().status.fullname
> > > > > local pic = img.scan{filename = filename}
> > > > > 
> > > > > ... works most of the time, but sometimes the "current" image is the 
> > > > > previous one, might be because I’m using layers and postponing.
> > > > > So I’d like to use just the same filename as I give to 
> > > > > \externalfigure, i.e. without path and extension.
> > > > > How can I address the same file path resolver in my Lua function?
> > > > > 
> > > > 
> > > > Moin, Hraban,
> > > > 
> > > > where could I find something about those lua functions?
> > > 
> > > Maybe here: 
> > > http://source.contextgarden.net/tex/context/base/mkiv/grph-inc.lua
> > > 
> > > The image placement functions I’m using are something Hans and others 
> > > helped me accomplish during the last meeting; AFAIK there’s no real 
> > > documentation.
> > > 
> > > Find attached the lua part. It’s probably more complicated than necessary
> > > 
> > > 
> > > I could work around my original problem: I’m using my image with 
> > > \externalfigure in an invisible place first, so it’s current, and 
> > > figures.current().status is the right one. :)
> > > 
> > > Here’s my (convoluted) placement macro:
> > > 
> > > % image on empty page, caption in margin
> > > % usage:
> > > % \startpostponing[pagenumber]
> > > % \pagefig[reference]{caption}{filename}
> > > % \stoppostponing
> > > % postponing is important, otherwise the page numbering gets wrong
> > > \def\pagefig{\dosingleempty\doPagefig}
> > > \def\doPagefig[#1]#2#3{
> > > % calculate image size
> > > \startfullpagemakeup
> > >\externalfigure[#3][width=1mm] % dummy to set image as current
> > >\def\myClipHeight{\ctxlua{ctxClipHeight("#3", \Resolution)}}
> > >\def\mystartY{\ctxlua{ctxStartY("#3", \Resolution)}}
> > >% image
> > >\setlayerframed[bglayer][%
> > >  frame=off,
> > >  offset=overlay,
> > >  x=21mm,
> > >  y=\mystartY,
> > >  height=\myClipHeight,
> > >  width=\textwidth,
> > >  align=flushleft,
> > >  ]{%
> > >  \clip[
> > >width=\textwidth,
> > >height=\myClipHeight,
> > >hoffset=0mm,
> > >voffset=0mm, % i.e. clip bottom! TODO: options!
> > >]{\externalfigure[#3][width=\textwidth]}
> > >   }
> > >\textreference[pre#1]{\myImgHeight}
> > >% caption
> > >\setlayerframed[bglayer][%
> > >frame=off,
> > >offset=overlay,
> > >linecorrection=on,
> > >x=143mm,y=\dimexpr\mystartY + 3pt\relax,
> > >height=\myClipHeight,
> > >width=\outermarginwidth,
> > >align={flushleft,low},
> > >valign=bottom,
> > >]{%
> > >\vbox{
> > >  \textreference[#1]{\strut #2}\vfill #2
> > >}}
> > > \stopfullpagemakeup
> > > }
> > > 
> > > 
> > > usage example:
> > > 
> > > \startpostponing[82]
> > > \pagefig[alinari-stelzen]{Gebrüder Alinari (Florenz, 19. 
> > > Jhd.)}{ka34/img/Gebr-Alinari_Kinder_auf_Stelzen}
> > > \stoppostponing
> > > 
> > > 
> > > 
> > > Greetlings, Hraban
> > > ---
> > > http://www.fiee.net
> > > http://wiki.contextgarden.net
> > > GPG Key ID 1C9B22FD
> > > 
> > 
> > Moin Hraban!
> > 
> > It's very interesting for me to see, how exactly you calculate
> > the size of images and texts with the help of lua!
> > 
> > Up to now I used to use python and a independend lua to provide some
> > necessary data for context. For instance python invokes

Re: [NTG-context] image file resolver in Lua?

2018-02-02 Thread Rudolf Bahr
On Fri, Feb 02, 2018 at 04:17:32PM +0100, Henning Hraban Ramm wrote:
> Am 2018-02-02 um 12:08 schrieb Rudolf Bahr <qu...@quasi.de>:
> 
> > On Fri, Feb 02, 2018 at 08:40:08AM +0100, Henning Hraban Ramm wrote:
> >> Ahoi,
> >> 
> >> I’m using a Lua function to calculate image sizes, cropping etc.
> >> This snippet:
> >> 
> >> local filename = figures.current().status.fullname
> >> local pic = img.scan{filename = filename}
> >> 
> >> ... works most of the time, but sometimes the "current" image is the 
> >> previous one, might be because I’m using layers and postponing.
> >> So I’d like to use just the same filename as I give to \externalfigure, 
> >> i.e. without path and extension.
> >> How can I address the same file path resolver in my Lua function?
> >> 
> > 
> > Moin, Hraban,
> > 
> > where could I find something about those lua functions?
> 
> Maybe here: http://source.contextgarden.net/tex/context/base/mkiv/grph-inc.lua
> 
> The image placement functions I’m using are something Hans and others helped 
> me accomplish during the last meeting; AFAIK there’s no real documentation.
> 
> Find attached the lua part. It’s probably more complicated than necessary
> 
> 
> I could work around my original problem: I’m using my image with 
> \externalfigure in an invisible place first, so it’s current, and 
> figures.current().status is the right one. :)
> 
> Here’s my (convoluted) placement macro:
> 
> % image on empty page, caption in margin
> % usage:
> % \startpostponing[pagenumber]
> % \pagefig[reference]{caption}{filename}
> % \stoppostponing
> % postponing is important, otherwise the page numbering gets wrong
> \def\pagefig{\dosingleempty\doPagefig}
> \def\doPagefig[#1]#2#3{
> % calculate image size
> \startfullpagemakeup
>   \externalfigure[#3][width=1mm] % dummy to set image as current
>   \def\myClipHeight{\ctxlua{ctxClipHeight("#3", \Resolution)}}
>   \def\mystartY{\ctxlua{ctxStartY("#3", \Resolution)}}
>   % image
>   \setlayerframed[bglayer][%
> frame=off,
> offset=overlay,
> x=21mm,
> y=\mystartY,
> height=\myClipHeight,
> width=\textwidth,
> align=flushleft,
> ]{%
> \clip[
>   width=\textwidth,
>   height=\myClipHeight,
>   hoffset=0mm,
>   voffset=0mm, % i.e. clip bottom! TODO: options!
>   ]{\externalfigure[#3][width=\textwidth]}
>   }
>   \textreference[pre#1]{\myImgHeight}
>   % caption
>   \setlayerframed[bglayer][%
>   frame=off,
>   offset=overlay,
>   linecorrection=on,
>   x=143mm,y=\dimexpr\mystartY + 3pt\relax,
>   height=\myClipHeight,
>   width=\outermarginwidth,
>   align={flushleft,low},
>   valign=bottom,
>   ]{%
>   \vbox{
> \textreference[#1]{\strut #2}\vfill #2
>   }}
> \stopfullpagemakeup
> }
> 
> 
> usage example:
> 
> \startpostponing[82]
> \pagefig[alinari-stelzen]{Gebrüder Alinari (Florenz, 19. 
> Jhd.)}{ka34/img/Gebr-Alinari_Kinder_auf_Stelzen}
> \stoppostponing
> 
> 
> 
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> GPG Key ID 1C9B22FD
> 

Moin Hraban!

It's very interesting for me to see, how exactly you calculate 
the size of images and texts with the help of lua! 

Up to now I used to use python and a independend lua to provide some 
necessary data for context. For instance python invokes graphicsmagick 
in order to get the size of images. Because it's provided in px and not 
in pt, so often some further manual work is unavoidable.

Now, since lua and metafun are well integrated into context it suggests
itself to use luatex instead of python, though I like this language
very much.

Thank you very much, Hraban, for putting your macros and links 
at my disposal!

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

Re: [NTG-context] image file resolver in Lua?

2018-02-02 Thread Rudolf Bahr
On Fri, Feb 02, 2018 at 08:40:08AM +0100, Henning Hraban Ramm wrote:
> Ahoi,
> 
> I’m using a Lua function to calculate image sizes, cropping etc.
> This snippet:
> 
> local filename = figures.current().status.fullname
> local pic = img.scan{filename = filename}
> 
> ... works most of the time, but sometimes the "current" image is the previous 
> one, might be because I’m using layers and postponing.
> So I’d like to use just the same filename as I give to \externalfigure, i.e. 
> without path and extension.
> How can I address the same file path resolver in my Lua function?
> 

Moin, Hraban,

where could I find something about those lua functions?

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

Re: [NTG-context] imposition with some rotated pages

2017-08-01 Thread Rudolf Bahr
On Sun, Jul 30, 2017 at 08:55:56PM +0200, Pablo Rodriguez wrote:
> 
> The rotated pages in the source PDF document are a problem here.
> 
> Is there any way to have rotation for some pages in the source document
> to get the right imposition?

With "pdftk" you can rotate some or all pages of a pdf-document.
But perhaps this isn't what you want.

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

[NTG-context] superscripts?

2015-12-19 Thread Rudolf Bahr
Hello,

using ConTeXt  ver: 2015.12.17 15:57 MKIV beta  fmt: 2015.12.18
and writing:

\starttext
\math{a^2 + b^2 = c^2}
\stoptext

I get "a?2 + b?2 = c?2" as the Pythagoras formula. 

Please, how should I write it better?

Thanks in advance,
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
___

Re: [NTG-context] Adrian Frutiger

2015-10-04 Thread Rudolf Bahr

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
___

Re: [NTG-context] Hans Hagen: an index entry needs an anchor (Mail Archive 3/19/2014)

2014-11-15 Thread Rudolf Bahr
On Fri, Nov 14, 2014 at 11:54:18AM +0100, Hans Hagen wrote:
 On 11/14/2014 10:24 AM, Rudolf Bahr wrote:
 Hi,
 
 LaTeX index command doesn't need an anchor in order to print the page 
 number.
 
 Sometimes you can't give the ConTeXt-Command index any anchor. Think of an
 external figure on a page and nothing else, without any text. When I say, 
 for instance:
 
 \index{Brigitte Bardot}\strut
 
 I get a correct index, but an unsolicited extra empty page, too. What could 
 be a solution?
 My ConTeXt version is: ConTeXt  ver: 2014.11.12 21:46 MKIV beta  fmt: 
 2014.11.14
 
 i'm pretty sure that any index mechanism that is supposed to provide the
 right page does a delayed write, so some kind of anchoring is there
 
 (you could try \index{...}\null or maybe \setregisterentry)
 
 Hans


Sorry, Hans. \index{...}\null isn't the solution either: I get an unwanted 
additional empty page,
but no pagenumbers in the index. 

Regarding \setregisterentry I cannot say very much because I didn't find enough 
information 
about that topic:  I fear I have to set in advance the appropriate page numbers 
and cannot 
use ConTeXt's page number facilities.

Ok, I shall look for other solutions, thank you.

___
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] Hans Hagen: an index entry needs an anchor (Mail Archive 3/19/2014)

2014-11-14 Thread Rudolf Bahr
Hi,

LaTeX index command doesn't need an anchor in order to print the page number.

Sometimes you can't give the ConTeXt-Command index any anchor. Think of an
external figure on a page and nothing else, without any text. When I say, for 
instance:

\index{Brigitte Bardot}\strut

I get a correct index, but an unsolicited extra empty page, too. What could be 
a solution?
My ConTeXt version is: ConTeXt  ver: 2014.11.12 21:46 MKIV beta  fmt: 
2014.11.14

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

[NTG-context] Main or Overall Index of a series of volumes

2014-09-20 Thread Rudolf Bahr
Hello All,

just to plan in advance:

I'd like to construct a main or overall index out of the indices of a series of 
rather
big volumes with their own page numbering from 1 to (say) 1000. Of course the 
intended main 
or overall index should point not only to a page number, but to the 
corresponding volume 
number or title too.

Is that fundamentally possible and  if yes how? 

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


[NTG-context] arch linux and ConTeXt

2014-05-13 Thread Rudolf Bahr
Hi Aditya,

recently I changed my linux distribution to arch and so I used your arch 
suggestion to
install ConTeXt. Instead of reporting any bugs at the ConTeXt mailing list 
according to
the last sentence it's in my own interest to thank you for your work there!

All went well, though one little rather unimportant thing irritated me 
initially:
makepkg which should generate context-minimals-date.pkg.tar.gz with the 
date of
today, as I assume, generated 
context-minimals-git-20130615-1-x86_64.pkg.tar.gz instead,
with a one year old date. 

But the eventually generated ConTeXt is totally new:
ConTeXt  ver: 2014.05.13 00:04 MKIV beta  fmt: 2014.5.13 

So, it's not a real bug, only irritating a little bit. 
I thank you again!

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
___


  1   2   >