Re: [NTG-context] Text and tree side by side in a framedtext environment

2019-11-18 Thread Andres Conrado
Or maybe try with "paragraphs":
https://wiki.contextgarden.net/Columns#Paragraphs

-- 
Andrés Conrado Montoya
http://chiquitico.org
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] context command line interface documentation?

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

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

context --silent -nostatistics
>

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


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

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

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

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

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

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

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

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

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

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


Re: [NTG-context] developer not verified error

2019-11-18 Thread Henri Menke
On 11/17/19 5:09 AM, Mojca Miklavec wrote> First I thought that we would have 
troubles with the binaries as soon
> as GateKeeper was introduced (not sure which macOS version started
> causing troubles), but somehow there were none, which at least came as
> a pleasant surprise to me. Maybe this has to do with the fact that
> anything running inside Terminal has somewhat higher permissions than
> regular app bundles. (I know that Audacity doesn't allow recording
> unless you run it from the Terminal, for example.)

In macOS Catalina Apple introduced “notarization”, i.e. anything you
install has to have Apple's blessing, otherwise it will refuse to
install and show you a message that it is malware.  Dick Koch,
maintainer of MacTeX ran into the same problems, as he presented at
TUG2019 and described in the corresponding TUGboat article:

http://tug.org/TUGboat/tb40-2/tb125koch-harden.pdf

> I'm curious if that will work. I don't yet dare to upgrade to Catalina
> (in some ways the OS is worse with each new version).

I don't use macOS myself, but it seems that the quality of the latest
release is absolutely abysmal.

https://tyler.io/broken/

Cheers, Henri
___
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] developer not verified error

2019-11-18 Thread Alan Bowen
This seems to be a problem peculiar to Catalina (macOS 10.15.1). There is a
fix, as Otared and Glen have indicated.

go to Apple menu -> Preferences -> Security & Privacy
on the Security & Privacy, login, choose the tab General
there choose, towards the bottom of that pane, under « Allow apps
downloaded from: »
   choose the radio button App Store and identified
developers
   click the button «allow anyway»

The macOS still chokes when you first try to update lmtx , but this time it
presents the option «Open». Select that and you are good to go.

So, thanks, guys.

And Mojca, yes, it is very confusing. Still, that seems to be all that one
has to do make the download. So perhaps there is no need for changes at
your end.

Cheers, Alan


On Sun, Nov 17, 2019 at 11:30 AM Keith McKay  wrote:

> This is the standard way to install "apps" on a mac, which have an unknown
> developer, to Apple anyway. It is a bit annoying when it happens especially
> when one has forgotten that you have to go through the Preferences dialog
> to get it to run. In my case it's an age thing.[image: ]
>
> Best Wishes
>
> Keith McKay
> On 16/11/2019 22:27, Glen Helman wrote:
>
> There seems to be a way around this built into Catalina, however awkward
> it may be.
>
> I tried to install lmtx on a computer running Catalina that didn’t have an
> installation and received a similar error. (There seems to be a quarantine
> applying to the text of the script and not merely the file because I tried
> creating a new document with the same text and received the same response,
> and that response referred to the download of the original file.)
>
> I did find that the “general” tab under “security & privacy” in the system
> preferences had, in addition to the usual two choices, a reference to the
> downloaded script with a button reading “allow anyway” (or something to
> that effect). When I tried to run the script again after clicking that
> button, the “developer cannot  be verified” dialogue included “open” as a
> choice; and, when I clicked that, the script ran successfully and the
> installation was usable.
>
> I then tried the install script on another computer running Cataline where
> I had installed lmtx last spring. I ran into the “developer cannot be
> verified” response again, but the same workaround allowed the script to
> run, and the installation was updated.
>
> Glen Helman
>
> On Nov 15, 2019, at 4:36 PM, Alan Bowen  wrote:
>
> Though I was able to download the latest ConTeXt beta without any
> problems, my attempt to update my ConText-LMTX installation was blocked.
> The error message was
>
> *“mtxrun” cannot be opened because the developer cannot be verified*
> macOS cannot verify that this app is free from malware.
> Safari downloaded this file on April 29, 2019.
>
>  I am not sure why this is happening and wonder if it would OK to copy
> mxtrun from my ConTeXt installation and replace the version in my
> ConTeXt-LMTX installation with it.
>
> 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
>
> ___
>
>
>
> ___
> 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
>
> ___
>
___
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] Widgets: Any good examples for developing JS-enabled PDFs that calculate?

2019-11-18 Thread Henning Hraban Ramm
Hi,
I didn’t check your example, but I remember that JScode did only work if 
there’s also a JSpreamble.
Also the "used now" keyword (see Hans’ message) is essential.

HTH. Sorry, no time for further investigation.

Hraban

> Am 2019-11-17 um 21:13 schrieb Paul Mazaitis :
> 
> 
> Hi everyone,
> 
> First: apologies for the long email; this got a little complicated.
> 
> Summary: there may be a bug in setting up calculate field for widgets?
> 
> Parts:
> 
> - calculator.tex
> - A M(N)WE
> - The MWE Only Sort of Works
> 
> # calculator.tex
> 
> On 13 Nov 2019, at 10:26, Pablo Rodriguez wrote:
> 
>> Hi Paul,
> 
>> I wonder whether
>> tex/texmf-context/doc/context/examples/calculator/calculator.tex from
>> the ConTeXt Suite might be what you look for.
>> 
>> Just in case it helps,
> 
> It does (and is quite something!); it's not quite what I need, though. I'd 
> like to take advantage of the internal _calculate_ event when a field updates 
> - the calculator.tex PDF appears to be entirely programmatically event driven?
> 
> (Which could certainly work for my application, but I want to try to keep 
> this as simple for the user as possible.)
> 
>> Pablo
> 
> # A M(N)WE
> 
> Here's a Minimal Working Example, with some caveats:
> 
> --- begin MWE ---
> 
> \usemodule[fields]
> 
> \starttext
> 
> \setupinteraction [state=start]
>   
> \startJScode{tallyUp}
>  var a_fld = this.getField("A");
>  var b_fld = this.getField("B");
>  event.value = a_fld.value + b_fld.value;
> \stopJScode
> 
> \setupfield[numField][reset,horizontal]
>[height=2pc,rulethickness=1pt,framecolor=lightgrey]
> 
> \setupfield[totalField][reset,horizontal]
>[
>height=2pc,
>rulethickness=1pt,
>framecolor=lightgrey,
>option=readonly,
>calculate=JS(tallyUp),
>]
> 
> \definefield[A][line][numField][]
> \definefield[B][line][numField][]
> 
> \definefield[Total][line][totalField][]
> 
> A: \field[A]
> 
> B: \field[B]
> 
> \blank[big]
> 
> Total: \field[Total]
> 
> \stoptext
> 
> ---  end MWE  ---

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

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


Re: [NTG-context] Text and tree side by side in a framedtext environment

2019-11-18 Thread Henning Hraban Ramm
Salut,

do maybe combinations fit your needs?

https://wiki.contextgarden.net/Combinations

Best, Hraban

> Am 2019-11-17 um 11:01 schrieb Fabrice Couvreur :
> 
> Hello,
> I am looking but without success !
> I tried \ starthanging [location = right] {tree} \ stophanging but that does 
> not work either.
> Fabrice
> 
> Le sam. 16 nov. 2019 à 12:44, Fabrice Couvreur  
> a écrit :
> Hello,
> I want to use a text frame to put text and a probability tree side by side, 
> but it does not work.
> Thanks for your help.
> Fabrice

___
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] Widgets: Any good examples for developing JS-enabled PDFs that calculate?

2019-11-18 Thread Hans Hagen

On 11/17/2019 9:13 PM, Paul Mazaitis wrote:


Hi everyone,

First: apologies for the long email; this got a little complicated.

Summary: there may be a bug in setting up calculate field for widgets?


it's more that javascript in pdf is kind of unreliable and can interfere 
in all kind of ways with settings in the viewer


so, what you need to do it

- play safe (only use actions that don't relate to something clever in 
the viewer, and calculat eis one of them)

- be redundant (hook into several actions)
- disable the spell checker
- enable javascript
- disable some security stuff
- use the debugger (which can be erratic but at least you can see 
something; in my older acrobat doesn't seem to work with field related 
scripts)

- put code in functions (easier to debug)

and

- cross your fingers

Here's something to play with ... note the Number conversion!

\usemodule[fields]

\starttext

\setupinteraction [state=start]

\startJSpreamble {whatever} used now
function recalculate() {
var a_fld = this.getField("A");
var b_fld = this.getField("B");
var t_fld = this.getField("T");
var a_val = Number(a_fld.value);
var b_val = Number(b_fld.value);
var t_val = a_val + b_val;
t_fld.value = String(t_val);
console.clear ;
console.println("A: "+a_val) ;
console.println("B: "+b_val) ;
console.println("T: "+t_val) ;
console.println("?: "+t_fld.value) ;
this.dirty = true;
}
\stopJSpreamble

\setupfield
  [numField]
  [reset,horizontal]
  [height=2pc,
   rulethickness=1pt,
   afterkey=JS(recalculate{}),
   focusout=JS(recalculate{}),
   framecolor=lightgrey]

\setupfield
  [totalField]
  [reset,horizontal]
  [height=2pc,
   rulethickness=1pt,
   option=readonly,
   framecolor=lightgrey]

\definefield[A][line][numField]  [0]
\definefield[B][line][numField]  [0]
\definefield[T][line][totalField][0]

A: \field[A]\par
B: \field[B]\par
T: \field[T]\par

\stoptext



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