Re: [NTG-context] Invoking ConTeXt from inside php web appliction

2016-07-09 Thread Pavneet Arora
I believe that public in this case refers to public assets such as CSS, js, 
etc., where one puts custom files rather than publicly accessible, e.g., 
wp-uploads for WordPress.  In the case of most frameworks, URL access is 
limited to specified routes only which point to controller methods.  ConTeXt, 
when installed in this manner,  can only be run as www-data:www-data, i.e., by 
httpd.

I wasn’t able to get it work using any of the other suggestions.  Is there 
another template you can suggest?

Pavneet Arora
m: +1 (647) 406-6843
e: pavneet_ar...@waroc.com

From: Henning Hraban Ramm___
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] Issue with tex.hangindent with latest beta 2016-07-08 17:24

2016-07-09 Thread josephcanedo
Dear list,


In some lua code I have in my project, I’ve started getting this error when 
upgrading to latest beta (used to work fine for lots of versions for months) :


attempt to perform arithmetic on field 'hangindent' (a nil value)


when using expression: tex.hangindent in lua code.


I am quite sure hangindent is not zero for this paragraph (on purpose). Is 
there a change in way to access hangindent value for a paragraph ?


Many thanks


Best regards


Joseph Canedo___
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] Invoking ConTeXt from inside php web appliction

2016-07-09 Thread Henning Hraban Ramm
Am 2016-07-09 um 17:45 schrieb Pavneet Arora :

> Sorry that this has taken me so long.  The report card application has
> been deployed, and although I am still going through and resolving minor
> bugs, it is very much in use (350 students leaving on Tu who already have
> their foundation work marked and commented within the system; output via
> ConTeXt).

Nice to hear about your success!
In my case, my customer, a publisher of several special interest magazines, 
uploads lists of customers and their ad bookings into my web app and gets 
nicely TeXed voucher shipping documents.

> Anyway, I have updated the Wiki, but am unsure if I missed anything. So
> can everyone have a look and let me know:
> http://wiki.contextgarden.net/ConTeXt_Standalone#Apache_webserver_installation

I’m quite sure it’s a bad idea to install ConTeXt (or anything like that) in a 
public, i.e. web-accessible, directory!
Even if I can’t imagine an attack via accessing files from the ConTeXt tree, 
experienced attackers might.
I don’t use PHP any more, but I’m quite sure there’s a better way.

I run ConTeXt from a Django (Python) web app behind Nginx, and there only 
static files (i.e. images, CSS etc.) are directly accessible, and I can call a 
system-wide installed ConTeXt owned by root (i.e. nobody else can change it).

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

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

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

[NTG-context] bug in image scaling

2016-07-09 Thread Pablo Rodriguez
Dear list,

I have the following sample:

\setupexternalfigure[location=default]
\starttext
\insertpages[cow.pdf][width=\textwidth]
\stoptext

Using latest beta from 2016.07.08 17:19, scaling doesn’t work.

Am I missing something or have I hit a bug?

Just in case it might me causing the issue, I’m using LuaTeX-0.95 for
Linux 32bit.

Could anyone check this issue?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] tug.org/interview: Pavneet Arora

2016-07-09 Thread Pavneet Arora
Thanks for the kind words, Luigi.  Glad you enjoyed the interview.  It is
a bit unsettling to find that you have revealed so much about yourself ;).
 Dave is an excellent interviewer.

Regards.

> Nice interview especially (at least for me) the answer to the question

-- 
Pavneet Arora   m: 647.406.6843
Waroc Informatikw: 416.937.9276




___
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] Invoking ConTeXt from inside php web appliction

2016-07-09 Thread Pavneet Arora
Dear Hraban,

Sorry that this has taken me so long.  The report card application has
been deployed, and although I am still going through and resolving minor
bugs, it is very much in use (350 students leaving on Tu who already have
their foundation work marked and commented within the system; output via
ConTeXt).

Anyway, I have updated the Wiki, but am unsure if I missed anything. So
can everyone have a look and let me know:

http://wiki.contextgarden.net/ConTeXt_Standalone#Apache_webserver_installation

Regards.

> Henning Hraban Ramm texml at fiee.net
> Fri Jun 17 20:49:11 CEST 2016
>
>  Please document this in the wiki (I had similar problems, should have
done it at that time…)


-- 
Pavneet Arora   m: 647.406.6843
Waroc Informatikw: 416.937.9276




___
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] \defineparagraphs

2016-07-09 Thread Wolfgang Schuster

John Kitzmiller 
9. Juli 2016 um 14:48


Thank you Wolfgang. I had to change .5\localhsize to .5\textwidth for 
it to work here (and scale down the cow to make it fit in the barn.)


I am looking into combinations to center the graphic in the second x 
box, and make a \setupcombination[mycombination] similar to 
\defineparagraph[Mypar] to reduce typing.

\definecombination[john][nx=2,ny=1,width=.5\textwidth]

\startcombination[john]
{...}{}
{...}{}
\stopcombination

\tbox is new to me. Is that a ConTeXt macro of TEX \vtop{\hbox}?
The command changes the vertical position of the content (by putting it 
into an \hbox and changing the height/depth values).


\setupblackrules[width=2cm,height=2cm]

\setuplayout[grid=yes]\showgrid

\starttext
XXX  {\blackrule}
XXX \tbox{\blackrule}
XXX \bbox{\blackrule}
XXX
\stoptext

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

Re: [NTG-context] \defineparagraphs

2016-07-09 Thread John Kitzmiller

> On 8Jul, 2016, at 09:20, Wolfgang Schuster  
> wrote:
> 
>> The code below works with context2016.02.15, but fails with 
>> context2016.05.19.
>> 
>> Itemize within the defined paragraph (Mypar) no longer puts the thinrule in 
>> the margin (see the third question.) The \ansblank command seems to the 
>> second part of Mypar is 
>> the margin? Pdf of the success and fail attached.
>> 
>> Thanks! John
>> 
>> \startMypar
>> \item Third question refers to graphic at right. 
>> \Mypar
>> 
>> \stopMypar
> \item
> \startcombination[nx=2,ny=1]
> 
> {\framed[frame=off,align=flushleft,location=top,width=.5\localhsize]{Third 
> question refers to graphic at right.}}{}
> {\tbox{\externalfigure[cow]}}{}
> \stopcombination

Thank you Wolfgang. I had to change .5\localhsize to .5\textwidth for it to 
work here (and scale down the cow to make it fit in the barn.)

I am looking into combinations to center the graphic in the second x box, and 
make a \setupcombination[mycombination] similar to \defineparagraph[Mypar] to 
reduce typing.

\tbox is new to me. Is that a ConTeXt macro of TEX \vtop{\hbox}?

Thanks again, John___
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] \currentheadnumber does not work

2016-07-09 Thread Wolfgang Schuster

Fabrice Couvreur 
9. Juli 2016 um 12:17
Hi Wolfgang,

In the first example, so I do not need the command \currentheadnumber 
but just do:


\setuphead
   [chapter]
   [command=\HeadTitle,
headstyle=\ss,
numbercommand=\Headed]

ConTeXt passes the section number to the argument of the \Headed command.
But in this second example, using the command 
\determineheadnumber[chapter], the chapter number is always 0
You need \determineheadnumber[...] each time when the value for 
\currentheadnumber should change.

\setuppagenumbering[location=footer]

\startusableMPgraphic{NumberHead}
  picture r ;
  r := image ( graphictext
\MPstring{chapter}
scaled 4pt
withfillcolor \MPcolor{lightgray}
withpen pencircle scaled 1pt ; ) ;
  draw r ;
\stopusableMPgraphic

\defineoverlay[NumberHead][\uniqueMPgraphic{NumberHead}]

\def\processMPheadnumber#1%
  {\setMPtext{chapter}{\bf#1}
   \useMPgraphic{NumberHead}}

\setuphead
   [chapter]
   [command=\HeadTitle,
headstyle=\ss,
numbercommand=\processMPheadnumber{\currentheadnumber}]

The following works here.

\startusableMPgraphic{NumberHead}
  picture r ;
  r := image ( graphictext
"\bf\namedheadnumber{chapter}"
scaled 4pt
withfillcolor \MPcolor{lightgray}
withpen pencircle scaled 1pt ; ) ;
  draw r ;
\stopusableMPgraphic

\def\processMPheadnumber#1%
  {\useMPgraphic{NumberHead}}

\setuphead
   [chapter]
   [command=\HeadTitle,
headstyle=\ss,
numbercommand=\processMPheadnumber]

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

Re: [NTG-context] \currentheadnumber does not work

2016-07-09 Thread Fabrice Couvreur
Hi Wolfgang,

In the first example, so I do not need the command  \currentheadnumber
 but just
do :

\setuphead
   [chapter]
   [command=\HeadTitle,
headstyle=\ss,
numbercommand=\Headed]


But in this second example, using the command
\determineheadnumber[chapter], the
chapter number is always 0

\setuppagenumbering[location=footer]

\startusableMPgraphic{NumberHead}
  picture r ;
  r := image ( graphictext
\MPstring{chapter}
scaled 4pt
withfillcolor \MPcolor{lightgray}
withpen pencircle scaled 1pt ; ) ;
  draw r ;
\stopusableMPgraphic

\defineoverlay[NumberHead][\uniqueMPgraphic{NumberHead}]

\def\processMPheadnumber#1%
  {\setMPtext{chapter}{\bf#1}
   \useMPgraphic{NumberHead}}


\unexpanded\def\HeadTitle#1#2%
  {\framed
[frame=off,
bottomframe=on,
width=broad,
align={broad,nothyphenated,left}]
{#1\blank[nowhite]#2}}

\determineheadnumber[chapter]

\setuphead
   [chapter]
   [command=\HeadTitle,
headstyle=\ss,
numbercommand=\processMPheadnumber{\currentheadnumber}]

\starttext

\startchapter
  [title={Fist chapter}]

\input knuth

\stopchapter

\startchapter
  [title={Second chapter}]

\input knuth

\stopchapter

\startchapter
  [title={Third chapter}]

\input knuth

\stopchapter

\stoptext

2016-07-09 11:32 GMT+02:00 Wolfgang Schuster :

> Fabrice Couvreur 
> 9. Juli 2016 um 11:12
> Hello,
> In this command, I have two problems :
>
> - \currentheadnumber does not work
>
> You need
>
> \determineheadnumber[chapter]
>
> before you can access the value with
>
> \currentheadnumber
>
> - the chapter number appears in black
>
> You need this setup:
>
> \setuphead
>[chapter]
>[numbercommand=\Headed]
>
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] ppchTeX

2016-07-09 Thread Henri Menke
Dear Alan,

thanks a lot for fixed code.  Could you point out where to find the
updated manual for MkIV?

Cheers,
Henri

On 07/07/2016 08:26 PM, Alan BRASLAU wrote:
> On Wed, 6 Jul 2016 18:23:57 +0200
> Henri Menke  wrote:
> 
>> Dear list,
>>
>> I just wanted to check whether chemical structures typeset in ConTeXt
>> can be exported as XML.  Therefore I wanted to setup a simple example
>> with ppchTeX.  I copied example 3.1 from the manual [1]
>>
>>> \usemodule[chemic]
>>> \starttext
>>>
>>> \startchemical[height=4500,bottom=2500]
>>>   \bottext{$\beta$-D-Fructopyranose}
>>>   \chemical[SIX,FRONT,BB1236,+SB4,-SB5,Z5][O]
>>>   \chemical[SIX,FRONT,+R12346,+RZ12346][\SR{HO},H,H,H,OH]
>>>   \chemical[SIX,FRONT,-R12346,-RZ12346][H,OH,\SR{HO},H,CH_2OH]
>>> \stopchemical
>>>
>>> \stoptext  
>>
>> Unfortunately, typesetting with MkIV distributed with TL 2016 produces
>> something really weird (see attached).
>>
>> Is the module `chemic` compatible with MkIV or am I doing something
>> wrong?
>>
>> Cheers,
>> Henri
>>
>> [1] http://www.pragma-ade.nl/general/manuals/mp-ch-en.pdf
> 
> 
> \usemodule[chemic] is MKII. It has been replace with core MKIV commands.
> 
> The syntax has been somewhat rationalized and many bugs corrected.
> 
> The example can be reproduced as follows:
> 
> 
> \starttext
> 
> \startchemical [height=4500,bottom=2500]
>   \bottext{$\beta$-D-Fructopyranose}
>   \chemical[SIXFRONT,BB123,B4,+SB5,-SB6,Z6] [O]
>   \chemical[+LR12345,LRZ12345] [OH,\SR{HO},H,H,H]
>   \chemical[+RR12345,RRZ12345] [CH_2OH,H,\SL{OH},\SR{HO},H]
> \stopchemical
> 
> \stoptext 
> 
> 
> 
> Unfortunately, the revised manual still has some errors that I need to
> fix...
> 
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \currentheadnumber does not work

2016-07-09 Thread Wolfgang Schuster

Fabrice Couvreur 
9. Juli 2016 um 11:12
Hello,
In this command, I have two problems:

- \currentheadnumber does not work

You need

\determineheadnumber[chapter]

before you can access the value with

\currentheadnumber

- the chapter number appears in black

You need this setup:

\setuphead
   [chapter]
   [numbercommand=\Headed]

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

[NTG-context] \currentheadnumber does not work

2016-07-09 Thread Fabrice Couvreur
Hello,
In this command, I have two problems :

- \currentheadnumber does not work

- the chapter number appears in black

thank you,
Fabrice

\setuppagenumbering[location=footer]

\startuseMPgraphic{head}
  pickup pencircle scaled 1mm ;
  drawoptions(withcolor lightgray) ;
  fill unitsquare scaled 1cm smoothed 1.2 ;
\stopuseMPgraphic

\defineoverlay[head][\uniqueMPgraphic{head}]

\def\Headed#1%
  {\framed
 [background=head,frame=off,offset=overlay]
 {\color[white]{#1}}}


\unexpanded\def\HeadTitle#1#2%
  {\framed
[frame=off,
bottomframe=on,
width=broad,
align={broad,nothyphenated,left}]
{#1\blank[white]#2}}

\setuphead
   [chapter]
   [command=\HeadTitle,
headstyle=\ss,
numbercommand=\Headed{\currentheadnumber}]

\starttext

\startchapter
  [title={Fist chapter}]

\input knuth

\stopchapter

\startchapter
  [title={Second chapter}]

\input knuth

\stopchapter

\startchapter
  [title={Third chapter}]

\input knuth

\stopchapter

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

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