Re: [NTG-context] Variable space with hanging description

2019-04-16 Thread Cedric Tissieres
Thanks Wolfgang, it works perfectly.

On 4/16/19 11:31 PM, Wolfgang Schuster wrote:
> Cedric Tissieres schrieb am 16.04.2019 um 06:16:
>> Dear all,
>>
>> I recently switched to mkiv and experienced some problems with
>> descriptions when set with alternative=hanging. The horizontal space
>> between the description title and the rest of the text varies a lot and
>> looks ugly. When the same code is compiled with mkii, this space is
>> almost constant (replace alternative=hanging by location=hanging in
>> mkii).
> 
> The different distances after each title comes from the fact that MkIV
> adds shrink and stretch values to the space but you can disable these
> values with the shrink and stretch keys.
> 
> \setupdescription [...] [shrink=0,stretch=0]
> 
> Wolfgang
> 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Variable space with hanging description

2019-04-16 Thread Wolfgang Schuster

Cedric Tissieres schrieb am 16.04.2019 um 06:16:

Dear all,

I recently switched to mkiv and experienced some problems with
descriptions when set with alternative=hanging. The horizontal space
between the description title and the rest of the text varies a lot and
looks ugly. When the same code is compiled with mkii, this space is
almost constant (replace alternative=hanging by location=hanging in mkii).


The different distances after each title comes from the fact that MkIV
adds shrink and stretch values to the space but you can disable these
values with the shrink and stretch keys.

\setupdescription [...] [shrink=0,stretch=0]

Wolfgang

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

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


Re: [NTG-context] local command description

2019-04-16 Thread Arthur Reutenauer
Hi Damien,

On Tue, Apr 16, 2019 at 11:15:08PM +0200, Damien Thiriet wrote:
> mtxrun --script server --auto
> 
> [snip]
>
> mtx-server  | context services: 
> http://localhost:8088/mtx-server-ctx-startup.lua

> mtxrun --gethelp
> --url=http://localhost:8088/mtx-server-ctx-help.lua?command=%command%
> --command= "\definecolor"
> 
> When I run this, I get
> sh: http://localhost:8088/mtx-server-ctx-help.lua?command=definecolor: not 
> found

  The first command starts a Web server that you can query with the
second command -- or obviously with a browser, using the URL displayed
(localhost:8088, etc.).  In order for the second command to succeed, you
thus need to keep the first one running.  In addition, you need to
protect the URL in the second command from the shell, like thus for
example:

mtxrun --gethelp \
  
--url='http://localhost:8088/mtx-server-ctx-help.lua?command=definecolor' \
  --command='\definecolor'

  Specifically, it’s the question mark that gives the shell grief.

Best,

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

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


[NTG-context] local command description

2019-04-16 Thread Damien Thiriet
Hi,


Last year after my speech at BachoTeX, Hans told me, that we can get a
local catalogue of ConTeXt macros. So I wrote on a piece of paper two
commands but did not note much more and now I am not sure what do they
stand for

mtxrun --script server --auto

When I run this, I got this on my console
resolvers   | trees | analyzing '/home/dthiriet/texmf'
mtx-server  | running at port: 8088
mtx-server  | document root:
/usr/local/share/texmf-dist/scripts/context/lua
mtx-server  | main index file: unknown
mtx-server  | scripts subpath:
/usr/local/share/texmf-dist/scripts/context/lua
mtx-server  | context services: 
http://localhost:8088/mtx-server-ctx-startup.lua

and then nothing appends for a quite long time (10 minutes). Is it
building a base or something like this? How long should I wait to have
it made?

The second command I note is

mtxrun --gethelp
--url=http://localhost:8088/mtx-server-ctx-help.lua?command=%command%
--command= "\definecolor"

When I run this, I get
sh: http://localhost:8088/mtx-server-ctx-help.lua?command=definecolor: not found

Is it because I did not build the base, or did I miss something (typo or
so on?)
Thanks,


Damien Thiriet
___
If your question is of interest to others as well, please add an 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] change in treating errors

2019-04-16 Thread Alan Braslau
On Tue, 16 Apr 2019 05:51:00 -0400
Mohammad Hossein Bateni  wrote:

> 1) You could correct a spelling mistake on the prompt (as in original TeX),
> although this is rarely done these days.

As you said, doesn't happen.

> 2) You could use the --nonstopmode or --batchmode to not get the prompt,
> and not have the lingering background process (Mac bug?).

No, a consequence of the model. Lingering background processes often occurred 
after interrupting a run using a keyboard interrupt.

> 3) You could see a collection of errors which might help you in fixing them
> altogether without having to run context again and again finding one error
> at a time.  (Same thing with compiling a C/C++ code, and getting a list of
> many errors at once.)

As Hans said, such errors are rarely limited in scope and without side 
consequences, so a waste of time to "collect" multiple errors.

> 4) There are many "errors" and "warnings" that context does not stop on.
> You could perhaps claim moving on from those is also useless :)  Just to
> give some examples: missing modules, fonts, glyphs in fonts, etc.

Garbage in-garbage out.

By the way, I "rarely" make errors, ever, so I'm not really affected by this 
change. :-)

My favorite, however, was trying to launch X(11) from the console (by typing 
one too many X)!

Alan
___
If your question is of interest to others as well, please add an 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] TeXShop Preview and fatal error bug

2019-04-16 Thread Alan Bowen
Using latest TeXShop,  latest ConTeXt beta, and latest Moajve,

run the file

\starttext
\quotation{tufte}
\page
\quotation[tufte}
\stoptext

The PDF preview is grey. Fix the error: \quotation[tufte} —>
\quotation{tufte}

Re-run the file. The PDF preview remains gray. Print the PDF file or view
it in full screen mode, the output is correct.

\page is essential for some reason.

Alan
___
If your question is of interest to others as well, please add an 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-16 Thread Hans Hagen

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  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

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] change in treating errors

2019-04-16 Thread Hans Hagen

On 4/16/2019 11:51 AM, Mohammad Hossein Bateni wrote:
Which one is better is certainly subjective :)  Maybe we could get the 
old TeX-y behavior via a switch or the other way around?


Alan, allow me to disagree with your assertions, though.  Here are a few 
reasons:
1) You could correct a spelling mistake on the prompt (as in original 
TeX), although this is rarely done these days.
2) You could use the --nonstopmode or --batchmode to not get the prompt, 
and not have the lingering background process (Mac bug?).


batchmode doesn't give much on the console, nonstopmode could runs 
forever and generate gigs of log files before you find out


i've run into 'stuck in the background' runs on windows, osx and linux 
... (even in batch mode)


3) You could see a collection of errors which might help you in fixing 
them altogether without having to run context again and again finding 
one error at a time.  (Same thing with compiling a C/C++ code, and 
getting a list of many errors at once.)


how often does that happen ... in most cases an error (say a missing }) 
will have side effects that either obscure other errors or when you hit 
return suggest errors that are not there; sometimes when a } is expected 
you get some confusing mode error that is hard to get out


4) There are many "errors" and "warnings" that context does not stop 
on.  You could perhaps claim moving on from those is also useless :)  
Just to give some examples: missing modules, fonts, glyphs in fonts, etc.


So let me rephrase my original question:  Is this change in behavior 
intended?  If so, is it possible to get the old behavior (specially for 
nonstopmode) via some switch?


it is definitely intended (i just didn't consider it before otherwise it 
would have been there already for a decade) and you can switch it off 
(see previous mail)


(btw this behaviour also permits a rather robust way to make sure no 
invalid pdf file results)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] link

2019-04-16 Thread Hans Hagen

On 4/16/2019 11:55 AM, Mohammad Hossein Bateni wrote:

Thank you for sharing, Hans!  Aditya always has a bunch of cool tricks.

I did not know about the --ansi flag.  It's not reported by "context 
--help".  Are there other "hidden" options? :)


context --directives --trackers

On Sat, Apr 13, 2019 at 11:33 AM Hans Hagen > wrote:


https://adityam.github.io/context-blog/post/setuptex/
-- 


-
                                            Hans Hagen | PRAGMA ADE
                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
         tel: 038 477 53 69 | www.pragma-ade.nl
 | www.pragma-pod.nl

-

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

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

___


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

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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[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] link

2019-04-16 Thread Mohammad Hossein Bateni
Thank you for sharing, Hans!  Aditya always has a bunch of cool tricks.

I did not know about the --ansi flag.  It's not reported by "context
--help".  Are there other "hidden" options? :)

On Sat, Apr 13, 2019 at 11:33 AM Hans Hagen  wrote:

> https://adityam.github.io/context-blog/post/setuptex/
> --
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] change in treating errors

2019-04-16 Thread Mohammad Hossein Bateni
Which one is better is certainly subjective :)  Maybe we could get the old
TeX-y behavior via a switch or the other way around?

Alan, allow me to disagree with your assertions, though.  Here are a few
reasons:
1) You could correct a spelling mistake on the prompt (as in original TeX),
although this is rarely done these days.
2) You could use the --nonstopmode or --batchmode to not get the prompt,
and not have the lingering background process (Mac bug?).
3) You could see a collection of errors which might help you in fixing them
altogether without having to run context again and again finding one error
at a time.  (Same thing with compiling a C/C++ code, and getting a list of
many errors at once.)
4) There are many "errors" and "warnings" that context does not stop on.
You could perhaps claim moving on from those is also useless :)  Just to
give some examples: missing modules, fonts, glyphs in fonts, etc.

So let me rephrase my original question:  Is this change in behavior
intended?  If so, is it possible to get the old behavior (specially for
nonstopmode) via some switch?

Thanks a lot,
~~MHB

On Tue, Apr 16, 2019 at 12:28 AM Alan Braslau 
wrote:

> On Mon, 15 Apr 2019 23:11:17 -0400
> Mohammad Hossein Bateni  wrote:
>
> > Hi,
> >
> > ConTeXt used to recover better from errors.  Consider the following file:
> >
> > =
> > \xyz
> > \abc
> >
> > \starttext
> > HELLO
> > \stoptext
> > =
> >
> > Running  ConTeXt  ver: 2019.03.21 21:39 MKIV beta  fmt: 2019.3.26  int:
> > english/english would catch both "Undefined control sequence" errors
> before
> > exiting with the message "mtx-context | fatal error: return code:
> > 256".  (I either press enter to move to the next error, or I use the
> > --nonstopmode option.)
> >
> > Now with ConTeXt  ver: 2019.04.13 17:01 MKIV beta  fmt: 2019.4.15  int:
> > english/english, even when I do not supply the --nonstopmode option,
> > ConTeXt exits abnormally with the same error message right after
> > discovering the first undefined control sequence.  The old "?" TeX prompt
> > allowing once to fix the misspellings, etc. does not appear at all.
> >
> > Has some defaults changed?  Is it possible to get the old behavior?
> >
> > Thanks,
> > ~MHB
>
> I much prefer the new behavior, for the previous prompt was pretty useless
> and there was little point going on without correcting an earlier error.
> Furthermore, the model would often leave a furtive process running in the
> background following a keyboard interrupt (especially on Mac OSX). The new
> process does not do this.
>
> Alan
>
___
If your question is of interest to others as well, please add an 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] change in treating errors

2019-04-16 Thread Hans Hagen

On 4/16/2019 6:28 AM, Alan Braslau wrote:

On Mon, 15 Apr 2019 23:11:17 -0400
Mohammad Hossein Bateni  wrote:


Hi,

ConTeXt used to recover better from errors.  Consider the following file:

=
\xyz
\abc

\starttext
HELLO
\stoptext
=

Running  ConTeXt  ver: 2019.03.21 21:39 MKIV beta  fmt: 2019.3.26  int:
english/english would catch both "Undefined control sequence" errors before
exiting with the message "mtx-context | fatal error: return code:
256".  (I either press enter to move to the next error, or I use the
--nonstopmode option.)


this 'go to next error' instead of 'fix it now' dates from the time when 
a run could take hours and the console (often) was a paper terminal so 
then it made sense to collect a couple of errors and / or go on


for a large macro package like context where an error nearly always will 
lead to a bad output file it makes not much sense ... fix the error and 
rerun ...



Now with ConTeXt  ver: 2019.04.13 17:01 MKIV beta  fmt: 2019.4.15  int:
english/english, even when I do not supply the --nonstopmode option,
ConTeXt exits abnormally with the same error message right after
discovering the first undefined control sequence.  The old "?" TeX prompt
allowing once to fix the misspellings, etc. does not appear at all.

Has some defaults changed?  Is it possible to get the old behavior?

Thanks,
~MHB


I much prefer the new behavior, for the previous prompt was pretty useless and 
there was little point going on without correcting an earlier error. 
Furthermore, the model would often leave a furtive process running in the 
background following a keyboard interrupt (especially on Mac OSX). The new 
process does not do this.
Indeed and on all platforms tex could end up in a state of 'hanging 
somewhere around in the background' (enforcing some hard manual kill) 
which then also locks files (like the output file).


This is way more robust (and i should have done it sooner). If you don't 
want it you can disable it (but you're on your own then):


\disabledirectives[system.quitonerror]

There are also oler options, like

\enabledirectives[system.showerror]

which could pop up a browser and alike. (I'm actually considering 
dropping the interactive mode completely or maybe replacing it by a lua 
driven one if i need it, which i never do.)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Variable space with hanging description

2019-04-16 Thread Cedric Tissieres
Dear all,

I recently switched to mkiv and experienced some problems with
descriptions when set with alternative=hanging. The horizontal space
between the description title and the rest of the text varies a lot and
looks ugly. When the same code is compiled with mkii, this space is
almost constant (replace alternative=hanging by location=hanging in mkii).

Thanks
Cedric



\definedescription[desc][
  align=hyphenated,alternative=hanging, width=fit,margin=standard]

\starttext
\startdesc{Abcdefgh}
\input knuth
\stopdesc

\startdesc{Abcdefghij}
\input knuth
\stopdesc

\startdesc{Abcdefghijklmn}
\input knuth
\stopdesc

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

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