[NTG-context] Overlays and layers documentation?

2016-11-21 Thread Jaroslav Hajtmar
Hello ConTeXist.
Is there any documentation or manual, where I could read some details about 
using of overlays and layers in ConTeXt? I see on the Internet and wiki 
ConTeXtgarden some examples, but I would be interested in details relating to 
the default layers and their names, their order. Are there any restrictions 
(number, name, etc.)

Thanx
Jaroslav Hajtmar
___
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] Asymptote or Metapost and ConTeXt parameters.

2016-12-18 Thread Jaroslav Hajtmar
Hello ConTeXtist,
I saw the opportunity to insert an Asymptote picture into Context source code 
(due filter).
For example here: https://mailman.ntg.nl/pipermail/ntg-context/2015/080581.html

Is there a way to pass the ConTeXt parameter which influenced the creation of 
the Asymptote image? My point eg. the ability to define macros, which gave its 
parameters to Asymptote procedure or function and depending on these 
parameters, the image created by Asymptote looked differently.

Before starting work on an illustrative example I am asking, whether it makes 
sense to deal with such a thing ... I suppose the impossibility of combining 
asymptote code and such Lua code (or not?).

There is a similar possibility, at least in Metapost? For simpler pictures it 
would probably suffice 

Thanx
Jaroslav Hajtmar

___
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] Asymptote or Metapost and ConTeXt parameters.

2016-12-20 Thread Jaroslav Hajtmar
Thanx Aditya 
very much for your Metapost example. This I certainly sufficient for the 
production of simple images for my ideas. I attach source code, which outlines 
how I imagined inserting Asymptote images into Context. In the lower part of 
commented code is fully functional, compiled ConTEXt of TeX Live 2016 (included 
in the package is also Asymptote). My idea is that Asymptote code is part of my 
ConTeXt macro and parameters of macro are passed into Asymptote. My example 
does not work because Asymptote is probably not enough linked with Context. I 
am very grateful that You would to deal with my problem. 

I am not sure whether it will do Asymptote example as in the case Metapost. 
That's why I use  filter in my own example (taken from 
https://mailman.ntg.nl/pipermail/ntg-context/2015/080581.html ).


Thank you once again.

Jaroslav Hajtmar



\usemodule[filter]

\defineexternalfilter
   [ASY]
   [
 filter={asy -tex "context" -outformat pdf
 -outname \externalfilteroutputfile},
 output=\externalfilterbasefile.pdf,
 cache=yes,
 readcommand=\ReadImage,
   ]

\define[1]\ReadImage{\externalfigure[#1]}

\define[1]\mycircle{
\startASY
import graph;
draw(Circle((0,0),#1));
\stopASY
}

\starttext
\mycircle{20}
\mycircle{30}
\mycircle{40}
\stoptext


%% simple asymptote example (compiled ConTeXt (LuaTeX) from TeX Live 2016)
%
%\usemodule[filter]
%
%\defineexternalfilter
%   [ASY]
%   [
% filter={asy -tex "context" -outformat pdf
% -outname \externalfilteroutputfile},
% output=\externalfilterbasefile.pdf,
% cache=yes,
% readcommand=\ReadImage,
%   ]
%
%\define[1]\ReadImage{\externalfigure[#1]}
%
%\starttext
%\startASY
%import graph;
%draw(Circle((0,0),20));
%\stopASY
%\stoptext


Dne 19.12.16 17:19, ntg-context za uživatele Aditya Mahajan 
 napsal(a):

On Mon, 19 Dec 2016, Jaroslav Hajtmar wrote:

> There is a similar possibility, at least in Metapost? For simpler 
> pictures it would probably suffice 

The ability to pass parameters to metapost has been around since the 
beginning. See the metafun manual for details (search for MPvar). For 
simple images, you can also do:

\define[1]\Circle{\startMPcode draw fullcircle scaled #1*cm; \stopMPcode}

\Circle{1} \Circle{2} \Circle{3}

> Is there a way to pass the ConTeXt parameter which influenced the 
> creation of the Asymptote image? My point eg. the ability to define 
> macros, which gave its parameters to Asymptote procedure or function and 
> depending on these parameters, the image created by Asymptote looked 
> differently.

In principle, something similar to \MPvar can work for asymptote as well 
(or one could do parse the content in Lua rather than expand variables in 
TeX).

> Before starting work on an illustrative example I am asking, whether it 
> makes sense to deal with such a thing ... I suppose the impossibility of 
> combining asymptote code and such Lua code (or not?).

ConTeXt and Metapost are very well integrated, even in MkII. The same 
ideas could work with other graphic backends as well (Asymptote, tikz, and 
others). But it does require a good knowledge of the graphics package.

I am willing to write the code at the context end, if someone who knows 
asymptote can tell me what needs to be done at the asymptote end.

Aditya

___
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] Asymptote or Metapost and ConTeXt parameters.

2016-12-23 Thread Jaroslav Hajtmar
Hello Adytia.
Thanks for sending Your code. It seems that it works with Asymptote. 
Unfortunately, when I am trying to multiple call a macro then I get fatal 
error, and then compile collapse. I do not know what it could be. Is it 
possible that my code is wrong. But it is possible that there is a stack 
overflow etc. It would be a need to look at why the fatal error occurs - It 
probably can evaluate Hans. Thanks again for your support. Below is my code. If 
removed commentary characters occurs advised error.

Jaroslav Hajtmar


\usemodule[filter]

\defineexternalfilter
   [ASY]
   [
 filtercommand={asy -tex context \externalfilterinputfile\space -o 
\externalfilteroutputfile}, output=\externalfilterbasefile.pdf,
 purge=no, 
 cache=yes,
 readcommand=\ReadImage,
   ]

\define[1]\ReadImage{\externalfigure[#1]}

\define[1]\mycircle{
#1 - XXX
\setbuffer[ASY]
import graph;
draw(Circle((0,0),#1));
\endbuffer
\processASYbuffer[ASY]
}

\starttext
AAA
\startASY
import graph;
draw((0,0)--(100,100));
\stopASY

BBB
\mycircle{100}


%CCC
%\mycircle{50}

%DDD
%\mycircle{200}

\stoptext





Dne 22.12.16 5:49, ntg-context za uživatele Aditya Mahajan 
 napsal(a):

On Tue, 20 Dec 2016, Jaroslav Hajtmar wrote:

> very much for your Metapost example. This I certainly sufficient for the 
> production of simple images for my ideas.

> \define[1]\mycircle{
>   \startASY
>   import graph;
>   draw(Circle((0,0),#1));
>   \stopASY
> }
>
> \starttext
> \mycircle{20}
> \mycircle{30}
> \mycircle{40}
> \stoptext

It is already feasible to define something this simple using the filter 
module. I don't have asymptote installed on the machine that I am 
currently working on, but here is an example that uses pandoc.

\usemodule[filter]

\defineexternalfilter
 [MARKDOWN]
 [
   filtercommand={pandoc -f markdown -t context 
\externalfilterinputfile\space -o \externalfilteroutputfile},
   cache=yes,
   purge=no, % Just for testing. May be removed.
 ]

\define[1]\TEST
 {\setbuffer[MARKDOWN]This is #1\endbuffer
  \processMARKDOWNbuffer[MARKDOWN]}

\starttext
\startMARKDOWN
   This is **one**
\stopMARKDOWN

\TEST{**ONE**}

\TEST{_TWO_}
\stoptext

With this method, the results are not cached. Let me know if this works 
for your needs.

Aditya

___
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] Asymptote or Metapost and ConTeXt parameters.

2016-12-23 Thread Jaroslav Hajtmar
Hello Adytia.
It seems now, that everything at this time works as intended. Many thanks for 
your support. Below is a minimal example. Attached is a PDF sample result.
I tried also to experiment with the choice "object = no", as suggested by Hans, 
but without success. I would asking  if you make any changes in filter module?
Or have I misunderstood Your opinion? 
Thank you once again
Jaroslav Hajtmar


Here is minimal example:

\usemodule[filter]

\unprotect
\appendtoks
   \setuevalue{set\currentexternalfilter 
buffer}{\externalfilter@set[\currentexternalfilter]}%
\to \everydefineexternalfilter

\unexpanded\def\externalfilter@set
   {\dodoubleargument\externalfiter@set_indeed}

\starttexdefinition externalfiter@set_indeed [#1][#2]#3
% #1 = filter
% #2 = options

\begingroup
\edef\currentexternalfilter{#1}

\setupexternalfilter[#1][\c!name=,#2]

\externalfilter@set_filenames
\setbuffer[\externalfilter@buffer_name]#3\endbuffer

\externalfilter@process_filter
  \stoptexdefinition
\protect

\defineexternalfilter
   [ASY]
   [
 filtercommand={asy -tex context \externalfilterinputfile\space -o 
\externalfilteroutputfile}, output=\externalfilterbasefile.pdf,
 purge=no, 
 cache=yes,
 readcommand=\ReadImage,
   ]

\define[1]\ReadImage{\externalfigure[#1]}

\define[1]\mycircle{
\setASYbuffer{
import graph;
draw(Circle((0,0),#1));
}}


\starttext

\startASY
 import graph;
 draw((0,0)--(100,100));
\stopASY

\mycircle{10}

\mycircle{20}

\mycircle{30}

\stoptext







Dne 23.12.16 20:22, ntg-context za uživatele Aditya Mahajan 
 napsal(a):

On Fri, 23 Dec 2016, Jaroslav Hajtmar wrote:

> Thanks for sending Your code. It seems that it works with Asymptote. 
> Unfortunately, when I am trying to multiple call a macro then I get 
> fatal error, and then compile collapse. I do not know what it could be.

When called for the first time, the code generates test-ASY.pdf file and 
includes it. After the second call, a new test-ASY.pdf is generated. 
ConTeXt generates an error because the name of the files is the same, but 
the content is not.

There should be an option for \externalfigure to disable this check, but I 
couldn't find it. Here is an alternative approach, that changes the name 
of the PDF.

\usemodule[filter]

\unprotect
\appendtoks
   \setuevalue{set\currentexternalfilter 
buffer}{\externalfilter@set[\currentexternalfilter]}%
\to \everydefineexternalfilter

\unexpanded\def\externalfilter@set
   {\dodoubleargument\externalfiter@set_indeed}

\starttexdefinition externalfiter@set_indeed [#1][#2]#3
% #1 = filter
% #2 = options

\begingroup
\edef\currentexternalfilter{#1}

\setupexternalfilter[#1][\c!name=,#2]

\externalfilter@set_filenames
\setbuffer[\externalfilter@buffer_name]#3\endbuffer

\externalfilter@process_filter
  \stoptexdefinition
\protect

\defineexternalfilter
 [MARKDOWN]
 [
   filtercommand={pandoc -f markdown -t context 
\externalfilterinputfile\space -o \externalfilteroutputfile},
   cache=yes,
   purge=no,
 ]

\define[1]\NEW
 {\setMARKDOWNbuffer{This is #1}}

\traceexternalfilters

\starttext
\startMARKDOWN
   This is **one**
\stopMARKDOWN

\NEW{**ONE**}

\NEW{_TWO_}
\stoptext

Note that this has the same limitation as using \type{...}. The contents of
\NEW{...} must have matched braces. If this works, I can include the code in
t-filter (mkiv only, as I no longer want to maintain the mkii branch).

Aditya

___
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

___



AsymptoteCodeInConTeXt03a-Adytia.pdf
Description: AsymptoteCodeInConTeXt03a-Adytia.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] generate multiple files from one source

2017-02-19 Thread Jaroslav Hajtmar
Hello Pablo,
I am using a new calling of ConTeXt ie. compile new source code from the main 
source code. It is possible due \executesystemcommand macro. Necessary 
parameters You can pass to new compiling source. For example:

\executesystemcommand{context --result invoice-\cA.pdf --arguments = "cA = \cA" 
servingfile.tex}.  

This possibility create a particular PDF file for recipient \cA. 

PS 2Pablo only: This option is possible with handleCSV module. The possibility 
of using handleCSV module I will publish to GitLab repository as soon as 
possible - today or tomorrow. I was very busy this weekend.

Jaroslav Hajtmar







Dne 18.02.17 23:27, ntg-context za uživatele Pablo Rodriguez 
 napsal(a):

Dear list,

I have the following sample:

\setuppapersize[A8, landscape]
\starttext
\dorecurse{10}{
\startpagemakeup[align=center]
This is invoice number \recurselevel.

Customer name from CSV file.

Other data from the same CSV file.
\stoppagemakeup}
\stoptext

How can I get new PDF documents with a one invoice per document instead
of new page breaks?

I need PDF documents with only one invoice (but with the correct number)
and also a single PDF document with all invoices.

Of course, my real documents are more complex. What I need is a file
breaking command. Appending -1, -2, -3... -n to the PDF file name would
be fine for me.

How could I achieve this in the ConTeXt compilation?

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://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] coma in an argument

2017-02-21 Thread Jaroslav Hajtmar
Hello Pablo.
Of course – it was my wrong example see:
\executesystemcommand{context --result invoice-\cA.pdf --arguments = "cA 
={\cA}" servingfile.tex}. Braces are of course important.
Thanx to Hans for his correction.

Jaroslav Hajtmar





Dne 21.02.17 19:15, ntg-context za uživatele Pablo Rodriguez 
 napsal(a):

On 02/21/2017 07:09 PM, Hans Hagen wrote:
> On 2/21/2017 6:57 PM, Pablo Rodriguez wrote:
>>  contextjit --arguments="cA=a, b" a.tex
> 
>   contextjit --arguments="cA={a, b}" a.tex

Hans,

many thanks for the fast reply and your help.

The answer is simple, but my mind seems to be simpler right now ;-).

Pablo
-- 
http://www.ousia.tk

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

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

___

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

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

[NTG-context] \savebuffer to merge of save contents

2017-03-21 Thread Jaroslav Hajtmar
Hello ConTeXist.

Is there any possibility or modifications that will allow to savebuffer to 
work, so that will add (merge) the buffer contents into a file (Which content 
of the previous buffer)?

For inspiration, it is possible use a solution that wrote before year ago 
Wolfgang for Lukas Prochazka – ie 
https://mailman.ntg.nl/pipermail/ntg-context/2016/087657.html


Thanx
Jaroslav Hajtmar


Here is source code of Wolfgangs solution:


\unexpanded\def\startcontentexport
   {\dosingleempty\dostartcontentexport}

\def\dostartcontentexport[#1]%
   {\iffirstargument
  \edef\contentexportfile{#1}%
\else
  \let\contentexportfile\empty
\fi
\grabbufferdata[contentexport][startcontentexport][stopcontentexport]}

\def\stopcontentexport

{\doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}%
\getbufferdata[contentexport]}

\starttext

A

\startcontentexport[Test.mkiv]
   Basic content …
   \startitemize
 \item Item
   \stopitemize
\stopcontentexport

B

\startcontentexport[Test.mkiv]
   Add this text into Test.mkiv file
   \startitemize
 \item Item
   \stopitemize
\stopcontentexport

C

\startcontentexport[Test.mkiv]
  And this text add into Test.mkiv file too.
   \startitemize
 \item Item
   \stopitemize
\stopcontentexport

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

[NTG-context] Problem with macro with optional parameter

2017-06-27 Thread Jaroslav Hajtmar
Hello ConTeXist.
I'm not able to solve a macros problem with one optional argument. I need the 
macro to return a value that can be used as a dorecurse loop parameter.
Is there possibility create macro with optional parameter and parameter is 
concurrently inside in braces? (in nonsquare brackets)?
I've tried to experiment with examples from the wiki, but I'm not clear about 
it.

Thanx for help.
Jaroslav Hajtmar

Here is minimal example:

\def\DoCommand[#1]%
  {\iffirstargument#1\else100\fi}

\def\Command%
  {\dosingleargument\DoCommand}

%\def\DoAnotherCommand{#1}%
%  {\iffirstargument#1\else100\fi}

%\def\AnotherCommand%
%  {\dosingleargument\DoAnotherCommand}

\starttext

1. \Command[5] % OK

2. \Command  % OK




%1. \dorecurse{\Command[5]}{\recurselevel\crlf} % not working

%2. \dorecurse{\Command}{\recurselevel\crlf}  % not working


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

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

Re: [NTG-context] Problem with macro with optional parameter

2017-06-27 Thread Jaroslav Hajtmar
Thanx Henri for answer.
Maybe I have been explaining wrong my problem. I would need a variant without a 
parameter and concurrently without braces. Command without braces swallows the 
break of the paragraph.

\def\Command#1%
  {\expdoifelse{#1}{}{100}{#1}}

\starttext

1. \Command{5} % OK

2. \Command  % OK

3. As You see, Command without braces swallows the break of the paragraph.

1. \dorecurse{\Command{5}}{\recurselevel\crlf} % not working

2. \dorecurse{\Command{}}{\recurselevel\crlf}  % not working

\stoptext


Jaroslav Hajtmar





Dne 27.06.17 13:05, ntg-context za uživatele Henri Menke 
 napsal(a):

On Tue, 2017-06-27 at 08:58 +, Jaroslav Hajtmar wrote:
> Hello ConTeXist.
> I'm not able to solve a macros problem with one optional argument. I need 
the macro to return a
> value that can be used as a dorecurse loop parameter.
> Is there possibility create macro with optional parameter and parameter 
is concurrently inside in
> braces? (in nonsquare brackets)?
> I've tried to experiment with examples from the wiki, but I'm not clear 
about it.
    >  
    > Thanx for help.
> Jaroslav Hajtmar
>  
> Here is minimal example:
>  
> \def\DoCommand[#1]%
>   {\iffirstargument#1\else100\fi}
>  
> \def\Command%
>   {\dosingleargument\DoCommand}
>  
> %\def\DoAnotherCommand{#1}%
> %  {\iffirstargument#1\else100\fi}
>  
> %\def\AnotherCommand%
> %  {\dosingleargument\DoAnotherCommand}
>   
> \starttext
>  
> 1. \Command[5] % OK
>  
> 2. \Command  % OK
>  
>  
>  
>  
> %1. \dorecurse{\Command[5]}{\recurselevel\crlf} % not working
>  
> %2. \dorecurse{\Command}{\recurselevel\crlf}  % not working

The first argument to \dorecurse has to expand to a number.  Therefore it 
has to be fully-
expandable.  Scanning for optional brackets is never expandable.  You have 
to do it this way:

\def\Command#1%
  {\expdoifelse{#1}{}{100}{#1}}

\starttext

1. \Command{5} % OK

2. \Command{}  % OK

1. \dorecurse{\Command{5}}{\recurselevel\crlf} % not working

2. \dorecurse{\Command{}}{\recurselevel\crlf}  % not working

\stoptext


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

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

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

___

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

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

[NTG-context] Overarc etc. symbols

2017-07-02 Thread Jaroslav Hajtmar
Hello ConTeXist.
Can someone advise me how to lay an arc over three letters AVB.
It's about the LaTeX equivalent of \overarc or \widearc macro. Is there any 
table of similar ConTeXt symbols?

Thanks Jaroslav Hajtmar



___
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] Overarc etc. symbols

2017-07-02 Thread Jaroslav Hajtmar
Thanx Henri, 
that's exactly what I needed. Is there in any place on Wiki table of all 
ConTeXt math symbols? Sometimes I look for something and I explore, that few 
LaTeX symbols not work in ConTeXt.

Thanx again.
Jaroslav Hajtmar


> On 02.07.17 9:46, ntg-context za uživatele Henri Menke 
>  napsal(a):

>$\overparent{AVB}$



Dne 02.07.17 9:46, ntg-context za uživatele Henri Menke 
 napsal(a):

On 07/02/2017 07:18 PM, Jaroslav Hajtmar wrote:
> Hello ConTeXist.
> 
> Can someone advise me how to lay an arc over three letters AVB.
> 
> It's about the LaTeX equivalent of \overarc or \widearc macro. Is there 
any table of similar ConTeXt symbols?

Maybe like this?

\starttext

$\overparent{AVB}$

$\underparent{AVB}$

\stoptext

    > 
> Thanks Jaroslav Hajtmar
> 
>  
> 
>  
> 
>  
> 
> 
> 
> 
___
> 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] Overarc etc. symbols

2017-07-02 Thread Jaroslav Hajtmar
Thanx Henri, 
that's exactly what I needed. Is there in any place on Wiki table of all 
ConTeXt math symbols? Sometimes I look for something and I explore, that few 
LaTeX symbols not work in ConTeXt.

Thanx again.
Jaroslav Hajtmar


Dne 02.07.17 9:46, ntg-context za uživatele Henri Menke 
 napsal(a):

$\overparent{AVB}$


Dne 02.07.17 9:46, ntg-context za uživatele Henri Menke 
 napsal(a):

On 07/02/2017 07:18 PM, Jaroslav Hajtmar wrote:
> Hello ConTeXist.
> 
> Can someone advise me how to lay an arc over three letters AVB.
> 
> It's about the LaTeX equivalent of \overarc or \widearc macro. Is there 
any table of similar ConTeXt symbols?

Maybe like this?

\starttext

$\overparent{AVB}$

$\underparent{AVB}$

\stoptext

    > 
    > Thanks Jaroslav Hajtmar
> 
>  
> 
>  
> 
>  
> 
> 
> 
> 
___
> 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] Overarc etc. symbols

2017-07-02 Thread Jaroslav Hajtmar
Thanx Henri.
This is very useful for me.
Jaroslav Hajtmar


Dne 02.07.17 23:38, ntg-context za uživatele Henri Menke 
 napsal(a):

On Sun, 2017-07-02 at 08:38 +, Jaroslav Hajtmar wrote:
> Thanx Henri, 
> that's exactly what I needed. Is there in any place on Wiki table of all 
ConTeXt math symbols?
> Sometimes I look for something and I explore, that few LaTeX symbols not 
work in ConTeXt.

Most (all?) delimiters are defined in these files.


https://github.com/contextgarden/context-mirror/blob/beta/tex/context/base/mkiv/math-stc.mkvi

https://github.com/contextgarden/context-mirror/blob/beta/tex/context/base/mkiv/math-fen.mkiv

Otherwise I just look up the symbol in this file

http://texdoc.net/texmf-dist/doc/latex/unicode-math/unimath-symbols.pdf

and then search the ConTeXt source for the Unicode slot to get the name in 
ConTeXt.  But in many
cases the names from unimath-symbols also work in ConTeXt.

> 
> Thanx again.
    > Jaroslav Hajtmar
> 
> 
> Dne 02.07.17 9:46, ntg-context za uživatele Henri Menke 
 enrime...@gmail.com> napsal(a):
> 
> $\overparent{AVB}$
> 
> 
> Dne 02.07.17 9:46, ntg-context za uživatele Henri Menke 
 enrime...@gmail.com> napsal(a):
> 
> On 07/02/2017 07:18 PM, Jaroslav Hajtmar wrote:
> > Hello ConTeXist.
> > 
> > Can someone advise me how to lay an arc over three letters AVB.
> > 
> > It's about the LaTeX equivalent of \overarc or \widearc macro. Is 
there any table of similar
> ConTeXt symbols?
> 
> Maybe like this?
> 
> \starttext
> 
> $\overparent{AVB}$
> 
    > $\underparent{AVB}$
> 
> \stoptext
> 
> > 
> > Thanks Jaroslav Hajtmar
> > 
> >  
> > 
> >  
> > 
> >  
> > 
> > 
> > 
> > 
___
> > 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

___

___
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] Compare contents of macros via \doif etc. alternatives

2017-07-21 Thread Jaroslav Hajtmar
Hello ConTeXist.
Is there any way to evaluate of contents of two macros as I am showing in my 
minimal example?
I know, that problem is in expansion, but I dont know to resolve it.
My minimal example consist of piece lua code, because I am solving my problem 
in mixed codes (TeX & Lua)

Thanx for help.
Jaroslav Hajtmar


\starttext

\startluacode
interfaces.definecommand ("domymacro", {
arguments = { { "option", "string" }  },
macro = function (opt_1)
   if #opt_1>0 then
   context(opt_1)
   else
   context("123")
   end
end
   })
interfaces.definecommand("mymacro", {
macro = function ()
  context.dosingleempty()
  context["domymacro"]()
end
   })
\stopluacode

\def\myothermacro{123}

\hairline

\mymacro[123]

\mymacro

\myothermacro

\hairline

\doifelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}

\doifsamestringelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}

\doifinstringelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}

\doifincsnameelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}


\hairline

\doifelse{\mymacro}{\myothermacro}{equal content}{not equal content}

\doifsamestringelse{\mymacro}{\myothermacro}{equal content}{not equal content}

\doifinstringelse{\mymacro}{\myothermacro}{equal content}{not equal content}

\doifincsnameelse{\mymacro}{\myothermacro}{equal content}{not equal content}



\stoptext



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

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

Re: [NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-21 Thread Jaroslav Hajtmar
Thanks to Henri for the answer. To I admit, I thought it a bit technically that 
it would not be technically possible. At least I know why I was tearing my 
teeth while trying to test ... 
One more thanx.
Jaroslav Hajtmar


Dne 22.07.17 3:58, ntg-context za uživatele Henri  napsal(a):

On Fri, 2017-07-21 at 11:25 +, Jaroslav Hajtmar wrote:
> Hello ConTeXist.
> Is there any way to evaluate of contents of two macros as I am showing in 
my minimal example? 
> I know, that problem is in expansion, but I dont know to resolve it.
> My minimal example consist of piece lua code, because I am solving my 
problem in mixed codes (TeX
> & Lua)

Something similar has been asked before and it is not possible.  The 
interfaces.definecommand
function defines a new macro using \protected\def.  To compare as equal in 
a \doif context, both
operands have to _expand_ to the same thing (here 123).  Here \mymacro is 
not expandable and thus
only \doifelse{\mymacro}{\mymacro} will ever compare true.

Furthermore, scanning for optional arguments (i.e. [...]) is inherently 
non-expandable.  To get
something expandable you must at least switch to mandatory arguments (i.e. 
{...}).  Still, using
interfaces.definecommand will still not be possible.  I believe that 
scanning arguments is better
done on the macro level than in Lua, but that's just my opinion.

> Thanx for help.
> Jaroslav Hajtmar
>  
>  
> \starttext
>  
> \startluacode
> interfaces.definecommand ("domymacro", {
> arguments = { { "option", "string" }  },
> macro = function (opt_1)
>if #opt_1>0 then
>context(opt_1)
>else
>context("123")
>end
> end
>})
> interfaces.definecommand("mymacro", {
> macro = function ()
>   context.dosingleempty()
>   context["domymacro"]()
> end
>})
> \stopluacode
>  
> \def\myothermacro{123}
>  
> \hairline
>  
> \mymacro[123]
>  
> \mymacro
>  
> \myothermacro
>  
> \hairline
>  
> \doifelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}
>  
> \doifsamestringelse{\mymacro}{\mymacro[123]}{equal content}{not equal 
content}
>  
> \doifinstringelse{\mymacro}{\mymacro[123]}{equal content}{not equal 
content}
>  
> \doifincsnameelse{\mymacro}{\mymacro[123]}{equal content}{not equal 
content}
>  
>  
> \hairline
>  
> \doifelse{\mymacro}{\myothermacro}{equal content}{not equal content}
>  
> \doifsamestringelse{\mymacro}{\myothermacro}{equal content}{not equal 
content}
>  
> \doifinstringelse{\mymacro}{\myothermacro}{equal content}{not equal 
content}
>  
> \doifincsnameelse{\mymacro}{\myothermacro}{equal content}{not equal 
content}
>  
>  
>  
> \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
> 
___

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

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

___

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

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

[NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-22 Thread Jaroslav Hajtmar
Hello ConTeXist.

Is there any way to evaluate of contents of two macros as I am showing in my 
minimal example? 

I know, that problem is in expansion, but I dont know to resolve it.

My minimal example consist of piece lua code, because I am solving my problem 
in mixed codes (TeX & Lua)

 

Thanx for help.

Jaroslav Hajtmar

 

 

\starttext

 

\startluacode

    interfaces.definecommand ("domymacro", {

        arguments = { { "option", "string" }  },

        macro = function (opt_1)

       if #opt_1>0 then

   context(opt_1)

   else

   context("123")

   end

        end

   })

    interfaces.definecommand("mymacro", {

        macro = function ()

      context.dosingleempty()

      context["domymacro"]()

        end

   })

\stopluacode

 

\def\myothermacro{123}

 

\hairline

 

\mymacro[123]

 

\mymacro

 

\myothermacro

 

\hairline

 

\doifelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}

 

\doifsamestringelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}

 

\doifinstringelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}

 

\doifincsnameelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}

 

 

\hairline

 

\doifelse{\mymacro}{\myothermacro}{equal content}{not equal content}

 

\doifsamestringelse{\mymacro}{\myothermacro}{equal content}{not equal content}

 

\doifinstringelse{\mymacro}{\myothermacro}{equal content}{not equal content}

 

\doifincsnameelse{\mymacro}{\myothermacro}{equal content}{not equal content}

 

 

 

\stoptext

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

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

Re: [NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-22 Thread Jaroslav Hajtmar

Thanx Hans for reply.


also, it depends on what you want to achieve ... maybe comparing macros is not 
needed at all

You have right, that anytime compares are not needed, but for my very needed 
compares is not working in next eight examples. Problem is in expansions macros 
with optional argument. For “normal” macros are compares without problem as you 
see in last four examples….


mymacro

\doifelse{\mymacro}{123}{equal content}{not equal content}

\doifsamestringelse{\mymacro}{123}{equal content}{not equal content}

\doifinstringelse{\mymacro}{123}{equal content}{not equal content}

\doifincsnameelse{\mymacro}{123}{equal content}{not equal content}


\hairline

mymacro[123]

\doifelse{\mymacro[123]}{123}{equal content}{not equal content}

\doifsamestringelse{\mymacro[123]}{123}{equal content}{not equal content}

\doifinstringelse{\mymacro[123]}{123}{equal content}{not equal content}

\doifincsnameelse{\mymacro[123]}{123}{equal content}{not equal content}



\hairline


myothermacro

\doifelse{\myothermacro}{123}{equal content}{not equal content}

\doifsamestringelse{\myothermacro}{123}{equal content}{not equal content}

\doifinstringelse{\myothermacro}{123}{equal content}{not equal content}

\doifincsnameelse{\myothermacro}{123}{equal content}{not equal content}



there is not that much benefit defining these at the lua end if you directly 
feed back into tex anyway

sure, but I need define some macros automatically from luacode (is part of 
custom lua library)

Thanx
Jaroslav Hajtmar




22. 7. 2017 v 13:23, Hans Hagen mailto:pra...@wxs.nl>>:

On 7/22/2017 3:58 AM, Henri wrote:
On Fri, 2017-07-21 at 11:25 +, Jaroslav Hajtmar wrote:
Hello ConTeXist.
Is there any way to evaluate of contents of two macros as I am showing in my 
minimal example?
I know, that problem is in expansion, but I dont know to resolve it.
My minimal example consist of piece lua code, because I am solving my problem 
in mixed codes (TeX
& Lua)
Something similar has been asked before and it is not possible.  The 
interfaces.definecommand
function defines a new macro using \protected\def.  To compare as equal in a 
\doif context, both
operands have to _expand_ to the same thing (here 123).  Here \mymacro is not 
expandable and thus
only \doifelse{\mymacro}{\mymacro} will ever compare true.
Furthermore, scanning for optional arguments (i.e. [...]) is inherently 
non-expandable.  To get
something expandable you must at least switch to mandatory arguments (i.e. 
{...}).  Still, using
interfaces.definecommand will still not be possible.  I believe that scanning 
arguments is better
done on the macro level than in Lua, but that's just my opinion.

also, it depends on what you want to achieve ... maybe comparing macros is not 
needed at all

Thanx for help.
Jaroslav Hajtmar
   \starttext
 \startluacode
interfaces.definecommand ("domymacro", {
arguments = { { "option", "string" }  },
macro = function (opt_1)
   if #opt_1>0 then
   context(opt_1)
   else
   context("123")
   end
end
   })
interfaces.definecommand("mymacro", {
macro = function ()
  context.dosingleempty()
  context["domymacro"]()
end
   })
\stopluacode

there is not that much benefit defining these at the lua end if you directly 
feed back into tex anyway

\def\myothermacro{123}
 \hairline
 \mymacro[123]
 \mymacro
 \myothermacro
 \hairline
 \doifelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}
 \doifsamestringelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}
 \doifinstringelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}
 \doifincsnameelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}
   \hairline
 \doifelse{\mymacro}{\myothermacro}{equal content}{not equal content}
 \doifsamestringelse{\mymacro}{\myothermacro}{equal content}{not equal content}
 \doifinstringelse{\mymacro}{\myothermacro}{equal content}{not equal content}
 \doifincsnameelse{\mymacro}{\myothermacro}{equal content}{not equal content}
 \stoptext
 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl<mailto: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] Bug in wiki \doifsamestringselse vs \doifsamestringelse

2017-07-24 Thread Jaroslav Hajtmar
Hello ConTeXist

I add wiki information. In wiki on page 
http://wiki.contextgarden.net/System_Macros/Branches_and_Decisions is bug (I 
think) in caption \doifsamestringselse,\doifsamestring,\doifnotsamestring.

Right information is \doifsamestringelse,\doifsamestring,\doifnotsamestring 
(without s in first keyword).
Macro \doifsamestringselse not work.

Is there anybody, that fix this bug?

Jaroslav Hajtmar



___
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] Bug in wiki \doifsamestringselse vs \doifsamestringelse

2017-07-25 Thread Jaroslav Hajtmar
Thanx for reply and for fixed too. 
Jaroslav Hajtmar


Dne 24.07.17 23:06, ntg-context za uživatele Henri  napsal(a):

On Mon, 2017-07-24 at 16:54 +, Jaroslav Hajtmar wrote:
> Hello ConTeXist
>  
> I add wiki information. In wiki on page 
http://wiki.contextgarden.net/System_Macros/Branches_and_D
> ecisions is bug (I think) in caption 
\doifsamestringselse,\doifsamestring,\doifnotsamestring.
>  
> Right information is 
\doifsamestringelse,\doifsamestring,\doifnotsamestring (without s in first
> keyword).
> Macro \doifsamestringselse not work.
>  
> Is there anybody, that fix this bug?

It's just a simple typo.  I fixed it for you.  You can also fix things like 
this yourself by making
an account on the wiki and editing the page.

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

[NTG-context] Search problems in large source code (unwanted paragraph breaks)

2017-08-27 Thread Jaroslav Hajtmar
Hello ConTeXist.
During the compilation of a large source code that contains many macros, I get 
paragraph break in output. For a long time, I am looking for a place where this 
problem occurs. I've tested manual checks and turned on many different trackers 
(use \enabletrackers[] from wiki) to see where the problem is, but I can not 
figure out the solution. Does anyone know how this problem can be addressed?

In connection with this, I want to ask if there is something like 
\removeunwantedbreaks ???

Thanx Jaroslav Hajtmar


___
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] Search problems in large source code (unwanted paragraph breaks)

2017-08-27 Thread Jaroslav Hajtmar
Hello ConTeXist.
During the compilation of a large source code that contains many macros, I get 
paragraph break in output. For a long time, I am looking for a place where this 
problem occurs. I've tested manual checks and turned on many different trackers 
(for example use \enabletrackers[context.trace] from wiki) to see where the 
problem is, but I can not figure out the solution. Does anyone know how this 
problem can be addressed?

In connection with this, I want to ask if there is something like 
\removeunwantedbreaks ???

Thanx Jaroslav Hajtmar

___
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] Merging source ConTeXt files during compilation of main file

2018-02-19 Thread Jaroslav Hajtmar
Hello ConTeXist.
I have one main file and a large number of component files. I would like to 
merge all files in the right order without having to do it manually.
Is there a way to automatically merge several source files during the 
compilation of ConTeXt source text, which are loading using the input command 
or the component command? Example:

\starttext

Source code of main source….

\component file1
\component file2
\component file3 % etc.

Source code of main source….

\stoptext


The result should be one single source file that is created by merging all 
files and which can be compiled as one file:

\starttext

Source code of main source….

Contents of  file1

Contents of  file2

Contents of  file3

% etc.

Source code of main source….

\stoptext


Consequently, this file can be compiled, for example, with the online version 
of ConTeXt at live.contextgarden.net.

Thanx for any advice.

Jaroslav Hajtmar





___
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] Merging source ConTeXt files during compilation of main file

2018-02-19 Thread Jaroslav Hajtmar
Hello ConTeXist.
I have one main file and a large number of component files. I would like to 
merge all files in the right order without having to do it manually.
Is there a way to automatically merge several source files during the 
compilation of ConTeXt source text, which are loading using the input command 
or the component command? Example:

\starttext

Source code of main source….

\component file1
\component file2
\component file3 % etc.

Source code of main source….

\stoptext


The result should be one single source file that is created by merging all 
files and which can be compiled as one file:

\starttext

Source code of main source….

Contents of  file1

Contents of  file2

Contents of  file3

% etc.

Source code of main source….

\stoptext


Consequently, this file can be compiled, for example, with the online version 
of ConTeXt at live.contextgarden.net<http://live.contextgarden.net/>.

Thanx for any advice.

Jaroslav Hajtmar
___
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] Processing URL with TeX macros

2013-05-15 Thread Jaroslav Hajtmar

Hello ConTeXist.
I would like get right URL, when I use \useURL command.
Is there possibilities put any TeX macro to first and second parameter?
It was clear to me why this is about, but I need it for one application 
(in the cycle I change URL addresses).


Thanx Jaroslav Hajtmar

Here is my minimal example:


\setupinteraction[state=start]

\def\myurl{http://mydomain.com/path/}
\def\myfile{mypdffile.pdf}
\def\urltext{This is link to my file}

\useURL[okexample][http://mydomain.com/path][mypdffile.pdf][\urltext]
\useURL[problemexample][\myurl][\myfile][\urltext]

\starttext

\from[okexample] -- OK

\from[problemexample] -- link problem

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

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


Re: [NTG-context] Processing URL with TeX macros

2013-05-15 Thread Jaroslav Hajtmar

Hello Wolfgang.
Thanks for the reply. Now it's even more complicated. I think I need a 
combination of expanded and unexpanded macros. Both of the following examples 
do not work quite right.

Thanx Jaroslav Hajtmar

Here is other example:

\setupinteraction[state=start]

\def\myurl{http://mydomain.com/path}
\def\myfile{mypdffile\recurselevel.pdf}
\def\urltext{This is link to my file \recurselevel}

\unexpanded\def\unexpurltext{This is other link to my file \recurselevel}

\expanded{\useURL[problemexample][\myurl][\myfile][\urltext]}
\useURL[otherproblemexample][\myurl][\myfile][\unexpurltext]

\starttext

\dorecurse{5}{
\from[problemexample] \par
}

\blank[big]

\dorecurse{5}{
\from[otherproblemexample] \par
}


\stoptext
   






Am 15.05.2013 um 09:23 schrieb Jaroslav Hajtmar:


Hello ConTeXist.
I would like get right URL, when I use \useURL command.
Is there possibilities put any TeX macro to first and second parameter?
It was clear to me why this is about, but I need it for one application (in the 
cycle I change URL addresses).


Why can you change the \def lines but not the \useURL settings, both are set at 
the begin of the document?


Thanx Jaroslav Hajtmar

Here is my minimal example:


\setupinteraction[state=start]

\def\myurl{http://mydomain.com/path/}
\def\myfile{mypdffile.pdf}
\def\urltext{This is link to my file}

\useURL[okexample][http://mydomain.com/path][mypdffile.pdf][\urltext]
\useURL[problemexample][\myurl][\myfile][\urltext]


\expanded{\useURL[…][…][…][…]}

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] Problem with hidden text

2013-05-28 Thread Jaroslav Hajtmar

Hello ConTeXist.
I have a problem with hidden text.When I compile minimal example (ala 
ConTeXtgarden example):


\starttext

Visible text: \input tufte

\startproperty[hidden]
 Hidden text: \input tufte
\stopproperty

\stoptext


then I get errormessage:

(C:/context/tex/texmf-context/tex/context/sample/tufte.tex)
! Missing \endcsname inserted.

Problem is in last context standalone and context texlive 2012 too.

Thanx Jaroslav Hajtmar


___
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] Problem with hidden text

2013-05-28 Thread Jaroslav Hajtmar

Thanx Wolfgang.

Now is working. I fixed the problem on 
http://wiki.contextgarden.net/Hiding_Content.

I noticed, that is in MkIV

Thanx.
Jaroslav Hajtmar





Dne 29.5.2013 8:15, Wolfgang Schuster napsal(a):

\starttext

Visible text: \input tufte

\starteffect[hidden]
Hidden text: \input tufte
\stopeffect


___
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] \processcommalist and load values into macros.

2013-06-03 Thread Jaroslav Hajtmar

Hello ConTeXist.
Obviously I have a problem with expansion. My question is:
How can I place the elements of the list into macros for later use?
Basically, my point is that I want assign individual values into macros 
within the cycle of ​​and those subsequently used in a buffer to 
creating my own report.

Perhaps is can be understood what I want from my minimal example.

Thanx
Jaroslav Hajtmar

Minimal example:


\let\filename\null
\let\firstname\null
\let\surname\null
\let\city\null
\let\street\null
\let\postcode\null


\def\dosomething#1{#1\par}

\def\loadlistdatatomacros#1,#2,#3,#4,#5 {
\global\def\firstname{#1}
\global\def\surname{#2}
\global\def\town{#3}
\global\def\street{#4}
\global\def\postcode{#5}
}




\startbuffer[mypostbuffer]
\dosomething

% \loadlistdatatomacros
FIRSTNAME: \firstname\par
SURNAME: \surname\par
CITY \city\par
STREET \street\par
POSTCODE \postcode\par
\page
\stopbuffer


\starttext


\processcommalist[
{John, Smith, Prague, Václavské náměstí 20, 11500 },
{Peter, Paul, Brno, Nad struhou 232/12, 234 20 },
{Annie, Walter, Ostrava, Pod lipami 7, 321 54 },
]{\getbuffer[mypostbuffer]}


\stoptext

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

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

Re: [NTG-context] \processcommalist and load values into macros.

2013-06-04 Thread Jaroslav Hajtmar

Hello Wolfgang.
There is any problem in first method.
I get  message "Nested tabulate is not (yet) supported".
Thanx Jaroslav Hajtmar

Here is problematic example:


\usemodule[database]



\define[5]\TestCommand
  {\starttabulate
   \NC FIRSTNAME \EQ #1 \NC\NR
   \NC SURNAME   \EQ #2 \NC\NR
   \NC CITY  \EQ #3 \NC\NR
   \NC STREET\EQ #4 \NC\NR
   \NC POSTCODE  \EQ #5 \NC\NR
   \stoptabulate
   \page}

\define[5]\TestOtherCommand{#1, #2, #3, #4, #5\par}


\defineseparatedlist[test][command=\TestCommand]

\defineseparatedlist[othertest][command=\TestOtherCommand]

\starttext

Method 1:

\starttest
John, Smith, Prague, Václavské náměstí 20, 115 00
Peter, Paul, Brno, Nad struhou 232/12, 234 20
Annie, Walter, Ostrava, Pod lipami 7, 321 54
\stoptest

\startothertest
John, Smith, Prague, Václavské náměstí 20, 115 00
Peter, Paul, Brno, Nad struhou 232/12, 234 20
Annie, Walter, Ostrava, Pod lipami 7, 321 54
\stopothertest


\stoptext



Dne 4.6.2013 19:34, Wolfgang Schuster napsal(a):

Am 03.06.2013 um 23:47 schrieb Jaroslav Hajtmar :


Hello ConTeXist.
Obviously I have a problem with expansion. My question is:
How can I place the elements of the list into macros for later use?
Basically, my point is that I want assign individual values into macros within 
the cycle of ​​and those subsequently used in a buffer to creating my own 
report.
Perhaps is can be understood what I want from my minimal example.


I suggest to use a different method to store and load the data. The first method
is to use the database module (you can also use a external file for the data),
the other method is the \setvariables command where you can use keys for
the entries.


Method 1:

\usemodule[database]

\define[5]\TestCommand
   {\starttabulate
\NC FIRSTNAME \EQ #1 \NC\NR
\NC SURNAME   \EQ #2 \NC\NR
\NC CITY  \EQ #3 \NC\NR
\NC STREET\EQ #4 \NC\NR
\NC POSTCODE  \EQ #5 \NC\NR
\stoptabulate
\page}

\defineseparatedlist[test][command=\TestCommand]

\starttext

\starttest
John, Smith, Prague, Václavské náměstí 20, 11500
Peter, Paul, Brno, Nad struhou 232/12, 234 20
Annie, Walter, Ostrava, Pod lipami 7, 321 54
\stoptest

\stoptext


Method 2:

\startsetups[test]

   \starttabulate
   \NC FIRSTNAME \EQ \getvariable{test}{firstname} \NC\NR
   \NC SURNAME   \EQ \getvariable{test}{surname}   \NC\NR
   \NC CITY  \EQ \getvariable{test}{city}  \NC\NR
   \NC STREET\EQ \getvariable{test}{street}\NC\NR
   \NC POSTCODE  \EQ \getvariable{test}{postcode}  \NC\NR
   \stoptabulate

   \page

\stopsetups

\setvariable{test}{set}{\setups{test}}

\starttext

\setvariables
   [test]
   [firstname=John,
surname=Smith,
city=Prague,
street=Václavské náměstí 20,
postcode=11500]

\setvariables
   [test]
   [firstname=Peter,
surname=Paul,
city=Brno,
street=Nad struhou 232/12,
postcode=234 20]

\setvariables
   [test]
   [firstname=Annie,
surname=Walter,
city=Ostrava,
street=Pod lipami 7,
postcode=321 54]

\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] \processcommalist and load values into macros.

2013-06-04 Thread Jaroslav Hajtmar

Thanx Wolfgang very much.
After update standalone version of ConTeXt is first database method 
working OK.


You proposed methods are acceptable and comfortable for me. Moreover, it 
is systemic solutions.


Thanks very much for the reply and for the inspiration.
Jaroslav Hajtmar



Dne 4.6.2013 20:40, Wolfgang Schuster napsal(a):

Am 04.06.2013 um 20:26 schrieb Jaroslav Hajtmar :


Hello Wolfgang.
There is any problem in first method.
I get  message "Nested tabulate is not (yet) supported".

There was a bug in the database module regarding the command key,
update your installation and it will work.

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] Last standalone version suddenly will not load user module

2013-06-05 Thread Jaroslav Hajtmar

Hello ConTeXist.
For several years, I use very often my library for processing CSV 
tables. Even 2 months ago worked flawlessly in both versions (standalone 
version and ConTeXt TeXLive 2012). I am update standalone version fairly 
often (at least one times for two months).
Unfortunately, today I found out that my latest standalone version fails 
to load the library and the compilation is complete with an error message.


I find now that I can not detect and correct a problem in the library. 
Maybe in it any longer unsupported commands. Can someone be read from 
the attached log file?
Or I'll have to conserve the previous version of the standalone for my 
ConTeXt applications?


I can, if necessary, to send my module...

Thanx Jaroslav Hajtmar


Here is content of my log file ... :

C:\$~1da\SKOLA\2012-2013\pz2013>context --autopdf x

mtx-context | warning: no (local) file './x', proceeding
mtx-context | run 1: luatex 
--fmt="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" 
--jobname="x" 
--lua="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" 
--no-parse-first-line --c:autopdf --c:currentrun=1 
--c:fulljobname="./x" --c:input="./x" --c:kindofrun=1 
--c:maxnofruns=8 "cont-yes.mkiv"

This is LuaTeX, Version beta-0.77.0-2013053109 (rev 4635)
 \write18 enabled.
(C:/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2013.06.04 21:26 MKIV beta  fmt: 2013.6.4  int: 
english/english


system  > 'cont-new.mkiv' loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv)
system  > files > jobname 'x', input './x', result 'x'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
(C:/$~1da/SKOLA/2012-2013/pz2013/x.tex
fonts   > typescripts > unknown library 'loc'
fonts   > typescripts > unknown library 'cmr'
fonts   > preloading latin modern fonts (third stage)
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts   > 'fallback modern rm 11pt' is loaded
resolvers   > modules > 'hl2t-scancsv' is loaded
(../texlibrary//hl2t-scancsv.mkiv
loading > ConTeXt User Module / ScanCSV
! LuaTeX error [string "\directlua "]:80: invalid escape sequence near '\{'.

system  > tex > error on line 415 in file 
../texlibrary//hl2t-scancsv.mkiv: LuaTeX error  ...


405
406 if tempto>tempnumrows then tempto=tempnumrows end
407 if tempfrom>tempnumrows then tempfrom=1 end
408 tempfromI=tempfrom-1
409
410 
tex.sprint(tex.ctxcatcodes,'\\newcount\\tempfrom\\tempfrom='..tostring(tempfrom)) 
--
411 
tex.sprint(tex.ctxcatcodes,'\\newcount\\tempfromI\\tempfromI='..tostring(tempfromI)) 
--
412 
tex.sprint(tex.ctxcatcodes,'\\newcount\\tempto\\tempto='..tostring(tempto)) 
--

413 end -- function thirddata.scancsv.paramcontrol(from, to)
414
415 >>  \stopluacode
416
417 %D \section{MACRO DEFINITIONS}
418
419 \def\printline{\ctxlua{thirddata.scancsv.printline()}\par}
420 \def\printall{\ctxlua{thirddata.scancsv.printall()}\par}
421
422 \def\csvreport{
423 \ctxlua{thirddata.scancsv.csvreport()}
424 }
425

 ...ion thirddata.scancsv.paramcontrol(from, to)

}

\luat_start_lua_code_indeed ...nd \directlua {#1}}

l.415 \stopluacode

? ) (../texlibrary/lib-lua.tex)
! LuaTeX error [string "\directlua "]:1: attempt to call field 
'opencsvfile' (a nil value).


system  > tex > error on line 207 in file 
C:/$~1da/SKOLA/2012-2013/pz2013/x.tex: LuaTeX error  ...


197
198 \podpisreditele
199
200 \page
201 }
202
203 \def\lineaction{\printaction}
204
205 \starttext
206
207 >>  \filelineaction{rozh_4lneprijat-nesplnil.csv}
208
209 \stoptext
210
211
212


\dodoopencsvfile ...ata.scancsv.opencsvfile("#1")}
   \else \ctxlua 
{thirddata

 \opencsvfile {rozh_4lneprijat-nesplnil.csv}
   \doloopaction
\firstoftwoarguments #1#2n-#1

\doloopLineaction ...ion {\lineaction }{#2}{#3



l.207 \filelineaction{rozh_4lneprijat-nesplnil.csv}

? ! LuaTeX error [string "\directlua "]:1: attempt to call field 
'opencsvfile' (a nil value).


system  > tex > error on line 207 in file 
C:/$~1da/SKOLA/2012-2013/pz2013/x.tex: LuaTeX error  ...


197
198 \podpisreditele
199
200 \pag

Re: [NTG-context] Last standalone version suddenly will not load user module

2013-06-05 Thread Jaroslav Hajtmar

Thanx very much Wolfgang.

Now is all OK. Unfortunately now is necessary have one version of module 
for TeXLive version of ConTeXt and second version of module for 
standalone version.

But it's not much of a problem now for me...


I am afraid, that in the future will my module problematic again and 
without help I will lose it.

Now very much thanx for your help. I will not have sleepless night...

Jaroslav Hajtmar

Dne 5.6.2013 22:47, Wolfgang Schuster napsal(a):

Am 05.06.2013 um 22:26 schrieb Jaroslav Hajtmar :


Hello Wolfgang.
Thanks very much for your interest in my problem.
I am  sending a library and very simple example. When I compile example by 
ConTeXt Lexlive 2012, then is OK - flawless. When I use last standalone version 
to compile then compilation ending with error message.
I note that about two years I have successfully used the module. Just two 
months ago it managed standalone version. Standalone version don't work till in 
last version now.

If the error does not reveal, I'll probably have to use the module only in old 
versions Context. I really need it too often for my job. Processing large bulk 
data.

I do not know whether it makes sense to send this mail to the mailing list, so 
I send it to you privately.

The fixes are simple:

1. Don’t escape braces ("{” and "}"), e.g. line 169 has to be

  
context.setvalue("hc"..thirddata.scancsv.ar2colnum(i),'{\\bch'..thirddata.scancsv.gCSV[i]..'\\ech}')

and not

  
context.setvalue("hc"..thirddata.scancsv.ar2colnum(i),'\{\\bch'..thirddata.scancsv.gCSV[i]..'\\ech\}')


2. There is a \ missing in line 248 for the \par command. You wrote

  infomakra=infomakra..'\par'

but it has to be

  infomakra=infomakra..'\\par'

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] \define with more than 9 parameters??

2013-06-06 Thread Jaroslav Hajtmar

Hello ConTeXist.
Is there in ConTeXt any dirty trick, which can put more than 9 
parameters into macro?


I mean for example \define[25]\macrowithtwentyfiveparams{  }

I use rarely any trick from Peter Olsak (see below) and I'd like 
something like that used in ConTeXt.


Thanx
Jaroslav Hajtmar

Here is minimal example of trick of Petr Olsak:

\newcount\tempnum
\def\terminator{*}
\newcount\tempnum
\def\readparameters{\tempnum=0\let\next=\readone \next}
\def\readone #1,{\advance\tempnum by 1 \def\param{#1}%
%\the\tempnum - \param\par%
\ifx\param\terminator \let\next=\relax
\else\expandafter\gdef\csname param\the\tempnum\endcsname{#1}%
\fi\next}


\def\moreparameters#1{%
 \readparameters #1 %
 \csname param1\endcsname, % write first parameter
 \csname param3\endcsname, % write third parameter
 \csname param5\endcsname, % write fifth parameter
}


\starttext

%\readparameters a,b,c,d,e,f,g,h,i,j,k,m,n,o,*, %
%\def\parameters{aaa,,,,e,f,g,*,}
%\expandafter\readparameters\parameters

\moreparameters{a,b,c,d,e,f,g,h,i,j,k,m,n,o,*,}

\stoptext






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

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


Re: [NTG-context] Cloze Text (text with gaps)

2013-06-27 Thread Jaroslav Hajtmar

Hello Wolfgang.
Here is example of other using of your TextGap.
There is a problem in some lines? Why linewidth is change?

Thanx Jaroslav Hajtmar


\def\TextGap[#1]%
  {\scratchdimen#1\relax
   \divide\scratchdimen\plusten
   \dorecurse\plusten
 {\vrule width \scratchdimen height \linewidth\relax
  \ifnum\recurselevel<10 \hskip\zeropoint\relax \fi}}

\def\textgap#1{\setbox0=\hbox{#1}%
\TextGap[\the\wd0]%
}



\starttext
a \TextGap[4cm] b \TextGap[4cm] c \TextGap[4cm] d \TextGap[4cm] e


My words: \textgap{My words}. Why is line very thick here?

Here is an sentence: \textgap{Here is an sentence} -- linewidth is OK here.

Here is an sentence: \textgap{Here is an sentence}. And why is problem 
here again?



\stoptext


Dne 27.6.2013 20:23, Wolfgang Schuster napsal(a):

\def\TextGap[#1]%
   {\scratchdimen#1\relax
\divide\scratchdimen\plusten
\dorecurse\plusten
  {\vrule width \scratchdimen height \linewidth\relax
   \ifnum\recurselevel<10 \hskip\zeropoint\relax \fi}}

\starttext
a \TextGap[4cm] b \TextGap[4cm] c \TextGap[4cm] d \TextGap[4cm] e
\stoptext


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

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


Re: [NTG-context] Cloze Text (text with gaps)

2013-06-28 Thread Jaroslav Hajtmar

Hello Wolfgang.
I thank you as well. These macros I will also definitely come in handy. 
Sometimes I'm doing tests for my students.

I solved it yet a little awkward, now it is OK.

Thanx Jaroslav


Dne 28.6.2013 9:06, Christian Prim napsal(a):

Hello Wolfgang

thanks for both \TextGap and \WordGap. That is exactly what I needed!

Christian


2013/6/27 Wolfgang Schuster <mailto:schuster.wolfg...@gmail.com>>



Am 27.06.2013 um 20:53 schrieb Jaroslav Hajtmar mailto:hajt...@gyza.cz>>:

> Hello Wolfgang.
> Here is example of other using of your TextGap.
> There is a problem in some lines? Why linewidth is change?

Add “width 0pt” to the \vrule arguments. See also my definition of
\WordGap.

\def\TextGap[#1]%
{\scratchdimen#1\relax
\divide\scratchdimen\plusten
\dorecurse\plusten
{\vrule width \scratchdimen height \linewidth depth \zeropoint\relax
\ifnum\recurselevel<10 \hskip\zeropoint\relax \fi}}

\def\WordGap
{\dowithnextbox{\TextGap[\nextboxwd]}\hbox}

\starttext

a \TextGap[4cm] b \TextGap[4cm] c \TextGap[4cm] d \TextGap[4cm] e

My words: \WordGap{My words}. Why is line very thick here?

Here is an sentence: \WordGap{Here is an sentence} -- linewidth is
OK here.

Here is an sentence: \WordGap{Here is an sentence}. And why is
problem here again?

\stoptext

Wolfgang

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

maillist : ntg-context@ntg.nl <mailto: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
___


___
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] Problem with link colors.

2013-10-21 Thread Jaroslav Hajtmar

Hello ConTeXist.

Where is my mistake, if I want to have external references a different 
color than the other (default) links (to sections, figures etc) defined 
by \setupinteraction?


Thanx Jaroslav Hajtmar

Here is my minimal example:



\setupinteraction[state=start, style=normal, color=blue, contrastcolor=]
\setupurl[style=type, color=green]

\setupexternalfigures[location={local,default}]


\useURL [garden]
   [http://wiki.contextgarden.net/][]
   [http://wiki.contextgarden.net/]

\starttext

\section[sect]{Section}

This is testing Cow section.

\placefigure[here][cowfig]{Cow figure in Section.}
  {\externalfigure[cow][width=7cm]}

In \in {section}[sect] at \at {page}[sect] is \in {figure}[cowfig] 
(these links have the correct blue color).



But this external link to URL \from[garden] should be {\green green} and 
should be {\green\tt tt font}.


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


[NTG-context] How it works \setupurl?

2013-10-23 Thread Jaroslav Hajtmar

Hello ConTeXist.

I have a question: Is there \setupurl independent on \setupinteraction?

Is there posibility get external references a different color than the 
other (default) links (to sections, figures etc) defined by 
\setupinteraction?


Thanx Jaroslav Hajtmar

Here is my minimal example:



\setupinteraction[state=start, style=normal, color=blue, contrastcolor=]
\setupurl[style=type, color=green]

\setupexternalfigures[location={local,default}]


\useURL [garden]
   [http://wiki.contextgarden.net/][]
   [http://wiki.contextgarden.net/]

\starttext

\section[sect]{Section}

This is testing Cow section.

\placefigure[here][cowfig]{Cow figure in Section.}
  {\externalfigure[cow][width=7cm]}

In \in {section}[sect] at \at {page}[sect] is \in {figure}[cowfig] 
(these links have the correct blue color).



But this external link to URL \from[garden] should be {\green green} and 
should be {\green\tt tt font}.


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


[NTG-context] Nested itemize (spaces before and after inside environment)

2013-10-24 Thread Jaroslav Hajtmar

Hello ConTeXist.

I tried convert plainTeX source code into ConTeXt  source code so that 
the output PDF gave the same (or approximately the same) result. I did 
it for one of plainTEX developers (Mr. Olšák), which compared results of 
PlainTeX, LaTeX and ConTeXt. However, I encountered the following problem.


Is there a way to adjust the spacing before internal itemize environment 
when the external itemize environment is set as PACKED?


Thanx JaroslavHajtmar

Here is my minimal example:


\setupitemize[1][packed][symbol=n,before={\blank[medium]},after={\blank[medium]}]
\setupitemize[2][packed][symbol=a,stopper=),before={\blank[big]},after={\blank[big]}]

\starttext

This is normal text before itemize list.

\startitemize
\item First 1 level
\item Second 1 level
  \startitemize
  \item First 2 level (before this line should be big space)
  \item Second 2 level
  \item Third  2 level (after this line should be big space)
  \stopitemize
\item Third 1 level
\item Fourth 1 level
\stopitemize

This is normal text after itemize list.


\stoptext

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

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


Re: [NTG-context] Nested itemize (spaces before and after inside environment)

2013-10-24 Thread Jaroslav Hajtmar

Thanx Tomas.

Of course I know about the possibility of solving the problem by 
directly entering a space before internal environment. However, I prefer 
setting off the source text, so I wonder how it can be solved.


Jarda Hajtmar

Dne 24.10.2013 14:21, Tomas Hala napsal(a):

Hi Jarda and all,

I tested it on my computer using CTX from TL 2010 and 2013 and I have got
the same result in both cases. It seems that the content of the option before
is completely ignored. I tested another values for this option
(\page,\vskip,\godown...), no result.

The only one way which works is the manual addition of \blank before and
after the nested itemize environment, unfortunatelly.

---

Another interesting thing is that the compiler of CTX in TL 2013 does not
report an error when I forgot the opening \starttext, or the closing
\stoptext, or both, whereas in TL 2010 it does. Is this expected behaviour?

Best regards,

Tomas Hala


Thu, Oct 24, 2013 ve 12:45:01PM +0200 Jaroslav Hajtmar napsal(a):
# Hello ConTeXist.
#
# I tried convert plainTeX source code into ConTeXt  source code so
# that the output PDF gave the same (or approximately the same)
# result. I did it for one of plainTEX developers (Mr. Olšák), which
# compared results of PlainTeX, LaTeX and ConTeXt. However, I
# encountered the following problem.
#
# Is there a way to adjust the spacing before internal itemize
# environment when the external itemize environment is set as PACKED?
#
# Thanx JaroslavHajtmar
#
# Here is my minimal example:
#
#
# 
\setupitemize[1][packed][symbol=n,before={\blank[medium]},after={\blank[medium]}]
# 
\setupitemize[2][packed][symbol=a,stopper=),before={\blank[big]},after={\blank[big]}]
#
# \starttext
#
# This is normal text before itemize list.
#
# \startitemize
# \item First 1 level
# \item Second 1 level
#   \startitemize
#   \item First 2 level (before this line should be big space)
#   \item Second 2 level
#   \item Third  2 level (after this line should be big space)
#   \stopitemize
# \item Third 1 level
# \item Fourth 1 level
# \stopitemize
#
# This is normal text after itemize list.
#
#
# \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
# 
___

  Tomáš Hála

Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky
Zemědělská 1, CZ-613 00 Brno,  tel. +420 545 13 22 28

http://akela.mendelu.cz/~thala
___
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] Dissertation/diploma style

2013-12-18 Thread Jaroslav Hajtmar

Hello Vyatcheslav.
Two years ago my doughter wrote her thesis by Microsoft Word and it 
looked awful. Therefore I retyped hers Word texts (resources) by Context.
Her thesis can not be published now due to patent management, so I 
removed all the texts, images and other information from the source 
text, and I made a sort of thesis template.
I note it's definitely not a work of developer of modules, but such a 
conglomerate of my minds. Some things are in Czech language, so it may 
not be for someone to understand, but for inspiration and start working 
on your own module, would it be useful. There's a lot of my work, but I 
hope it helps someone to be for beginning of own work.


Here is link to my google disk drive:
https://drive.google.com/folderview?id=0B1tJnd0SSM25Skt4S3VnQVlhdFU&usp=sharing

Have a nice crossword :-)

With greetings  Jaroslav Hajtmar




Dne 16.12.2013 23:10, Vyatcheslav Y. napsal(a):
> Is there any dissertation/high-school diploma style for Context? I'm 
sure if there any, I can adapt it to Ukrainian standards (dstu 3008-95).


>>Unless you can find a module (at http://modules.contextgarden.net/) 
then you'll have to design it yourself.


The closest thing I found is
http://wiki.contextgarden.net/Law_Faculty_University_of_Ljubljana_Styling_and_citations
but it's a bit outdated and far from complete.

Maybe someone did his/her thesis in ConTeXt?

Vyatcheslav Yatskovsky


___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Jaroslav Hajtmar

Hello Otared.
I will throw this one... Thanx.

Once I was using exercise-answer package for LaTeX.
Is there anything like this to use in ConTeXt?

Thanx
Jaroslav Hajtmar


Dne 9.1.2014 15:19, Otared Kavian napsal(a):

%%% begin example-exercise.tex
%%%
% defining \startexo, \stopexo as an enumeration:
\startsetups style:simple
\defineenumeration[exo]
[alternative=hanging,
width=fit,
stopper={.},
text=Exercise,
%   between=,
before=,
after=\blank]
\stopsetups % style:simple

\startsetups style:textrule
\definenumber[MyExoNumber][way=bysection,sectionumber=yes]
\setuptextrules[rulecolor=darkred]
\define\ExoCommand{\incrementnumber[MyExoNumber]
\textrule[top]{Exercise \getnumber[MyExoNumber]}
\startbackground[frame=off,leftframe=on,backgroundcolor=white,
framecolor=darkred]}

\defineenumeration[exo]
[alternative=hanging,
width=fit,
text={},
number=hide,
number=no,
before={\ExoCommand},
after={\stopbackground\blank}]
\stopsetups % style:textrule

% end defining \startexo, \stopexo as an enumeration
%%%

%defining  numbered questions
\defineconversion[exercise][\numbers]
%\setupitemize[packed]
\def\StartQuestions{%
\startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]}
\def\StopQuestions{\stopitemize}
\def\q{\item}

% trye each of the following
\setups[style:simple]
%\setups[style:textrule]

\starttext
\startexo
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^2  = a^2  + b^2$.
\stopexo


\startexo
Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has 
$(a+b)^4  = a^4  + b^4$.
\stopexo

\startexo
\StartQuestions
\q Prove that
\startformula
\sum_{n=1}^\infty{1 \over n^2} = {\pi^2  \over 6}.
\stopformula

\q Prove that for any $n \geq 1$ integer one has
\startformula
\sum_{k=1}^n k^3  = \left({n(n+1) \over 2}\right)^2.
\stopformula
\StopQuestions
\stopexo

\stoptext
%%% end example-exercise.tex


___
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] setuphead for in-paragraph head ?

2014-01-09 Thread Jaroslav Hajtmar

Hello Wolfgang, Otared and Aditya.
Thanks for your advice and treatments. It is there a complete working 
example?
I am sorry, but I am not able to achieve the proposed modifications to 
make it work.

Thanx.
Jaroslav Hajtmar






Dne 9.1.2014 18:41, Wolfgang Schuster napsal(a):


Am 09.01.2014 um 18:36 schrieb Otared Kavian <mailto:ota...@gmail.com>>:



Hi Wolfgang, Hi Aditya,

Thanks for your attention.
Unfortunately adding
\keepblocks[question]
the example I sent before does not work in mkiv, and changing
location=hanging
to
alternative=hanging
does not help neither…
The error message in mkiv is:
\dostopnormalblock ...meter \c!after \par \egroup

 ...fact that $2\times 5 = 10$. \dostopnormalblock
\dostartnormalblock {hint}...
\dodowithpar ...dler \v!construction \endcsname #1
\csname \??constructionsto…

So I don’t know what to do if one has to use mkiv.


When you enumerations in this form

\beginanswer
\answer $10$
\endanswer

you have to finish the paragraph, e.g. by adding \par

\beginanswer
\answer $10$\par
\endanswer

or better use the start/stop commands for the enumeration.

\beginanswer
\startanswer
$10$
\stopanswer
\endanswer

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] setuphead for in-paragraph head ?

2014-01-12 Thread Jaroslav Hajtmar

Hello Otared and Wolfgang.

Thanks for launching this example.
Is there a possibility to write the answers into a more compact form 
(more columns, one paragraph, etc) like in any textbooks? I tried 
experimenting, but I was unable to put answers into a compact form.

Thanks Jaroslav Hajtmar

Here is my modification of answer enumeration (not working):

 begin question-hint-answer-blocks.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question]
[alternative=hanging,
width=2.5cm,
text={Question},
headstyle={\bi},
stopper={.}]

\defineenumeration[hint]
[alternative=hanging,
width=4cm,
text={Hint for question},
headstyle={\bi},
stopper={.}]

\defineenumeration[answer]
[alternative=hanging,
beforehead=,
afterhead=,
 before={\startcolumns[n=4]},
after=\stopcolumns,
width=0.5em,
text={},
headstyle={},
stopper={.}]

\setupblock[question][before={\startquestion},after={\stopquestion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer}]

\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]

\starttext

\section{Questions}

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer
\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer


\section{Hints to all questions}

\useblocks[hint]

\section{Answers to all questions}

\useblocks[answer]

\stoptext
 end question-hint-answer-blocks.tex



Dne 11.1.2014 20:01, Otared Kavian napsal(a):

 begin question-hint-answer-blocks.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question]
[alternative=hanging,
width=2.5cm,
text={Question},
headstyle={\bi},
stopper={.}]

\defineenumeration[hint]
[alternative=hanging,
width=4cm,
text={Hint for question},
headstyle={\bi},
stopper={.}]

\defineenumeration[answer]
[alternative=hanging,
width=4.5cm,
text={Answer to question},
headstyle={\bi},
stopper={.}]

\setupblock[question][before={\startquestion},after={\stopquestion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer}]

\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]

\starttext

\section{Questions}

\beginquestion
   Compute $4\times 5$.
\endquestion

\beginhint
   Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
   $20$.
\endanswer

\beginquestion
   What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\section{Hints to all questions}

\useblocks[hint]

\section{Answers to all questions}

\useblocks[answer]

\stoptext
 end question-hint-answer-blocks.tex


___
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] setuphead for in-paragraph head ?

2014-01-12 Thread Jaroslav Hajtmar

OK.  Thanx very much - for me it is a useful thing...
Jaroslav Hajtmar


Dne 12.1.2014 17:08, Otared Kavian napsal(a):

Hi Jaroslav,

Actually the formatting of what you put in the block determined for example by
\beginanswer
The answer is…
\endanswer
is independent of the block mechanism: you can use whatever structure you want. 
In the example we exchanged on, an enumeration such as
\startanswer
\stopanswer
where this \start \stop has been defined by \defineenumeration[answer], but you 
can use your own compact formatting instead of this.

Best regards: OK

On 12 janv. 2014, at 11:45, Jaroslav Hajtmar  wrote:


Hello Otared and Wolfgang.

Thanks for launching this example.
Is there a possibility to write the answers into a more compact form (more 
columns, one paragraph, etc) like in any textbooks? I tried experimenting, but 
I was unable to put answers into a compact form.
Thanks Jaroslav Hajtmar

Here is my modification of answer enumeration (not working):

 begin question-hint-answer-blocks.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question]
[alternative=hanging,
width=2.5cm,
text={Question},
headstyle={\bi},
stopper={.}]

\defineenumeration[hint]
[alternative=hanging,
width=4cm,
text={Hint for question},
headstyle={\bi},
stopper={.}]

\defineenumeration[answer]
[alternative=hanging,
beforehead=,
afterhead=,
 before={\startcolumns[n=4]},
after=\stopcolumns,
width=0.5em,
text={},
headstyle={},
stopper={.}]

\setupblock[question][before={\startquestion},after={\stopquestion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer}]

\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]

\starttext

\section{Questions}

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer
\beginquestion
  Compute $4\times 5$.
\endquestion

\beginhint
  Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
  $20$.
\endanswer

\beginquestion
  What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer


\section{Hints to all questions}

\useblocks[hint]

\section{Answers to all questions}

\useblocks[answer]

\stoptext
 end question-hint-answer-blocks.tex



Dne 11.1.2014 20:01, Otared Kavian napsal(a):

 begin question-hint-answer-blocks.tex
\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question]
[alternative=hanging,
width=2.5cm,
text={Question},
headstyle={\bi},
stopper={.}]

\defineenumeration[hint]
[alternative=hanging,
width=4cm,
text={Hint for question},
headstyle={\bi},
stopper={.}]

\defineenumeration[answer]
[alternative=hanging,
width=4.5cm,
text={Answer to question},
headstyle={\bi},
stopper={.}]

\setupblock[question][before={\startquestion},after={\stopquestion}]
\setupblock[hint][before={\starthint},after={\stophint}]
\setupblock[answer][before={\startanswer},after={\stopanswer}]

\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]

\starttext

\section{Questions}

\beginquestion
   Compute $4\times 5$.
\endquestion

\beginhint
   Use the fact that $2\times 5 = 10$.
\endhint

\beginanswer
   $20$.
\endanswer

\beginquestion
   What is the value of $100 / 10$?
\endquestion

\beginhint
Remember that $10\times 10 = 100$.
\endhint

\beginanswer
$10$
\endanswer

\section{Hints to all questions}

\useblocks[hint]

\section{Answers to all questions}

\useblocks[answer]

\stoptext
 end question-hint-answer-blocks.tex

___
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

[NTG-context] Problem with matematics (derivative and brackets combinations) + wrong pagenumbering

2014-02-04 Thread Jaroslav Hajtmar

Hello ConTeXist.

I type some math now. When I use the symbol derivative in combination 
with symbols brackets, so the result does not look too good. Compared to 
the result in LaTeX output is almost unusable. It is possible to achieve 
a better result?


In addition, I noticed that the page numbering starts from number 2. Is 
it a bug or I wrong?


Thanx Jaroslav Hajtmar

Here is my example:

% This is LuaTeX, Version beta-0.78.2 (TeX Live 2013/W32TeX) (rev 4771)
% ConTeXt  ver: 2014.01.30 22:19 MKIV beta  fmt: 2014.1.30  int: 
english/english



\starttext

$\left(f\pm g\right)'= f'\pm g'$

\blank[big]

$\left(f\cdot g\right)'= f'\cdot g + f\cdot g'$

\blank[big]

\mathematics{\left(\frac{f}{g}\right)'=\frac{f'\cdot g - f\cdot 
g'}{g^2}}, $g\neq0$


\blank[big]

\startformula
\left(\frac{f}{g}\right)'=\frac{f'\cdot g - f\cdot g'}{g^2}
\stopformula

\blank[big]

$\left(c\cdot f\right)'=c\cdot f'$

\blank[big]

$\left[f\left(g\right)\right]'=f'(g)\cdot g'$

\blank[big]

\stoptext




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

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


Re: [NTG-context] Problem with matematics (derivative and brackets combinations) + wrong pagenumbering

2014-02-04 Thread Jaroslav Hajtmar

Hello Jannik.
Thanx. I know about ^\prime but this is the same as ^{'}.
In this case is derivative symbol too higher - but emergency it can of 
course use.
Use ^{'} or  ^{\ prime}  in LaTeX leads to equally poor results (too 
higher).


Apparently to terms with the fact that it simply will not probably be 
better :-) ...
In addition, I noticed that the broken line is too short (and it needs 
to be extended with spaces.).


Thanks Jroslav Hajtmar




Dne 5.2.2014 1:41, Jannik Voges napsal(a):

You should use ^\prime instead of '.


Jannik Voges

Am 05.02.2014 um 00:07 schrieb Jaroslav Hajtmar :


Hello ConTeXist.

I type some math now. When I use the symbol derivative in combination with 
symbols brackets, so the result does not look too good. Compared to the result 
in LaTeX output is almost unusable. It is possible to achieve a better result?

In addition, I noticed that the page numbering starts from number 2. Is it a 
bug or I wrong?

Thanx Jaroslav Hajtmar

Here is my example:

% This is LuaTeX, Version beta-0.78.2 (TeX Live 2013/W32TeX) (rev 4771)
% ConTeXt  ver: 2014.01.30 22:19 MKIV beta  fmt: 2014.1.30  int: english/english


\starttext

$\left(f\pm g\right)'= f'\pm g'$

\blank[big]

$\left(f\cdot g\right)'= f'\cdot g + f\cdot g'$

\blank[big]

\mathematics{\left(\frac{f}{g}\right)'=\frac{f'\cdot g - f\cdot g'}{g^2}}, 
$g\neq0$

\blank[big]

\startformula
\left(\frac{f}{g}\right)'=\frac{f'\cdot g - f\cdot g'}{g^2}
\stopformula

\blank[big]

$\left(c\cdot f\right)'=c\cdot f'$

\blank[big]

$\left[f\left(g\right)\right]'=f'(g)\cdot g'$

\blank[big]

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

___
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] Problem with matematics (derivative and brackets combinations) + wrong pagenumbering

2014-02-05 Thread Jaroslav Hajtmar

Thanx Alan for the explanation.
I tried use all of symbols ie U+2032 ′, U+0027 ' , U+2019 ’ and U+02BC ʼ.
Visual results with using of U+2032 ′, U+0027 ' and U+02BC ʼ are the 
same as with symbol apostrophe ' (\prime) ... i.e. bad appearance (very 
low or very high with ^ symbol).

Using of  U+2019 ’ get error.


Jaroslav Hajtmar





Dne 5.2.2014 12:30, Alan BRASLAU napsal(a):

On Wed, 5 Feb 2014 01:58:44 +0100
Jaroslav Hajtmar  wrote:


I know about ^\prime but this is the same as ^{'}.

Not to be confused with ´ (prime)!
U+2032 ′
U+0027 '
U+2019 ’
U+02BC ʼ
etc.

Windows (Word) is really "bad" in substituting the "right single
quotation mark" for the ASCII (typewriter) apostrophe (U+0027).
This is probably because some people in the unicode world decided that
this be the "preferred" character to use for apostrophe (for some
strange 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Problem with integral sign

2014-02-09 Thread Jaroslav Hajtmar

Hello ConTeXist.

I googled a long time, but did not come across anything relevant.

How can type big integral sign to result looked good?

Here is my example:

\startformula
\int \frac{P_n(x)}{Q_m(x)} \, \mathrm{d}x, \quad nhttp://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] OT: Reflections on usability ConTeXt for typesetting of mathematics

2014-02-09 Thread Jaroslav Hajtmar

Hello ConTeXist.
I am very sorry for this OFF TOPIC contribution.

For writing of this text led me several hours of searching on internet. 
I was looking for ways to typing of non-elementary math in ConTeXt


Already a long time I use ConTeXt typesetting lot of different things 
and I am very satisfied. In the many things, of which I typed, was maths 
represented only marginally and minimally. Now I need to type some 
mathematics (at secondary school level) and I found that I came across 
borders of my knowledge of ConTeXt, or on possibilities of ConTeXt for 
typesetting of mathematics.
I do not in any way call into question the ability of ConTeXt 
typesetting mathematics, although I think that who wants to type 
mathematics then use LaTeX.
I want find experience of users of ConTeXt for real using of ConTeXt for 
typesetting of mathematics. I wonder how users use possible math modules 
(exist anything?) to be usable results.


I have a few questions:

0. Do you think that this is only a problem for beginners of ConText or 
it is a general problem of ConTeXt?
1. How many of ConTeXt users use this tool for typesetting of 
non-elementary mathematics?
2. Are you satisfied with the results, which produces ConTeXt (thinking 
in the field of mathematics rate)?
3. What things do you need to have in ConTeXt study that one could bet 
mathematics at a reasonable level?
4. Is ConTeXt able to substitute LaTeX to typesetting of math (e.g. in 
the future)?

5. Can you think of any more questions that should be here?


I hope that my question will help other beginners who would like to 
typing of mathematics use ConText - this unique and useful tool.


Thanks for all the answers.

Jaroslav Hajtmar


___
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] OT: Reflections on usability ConTeXt for typesetting of mathematics

2014-02-09 Thread Jaroslav Hajtmar

Thanks Otared.
Many thanks for your reaction.  Even if I would not not make any other 
statement than yours, so I'm clear at this time that the problem is 
probably sitting in front of a keyboard and monitor :-).


Perhaps the problem is that the Internet is relatively little of 
mathematical demonstrations in ConTeXt, and if one is accustomed to some 
practices in LaTeX or use different packages, it can be a little taken 
aback ConTeXt. Now I also found that even though I dont switch fonts, so 
I worked in an environment that me from switching fonts and therefore 
some formulas look very bad. But it is my wrong.
I've got to give more attention. Enthusiasm for my current project takes 
patience and sound reasoning. I've to give a time to prevents my mistakes.

When I am not careful, then I am doing many of dificult searchable errors.

Thanks for ConTeXt and thanks to all in this list for your advice and help.

Jaroslav Hajtmar






Dne 9.2.2014 23:31, Otared Kavian napsal(a):

Hi,

I do use ConTeXt for typesetting mathematics, and actually I began to use 
ConTeXt several years ago for my work as a mathematician: up to now I haven’t 
encountered a single instance in which ConTeXt would not give the expected 
result, and as a matter of fact the out-of-the-box capabilities and the quality 
of the typestting when using ConTeXt seems to me quite superior to plain TeX or 
LaTeX. I use ConTeXt for writing exercise sheets, lecture notes, and drafts of 
papers and all the presentations for my talks.
It is true that when submitting my papers to journals, unfortunately I have to 
switch back to LaTeX, but even so I prefer using ConTeXt in all the preparation 
steps because it is more convenient to use, and also I can use these notes 
directly for my lecture notes and presentations.

Now coming to answer your questions:


I have a few questions:

0. Do you think that this is only a problem for beginners of ConText or it is a 
general problem of ConTeXt?

All depends on how complex one's document is, and how deep one’s knowledge of 
TeX and ConTeXt is.


1. How many of ConTeXt users use this tool for typesetting of non-elementary 
mathematics?

I cannot say anything about the overall number of users, but as I said above I 
use it for the kind of maths I am doing: some of it is really not elementary…


2. Are you satisfied with the results, which produces ConTeXt (thinking in the 
field of mathematics rate)?

I am absolutely satisfied with the results.


3. What things do you need to have in ConTeXt study that one could bet 
mathematics at a reasonable level?

My knowledge of TeX and ConTeXt is rather elementary, but this does not prevent 
me to use ConTeXt. Moreover in the rare situations in which I don’t know how to 
achieve a certain result, there a good group of gurus on the mailing list to 
help solve my problem.


4. Is ConTeXt able to substitute LaTeX to typesetting of math (e.g. in the 
future)?

For sure it is: the reason for which ConTeXt is seldom used among 
mathematicians (or other scientists) is the fact that journals have developped 
specific macros for their layout and despite the fact that the quality and 
shortcomings of LaTeX are well-known, publishers of these journals are more 
than reluctant to switch to a more modern macro package of TeX, such as ConTeXt.


5. Can you think of any more questions that should be here?

Maybe one can imagine a script which would downgrade a file written in ConTeXt 
to a LaTeX file, once one accepts to lose the quality of the typesetting…

Best regards: OK

On 9 févr. 2014, at 20:09, Jaroslav Hajtmar  wrote:


Hello ConTeXist.
I am very sorry for this OFF TOPIC contribution.

For writing of this text led me several hours of searching on internet. I was 
looking for ways to typing of non-elementary math in ConTeXt

Already a long time I use ConTeXt typesetting lot of different things and I am 
very satisfied. In the many things, of which I typed, was maths represented 
only marginally and minimally. Now I need to type some mathematics (at 
secondary school level) and I found that I came across borders of my knowledge 
of ConTeXt, or on possibilities of ConTeXt for typesetting of mathematics.
I do not in any way call into question the ability of ConTeXt typesetting 
mathematics, although I think that who wants to type mathematics then use LaTeX.
I want find experience of users of ConTeXt for real using of ConTeXt for 
typesetting of mathematics. I wonder how users use possible math modules (exist 
anything?) to be usable results.

I have a few questions:

0. Do you think that this is only a problem for beginners of ConText or it is a 
general problem of ConTeXt?
1. How many of ConTeXt users use this tool for typesetting of non-elementary 
mathematics?
2. Are you satisfied with the results, which produces ConTeXt (thinking in the 
field of mathematics rate)?
3. What things do you need to have in ConTeXt study that one could bet 
mathematics at a

Re: [NTG-context] Pgfplots - passing point coordinates by Lua

2014-02-16 Thread Jaroslav Hajtmar

Hi Lukas.
A year ago, I tried something similar when I wanted to make an animated 
pdf images.
With using Lua, I can not handle eventually, but for inspiration attach 
a piece of code that demonstrates how get into buffer some parameters 
without Lua code. Maybe it inspires you in your solution.


I apologize for dirty code, but I cutting it from my old library and my 
context application. I did not clean it and I did not translate into 
English. For those interested I can possibly do.


Jarda Hajtmar

Here is my example:


\usemodule[tikz]
\usemodule[pgfplots]

%\define[1]\ListEntry{#1\par}
%\processcommalist[one,two,{three,four}]\ListEntry
%\processseparatedlist[one*two*three,four][*]\ListEntry
\def\zpracujparametry[#1]#2%
{\processcommalist[#1]{\nastavparametr{#2}}}
% Použití:
% \zpracujparametry[1,5,3.7,4,5,8,9,11]{
% \getbuffer[funkce1]
% \page
% }


\def\ZPRACUJPARAMETRY#1[#2]#3%
{\processseparatedlist[#2][#1]{\nastavparametr{#3}}}
% Použití:
% \ZPRACUJPARAMETRY{znak separátoru}[1,5,3.7,4,5,8,9,11]{
% \getbuffer[funkce1]
% \page
% }


\def\pmparametr#1=$#2${\global\def\parametr{#1}\global\def\mparametr{#2}}

\def\nastavparametry#1#2{\pmparametr#2\global\def\pparametr{#2}#1}%

\def\zpracujdvojparametry[#1]#2%
{\processcommalist[#1]{\nastavparametry{#2}}}
% Použití:
% \zpracujdvojparametry[1=$a$,5=$b$,3.7=$c$,4=$d$,5=$e$,8=$f$,9=$g$,11=$h$]{
% \getbuffer[funkce1]
% \page
% }

\def\ZPRACUJDVOJPARAMETRY#1[#2]#3%
{\processseparatedlist[#2][#1]{\nastavparametry{#3}}}
% Použití:
% 
\ZPRACUJDVOJPARAMETRY{;}[1=$a$;5=$b$;3.7=$c$;4=$d$;5=$e$;8=$f$;9=$g$;11=$h$]{

% \getbuffer[funkce1]
% \page
% }



\startbuffer[goniometrickefunkce]
\def\function{cos(deg(\x+\parametr))}
\def\permfunction{cos(deg(\x))}
\def\permfunctiontwo{sin(deg(\x))}
\startTEXpage
\starttikzpicture[scale=1]
\tikzset{style={font=\ssxx}}
\startaxis
[xmin=-1.6,
xmax=10,
domain=-1.6:10,
ymin=-1.1,
ymax=1.1,
width=\textwidth,
height=0.3\textwidth,
axis x line=middle,
axis y line=middle,
axis equal=true,
xlabel=$x$,
ylabel=$y$,
samples=600,
clip=true,
xtick={0},
ytick={-1,0,1},
grid=major,
extra x ticks={-1.57,1.57,3.14,4.71,6.28,7.85,9.42,10.99,12.57}, extra x 
tick 
labels={$-\frac{\pi}{2}$,$\frac{\pi}{2}$,$\pi$,$3\!\frac{\pi}{2}$,$2\pi$,$5\!\frac{\pi}{2}$,$3\pi$},
title={{\framed[frame=off,height=1cm]{\blue $\ssb f\!:\ y=\cos{(x 
\mparametr )}$}}},

]

\addplot[color=yellow, line width=0.5pt] {\permfunctiontwo};
\addplot[color=red, line width=0.5pt] {\permfunction};
\addplot[color=blue, line width=1pt] {\function};

\stopaxis
\stoptikzpicture
\stopTEXpage
\stopbuffer









\starttext

\ZPRACUJDVOJPARAMETRY{*}[1.57=$+\frac{\pi}{2}$*1.047=$+\frac{\pi}{3}$*0.785=$+\frac{\pi}{4}$*0.524=$+\frac{\pi}{6}$*0=$-0$*-0.524=$-\frac{\pi}{6}$*-0.785=$-\frac{\pi}{4}$*-1.047=$-\frac{\pi}{3}$*-1.57=$-\frac{\pi}{2}$*-3.142=$-\pi$*-4.712=$-\frac{3\pi}{2}$*6.28=$-2\pi$]{
\getbuffer[goniometrickefunkce]
\page
}

\stoptext






Dne 15.2.2014 20:38, Lukáš Procházka napsal(a):

Hello,

I just started experimenting with pgfplots package.

I'd have two questions:

1) When plotting/loading a data file: Is it possible to specify the 
comment mark, which is '#' and '%" by default? I'd need to treat ';' 
as a comment mark, too.


2) How to pass coordinates of plot points by Lua?

The following code:


\usemodule[tikz]
\usemodule[pgfplots]

\startluacode
data = {{5, 15}, {20, 20}, {24, -24}}

plot = function(data)
local str

for i, v in ipairs(data) do
str = (str or "") .. "(" .. v[1] .. "," .. v[2] .. ")"
end

print("Crds=", str)

context(str)
end
\stopluacode

\starttext
\starttikzpicture
\startaxis[]
\addplot[mark=none,color=red] coordinates {(11, 5) (12, 18)}; % THIS 
PLOT IS OK
\addplot[mark=none,color=red] coordinates {\ctxlua{plot(data)}}; % 
THIS PLOT HAS NO POINT (?!)

\stopaxis
\stoptikzpicture
\stoptext


gives error:

"
...
fonts > fallback modern rm 12pt is loaded
Crds= (5,15)(20,20)(24,-24)
Package pgfplots: Error! Sorry, I could not read the plot coordinates 
near '(5,15)(20,20)(24,-24)'. Please check for format mistakes.
! Package pgfplots Warning: the current plot has no coordinates (or 
all have been filtered away)...

"

Any idea from someone more familiar with pgfplots would be appreciated.

TIA.

Best regards,

Lukas




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

Re: [NTG-context] Pgfplots - passing point coordinates by Lua

2014-02-16 Thread Jaroslav Hajtmar

Thanks Jorge
for the helpful and useful instructions. Sometimes it will certainly 
come in handy.


Jaroslav Hajtmar


Dne 17.2.2014 0:53, DesdeChaves napsal(a):

\usemodule[tikz]
\usemodule[pgfplots]
\usemodule[pgfplotstable]

\starttext

\startluacode

local dados={};

for i=1,10 do
dados[i]=2*i
end

context("\\starttikzpicture")
context("\\pgfplotsset{width=10cm, compat=1.3, legend 
style={font=\\tfx}}")

context("\\startaxis[")
context("xlabel={L  (m) },")
context("ylabel={ $T^2 (s^2)$},legend cell align=left, legend 
pos=north west]")

context("\\addplot[only marks] table[row sep=]{")
 context("X Y")
for key,value in pairs(dados) do
context("%0.2f %0.1f ", key, value)
end
 context("   };")
context("\\addlegendentry{Experimental points}")
context("\\addplot table[row sep=,")
context("y={create col/linear regression={y=Y}}]{")
context("X Y")
for key,value in pairs(dados) do
context("%0.2f %0.1f ", key, value)
end
context("};")
context("\\addlegendentry{")
context("$\\pgfmathprintnumber{\\pgfplotstableregressiona} \\cdot x")
context("\\pgfmathprintnumber[print 
sign]{\\pgfplotstableregressionb}$ lin. Regression}")

context("\\stopaxis")
context("\\stoptikzpicture")

\stopluacode


\stoptext


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

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


Re: [NTG-context] solutions and problems

2014-02-20 Thread Jaroslav Hajtmar

Thanx Thomas
very much for link to PDF file "Using ConTEXt with Databases". I'm sure 
I will use it in the future.

Jaroslav Hajtmar


Dne 20.2.2014 13:57, Thomas A. Schmitz napsal(a):

On 02/20/2014 01:22 PM, Xan wrote:
If you comment one solution, then, you get "Answer to question 1", 
instead of "Answer of question 2", which is really. No always a 
question has an answer provided by me;-)


Thanks,


Obviously you will have to give every question|answer|hint some sort 
of unique identifier to which you can later refer. So an enumeration 
is maybe not the best approach for this because these identifiers need 
to be shared between all your blocks.


Just a personal impression: if you want to have many of these blocks, 
I would advise to use some format other than TeX to store them because 
it soon becomes difficult to read for you and unsustainable. I have 
written something in MAPS (http://www.ntg.nl/maps/42/12.pdf) which may 
be useful for you.


Thomas
___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://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] solutions and problems

2014-02-20 Thread Jaroslav Hajtmar

Thanx Wolfgang.
For me this is valuable information
Jaroslav Hajtmar



Dne 20.2.2014 14:13, Wolfgang Schuster napsal(a):

Am 20.02.2014 um 13:22 schrieb Xan :


Not exactly. If you don't have the same number of answers that the number of 
questions, so your counter is not properly set. See that:

\defineblock[question]
\defineblock[hint]
\defineblock[answer]

\defineenumeration[question][alternative=hanging,width=2.5cm,text={Question},stopper={.}]
\defineenumeration[hint][alternative=hanging,width=4cm,text={Hint for 
question},stopper={.}]
\defineenumeration[answer]  [alternative=hanging,width=4.5cm,text={Answer to 
question},stopper={.}]

\keepblocks[question]
\hideblocks[hint]
\hideblocks[answer]

\starttext

\section{Questions}

\beginquestion
\startquestion
  Compute $4\times 5$.
\stopquestion
\endquestion


\beginhint
\starthint
  Use the fact that $2\times 5 = 10$.
\stophint
\endhint

%\beginanswer
%\startanswer
%  $20$.
%\stopanswer
%\endanswer

\beginquestion
\startquestion
  What is the value of $100/10$?
\stopquestion
\endquestion

\beginhint
\starthint
Remember that $10\times 10 = 100$.
\stophint
\endhint

\beginanswer
\startanswer
$10$
\stopanswer
\endanswer

\section{Hints}

\useblocks[hint]

\section{Answers}

\useblocks[answer]

\stoptext

If you comment one solution, then, you get "Answer to question 1", instead of 
"Answer of question 2", which is really. No always a question has an answer provided by 
me ;-)


You can add a answer block which increments the answer counter.

\defineblock[question]
\defineblock[answer]

\defineenumeration[question][text={Question}]
\defineenumeration[answer]  [text={Answer}]

\keepblocks[question]
\hideblocks[answer]

\starttext

\chapter{Question}

\beginquestion
\startquestion
Question 1.
\stopquestion
\endquestion

\beginanswer
\startanswer
Answer 1.
\stopanswer
\endanswer

\beginquestion
\startquestion
Question 2.
\stopquestion
\endquestion

\beginanswer
\incrementcounter[answer]
\endanswer

\beginquestion
\startquestion
Question 3.
\stopquestion
\endquestion

\beginanswer
\startanswer
Answer 3.
\stopanswer
\endanswer

\chapter{Answers}

\useblocks[answer]

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



___
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] Problem with last version of ConTeXt

2014-10-18 Thread Jaroslav Hajtmar

Hello ConTeXist
Already a long time I use ConTeXt for processing the same files and 
always worked very well. Yesterday I updated version of ConTeXt 
Standalone and then I (like many times before) wanted to translate his 
usual document. Unfortunately, the translation stopped with an error 
message that I do not understand. Does anyone know what this could mean? 
The source code of my source file I did not change for a very long time 
a translation by using ConTeXt from TeXLive 2014 is without problem.

Thanks for the advice.
Jaroslav Hajtmar

Here is error message.


C:\$~1da\PODNIK\ConTeXt>context Ds477_2202421

mtx-context | warning: no (local) file './Ds477_2202421', proceeding
mtx-context | run 1: luatex 
--fmt="C:/context/tex/texmf-cache/luatex-cache/c
ontext/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" 
--jobname="Ds477
_2202421" 
--lua="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce
0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line 
--c:currentr
un=1 --c:fulljobname="./Ds477_2202421" --c:input="./Ds477_2202421" 
--c:kindofrun

=1 --c:maxnofruns=8 "cont-yes.mkiv"
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5041)
 \write18 enabled.
open source > 1 > 1 > 
C:/context/tex/texmf-context/tex/context/base/cont-yes

.mkiv

ConTeXt  ver: 2014.09.25 18:58 MKIV beta  fmt: 2014.10.18  int: 
english/english


system  > 'cont-new.mkiv' loaded
open source > 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-new

.mkiv
close source> 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-new

.mkiv
system  > files > jobname 'Ds477_2202421', input 
'./Ds477_2202421', resu

lt 'Ds477_2202421'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > 2 > 3 > C:/$~1da/PODNIK/ConTeXt/Ds477_2202421.tex
open source > 3 > 4 > c:/1da/tex/context/ctx_sml_library.tex
colors  > 'rgb' color space is supported
colors  > 'cmyk' color space is supported
resolvers   > modules > 'visual' is loaded
open source > 4 > 5 > 
C:/context/tex/texmf-context/tex/context/base/m-visual

.mkiv
loading > ConTeXt Tracking Macros / Visualization
close source> 4 > 5 > 
C:/context/tex/texmf-context/tex/context/base/m-visual

.mkiv
setup   > error in line 14, namespace 'itemgroup', instance 
'itemize', k

ey 'n'
setup   > error in line 14, namespace 'itemgroup', instance 
'itemize', k

ey 'packed'
close source> 3 > 5 > c:/1da/tex/context/ctx_sml_library.tex
close source> 2 > 5 > C:/$~1da/PODNIK/ConTeXt/Ds477_2202421.tex
close source> 1 > 5 > 
C:/context/tex/texmf-context/tex/context/base/cont-yes

.mkiv

*
___
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] Problem with last version of ConTeXt

2014-10-18 Thread Jaroslav Hajtmar

Thanx Hans for reply.
A few hours I was looking for a problem in my source file and library 
that load at the beginning of my file. It seems that the problem has 
nothing to do with the error message means that it has not  nothing to 
do with the itemize environment nor setupitemize (nothing like this in 
the file does not resp. when sections of code to comment out these 
environments, so nothing changes). The problem probably is related to 
some a side effect, because in older versions of ConTeXt Standalone not 
appear (and does not appear in Context, which is included in the latest 
distribution TeXLive 2014).


In my library are very old pieces of code that I used many years ago in 
plainTEX in combination with ConTeXtovým code (including frequent use 
\setvariables). Unfortunately I was despite my great efforts failed to 
create a "reasonable" minimal example, so I'll probably have to wait 
some time until someone else runs into a similar problem and will be 
able to describe properly document and create a minimum sample example 
(already with me it happened several times and each time it finally was 
resolved).


Thanks for your interest

Jaroslav Hajtmar


Dne 18.10.2014 11:40, Hans Hagen napsal(a):

On 10/18/2014 9:14 AM, Jaroslav Hajtmar wrote:

Hello ConTeXist
Already a long time I use ConTeXt for processing the same files and
always worked very well. Yesterday I updated version of ConTeXt
Standalone and then I (like many times before) wanted to translate his
usual document. Unfortunately, the translation stopped with an error
message that I do not understand. Does anyone know what this could mean?
The source code of my source file I did not change for a very long time
a translation by using ConTeXt from TeXLive 2014 is without problem.
Thanks for the advice.
Jaroslav Hajtmar

Here is error message.


C:\$~1da\PODNIK\ConTeXt>context Ds477_2202421

mtx-context | warning: no (local) file './Ds477_2202421', proceeding
mtx-context | run 1: luatex
--fmt="C:/context/tex/texmf-cache/luatex-cache/c
ontext/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
--jobname="Ds477
_2202421"
--lua="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce
0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line
--c:currentr
un=1 --c:fulljobname="./Ds477_2202421" --c:input="./Ds477_2202421"
--c:kindofrun
=1 --c:maxnofruns=8 "cont-yes.mkiv"
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5041)
  \write18 enabled.
open source > 1 > 1 >
C:/context/tex/texmf-context/tex/context/base/cont-yes
.mkiv

ConTeXt  ver: 2014.09.25 18:58 MKIV beta  fmt: 2014.10.18  int:
english/english

system  > 'cont-new.mkiv' loaded
open source > 2 > 2 >
C:/context/tex/texmf-context/tex/context/base/cont-new
.mkiv
close source> 2 > 2 >
C:/context/tex/texmf-context/tex/context/base/cont-new
.mkiv
system  > files > jobname 'Ds477_2202421', input
'./Ds477_2202421', resu
lt 'Ds477_2202421'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > 2 > 3 > C:/$~1da/PODNIK/ConTeXt/Ds477_2202421.tex
open source > 3 > 4 > c:/1da/tex/context/ctx_sml_library.tex
colors  > 'rgb' color space is supported
colors  > 'cmyk' color space is supported
resolvers   > modules > 'visual' is loaded
open source > 4 > 5 >
C:/context/tex/texmf-context/tex/context/base/m-visual
.mkiv
loading > ConTeXt Tracking Macros / Visualization
close source> 4 > 5 >
C:/context/tex/texmf-context/tex/context/base/m-visual
.mkiv
setup   > error in line 14, namespace 'itemgroup', instance
'itemize', k
ey 'n'
setup   > error in line 14, namespace 'itemgroup', instance
'itemize', k
ey 'packed'


some kind of error in your \setupitemize command


close source> 3 > 5 > c:/1da/tex/context/ctx_sml_library.tex
close source> 2 > 5 > C:/$~1da/PODNIK/ConTeXt/Ds477_2202421.tex
close source> 1 > 5 >
C:/context/tex/texmf-context/tex/context/base/cont-yes
.mkiv

*


a missing { or } ?

we need a real minimal example to see what is happening

Hans

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



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

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

Re: [NTG-context] Problem with last version of ConTeXt

2014-10-19 Thread Jaroslav Hajtmar

Hello
Thanx Hans for the advice - too me it could attack itself :-).

When I use \tracingall, then I managed to figure out what the problem was.
In fact, there was an error retrieving data from an external file (the 
library), and it while trying to load ConTeXt buffer command.


The original content of this buffer was:

\startbuffer[hlavička_kú]%
{\bf Katastrálnímu úřadu pro \VART{SMLOUVA}{KU_kraj} kraj\br%
\expdoifelse{\getvariable{SMLOUVA}{KU_sidlo}}{\empty}{}{se sídlem 
\VART{SMLOUVA}{KU_sidlo}\br}%

Katastrálnímu pracovišti \VART{SMLOUVA}{KU_pracoviste}}%
\stopbuffer%

This content has caused the error in the latest version of ConTeXt 
standalone (but in past versions of ConTeXt or standalone version of 
TeXLive 2014, I did not noticed this error message).



When I made ​​the following changes:

\startbuffer[hlavička_kú]%
\bgroup%
\bf Katastrálnímu úřadu pro \VART{SMLOUVA}{KU_kraj} kraj\br%
\expdoifelse{\getvariable{SMLOUVA}{KU_sidlo}}{\empty}{}{se sídlem 
\VART{SMLOUVA}{KU_sidlo}\br}%

Katastrálnímu pracovišti \VART{SMLOUVA}{KU_pracoviste}%
\egroup%
\stopbuffer%


then everything goes smoothly and everything is OK.

Thanks very much for your help and assistance. I'm not sure if this 
irregularities those revelations this somehow help you. It is at least 
strange that ConTeXt version of TeXLive 2014 the code untroubled eat 
...: -) ...


Thanks again and have a lot of energy ...

Jaroslav Hajtmar


PS: Just to explain the code of \VART macro (probably irrelevant to You):

\def\random#1#2{
\startluacode
local cislo=math.random(10)
if cislo > 3 then
context('\\getvariable{#1}{#2}')
else
context('\\fakenwords{1}{'..math.random(10,15)..'}')
end
\stopluacode
}


\def\VART#1#2{%
\doifmodeelse{koncept}%
{
\doifmodeelse{security}%
{\random{#1}{#2}}
{%
\expdoifelse{\getvariable{#1}{#2}}{}{{\ERRORSCOLOR 
#1.#2 ERROR}}{{\VARSCOLOR\getvariable{#1}{#2}}}%\removeunwantedspaces}

}%
}
{%
\expdoifelse{\getvariable{#1}{#2}}{}{{\ERRORSCOLOR #1.#2 
ERROR}}{{\VARSCOLOR\getvariable{#1}{#2}}}%\removeunwantedspaces

  }%
}%







Dne 19.10.2014 10:49, Hans Hagen napsal(a):

On 10/18/2014 9:20 PM, Jaroslav Hajtmar wrote:

Thanx Hans for reply.
A few hours I was looking for a problem in my source file and library
that load at the beginning of my file. It seems that the problem has
nothing to do with the error message means that it has not nothing to
do with the itemize environment nor setupitemize (nothing like this in
the file does not resp. when sections of code to comment out these
environments, so nothing changes). The problem probably is related to
some a side effect, because in older versions of ConTeXt Standalone not
appear (and does not appear in Context, which is included in the latest
distribution TeXLive 2014).

In my library are very old pieces of code that I used many years ago in
plainTEX in combination with ConTeXtovým code (including frequent use
\setvariables). Unfortunately I was despite my great efforts failed to
create a "reasonable" minimal example, so I'll probably have to wait
some time until someone else runs into a similar problem and will be
able to describe properly document and create a minimum sample example
(already with me it happened several times and each time it finally was
resolved).


just put a \tracingall someplace ... (bottom up) then you can see 
where it stops


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



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

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

Re: [NTG-context] Problem with last version of ConTeXt

2014-10-20 Thread Jaroslav Hajtmar

Thanx one more.
Jaroslav Hajtmar


Dne 20.10.2014 9:16, Hans Hagen napsal(a):
maybe some lookahead issue: you load a buffer and the preceding 
command sees the { which confuses it. Sometimes it hels to define 
macros as unexpanded:


\unexpanded\def\random#

\unexpanded\def\VART#1#2{% 


___
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] ConTeXt Standalone will not install

2014-10-21 Thread Jaroslav Hajtmar

Hello ConTeXist.
Some time ago I changed a installing TeX Live directly from version 2012 
to version 2014.
ConTeXt in this version TeX Live works seamlessly, but I have since 
stopped working update Standalone version. But I'm not entirely sure 
causation. Anyway, the update does not work as before. At first glance, 
it seems that the updates are performed correctly, but the files are not 
probably somehow eventually copied. I am not subsequently able to 
compile things that require the latest version of ConTeXt.
I must say that I am in a one moment delete the entire directory 
texmf-cache, because I began to discover a strange message about the 
mischmasch format of ConTeXt.


OK. Nothing to do. When I after a vain attempt failed ConTeXt update to 
the latest version, so I decided to ConTeXt Standalone completely 
re-install into my Windows 7 home edition. Installation failed, although 
I followed the instructions exactly to ConTeXtgarden 
(http://wiki.contextgarden.net/ConTeXt_Standalone). Creates only the TeX 
directory and there empty directories ("cache-texmf, texmf-fonts, 
texmf-local texmf and texmf-modules-project"). These directories do not 
contain any files. I attach below the log file during installation.


I tried a second installation method cited in ConTeXt ConTeXtGarden (see 
http://wiki.contextgarden.net/Simple_Windows_Installation).
Link to the installation file is broken (see 
http://minimals.contextgarden.net/setup/context-installer/ContextMinimalInstall.exe)


Can anyone advise what I'm doing wrong and why you can not install 
ConTeXt? Nowhere does not say anything about setting the path 
respectively next steps. Blame those problems installing TeX Live 2014?

Thanks for the advice.
Jaroslav Hajtmar

Here is log file from instalation:

receiving incremental file list
./
kpathsea620w64.dll
luatex.dll
mtxrun.dll
mtxrun.exe
mtxrun.lua

sent 22928 bytes  received 5501341 bytes  356404.45 bytes/sec
total size is 9371026  speedup is 1.70

mtxrun  | forcing cache reload
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/Users/Jaroslav  Hajtmar/texmf/web2c' from specification 
'home:texmf/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path 
'C:/context/bin' from specification 'selfautoloc:'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/context/bin/share/texmf-local/web2c' from specification 
'selfautoloc:/share/texmf-local/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/context/bin/share/texmf-dist/web2c' from specification 
'selfautoloc:/share/texmf-dist/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/context/bin/share/texmf/web2c' from specification 
'selfautoloc:/share/texmf/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/context/bin/texmf-local/web2c' from specification 
'selfautoloc:/texmf-local/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/context/bin/texmf-dist/web2c' from specification 
'selfautoloc:/texmf-dist/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/context/bin/texmf/web2c' from specification 'selfautoloc:/texmf/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on weird path 
'C:/context' from specification 'selfautodir:'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/context/share/texmf-local/web2c' from specification 
'selfautodir:/share/texmf-local/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/context/share/texmf-dist/web2c' from specification 
'selfautodir:/share/texmf-dist/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/context/share/texmf/web2c' from specification 
'selfautodir:/share/texmf/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/context/texmf-local/web2c' from specification 
'selfautodir:/texmf-local/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/context/texmf-dist/web2c' from specification 
'selfautodir:/texmf-dist/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'C:/context/texmf/web2c' from specification 'selfautodir:/texmf/web2c'
resolvers   | resolving | looking for 'texmfcnf.lua' on given path 
'$SELFAUTOGRANDPARENT/texmf-local/web2c' from specification 
'$SELFAUTOGRANDPARENT/texm

Re: [NTG-context] ConTeXt Standalone will not install

2014-10-21 Thread Jaroslav Hajtmar

Thanx Hans for quick reply.
My coments are bottom in the text of mail

Dne 22.10.2014 0:01, Hans Hagen napsal(a):

On 10/21/2014 11:32 PM, Jaroslav Hajtmar wrote:

Hello ConTeXist.
Some time ago I changed a installing TeX Live directly from version 2012
to version 2014.
ConTeXt in this version TeX Live works seamlessly, but I have since
stopped working update Standalone version. But I'm not entirely sure
causation. Anyway, the update does not work as before. At first glance,
it seems that the updates are performed correctly, but the files are not
probably somehow eventually copied. I am not subsequently able to
compile things that require the latest version of ConTeXt.
I must say that I am in a one moment delete the entire directory
texmf-cache, because I began to discover a strange message about the
mischmasch format of ConTeXt.


you don't have the two bin trees in your path do you?


My users variable path:
C:\texlive\2014\bin\win32;C:\Program Files (x86)\PC Connectivity 
Solution\; C:\Program Files\Common Files\Microsoft Shared\Windows 
Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows 
Live;C:\texlive\support\exe\sw\wscite;C:\Program 
Files\ImageMagick-6.6.4-Q16;C:\Perl64\site\bin;C:\Perl64\bin; 
C:\1da\support\exe;C:\1da\support\batch;C:\Ruby\bin;C:\Windows\system32; 
C:\Windows;C:\Windows\System32\Wbem; 
C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Dell\Dell 
Wireless WLAN Card;c:\Program Files\WIDCOMM\Bluetooth 
Software\;c:\Program Files\WIDCOMM\Bluetooth 
Software\syswow64;c:\Program Files (x86)\ATI 
Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common 
Files\Roxio Shared\DLLShared\;"c:\Program Files (x86)\pstoedit"; 
"C:\Program Files (x86)\gs\gs8.71\bin";"C:\Program Files (x86) 
\ghostgum\gsview";"C:\Program Files\Tracker Software\PDF 
Viewer\";C:\Program Files (x86)\Kofax\ImgCtls\bin;C:\Program Files 
(x86)\Windows Live\Shared; "C:\Program Files 
(x86)\SumatraPDF\SumatraPDF.exe";"C:\Program Files (x86) 
\Inkscape\Inkscape.exe"


My system variable path:
C:\Program Files\ImageMagick-6.8.7-Q16;C:\Program Files (x86)\PC 
Connectivity 
Solution\;C:\texlive\2014\bin\win32;C:\texlive\support\exe\sw\wscite; 
C:\Perl64\site\bin;C:\Perl64\bin;C:\1da\support\exe;C:\1da\support\batch; C:\Ruby\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem; 
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Dell\Dell 
Wireless WLAN Card;c:\Program Files\WIDCOMM\Bluetooth 
Software\;c:\Program Files\WIDCOMM\Bluetooth 
Software\syswow64;c:\Program Files (x86)\ATI 
Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Common 
Files\Roxio Shared\DLLShared\;"c:\Program Files 
(x86)\pstoedit";"C:\Program Files (x86) \gs\gs8.71\bin";"C:\Program 
Files (x86)\ghostgum\gsview";"C:\Program Files\Tracker Software\PDF 
Viewer\";C:\Program Files (x86)\Kofax\ImgCtls\bin; "C:\Program Files 
(x86)\SumatraPDF\SumatraPDF.exe";C:\Program Files (x86) 
\PDFtk\bin\;C:\Program Files (x86)\Inkscape\



I have no ConTeXt Standalone in Path, but before I start ConTeXt I 
running the batch file containing:


@echo off
C:\WINDOWS\System32\cmd.exe /k C:\context\tex\setuptex.bat C:\context\tex
set MTX_PDFVIEW_METHOD="PDFXCview"






OK. Nothing to do. When I after a vain attempt failed ConTeXt update to
the latest version, so I decided to ConTeXt Standalone completely
re-install into my Windows 7 home edition. Installation failed, although
I followed the instructions exactly to ConTeXtgarden
(http://wiki.contextgarden.net/ConTeXt_Standalone). Creates only the TeX
directory and there empty directories ("cache-texmf, texmf-fonts,
texmf-local texmf and texmf-modules-project"). These directories do not
contain any files. I attach below the log file during installation.


how clean did you start? really nothing? by fetching the win32 or 
win64 zip?
I like install 64bit version, but a while ago I tried to install the 
32-bit version and also without success ...





I tried a second installation method cited in ConTeXt ConTeXtGarden (see
http://wiki.contextgarden.net/Simple_Windows_Installation).
Link to the installation file is broken (see
http://minimals.contextgarden.net/setup/context-installer/ContextMinimalInstall.exe) 



is that installer ok anyway? at some point mojca changed the structure 
bit and maybe that installer was not adapted (it's not an official 
part of the minimals)


Link to the installation file is not functional, so I can not try to do 
the installation...

Can anyone advise what I'm doing wrong and why you can not install
ConTeXt? Nowhere does not say anything about setting the path
respectively next steps. Blame those problems installing TeX Live 2014?
Thanks for the advice.
Jaroslav Hajtmar



Here is log file from instalation:

receiving incremental file list
./
kpathsea620w64.dll
luatex.dll
mtxrun.dll

Re: [NTG-context] ConTeXt Standalone will not install

2014-10-22 Thread Jaroslav Hajtmar

Thanx Hans for reply.
I'm sorry, but the installation still does not work. I really can not 
cope with it. Although completely I turned off the firewall and loged in 
as an administrator, in two different networks (at my home network and 
in my work) can not install ConTeXt. Always only creates the directory 
structure, but does not copy the file from the Internet.


Can you ever find out what is the current version and install ConTeXt 
LuaTEX? My current version of ConTeXt and LuaTeX from which I have does 
not work update is:


This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5041)
ConTeXt  ver: 2014.09.25 18:58 MKIV beta  fmt: 2014.10.22  int: 
english/english



Now I see that in those versions LuaTeX and ConTeXt is not a contradiction?

Thank you. Jaroslav Hajtmar





Dne 22.10.2014 9:20, Hans Hagen napsal(a):

On 10/22/2014 12:44 AM, Jaroslav Hajtmar wrote:


receiving incremental file list
./
kpathsea620w64.dll
luatex.dll
mtxrun.dll
mtxrun.exe
mtxrun.lua

sent 22928 bytes  received 5501341 bytes  356404.45 bytes/sec
total size is 9371026  speedup is 1.70


ok, so 64 bit?

Hans



A while ago I tried to install the 32-bit version and also without
success ...The entire installation (both 32 and 64bit) will take place
during one minute, which just goes to show that nothing not copied from
the internet.


i just donwloaded the 64 bit zip, unzipped it in a new directory and 
ran first-setup:


  first-setup.bat --modules=all --engine=luatex

this took 57 seconds

  first-setup.bat --modules=all

that took 82 seconds

So, the garden process runs ok. Are you sure your firewall is not 
blocking rsync?


Hans


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



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

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

Re: [NTG-context] ConTeXt Standalone will not install

2014-10-22 Thread Jaroslav Hajtmar

Thanx Hans.

Dne 22.10.2014 16:52, Hans Hagen napsal(a):

On 10/22/2014 4:34 PM, Jaroslav Hajtmar wrote:

Thanx Hans for reply.
I'm sorry, but the installation still does not work. I really can not
cope with it. Although completely I turned off the firewall and loged in
as an administrator, in two different networks (at my home network and
in my work) can not install ConTeXt. Always only creates the directory
structure, but does not copy the file from the Internet.


can you try another machine?
A while ago I installed ConTeXt from my home network to another notebook 
(of my wife) - everything was OK. When I was copy all the installed 
directories into my own notebook, then latest ConTeXt is functional. At 
this moment I update installation on the second computer and every time 
you copy it to my own computer ...



Can you ever find out what is the current version and install ConTeXt
LuaTEX? My current version of ConTeXt and LuaTeX from which I have does
not work update is:


ther emust be something weird with your system
Yes, I agree that something is wrong, but I've tried everything 
possible, but to no avail (including firewall settings are copied from 
the computer on which the installation was OK) ... It seems that rsync 
does not work  I do not know whether installation (upgrade ) script 
checks for any system settings or something others...
Lately I've just installed TeX Live 2014, and then a new WD My Cloud 
with remote access. I'm not sure if something while these actions screw up.



My current version is after the copy into my own computer:
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5064)
ConTeXt  ver: 2014.10.22 16:23 MKIV beta  fmt: 2014.10.22  int: 
english/english



Thanks for your support ...
Jaroslav Hajtmar




This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5041)
ConTeXt  ver: 2014.09.25 18:58 MKIV beta  fmt: 2014.10.22  int:
english/english


Now I see that in those versions LuaTeX and ConTeXt is not a 
contradiction?


luatex looks new enough but the context is from last month so not the 
latest


C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\float>context sidefloat.mkiv

mtx-context | run 1: luatex 
--fmt="C:/context/tex/texmf-cache/luatex-cache/c
ontext/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" 
--jobname="sidef
loat" 
--lua="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde
776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line 
--c:currentrun=1
 --c:fulljobname="./sidefloat.mkiv" --c:input="./sidefloat.mkiv" 
--c:kindofrun=1

 --c:maxnofruns=8 "cont-yes.mkiv"
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5064)
 \write18 enabled.
open source > 1 > 1 > 
C:/context/tex/texmf-context/tex/context/base/cont-yes

.mkiv

ConTeXt  ver: 2014.10.22 16:23 MKIV beta  fmt: 2014.10.22  int: 
english/english


system  > 'cont-new.mkiv' loaded
open source > 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-new

.mkiv
close source> 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-new

.mkiv
system  > files > jobname 'sidefloat', input './sidefloat.mkiv', 
result

'sidefloat'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > 2 > 3 > 
C:/$~1da/ConTeXt/ConTeXt-Tests/my_way/float/sidefloat.

mkiv
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
floatblocks > '1' placed
open source > 3 > 4 > 
C:/context/tex/texmf-context/tex/context/sample/tufte.

tex
close source> 3 > 4 > 
C:/context/tex/texmf-context/tex/context/sample/tufte.

tex
floatblocks > '2' placed
open source > 3 > 5 > 
C:/context/tex/texmf-context/tex/context/sample/tufte.

tex
close source> 3 > 5 > 
C:/context/tex/texmf-context/tex/context/sample/tufte.

tex

Overfull \hbox (0.51917pt too wide) in paragraph at lines 1--17
\3>modern-designsize-12pt-rm-tf-0--0 item-ize, re-view, dip into, flip 
through,

browse, glance into, leaf through,
backend > xmp > using file 
'C:/context/tex/texmf-context/tex/context/bas

e/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1
close source> 2 > 5 > 
C:/$~1da/ConTeXt/ConTeXt-Tests/my_way/float/sidefloat.

mkiv
close source> 1 > 5 > 
C:/context/tex/texmf-context/tex/context/base/cont-yes

.mkiv

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
C:/context/tex/texmf-cache/luatex-cache/conte

xt/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.000 seconds, 2 scans 
with 

Re: [NTG-context] mail merge in mkiv?

2014-11-05 Thread Jaroslav Hajtmar

Hello Pablo.
I do very often mailmerge using ConTeXt. I do it with my lua library and 
data in my external CSV file. Unfortunately I do not have a manual to 
the my lua library. If you send me a minimal example of how you imagine 
it, I'll send you back solving and my lualibrary too...


Jaroslav Hajtmar

Dne 3.11.2014 20:41, Pablo Rodriguez napsal(a):

Dear list,

I would like to be able to use ConTeXt at work for mail merging. The
issue here is that I don’t have any clue on how to do it with MKIV. I
don’t even know whehter this is possible at all.

BTW, searching for "merge" at the wiki, I found
http://wiki.contextgarden.net/An_Update_On_Essential_Elements_In_how_can_i_merge_google_plus_and_facebook,
which seems spam to me.

Is there any way to do mail merge with mkiv?

Many thanks for your help,


Pablo


___
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] mail merge in mkiv?

2014-11-07 Thread Jaroslav Hajtmar

Hello Pablo.

Here is the solution of your minimal example:
http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSYcKAAcHxYUAS8XVkIkIhAVHyYsFgsZEzYXAw


Examples of more complex and comprehensive application of my 
t-scancsv.lua mudule are available at:

http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSYcKAAcHxYUAS8X


I zip the entire folder and you can download it at:
http://public.hajtmar.com/files/TeX/context/t-scancsv_ConTeXt_module/t-scancsv_ConTeXt_module.zip

Perhaps those that serve well.

Jaroslav Hajtmar










Dne 6.11.2014 18:57, Pablo Rodriguez napsal(a):

On 11/05/2014 04:42 PM, Jaroslav Hajtmar wrote:

Hello Pablo.
I do very often mailmerge using ConTeXt. I do it with my lua library and
data in my external CSV file. Unfortunately I do not have a manual to
the my lua library. If you send me a minimal example of how you imagine
it, I'll send you back solving and my lualibrary too...

Hi Jaroslav,

many thanks for your reply.

Is your library scancsv.lua and is it described at
http://public.hajtmar.com/files/TeX/TeXperience2011/knihovna_ScanCSVlua.pdf?
(I read a previous English version ;-)).

Do you have any plans to release it as a module? Or to publish it at GitHub?

The minimal sample would be envelopes such as:
\setuppapersize[C6, landscape]
\setuppagenumbering[location=]
\starttext
Name\\
Address\\
Postcode--City\\
\stoptext

csv file would be:

Name;Address;Postcode;City;
Me;Street;;Here;
You;Square;;There;

Many thanks for your help,


Pablo


___
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] mail merge in mkiv?

2014-11-09 Thread Jaroslav Hajtmar

Hello Pablo.
The module I created about before 4 years ago, when I wanted to learn to 
program in Lua. Therefore, I think that my module is too rudimentary and 
not quite optimized. Unfortunately, since I do not now use much Lua, so 
I dare not reasonably somehow finish. Before inclusion in third party 
modules that would probably have to take some experienced Lua expert and 
redo the whole module. For my needs it is enough. I use this module very 
often for my practise (I am teacher). Perhaps it helped a little.

Greetings Jaroslav Hajtmar


Dne 8.11.2014 11:09, Pablo Rodriguez napsal(a):

On 11/07/2014 12:44 PM, Jaroslav Hajtmar wrote:

Hello Pablo.

Here is the solution of your minimal example:
http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSYcKAAcHxYUAS8XVkIkIhAVHyYsFgsZEzYXAw
  
Examples of more complex and comprehensive application of my

t-scancsv.lua mudule are available at:
http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSYcKAAcHxYUAS8X
  
I zip the entire folder and you can download it at:

http://public.hajtmar.com/files/TeX/context/t-scancsv_ConTeXt_module/t-scancsv_ConTeXt_module.zip

Perhaps those that serve well.

Many thanks for your reply, Jaroslav.

Since this feature may be useful to other users, how about including it
as a third-party module in the ConTeXt Suite?

Many thanks for your help again,


Pablo


___
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] mail merge in mkiv?

2014-11-09 Thread Jaroslav Hajtmar

Hello Pablo.
Here is example of add days in Lua:

\startluacode
x=5 -- add five days
tex.print ('Actual date is :'..os.date('%d.%m.%Y')..'\\crlf')
tex.print ( 'And x days added date is :'.. os.date('%d.%m.%Y',os.time()+ 
x * 24 * 3600))

\stopluacode


Jaroslav Hajtmar



Dne 9.11.2014 22:49, Pablo Rodriguez napsal(a):

On 11/09/2014 03:59 PM, Jaroslav Hajtmar wrote:

Hello Pablo.
The module I created about before 4 years ago, when I wanted to learn to
program in Lua. Therefore, I think that my module is too rudimentary and
not quite optimized. Unfortunately, since I do not now use much Lua, so
I dare not reasonably somehow finish. Before inclusion in third party
modules that would probably have to take some experienced Lua expert and
redo the whole module. For my needs it is enough. I use this module very
often for my practise (I am teacher). Perhaps it helped a little.
Greetings Jaroslav Hajtmar

Many thanks for the module, Jaroslav.

BTW, wouldn’t you know how can I set a \date using Lua that adds x
working days to the current date?

Many thanks for your help,


Pablo


___
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] Moving hairline in itemize environment

2014-11-21 Thread Jaroslav Hajtmar

Hello ConTeXist.
Is there possibility move hairline in itemize environment to the leftto 
start from the beginning of the line independently indentation environment?


Thanx Jaroslav Hajtmar

Here is minimal example:

\starttext

\startitemize[n]
\item \input ward
\hairline %this line move to the left to start from the very 
beginning of the line

\item \input ward
\hairline %this line move to the left to start from the very 
beginning of the line

\item \input ward
\hairline%this line move to the left to start from the very 
beginning of the line


\stopitemize
\stoptext



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

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

Re: [NTG-context] issue with t-scancsv.lua

2014-12-08 Thread Jaroslav Hajtmar

Hello Pablo.
What do you think of this solution:

\usemodule[scancsv]

\setuppapersize[C6, landscape]
\setuppagenumbering[location=]

\unexpanded\def\lineaction{
\edef\lcA{\lowercase{\cA}}
\edef\ucB{\uppercase{\cB}}
cA: \cA -- lowercase cA: \lcA\crlf
cB: \cB -- upercase cB: \ucB\crlf
cC: \cC -- cD: \cD\crlf

\lowercase{}\crlf
\uppercase{}\crlf
\page
}

\setsep{;}
\setfiletoscan{mailmergedatatable.csv}

\starttext
\filelineaction
\stoptext


I greet you

Jaroslav Hajtmar


Dne 8.12.2014 13:38, Pablo Rodriguez napsal(a):

Hello Jaroslav,

I have discovered that it is impossible to change letter cases with
fields imported with t-scancsv.lua.

Here you have a sample:

\usemodule[scancsv]

\setuppapersize[C6, landscape]
\setuppagenumbering[location=]

\unexpanded\def\lineaction{
\lowercase{\cA}\crlf
\uppercase{\cB}\crlf
\cC--\cD\crlf

\lowercase{}\crlf
\uppercase{}\crlf
\page
}

\setsep{;}
\setfiletoscan{mailmergedatatable.csv}

\starttext
 \filelineaction
\stoptext

The contents of mailmergedatatable.csv would be:

name;address;postcode;city;
ME;STREET;;HERE;
You;Square;;There;

Would it be a way to avoid this?

Many thanks for your help,


Pablo


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

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

Re: [NTG-context] issue with t-scancsv.lua

2014-12-08 Thread Jaroslav Hajtmar

Hi Pablo.
I am glad that my library for you to use ...
I noticed that you have in your CSV file header with column names (ie. 
head of CSV document). I do not know if you noticed the option put this 
information into scancsv.lua library. This is done via the command 
\setheader. In this case library does not consider the first line of the 
CSV file as a data line. From the header of CSV file are now macros 
(from header names) contain later data from rows of the CSV file 
(changing in cycle). In addition, you can also use internal hooks. CSV 
file can even contain macros (must be defined before processing the CSV 
file).


I greet you.
Jaroslav Hajtmar

Example of use hooks etc. eg. Here:

\usemodule[scancsv]

\setuppapersize[C6, landscape]
\setuppagenumbering[location=]

% Structure of CSV file - you can use macros in CSV table too
% name;address;postcode;city;linecolor
% ME;STREET;;HERE;\green;
% You;Square;;There;\red;
% we;another Square;111;anyplace;\blue;


% Library is making \name, \address, \postcode, \city and \linecolor macros
% when you using \setheader command.

% Your example:
\unexpanded\def\lineaction{
\edef\lowercasename{\lowercase{\name}}
\edef\uppercaseaddress{\uppercase{\address}}
name: {\linecolor\name}\ -- lowercase name: \lowercasename\crlf
address: \address\ -- upercase address: \uppercaseaddress\crlf
\postcode\ \city\crlf

\page
}


% My example with hooks:
\unexpanded\def\tablelineaction{%
\edef\ehname{\hname}%
\edef\ehaddress{\haddress}%
\edef\ehpostcode{\hpostcode}%
\edef\ehcity{\hcity}%
\ehname \ehaddress \ehpostcode \ehcity %
}

% My simple example with hooks:
\def\simpletablelineaction{%
\bTD{\linecolor\numline}\eTD\hname\haddress\hpostcode\hcity%
}


\setsep{;} % set separator
\setheader % set information about header
\setfiletoscan{mailmergedatatable.csv}

\starttext
% process all file

Here is begin of processing...

\filelineaction

And here is end

\page

And now we can use internal hooks:

\def\bch{\bTD } % begin column hook
\def\ech{\eTD} % end column hook
\def\blinehook{\bTR } % begin line hook
\def\elinehook{\eTR} % end line hook
\def\bfilehook{\bTABLE } % begin CSV file hook
\def\efilehook{\eTABLE} % end CSV file hook

Here is begin of processing...

%process all file too (endless cycle)
\doloopif{1}{==}{1}{\tablelineaction}

And here is end

\page

Printing only specific data:

\doloopif{\name}{eq}{You}{\tablelineaction}

\page

Simpletablelineaction:

\doloopif{1}{==}{1}{\simpletablelineaction}

\page

Another using of hooks:

\def\bch{\bgroup\linecolor\bf } % begin column hook
\def\ech{\egroup,\ } % end column hook
\def\blinehook{Here is new \numline. line of CSV file:\crlf } % begin 
line hook

\def\elinehook{\hairline\par} % end line hook
\def\bfilehook{Here is all CSV file:\blank[2*big] } % begin CSV file hook
\def\efilehook{\par Here is end of file processing\par} % end CSV file hook

\doloopif{1}{==}{1}{\tablelineaction}



\stoptext





Dne 8.12.2014 17:21, Pablo Rodriguez napsal(a):

Hi Jaroslav,

many thanks for your reply.

It works fine here. Let’s see what I can do tomorrow with the real
documents :-)

Many thanks for your help again,


Pablo


On 12/08/2014 01:56 PM, Jaroslav Hajtmar wrote:

Hello Pablo.
What do you think of this solution:

\usemodule[scancsv]

\setuppapersize[C6, landscape]
\setuppagenumbering[location=]

\unexpanded\def\lineaction{
\edef\lcA{\lowercase{\cA}}
\edef\ucB{\uppercase{\cB}}
cA: \cA -- lowercase cA: \lcA\crlf
cB: \cB -- upercase cB: \ucB\crlf
cC: \cC -- cD: \cD\crlf

\lowercase{}\crlf
\uppercase{}\crlf
\page
}

\setsep{;}
\setfiletoscan{mailmergedatatable.csv}

\starttext
  \filelineaction
\stoptext


I greet you

Jaroslav Hajtmar


___
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] expand date from CSV file

2014-12-18 Thread Jaroslav Hajtmar

Hi Pablo

Here is a quick solution. However, it not treat the incorrect input 
data, ie it requires, however, correct input, otherwise it will collapse ...


Jaroslav Hajtmar



\usemodule[scancsv]

\def\ddmm#1#2#3{% #1 - date, #2 - old separator, #3 - new separator
\startlua
parsedate=thirddata.scancsv.ParseCSVLine('#1','#2');
day=tonumber(parsedate[1]);
month=tonumber(parsedate[2]);
year=tonumber(parsedate[3]);
if (year<2000) then year=year+2000 end;
tex.print(day..'#3'..month..'#3'..year);
\stoplua
}

\unexpanded\def\lineaction{
\Name\ arrived on \ddmm{\Date}{/}{.} \\
}


% Name;Date
% ME;11/10/14
% You;05/02/14
% He;15/02/2014
% She;03/03/12
% It;03/03/14

\setheader
 \setsep{;}
 \setfiletoscan{mail.csv}

\starttext
   \filelineaction
\stoptext





Dne 17.12.2014 22:20, Pablo Rodriguez napsal(a):

Dear list,

I have the following sample:

 \usemodule[scancsv]

 \unexpanded\def\lineaction{
 \Name\ arrived on \Date\\
 }

 \setheader
 \setsep{;}
 \setfiletoscan{mail.csv}

 \starttext
 \filelineaction
 \stoptext

that reads data from mail.csv:

 Name;Date
 ME;11/10/14
 You;05/02/14
 He;15/02/2014
 She;03/03/12
 It;03/03/14

My question is simple (and not related to CSV data import): how can I
define a command (ConTeXt or Lua) that changes date format from DD/MM/YY
to DD/MM/ when required?

Many thanks for your help,


Pablo


___
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] expand date from CSV file

2014-12-18 Thread Jaroslav Hajtmar

Hi Pablo,
I am sending still slightly modified version (use local variables and 
better typographic output).
It use of much variables, but at least it is clear how it works. For 
solution occurred me to use parsing function that I have been defined in 
the library, so that it can be successfully used.


Sincerely
Jaroslav Hajtmar



\usemodule[scancsv]

\def\ddmm#1#2#3{% #1 - date, #2 - old separator, #3 - new separator
\startlua
local parsedate=thirddata.scancsv.ParseCSVLine('#1','#2');
local day=tonumber(parsedate[1]);
local month=tonumber(parsedate[2]);
local year=tonumber(parsedate[3]);
if (year<2000) then year=year+2000 end;
tex.print(day..'#3'..month..'#3'..year);
\stoplua
}

\unexpanded\def\lineaction{
\Name\ arrived on \ddmm{\Date}{/}{.\\,} \\
}


% Name;Date
% ME;11/10/14
% You;05/02/14
% He;15/02/2014
% She;03/03/12
% It;03/03/14

\setheader
 \setsep{;}
 \setfiletoscan{mail.csv}

\starttext
   \filelineaction
\stoptext




Dne 18.12.2014 9:39, Jaroslav Hajtmar napsal(a):

Hi Pablo

Here is a quick solution. However, it not treat the incorrect input 
data, ie it requires, however, correct input, otherwise it will 
collapse ...


Jaroslav Hajtmar



\usemodule[scancsv]

\def\ddmm#1#2#3{% #1 - date, #2 - old separator, #3 - new separator
\startlua
parsedate=thirddata.scancsv.ParseCSVLine('#1','#2');
day=tonumber(parsedate[1]);
month=tonumber(parsedate[2]);
year=tonumber(parsedate[3]);
if (year<2000) then year=year+2000 end;
tex.print(day..'#3'..month..'#3'..year);
\stoplua
}

\unexpanded\def\lineaction{
\Name\ arrived on \ddmm{\Date}{/}{.} \\
}


% Name;Date
% ME;11/10/14
% You;05/02/14
% He;15/02/2014
% She;03/03/12
% It;03/03/14

\setheader
 \setsep{;}
 \setfiletoscan{mail.csv}

\starttext
   \filelineaction
\stoptext





Dne 17.12.2014 22:20, Pablo Rodriguez napsal(a):

Dear list,

I have the following sample:

 \usemodule[scancsv]

 \unexpanded\def\lineaction{
 \Name\ arrived on \Date\\
 }

 \setheader
 \setsep{;}
 \setfiletoscan{mail.csv}

 \starttext
 \filelineaction
 \stoptext

that reads data from mail.csv:

 Name;Date
 ME;11/10/14
 You;05/02/14
 He;15/02/2014
 She;03/03/12
 It;03/03/14

My question is simple (and not related to CSV data import): how can I
define a command (ConTeXt or Lua) that changes date format from DD/MM/YY
to DD/MM/ when required?

Many thanks for your help,


Pablo


___ 

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] expand date from CSV file

2014-12-18 Thread Jaroslav Hajtmar

Hi Pablo.
Peter pointed out an error in my solution. Thanks Peter! His message but 
pointed out that in fact is not the task as simple as it seems at first 
glance. In fact, a lot depends on what target group for those you solve 
a problem resp. whether e.g. date of birth of persons. What does it mean 
03/01/00? It means 1/3/1900? Or does it mean 01/03/2000? Particular job 
you have to deal specifically separately. It occurred to me yet 
following solution that respects the current year as the year when he 
could anyone born. E.g. 19/12/14 means a newborn soul (ie. In fact, 
12/19/2014), while 01/02/15 mean old man ie. in fact 01/02/1915. For the 
specific case you have to modify or create the solution separately.


Greetings
Jaroslav Hajtmar

Here is new minimal example:

\usemodule[scancsv]

\def\ddmm#1#2#3{% #1 - date, #2 - old separator, #3 - new separator
\startlua
local parsedate=thirddata.scancsv.ParseCSVLine('#1','#2');
local day=tonumber(parsedate[1]);
local month=tonumber(parsedate[2]);
local year=tonumber(parsedate[3]);
if (year<100) then % when is only two digits year format then
if year<=14 then % it is very young person
year=year+2000
else % this person has more than one hundred years
year=year+1900;
end;
end;
tex.print(day..'#3'..month..'#3'..year);
\stoplua
}

\unexpanded\def\lineaction{
\Name\ born \Date\quad  (\ddmm{\Date}{/}{.\\,}) \\
}

% Content of CSV file:
% Name;Date
% ME;11/10/14
% You;05/02/14
% He;15/02/2014
% She;03/03/12
% It;03/03/14
% A;11/11/1999
% B;01/2/1964
% C;02/3/23
% D;03/4/64
% E;04/5/00
% F;05/6/01
% G;05/7/15
% H;05/7/1915
% Test0;1/2/00
% Test1;1/2/01
% Test2;1/2/02
% Test3;1/2/03
% Test4;1/2/04
% Test5;1/2/05
% Test6;1/2/06
% Test7;1/2/07
% Test8;1/2/08
% Test9;1/2/09
% Test10;1/2/10
% Test11;1/2/11
% Test12;1/2/12
% Test13;1/2/13
% Test14;1/2/14
% Test15;1/2/15
% Test16;1/2/16
% Test17;1/2/17
% Test18;1/2/18
% Test19;1/2/19
% Test20;1/2/20

\setheader
 \setsep{;}
 \setfiletoscan{mail.csv}

\starttext
   \filelineaction
\stoptext



Dne 18.12.2014 19:07, Pablo Rodriguez napsal(a):

On 12/18/2014 01:24 PM, Jaroslav Hajtmar wrote:

Hi Pablo,
I am sending still slightly modified version (use local variables and
better typographic output).
It use of much variables, but at least it is clear how it works. For
solution occurred me to use parsing function that I have been defined in
the library, so that it can be successfully used.

Many thanks for your reply, Jaroslav.

This is exactly what I need.

Many thanks for your help,

Pablo



\usemodule[scancsv]

\def\ddmm#1#2#3{% #1 - date, #2 - old separator, #3 - new separator
\startlua
  local parsedate=thirddata.scancsv.ParseCSVLine('#1','#2');
  local day=tonumber(parsedate[1]);
  local month=tonumber(parsedate[2]);
  local year=tonumber(parsedate[3]);
  if (year<2000) then year=year+2000 end;
  tex.print(day..'#3'..month..'#3'..year);
\stoplua
}

\unexpanded\def\lineaction{
  \Name\ arrived on \ddmm{\Date}{/}{.\\,} \\
}


% Name;Date
% ME;11/10/14
% You;05/02/14
% He;15/02/2014
% She;03/03/12
% It;03/03/14

\setheader
   \setsep{;}
   \setfiletoscan{mail.csv}

\starttext
 \filelineaction
\stoptext




Dne 18.12.2014 9:39, Jaroslav Hajtmar napsal(a):

Hi Pablo

Here is a quick solution. However, it not treat the incorrect input
data, ie it requires, however, correct input, otherwise it will
collapse ...

Jaroslav Hajtmar



\usemodule[scancsv]

\def\ddmm#1#2#3{% #1 - date, #2 - old separator, #3 - new separator
\startlua
 parsedate=thirddata.scancsv.ParseCSVLine('#1','#2');
 day=tonumber(parsedate[1]);
 month=tonumber(parsedate[2]);
 year=tonumber(parsedate[3]);
 if (year<2000) then year=year+2000 end;
 tex.print(day..'#3'..month..'#3'..year);
\stoplua
}

\unexpanded\def\lineaction{
 \Name\ arrived on \ddmm{\Date}{/}{.} \\
}


% Name;Date
% ME;11/10/14
% You;05/02/14
% He;15/02/2014
% She;03/03/12
% It;03/03/14

\setheader
  \setsep{;}
  \setfiletoscan{mail.csv}

\starttext
\filelineaction
\stoptext





Dne 17.12.2014 22:20, Pablo Rodriguez napsal(a):

Dear list,

I have the following sample:

  \usemodule[scancsv]

  \unexpanded\def\lineaction{
  \Name\ arrived on \Date\\
  }

  \setheader
  \setsep{;}
  \setfiletoscan{mail.csv}

  \starttext
  \filelineaction
  \stoptext

that reads data from mail.csv:

  Name;Date
  ME;11/10/14
  You;05/02/14
  He;15/02/2014
  She;03/03/12
  It;03/03/14

My question is simple (and not related to CSV data import): how can I
define a command (ConTeXt or Lua) that changes date format from DD/MM/YY
to DD/MM/ when required?

Many thanks for your help

Re: [NTG-context] expand date from CSV file

2014-12-19 Thread Jaroslav Hajtmar

;-)
Thanx Peter. I'm too not thought about solutions :-).
I was so focused to mined data from a CSV file, and I've not think much 
about the appropriate algorithm.

I love attentive and thoughtful people (although often I'm not alone such)
Maybe I corrected in a subsequent e-mail properly.
One more thanx.

Jaroslav Hajtmar


Dne 18.12.2014 v 13:37 Peter Münster napsal(a):

On Thu, Dec 18 2014, Jaroslav Hajtmar wrote:


 if (year<2000) then year=year+2000 end;

Hi,

What about "Test;11/11/1999" ... ;-)



___
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] \executesystemcommand dont work?

2015-02-16 Thread Jaroslav Hajtmar

Hi ConTeXist.
After a long time I tried to recompile ConTeXt file that contained the 
\executesystemcommand. It seems to me that this command stopped working.

Can anyone confirm or refute this my perception?
I call \executesystemcommand to compiling another ConTeXt file from 
running ConTeXt. I use Windows 7 and problem is under TeXlive 2014 
version and Standalone version too.


Thanx Jaroslav Hajtmar


Here is my minimal example:
When I compile maintestfile.tex, then I expect, that 
compilebyexecutesystemcommand.pdf is created during compilation of 
maintestfile.tex file.


I have two files.

First is "test.tex" name:

\starttext
\input tufte
\stoptext


And second is file maintestfile.tex:

\starttext
\executesystemcommand{context --result=compilebyexecutesystemcommand.pdf 
test.tex}

\input knuth
\stoptext





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

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

Re: [NTG-context] \executesystemcommand dont work?

2015-02-16 Thread Jaroslav Hajtmar

Thanks to Pablo for testing of functionality.
Does anyone know whether it could be related to the random last 
comprehensive update of Win7? I read that Microsoft corrected with 
problem of  big security hole.


It is strange that a few days ago I find it all worked very well and 
after the last update of Windows 7 it not working.

You can someone please verify this?

Have you Pablo the latest Microsoft Windows 7 update??

Thanx
Jaroslav Hajtmar





Dne 16.2.2015 v 21:20 Pablo Rodriguez napsal(a):

On 02/16/2015 12:41 PM, Jaroslav Hajtmar wrote:

Hi ConTeXist.
After a long time I tried to recompile ConTeXt file that contained the
\executesystemcommand. It seems to me that this command stopped working.
Can anyone confirm or refute this my perception?

Hi Jaroslav,

the sample you sent works fine for me. Both files get compiled.


I call \executesystemcommand to compiling another ConTeXt file from
running ConTeXt. I use Windows 7 and problem is under TeXlive 2014
version and Standalone version too.

I’m using latest beta in Fedora 20.

At work, I use Win7 64 bits and \executesystemcommand works also fine (I
use it every day).

Sorry, but I’m afraid I don’t have a clue why it doesn’t work in your
system.


Pablo


___
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] \executesystemcommand dont work?

2015-02-16 Thread Jaroslav Hajtmar

Thanx Aditya for reply.

I compile this ConTeXt file:

\starttext
\immediate\write18{context --version}
\stoptext

with last standalone version of ConTeXt (minimals). Below is the console 
output and log file.
I do not know whether this can decipher be from a reading. It seems that 
write18 is enabled. I do not know what could have happened and why it 
does not work. Can be a problem in collision TeXlive vs Standalone 
version (paths problem)? I do not know how to fix it. I tried again to 
install the standalone version, but it did not help. I hope that I have 
somehow smashed up Windows because reinstalling windows because of 
dysfunctional ConTeXt me quite a scare...


Thanx Jaroslav Hajtmar


C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod
riguez5\bbb>context test

mtx-context | warning: no (local) file './test', proceeding
mtx-context | run 1: luatex 
--fmt="C:/context/tex/texmf-cache/luatex-cache/c
ontext/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" 
--jobname="test"

 --lua="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb
1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line 
--c:currentrun=1 --c:
fulljobname="./test" --c:input="./test" --c:kindofrun=1 --c:maxnofruns=8 
"cont-y

es.mkiv"
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5064)
 \write18 enabled.
open source > 1 > 1 > 
C:/context/tex/texmf-context/tex/context/base/cont-yes

.mkiv
>
ConTeXt  ver: 2015.02.03 23:55 MKIV beta  fmt: 2015.2.16  int: 
english/english >


>
system  > 'cont-new.mkiv' loaded
open source > 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-new

.mkiv
close source> 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-new

.mkiv
system  > files > jobname 'test', input './test', result 'test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > 2 > 3 > 
C:/$~1da/ConTeXt/ConTeXt-Tests/my_way/ScanCSV/t-scancs

v_ConTeXt_module/2PabloRodriguez5/bbb/test.tex
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
close source> 2 > 3 > 
C:/$~1da/ConTeXt/ConTeXt-Tests/my_way/ScanCSV/t-scancs

v_ConTeXt_module/2PabloRodriguez5/bbb/test.tex
close source> 1 > 3 > 
C:/context/tex/texmf-context/tex/context/base/cont-yes

.mkiv

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
C:/context/tex/texmf-cache/luatex-cache/conte

xt/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.012 seconds, 0 scans 
with scanti

me 0.000 seconds, 0 shared scans, 8 found files, scanned paths: 
mkiv lua stats  > stored bytecode data: 364 modules (0.209 sec), 76 
tables (0.00

5 sec), 440 chunks (0.214 sec)
mkiv lua stats  > running in nuts mode: yes
mkiv lua stats  > cleaned up reserved nodes: 41 nodes, 439 lists of 438
mkiv lua stats  > node memory usage: 2 glue, 2 penalty, 6 attribute, 20 
glue_spe

c, 2 attribute_list, 2 temp
mkiv lua stats  > node list callback tasks: 6 unique task lists, 2 
instances (re

)created, 3 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf 
output)


mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > jobdata time: 0.003 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: 55 direct, 239 indirect, 294 total
mkiv lua stats  > result saved in file: test.pdf, compresslevel 3, 
objectcompres

slevel 3
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, 
lmroman12-regular

.otf
mkiv lua stats  > fonts load time: 0.239 seconds
mkiv lua stats  > used platform: win64, type: windows, binary subtree: 
texmf-win

64
mkiv lua stats  > luatex banner: this is luatex, version beta-0.79.1 
(tex live 2

014/w32tex) (rev 5064)
mkiv lua stats  > control sequences: 40425 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua, used memory: 60 MB (ctx: 
60 MB),

hash type: lua, hash chars: min(64,40), symbol mask: utf (¤ä╬Á¤ç)
mkiv lua stats  > runtime: 0.627 seconds

mtx-context | run 2: luatex 
--fmt="C:/context/tex/texmf-cache/luatex-cache/c
ontext/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" 
--jobname="test"

 --lua="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb
1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line 
--c:currentrun=2 --c:
fulljobname="./test" --c:input="./test" --c:kindofrun=2 --c:maxnofruns=8 
"cont-y

es.mkiv"
This is LuaTeX, Version beta-0.79.1 (Te

Re: [NTG-context] \executesystemcommand dont work?

2015-02-16 Thread Jaroslav Hajtmar

Hi Aditya.
Thanx for reply. I am sending result from output console from your 
example ie:

\starttext
\writestatus{test}{before calling shell command}
\immediate\write18{echo HELP}
\writestatus{test}{after calling shell command}
\stoptext

Output is below.
Regarding the call ConTeXt, I often calls it directly from the editor 
(PsPad) but when frequently repeated compilations, then I type commands 
directly from terminal (command line of windows)


Thankx for attempt to solve my problem.
Jaroslav Hajtmar


C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod
riguez5\bbb>context test

mtx-context | warning: no (local) file './test', proceeding
mtx-context | run 1: luatex 
--fmt="C:/context/tex/texmf-cache/luatex-cache/c
ontext/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" 
--jobname="test"

 --lua="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb
1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line 
--c:currentrun=1 --c:
fulljobname="./test" --c:input="./test" --c:kindofrun=1 --c:maxnofruns=8 
"cont-y

es.mkiv"
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5064)
 \write18 enabled.
open source > 1 > 1 > 
C:/context/tex/texmf-context/tex/context/base/cont-yes

.mkiv
>
ConTeXt  ver: 2015.02.03 23:55 MKIV beta  fmt: 2015.2.16  int: 
english/english >


>
system  > 'cont-new.mkiv' loaded
open source > 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-new

.mkiv
close source> 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-new

.mkiv
system  > files > jobname 'test', input './test', result 'test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > 2 > 3 > 
C:/$~1da/ConTeXt/ConTeXt-Tests/my_way/ScanCSV/t-scancs

v_ConTeXt_module/2PabloRodriguez5/bbb/test.tex
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
test> before calling shell command
test> after calling shell command
close source> 2 > 3 > 
C:/$~1da/ConTeXt/ConTeXt-Tests/my_way/ScanCSV/t-scancs

v_ConTeXt_module/2PabloRodriguez5/bbb/test.tex
close source> 1 > 3 > 
C:/context/tex/texmf-context/tex/context/base/cont-yes

.mkiv

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
C:/context/tex/texmf-cache/luatex-cache/conte

xt/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.012 seconds, 0 scans 
with scanti

me 0.000 seconds, 0 shared scans, 8 found files, scanned paths: 
mkiv lua stats  > stored bytecode data: 364 modules (0.231 sec), 76 
tables (0.00

6 sec), 440 chunks (0.237 sec)
mkiv lua stats  > running in nuts mode: yes
mkiv lua stats  > cleaned up reserved nodes: 41 nodes, 439 lists of 438
mkiv lua stats  > node memory usage: 2 glue, 2 penalty, 6 attribute, 20 
glue_spe

c, 2 attribute_list, 2 temp
mkiv lua stats  > node list callback tasks: 6 unique task lists, 2 
instances (re

)created, 3 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf 
output)


mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > jobdata time: 0.004 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: 55 direct, 241 indirect, 296 total
mkiv lua stats  > randomizer: resumed with value 0.53962828455458
mkiv lua stats  > result saved in file: test.pdf, compresslevel 3, 
objectcompres

slevel 3
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, 
lmroman12-regular

.otf
mkiv lua stats  > fonts load time: 0.267 seconds
mkiv lua stats  > used platform: win64, type: windows, binary subtree: 
texmf-win

64
mkiv lua stats  > luatex banner: this is luatex, version beta-0.79.1 
(tex live 2

014/w32tex) (rev 5064)
mkiv lua stats  > control sequences: 40426 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua, used memory: 59 MB (ctx: 
59 MB),

hash type: lua, hash chars: min(64,40), symbol mask: utf (¤ä╬Á¤ç)
mkiv lua stats  > runtime: 0.721 seconds

system  | total runtime: 1.095 seconds
C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod
riguez5\bbb>



And here is log file:


open source > 1 > 1 > 
C:/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

>
ConTeXt  ver: 2015.02.03 23:55 MKIV beta  fmt: 2015.2.16  int: 
english/english >

>
system  > 'cont-new.mkiv' loaded
open source > 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-n

Re: [NTG-context] \executesystemcommand dont work?

2015-02-16 Thread Jaroslav Hajtmar

Hi Luigi.
Thanx for reply. I am sending result from output console from your 
example ie:

\starttext
\immediate\write18{echo "OO"}
\stoptext

Output is below.
To be honest, I've never done such a thing and did not examine how many 
times ConTeXt runs. I have always relied on the default settings.


Thankx for attempt to solve my problem.
Jaroslav Hajtmar


C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod
riguez5\bbb>context test

mtx-context | warning: no (local) file './test', proceeding
mtx-context | run 1: luatex 
--fmt="C:/context/tex/texmf-cache/luatex-cache/c
ontext/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" 
--jobname="test"

 --lua="C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb
1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line 
--c:currentrun=1 --c:
fulljobname="./test" --c:input="./test" --c:kindofrun=1 --c:maxnofruns=8 
"cont-y

es.mkiv"
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 5064)
 \write18 enabled.
open source > 1 > 1 > 
C:/context/tex/texmf-context/tex/context/base/cont-yes

.mkiv
>
ConTeXt  ver: 2015.02.03 23:55 MKIV beta  fmt: 2015.2.16  int: 
english/english >


>
system  > 'cont-new.mkiv' loaded
open source > 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-new

.mkiv
close source> 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-new

.mkiv
system  > files > jobname 'test', input './test', result 'test'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > 2 > 3 > 
C:/$~1da/ConTeXt/ConTeXt-Tests/my_way/ScanCSV/t-scancs

v_ConTeXt_module/2PabloRodriguez5/bbb/test.tex
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
close source> 2 > 3 > 
C:/$~1da/ConTeXt/ConTeXt-Tests/my_way/ScanCSV/t-scancs

v_ConTeXt_module/2PabloRodriguez5/bbb/test.tex
close source> 1 > 3 > 
C:/context/tex/texmf-context/tex/context/base/cont-yes

.mkiv

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
C:/context/tex/texmf-cache/luatex-cache/conte

xt/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.011 seconds, 0 scans 
with scanti

me 0.000 seconds, 0 shared scans, 8 found files, scanned paths: 
mkiv lua stats  > stored bytecode data: 364 modules (0.224 sec), 76 
tables (0.00

6 sec), 440 chunks (0.230 sec)
mkiv lua stats  > running in nuts mode: yes
mkiv lua stats  > cleaned up reserved nodes: 41 nodes, 439 lists of 438
mkiv lua stats  > node memory usage: 2 glue, 2 penalty, 6 attribute, 20 
glue_spe

c, 2 attribute_list, 2 temp
mkiv lua stats  > node list callback tasks: 6 unique task lists, 2 
instances (re

)created, 3 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf 
output)


mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > jobdata time: 0.003 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: 55 direct, 239 indirect, 294 total
mkiv lua stats  > randomizer: resumed with value 0.53962828455458
mkiv lua stats  > result saved in file: test.pdf, compresslevel 3, 
objectcompres

slevel 3
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, 
lmroman12-regular

.otf
mkiv lua stats  > fonts load time: 0.241 seconds
mkiv lua stats  > used platform: win64, type: windows, binary subtree: 
texmf-win

64
mkiv lua stats  > luatex banner: this is luatex, version beta-0.79.1 
(tex live 2

014/w32tex) (rev 5064)
mkiv lua stats  > control sequences: 40426 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua, used memory: 56 MB (ctx: 
56 MB),

hash type: lua, hash chars: min(64,40), symbol mask: utf (¤ä╬Á¤ç)
mkiv lua stats  > runtime: 0.643 seconds

system  | total runtime: 1.002 seconds
C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod
riguez5\bbb>


and here is log file:

open source > 1 > 1 > 
C:/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

>
ConTeXt  ver: 2015.02.03 23:55 MKIV beta  fmt: 2015.2.16  int: 
english/english >

>
system  > 'cont-new.mkiv' loaded
open source > 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv
close source> 2 > 2 > 
C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv

system  > files > jobname 'test', input './test', result 'test&

Re: [NTG-context] \executesystemcommand dont work?

2015-02-17 Thread Jaroslav Hajtmar

Thanx Akira for reply.
Thanks to your answers I see that my console output differs from yours. 
At this moment, however, I do not know what happened to my windows 
respectively how to correct the mistake. Does anyone know how to fix it? 
I'm not ConTeXt expert and I'm not Windows expert too.


Thanx Jaroslav Hajtmar


Dne 17.2.2015 v 8:04 Akira Kakuto napsal(a):

Dear Jaroslav,

Here your lines

fonts   > 'fallback modern-designsize rm 12pt' is loaded
test> before calling shell command
test> after calling shell command
close source> 2 > 3 > 
C:/$~1da/ConTeXt/ConTeXt-Tests/my_way/ScanCSV/t-scancs...


are like

fonts   > 'fallback modern-designsize rm 12pt' is loaded
"OO"
close source> 2 > 3 > 
C:/$~1da/ConTeXt/ConTeXt-Tests/my_way/ScanCSV/t-scancs...



(Windows 7, 32bit and Windows 8.1, 64bit)
(mtx-context | current version: 2015.02.03 23:55)

Thanks,
Akira

___ 

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] \executesystemcommand dont work?

2015-02-17 Thread Jaroslav Hajtmar

Thanx Ulrike for reply.
I'm sending outputs from Pdflatex and lualatex consoles:
I do not know what I should receive
Jaroslav Hajtmar



PDFLaTeX output console:
Microsoft Windows [Verze 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Všechna práva vyhrazena.

C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod
riguez5\ddd>pdflatex --shell-escape latex
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/W32TeX) 
(preloaded

 format=pdflatex)
 \write18 enabled.
entering extended mode
(./latex.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 79 languages loaded.
(c:/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(c:/texlive/2014/texmf-dist/tex/latex/base/size10.clo))
No file latex.aux.
(./latex.aux) )
No pages of output.
Transcript written on latex.log.

C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod
riguez5\ddd>



And LuaLaTeX output console:

C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod
riguez5\ddd>lualatex --shell-escape latex
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/W32TeX) (rev 4971)
 \write18 enabled.
(./latex.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 79 languages loaded.
(c:/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(c:/texlive/2014/texmf-dist/tex/latex/base/size10.clo)) (./latex.aux)
(./latex.aux))
 262 words of node memory still in use:
   2 hlist, 1 vlist, 1 rule, 2 glue, 39 glue_spec, 2 write nodes
   avail lists: 2:12,3:1,6:3,7:1,9:1
No pages of output.
Transcript written on latex.log.

C:\$~1da\ConTeXt\ConTeXt-Tests\my_way\ScanCSV\t-scancsv_ConTeXt_module\2PabloRod
riguez5\ddd>





Dne 17.2.2015 v 11:29 Ulrike Fischer napsal(a):

pdflatex --shell-escape


___
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] \executesystemcommand dont work?

2015-02-17 Thread Jaroslav Hajtmar

Thanx Akira.
I tested path settings, but it seems it is OK (c:\windows\system32 is in 
my PATH)

I am sending full path variable.

PATH=C:\ProgramData\Oracle\Java\javapath;C:\Program 
Files\ImageMagick-6.8.7-Q16;
C:\Program Files (x86)\PC Connectivity 
Solution\;C:\texlive\2014\bin\win32;C:\Pe
rl64\site\bin;C:\Perl64\bin;C:\1da\support\exe;C:\1da\support\batch; 
C:\Ruby\bin
;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; 
C:\Windows\System32\Wi
ndowsPowerShell\v1.0\;C:\Program Files\Dell\Dell Wireless WLAN 
Card;c:\Program F
iles\WIDCOMM\Bluetooth Software\;c:\Program Files\WIDCOMM\Bluetooth 
Software\sys
wow64;c:\Program Files (x86)\ATI 
Technologies\ATI.ACE\Core-Static;C:\Program Fil
es (x86)\Common Files\Roxio Shared\DLLShared\;"c:\Program Files 
(x86)\pstoedit";
"C:\Program Files (x86) \gs\gs8.71\bin";"C:\Program Files 
(x86)\ghostgum\gsview"
;"C:\Program Files\Tracker Software\PDF Viewer\";C:\Program Files 
(x86)\Kofax\Im
gCtls\bin; "C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe";C:\Program 
Files (
x86) \PDFtk\bin\;C:\Program Files 
(x86)\Inkscape\;c:\ruby\bin;c:\context\bin; C:
\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program 
Files (x86)
\Common Files\Microsoft Shared\Windows 
Live;C:\texlive\support\exe\sw\wscite;C:\
Program Files\ImageMagick-6.6.4-Q16; C:\1da\support\exe; C:\Windows; 
"C:\Program
 Files (x86)\gs\gs8.71\bin";"C:\Program Files (x86) 
\ghostgum\gsview";C:\Program
 Files (x86)\Windows Live\Shared;"C:\Program Files (x86) 
\Inkscape\Inkscape.exe"



Thanx for support.
Jaroslav Hajtmar



Dne 17.2.2015 v 13:21 Akira Kakuto napsal(a):

No file latex.aux.
(./latex.aux) )
No pages of output.


OK, as I said previously, c:\windows\system32 does not
exist in your PATH.

In your command prompt
echo "000"
will work, but
cmd /c echo "000"
will not work.

Please test in your command prompt

set PATH=c:\windows\system32;%PATH%
pdflatex --shell-escape latex

It should work perfectly.

After that, repair the PATH variable,
by reading the manual of OS, if you don't understand.

Thanks,
Akira

___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

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

[NTG-context] \executesystemcommand dont work? (RESOLVED!!!)

2015-02-17 Thread Jaroslav Hajtmar

Dear Akira.
I made adjustments as you advised me and ... believe it or not, all 
started working, including automatic updates of Standalone ConTeXt 
(which I was asking some time ago). I am very, very pleased, and I 
admire you for Your insight and work with the revelation of mistakes in 
setting my path variable. I am very grateful for your help. Likewise, I 
thank all those who have dealt with my problem. I hope that the error 
which was detected by Akira, help perhaps in the future to other users 
who fall into similar problems. Next time I I'll be careful when 
modifying setting of my path. Errors in the my Path was definitely my 
carelessness and sloppy settings.
Once again, many thanks and I appreciate very valuable advice. Finally, 
I again after a long time, everything works as it should ...


Sincerely,
Jaroslav Hajtmar



Dne 17.2.2015 v 14:55 Akira Kakuto napsal(a):

Dear Jaroslav,

See your PATH carefully. For example I find a space between
C:\1da\support\batch;
and
C:\Ruby\bin;C:\Windows\system32
i.e.,
C:\1da\support\batch; C:\Ruby\bin;C:\Windows\system32

There are many such spaces which should be removed.

I think quotations such as
"C:\Program Files (x86)\ghostgum\gsview"
should be removed like
C:\Program Files (x86)\ghostgum\gsview

Best,
Akira

___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

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

[NTG-context] Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)

2015-02-22 Thread Jaroslav Hajtmar

Hi ConTeXist...
How can I find out what version of Lua uses ConTeXt TeXlive 2014 
respectively what version of Lua uses Standalone ConTeXt?
The point is that Pablo Rodriguez use Fedora 20, which comes with 
Lua-5.2.2. Pablo tested last version of my module ScanCSV and his 
current version of standalone ConTeXt gained mistake, while I compiled 
(with the same current version of Standalone under Win7) the same source 
code without error 


Error message from log file is:

t-scancsv-2015-02-19.lua:81: assertion failed!
stack traceback:
[C]: in function 'assert'
t-scancsv-2015-02-19.lua:81: in function 'ParseCSVLine'
t-scancsv-2015-02-19.lua:123: in function 'parsecsvdata'
t-scancsv-2015-02-19.lua:180: in function 'opencsvfile'
    [\directlua]:1: in main chunk


Thanx
Jaroslav Hajtmar


___
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] Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)

2015-02-22 Thread Jaroslav Hajtmar
Hans, thanks for the reply. You write about the embedded CSV scanner. I 
was looking at contextgarden and on the Internet too, but I did not 
found any information about this.
Can you, please, about built-in scanner CSV say more (link, minimal 
example etc.)? This thing interests me very much...


Thanks
Jaroslav Hajtmar




Dne 22.2.2015 v 19:44 Hans Hagen napsal(a):

On 2/22/2015 7:36 PM, Jaroslav Hajtmar wrote:

Hi ConTeXist...
How can I find out what version of Lua uses ConTeXt TeXlive 2014
respectively what version of Lua uses Standalone ConTeXt?
The point is that Pablo Rodriguez use Fedora 20, which comes with
Lua-5.2.2. Pablo tested last version of my module ScanCSV and his
current version of standalone ConTeXt gained mistake, while I compiled
(with the same current version of Standalone under Win7) the same source
code without error 

Error message from log file is:

t-scancsv-2015-02-19.lua:81: assertion failed!
stack traceback:
 [C]: in function 'assert'
 t-scancsv-2015-02-19.lua:81: in function 'ParseCSVLine'
 t-scancsv-2015-02-19.lua:123: in function 'parsecsvdata'
 t-scancsv-2015-02-19.lua:180: in function 'opencsvfile'
 [\directlua]:1: in main chunk


_VERSION

for pablo: there are csv scanners built in context

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

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

Re: [NTG-context] Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)

2015-02-22 Thread Jaroslav Hajtmar

Akira, thanx for reply.
Jaroslav


Dne 23.2.2015 v 1:10 Akira Kakuto napsal(a):
The point is that Pablo Rodriguez use Fedora 20, which comes with 
Lua-5.2.2.


I think TeX Live 2014 uses Lua-5.2.3 on all platforms.
I don't know differences between 5.2.2 and 5.2.3.
Current windows version of standalone ConTeXt also uses 5.2.3.

Best,
Akira

___ 

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] Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)

2015-02-23 Thread Jaroslav Hajtmar
Thanks for showing options in last mails. This is for me very 
interesting news, and certainly it will be very useful and inspirative 
for me.


Jaroslav Hajtmar



Dne 23.2.2015 v 9:49 Hans Hagen napsal(a):

in addition to the previous mail, t.txt is:

first,second,third,fourth
"1","2","3","4"
"a","b","c","d"
"foo","bar""baz","boogie","xyzzy"

the code is in util-prs.lua (where all kind of parsing code lives)

if you want to use that kind of code outside context you can do 
something like this:


lua mtxlibs.lua --selfmerge foo.lua

and then in your script load foo.lua

this makes it possible to use the same set of helpers in context as 
well outside it (alternatively you can just use luatex as lua engine 
and mtxrun as script runner which is what we mostly do); this means 
that the context distribution provides all kind of means to set up 
workflows 


___
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] Different versions of Lua and error in the same versions of ConTeXt (Fedora vs Win7)

2015-02-24 Thread Jaroslav Hajtmar

Hi Hans.
One more I ask You about this thing. When I have other separator - for 
example ";" then c.txt data file is:


first,second,third,fourth
"1";"2";"3";"4"
"a";"b";"c";"d"
"foo";"bar""baz";"boogie";"xyzzy"

I was unable to figure out how to set the separator (and others default 
values too) so as to replace the default value in the library util-prs.lua

Is there anything as utilities.parsers.rfc4180splitter.separator=";"???

This library is loaded automatically? Or as a module?

Thanks Jaroslav Hajtmar

Here is minimal example for Your correction:

\starttext

\startluacode

local mycsvsplitter = utilities.parsers.rfc4180splitter()
utilities.parsers.rfc4180splitter.separator=";"

local crap = io.loaddata("c.txt")

local list, names = mycsvsplitter(crap,true)   inspect(list) inspect(names)
local list, names = mycsvsplitter(crap)inspect(list) inspect(names)

context.starttabulate { "|l|r|" }
for i=1,#list do
local l = list[i]
context.NC() context(l[1])
context.NC() context(l[3])
context.NC()
context.NR()
end
context.stoptabulate()

\stopluacode

\stoptext





Dne 23.2.2015 v 9:49 Hans Hagen napsal(a):

On 2/22/2015 9:42 PM, Pablo Rodriguez wrote:

On 02/22/2015 07:44 PM, Hans Hagen wrote:

[...]
for pablo: there are csv scanners built in context


Hans,

I don’t really need this at home, but I’m interested in this.


in addition to the previous mail, t.txt is:

first,second,third,fourth
"1","2","3","4"
"a","b","c","d"
"foo","bar""baz","boogie","xyzzy"

the code is in util-prs.lua (where all kind of parsing code lives)

if you want to use that kind of code outside context you can do 
something like this:


lua mtxlibs.lua --selfmerge foo.lua

and then in your script load foo.lua

this makes it possible to use the same set of helpers in context as 
well outside it (alternatively you can just use luatex as lua engine 
and mtxrun as script runner which is what we mostly do); this means 
that the context distribution provides all kind of means to set up 
workflows



I guess you mean m-database.mkiv. But I don’t have a clue on how to
handle it.

I mean, how to ignore the first line and how to make commands from the
so-called cells (A2, B5...; to use them in document combination) reading
an external file.

Many thanks for your help,

Pablo






___
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] CSV scanners built in ConTeXt - feature or bug?

2015-02-25 Thread Jaroslav Hajtmar

Hi ConTeXist
A few days ago Hans pointed me builtin CSV splitter. I tried to test it 
sure will come in handy for my needs. I found that if the CSV file 
contain a blank line, then it stops processing the file (see my minimal 
example). It is clear to me that the incorrectness of file format (eg. 
different number of columns in rows etc.) may cause interruption of 
processing, however, I want to ask whether there is an opportunity to 
process the CSV file with blank lines until the end of CSV file. I 
noticed that when I exporting data from Excel sometimes happens that in 
the export file will appear blank line. Is it interrupt processing a 
feature of a buildin splitter or is it a bug? Can it possibly somehow 
fix or add new functionality?


Thanx
Jaroslav Hajtmar



Here is minimal example:

\starttext

\startluacode
local mycsvsplitter = utilities.parsers.rfc4180splitter{
separator = ",",
quote = '"',
}

local crap = io.loaddata("data.txt")

-- with header variant
local tablerows, columnname = mycsvsplitter(crap,true)
inspect(tablerows)
inspect(columnname)

-- without header variant
-- local tablerows = mycsvsplitter(crap)
-- inspect(tablerows)

for i=1,#tablerows do
local l = tablerows[i]
 for j=1,#l do context(l[j]..", ")
end
context('\\crlf')
end

\stopluacode


\stoptext




% <-- here start data.txt file -->
first,second,third,fourth
1,"2","3","4"
"a","b","c","d"
"foo","bar""baz","boogie","xyzzy"
"","",""," "
"And now","followed by","several","blank lines"




"After several","empty rows","data continues","here"
11,"22","33","44"
"aa","bb","cc","dd"
% <-- and here stop data.txt 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] CSV scanners built in ConTeXt - feature or bug?

2015-02-26 Thread Jaroslav Hajtmar

Hans and Alan,
Thanks for the reply. Now it works properly. I would like to ask if 
you're planning to fix file util-prs.lua in a future release of 
standalone ConTeXt.
As for me, I'd rather vote for as the default option other option, ie 
which does not stop on a blank line ie. not how it's setup now (ie 
personally I'd rather vote  strict=true would mean process all lines of 
CSV file and strict=false mean stop processing on blank line), but I 
will take into account whatever alternative and consequently I would 
take into account this options for my own library.
Alan writes about this behavior as like metapost feature. Personally, I 
think that the CSV file is basically a plain text file and a blank line 
in it has its place. The end of the text file is usually marked by  
character, so I guess there's no reason to terminate processing before 
the file really ends.


Jaroslav Hajtmar



Dne 26.2.2015 v 12:20 Alan BRASLAU napsal(a):

On Thu, 26 Feb 2015 10:47:29 +0100
Hans Hagen  wrote:


i'm not sure about the default as the standard might demand quit at
empty line so that needs to be figured out (not by me therefore by
you)

Stop on empty line is a very MetaPost-like feature.

I don't have an opinion as to what should be expected for CSV, but
MP thus allows one to pick-off sets of data by successive reads to one
file.

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
___


___
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] Incompatibility catcodes of characters in ConTeXt and PlainTeX

2015-02-27 Thread Jaroslav Hajtmar

Hello ConTeXist.
Petr Olsak (maintainer of Czech/Slovak support for TeX) helped me with 
simple typing of sign charts. He made a PlainTeX macro who is working 
too in ConTeXt (see 
http://tex.stackexchange.com/questions/230273/typing-of-math-sign-charts).


Petr Olsak (not ConTeXt even LaTeX user) was modified PlainTeX macro to 
work in ConTeXt and asked the question:
"Does anybody know why ConTeXt sets catcode of & to 12? This means that 
it is incompatible with plain TeX".


May I therefore ask , what is the reason that has character & catcode 
other than in Knuth PlainTeX?

There are catcodes of other characters incompatible?

Thanx Jaroslav Hajtmar


___
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] Incompatibility catcodes of characters in ConTeXt and PlainTeX

2015-02-28 Thread Jaroslav Hajtmar

Dne 27.2.2015 v 19:04 Hans Hagen napsal(a):

On 2/27/2015 5:53 PM, Jaroslav Hajtmar wrote:

Hello ConTeXist.
Petr Olsak (maintainer of Czech/Slovak support for TeX) helped me with
simple typing of sign charts. He made a PlainTeX macro who is working
too in ConTeXt (see
http://tex.stackexchange.com/questions/230273/typing-of-math-sign-charts). 



Petr Olsak (not ConTeXt even LaTeX user) was modified PlainTeX macro to
work in ConTeXt and asked the question:
"Does anybody know why ConTeXt sets catcode of & to 12? This means that
it is incompatible with plain TeX".


Which is imo no big deal.
I did not write that he would give redoing some work, after discovering 
that catcode & is different than in plainTEX.



May I therefore ask , what is the reason that has character & catcode
other than in Knuth PlainTeX?
There are catcodes of other characters incompatible?


Because the context table mechanisms don't use & (and never used it) 
so ther ei sno reason to make & special. The _ and ^ are also normal 
characters. For now we keep the $ for math (and in math mode the & ^ _ 
work as expected).


Although we're to some extend plain compatible it's not our aim, just 
like we're not amstex, latex, lamstex or anytex compatible.


Ok. Thanks for the explanation. I wrote to Peter that developer context 
to have a reason, and certainly it would from an ordinary whim not done.
Even so, I am very satisfied with the degree of compatibility. 
Practically all of my old PlainTeX macros in ConTeXt work fine.

Thanx
Jaroslav


Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


___
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] Incompatibility catcodes of characters in ConTeXt and PlainTeX

2015-03-01 Thread Jaroslav Hajtmar

One more thanx Hans for interesting and useful information
Jaroslav Hajtmar

BTW: I did not get an answer to my last mail see Re: [NTG-context] CSV 
scanners built in ConTeXt - feature or bug?
I wrote that now is splitter works properly. I would like to ask if 
you're planning to fix file util-prs.lua in a future release of 
standalone ConTeXt?


As for me, I'd rather vote for as the default option other option, ie 
which does not stop on a blank line ie. not how it's setup now (ie 
personally I'd rather vote  strict=true would mean process all lines of 
CSV file and strict=false mean stop processing on blank line), but I 
will take into account whatever alternative and consequently I would 
take into account this options for my own library.
Alan writes about this behavior as like metapost feature. Personally, I 
think that the CSV file is basically a plain text file and a blank line 
in it has its place. The end of the text file is usually marked by  
character, so I guess there's no reason to terminate processing before 
the file really ends.





Dne 1.3.2015 v 11:05 Hans Hagen napsal(a):

On 3/1/2015 7:24 AM, Jaroslav Hajtmar wrote:

Dne 27.2.2015 v 19:04 Hans Hagen napsal(a):

On 2/27/2015 5:53 PM, Jaroslav Hajtmar wrote:

Hello ConTeXist.
Petr Olsak (maintainer of Czech/Slovak support for TeX) helped me with
simple typing of sign charts. He made a PlainTeX macro who is working
too in ConTeXt (see
http://tex.stackexchange.com/questions/230273/typing-of-math-sign-charts). 




Petr Olsak (not ConTeXt even LaTeX user) was modified PlainTeX 
macro to

work in ConTeXt and asked the question:
"Does anybody know why ConTeXt sets catcode of & to 12? This means 
that

it is incompatible with plain TeX".


Which is imo no big deal.

I did not write that he would give redoing some work, after discovering
that catcode & is different than in plainTEX.



May I therefore ask , what is the reason that has character & catcode
other than in Knuth PlainTeX?
There are catcodes of other characters incompatible?


Because the context table mechanisms don't use & (and never used it)
so ther ei sno reason to make & special. The _ and ^ are also normal
characters. For now we keep the $ for math (and in math mode the & ^ _
work as expected).

Although we're to some extend plain compatible it's not our aim, just
like we're not amstex, latex, lamstex or anytex compatible.


Ok. Thanks for the explanation. I wrote to Peter that developer context
to have a reason, and certainly it would from an ordinary whim not done.
Even so, I am very satisfied with the degree of compatibility.
Practically all of my old PlainTeX macros in ConTeXt work fine.


\pushcatcodetable
\catcodetable\texcatcodes

your plain code

\popcatcodetable

but it doesn't help when sources are passed as arguments of macros 
under the normal regime




Thanx
Jaroslav


Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___ 



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

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





___ 



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] Hello -- and RFH (Request For Help) for privately typesetting a new travelling book

2015-03-09 Thread Jaroslav Hajtmar

Hi Harald.
I remember you very well:-) unforgettable guy (see 
http://bulletin.cstug.cz/pdf/2011-2-4  on page 70 - guy number 22 :-))


In terms of assistance, I think that many users in this conference, 
happy to help. Moreover, I think it will be quite useful, since it will 
be certainly practical questions whose solution will surely welcome the 
many users ConTeXt.


E.g. the very first query and reply to it (ie Shrink JPGs to some 
resolution (dpi) ?)  deeply impressed me and learn about practical things.
A greeting to you and all enthusiasts of this conference, which is an 
integral part of my life (both work and hobby too) ...


Jaroslav Hajtmar








Dne 9.3.2015 v 22:00 Harald Koenig napsal(a):

Hello ConTeXt users!

since I'm new to this list (and the group of context users;) a quick 
introduction
to myself and my current project:

I've been using LaTeX since 1986 -- some of you may know me from some TeX 
meetings
(and recently also the context users's meetings -- without really using context 
so far).

in 2009 using LaTeX I typeset a 100 page diary+pictures book about a group tour
from our parish to Israel and Jordan.  making text flowing around the picutres
with LaTeX (in the way I'd like to typeset it) was a real nightmare with LaTeX.

so after finishing that project with LaTeX due to severe time constraints,
I've used that text to convert it to context and learn a bit how this book
can be typeset (much better?) using context -- mostly whenever I met Hans
at every tex conference I could et hands on him, and also Willi and other 
helpers!
but the "context-way" Isreal book  always remained unfinished or at least 
unpolished
as there was no need (and again no time) to really perfectly finish up.


now this happend again:
recently I've been traveling through India, again with a group of our parish.
and again, there was that idea to make such a nice book like for the Isreal 
tour.
so this time, I'd like to use context instead of latex...


BUT, there are still quite some issues where I'll need *your* help
to make this really work and get a nice book.

I'll try to split up my questions into separate mails,
hopefully with small to minimal examples if possible
(and if you'd like to get hards on my complete ugly tex code,
plesae feel free to ask me!... ;-)



so thanks in advance for any advice and help,

Harald


___
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] setupformulas options (or defineformula) and effort to reduce the font in math formulas

2015-03-10 Thread Jaroslav Hajtmar

Hello List.
I would like some elegant way to diminished font in math formulas...

Is there possibility anything as 
\setupformulas[before={\switchtobodyfont[small]} ]?

I need to align formulas, so are not enough to \mathematics {}

Below is my fallback. You can do something smarter?

Thanx Jaroslav Hajtmar



\defineformula[small][
align=right,
strut=yes,
spacebefore=,
spaceafter=,
% before={\switchtobodyfont[small]}
]

% Here is my fallback solution:
\def\Startsmallformula{\startsmallformula\switchtobodyfont[small] }


\starttext

\startformula
\lim\limits_{x\rightarrow-2^{\mp}}{\arctan\frac{x}{2+x}}=\pm\frac{\pi}{2}
\stopformula

\startformula
f':\;y' = \frac{\sqrt{3}(1+x^2)}{(1-x^2)^2+3x^2}
\stopformula

\startformula
\lim\limits_{x\rightarrow 1^{\mp}}{\frac{x^2+1}{x-1}}=\mp\infty
\stopformula



\Startsmallformula
\lim\limits_{x\rightarrow-2^{\mp}}{\arctan\frac{x}{2+x}}=\pm\frac{\pi}{2}
\stopsmallformula

\Startsmallformula
f':\;y' = \frac{\sqrt{3}(1+x^2)}{(1-x^2)^2+3x^2}
\stopsmallformula

\Startsmallformula
\lim\limits_{x\rightarrow 1^{\mp}}{\frac{x^2+1}{x-1}}=\mp\infty
\stopsmallformula



\blank[big]

\startsmallformula
\startalign
\NC f(x)\NC = \ln (x^2+2x+2)\NR
\NC f(-x)\NC = \ln ((–x)^2 - 2x + 2)\NR
\NC -f(x)\NC = -\ln (x^2+2x+2)\NR
\stopalign
\stopsmallformula

\blank[big]

\Startsmallformula
\startalign
\NC f(x)\NC = \ln (x^2+2x+2)\NR
\NC f(-x)\NC = \ln ((–x)^2 - 2x + 2)\NR
\NC -f(x)\NC = -\ln (x^2+2x+2)\NR
\stopalign
\stopsmallformula

\stoptext



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

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

Re: [NTG-context] setupformulas options (or defineformula) and effort to reduce the font in math formulas

2015-03-10 Thread Jaroslav Hajtmar

Thanks Hans for the reply.
I take to type some formulas larger font, so that's why I opted to frame 
their own definition of a formula environment with small print. Switch 
entire mathematical text on small I don't want.

Therefore, I would like to have both:

\startformula

\stopformula

and

\startsmallformula

\stopsmallformula

Thanx
Jaroslav Hajtmar


Dne 10.3.2015 v 23:57 Hans Hagen napsal(a):

On 3/10/2015 11:45 PM, Jaroslav Hajtmar wrote:

Hello List.
I would like some elegant way to diminished font in math formulas...

Is there possibility anything as
\setupformulas[before={\switchtobodyfont[small]} ]?
I need to align formulas, so are not enough to \mathematics {}

Below is my fallback. You can do something smarter?


define a bodyfont (rm,mm,tt) where the math has an rscale of 0.8

Hans

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



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

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

Re: [NTG-context] setupformulas options (or defineformula) and effort to reduce the font in math formulas

2015-03-11 Thread Jaroslav Hajtmar

Thanx Wolfgang for reply.
I had no idea that it is possible in this way to change the font size. I 
could not figure a way for your solution set alignment formulas to right 
and how work \defineformula and \definestartstop together.


After defining a new MY formula in combination with your solution works 
it fine, as I had imagined.
Is there any possibility of setting of parameters a newly defined 
formulas? Or, it can not be done, and everything must be solved within 
the initial definition?


One more thanx
Jaroslav Hajtmar


\defineformula[MY][
align=right,
strut=yes,
spacebefore=,
spaceafter=,
]

\definestartstop[smallformula]
  [before={\startformula[small]},
   after=\stopformula,
]


% \setupformulas[align=right,strut=yes,spacebefore=,spaceafter=]
% 
\setupformulas[smallformula][align=right,strut=yes,spacebefore=,spaceafter=]

% \setupformulas[small][align=right,strut=yes,spacebefore=,spaceafter=]
% \setupsmallformulas[align=right,strut=yes,spacebefore=,spaceafter=]
% \setupsmallformulaformulas[align=right,strut=yes,spacebefore=,spaceafter=]
% \setupformulas[MY][align=right,strut=yes,spacebefore=,spaceafter=]
% \setupformulas[MYformula][align=right,strut=yes,spacebefore=,spaceafter=]
% \setupMYformulas[align=right,strut=yes,spacebefore=,spaceafter=]


\starttext

\startformula
c^2 = a^2 + b^2
\stopformula

\startformula[small]
c^2 = a^2 + b^2
\stopformula

\startformula[8pt]
c^2 = a^2 + b^2
\stopformula

\startsmallformula
c^2 = a^2 + b^2
\stopsmallformula

\startMYformula[small]
c^2 = a^2 + b^2
\stopMYformula

\startMYformula[5pt]
c^2 = a^2 + b^2
\stopMYformula


\stoptext



Dne 11.3.2015 v 0:52 Wolfgang Schuster napsal(a):

\startformula has a optional argument which let you change the font, e.g. 
\startformula[9pt].

\definestartstop[smallformula]
   [before={\startformula[small]},
after=\stopformula]

\starttext

\startformula
c^2  = a^2  + b^2
\stopformula

\startformula[small]
c^2  = a^2  + b^2
\stopformula

\startsmallformula
c^2  = a^2  + b^2
\stopsmallformula

\stoptext


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

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

Re: [NTG-context] setupformulas options (or defineformula) and effort to reduce the font in math formulas

2015-03-12 Thread Jaroslav Hajtmar

Hello Wolfgang.

After some searching and experimenting, here is my functional solution.
I wrote it into the wiki. I have not found there eg. defineformula 
command etc


Jaroslav Hajtmar



\defineformula[MY][
align=left,
strut=no,
 spacebefore=,
 spaceafter=,
]


% so you can modify the settings of defineforumla[MY]
\setupformulae[MY][align=right,strut=yes,spacebefore=medium,spaceafter=big]

% so we can create new start-stopsmallformula
\definestartstop[smallformula]
  [before={\startformula[small]},
   after=\stopformula,
]

% and we can so create new start-stopmysmallformula:
\definestartstop[mysmallformula]
  [before={\startMYformula[small]},
   after=\stopMYformula,
]

% and here is my shortcuts:
\let\bmyformula\startmysmallformula
\let\emyformula\stopmysmallformula



\starttext

\title{Example of use and behavior}

startformula:

\startformula
c^2 = a^2 + b^2
\stopformula

startformula$[$small$]$:

\startformula[small]
c^2 = a^2 + b^2
\stopformula

startformula[8pt]:

\startformula[8pt]
c^2 = a^2 + b^2
\stopformula

startsmallformula:

\startsmallformula
c^2 = a^2 + b^2
\stopsmallformula


startmysmallformula:

\startmysmallformula
c^2 = a^2 + b^2
\stopmysmallformula

startMYformula:

\startMYformula
c^2 = a^2 + b^2
\stopMYformula

startMYformula[5pt]:

\startMYformula[5pt]
c^2 = a^2 + b^2
\stopMYformula


bmyformula:

\bmyformula
c^2 = a^2 + b^2
\emyformula



\stoptext


http://wiki.contextgarden.net/defineformula


Dne 11.3.2015 v 18:18 Jaroslav Hajtmar napsal(a):

Thanx Wolfgang for reply.
I had no idea that it is possible in this way to change the font size. 
I could not figure a way for your solution set alignment formulas to 
right and how work \defineformula and \definestartstop together.


After defining a new MY formula in combination with your solution 
works it fine, as I had imagined.
Is there any possibility of setting of parameters a newly defined 
formulas? Or, it can not be done, and everything must be solved within 
the initial definition?


One more thanx
Jaroslav Hajtmar


\defineformula[MY][
align=right,
strut=yes,
spacebefore=,
spaceafter=,
]

\definestartstop[smallformula]
  [before={\startformula[small]},
   after=\stopformula,
]


% \setupformulas[align=right,strut=yes,spacebefore=,spaceafter=]
% 
\setupformulas[smallformula][align=right,strut=yes,spacebefore=,spaceafter=]

% \setupformulas[small][align=right,strut=yes,spacebefore=,spaceafter=]
% \setupsmallformulas[align=right,strut=yes,spacebefore=,spaceafter=]
% 
\setupsmallformulaformulas[align=right,strut=yes,spacebefore=,spaceafter=]

% \setupformulas[MY][align=right,strut=yes,spacebefore=,spaceafter=]
% 
\setupformulas[MYformula][align=right,strut=yes,spacebefore=,spaceafter=]

% \setupMYformulas[align=right,strut=yes,spacebefore=,spaceafter=]


\starttext

\startformula
c^2 = a^2 + b^2
\stopformula

\startformula[small]
c^2 = a^2 + b^2
\stopformula

\startformula[8pt]
c^2 = a^2 + b^2
\stopformula

\startsmallformula
c^2 = a^2 + b^2
\stopsmallformula

\startMYformula[small]
c^2 = a^2 + b^2
\stopMYformula

\startMYformula[5pt]
c^2 = a^2 + b^2
\stopMYformula


\stoptext



Dne 11.3.2015 v 0:52 Wolfgang Schuster napsal(a):
\startformula has a optional argument which let you change the font, 
e.g. \startformula[9pt].


\definestartstop[smallformula]
   [before={\startformula[small]},
after=\stopformula]

\starttext

\startformula
c^2  = a^2  + b^2
\stopformula

\startformula[small]
c^2  = a^2  + b^2
\stopformula

\startsmallformula
c^2  = a^2  + b^2
\stopsmallformula

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


___
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] How to properly put information into contextwiki

2015-03-12 Thread Jaroslav Hajtmar

Hello list.

I tried in vain to find some information on how to properly load some 
things into http://wiki.contextgarden.net/
I tried to insert there thing I have not found there 
(http://wiki.contextgarden.net/defineformula) but I could not find how 
to classify this page to a hierarchy (in this case into the section 
commands). They are somewhere about some information? Or has the final 
classification in charge of an administrator, etc? Thanks for the link 
to some information. I would like to wiki occasionally contributed 
something, but I've somehow fundamentally not orienting.


Thanks Jaroslav Hajtmar
___
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] Change counter of chapters (sections, subsections...)

2015-04-16 Thread Jaroslav Hajtmar
Hello ConTeXistI need to start writing any text from 53 page and such from the 
5th chapter (or section). It is possible in a similar way as I set the start 
page number set also the counter of chapters (sections)?

Here is my minimal example:

\starttext
\chapter{Fictive chapter}
\chapter{Fictive chapter}
\chapter{Fictive chapter}
\chapter{Fictive chapter}


\page


\setcounter[userpage][53]


\chapter{Fifth (actually first) nonfictive chapter}


blablabla


\stoptext


Thanx for help.


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

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

  1   2   3   4   >