[NTG-context] Column sets (span) & unwanted vertical gap

2019-10-01 Thread Procházka Lukáš Ing .

Hello,

the code bellow produces unwanted vertical gap between the bottom border of the figure and the following 
title "A" in the first column (marked by red arrows "<->" in the PDF attached).

Note that in the second column there is no such gap.

I tried to play with "before", "inbetween", "beforesection" and other keys of 
\setuphead to remove the gap but without success.

Is there a way to avoid the vertical gap?

My code so far:


\setuppapersize[A3,landscape]

\setuplayout
  [topspace=10mm,header=5mm,headerdistance=5mm,height=270mm,
   backspace=20mm,width=380mm,
  ]

\setupheadertexts[]
\setupfootertexts[]

\definecolumnset[example][n=3,balancing=no]
\definecolumnsetspan[wide][n=2]

\setupexternalfigures[location=default]

\setupindenting[no]
\setupwhitespace[none]

\setuplayout[grid=yes]

\definehead[MyTit][title]
\setuphead[MyTit]
  [style=\bf,color=MyBlue,
   
before={\blank[none]},after={\blank[none]},inbetween={\blank[none]},beforesection={BS},aftersection={AS},
   page=no,%grid=yes,
  ]

%

%\showframe
%\showboxes

%\showlayout

%

\starttext
  \startcolumnset[example]
\startcolumnsetspan[wide]
  \externalfigure[cow][height=120mm,frame=on]
  %\vbox to120mm{}
\stopcolumnsetspan
\MyTit{A}
  \input knuth
\MyTit{B}
  \input knuth
  \stopcolumnset
\stoptext


Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t6.mkiv
Description: Binary data


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

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


Re: [NTG-context] Column(set)s & overlapping lines

2019-10-01 Thread Procházka Lukáš Ing .

Hello,

thank you for quick response - I didn't notice such question.

I added some info to wiki:

https://wiki.contextgarden.net/Command/startcolumnset#Note

Best,

Lukas


On Tue, 01 Oct 2019 08:24:19 +0200, Henri Menke  wrote:


This has been asked many times.
Columnsets need grid.

\setuplayout[grid=yes]

Cheers, Henri

On 10/1/19 7:16 PM, Procházka Lukáš Ing. wrote:

Hello,

I have the following code:


\definecolumnset[example][n=3,balancing=no]
\definecolumnsetspan[wide][n=2]

\setupexternalfigures[location=default]

%

\starttext
   \startcolumnset[example]
 \startcolumnsetspan[wide]
   %\externalfigure[hacker][width=120mm] % Produces overlapping last two 
lines in the first column, too
   \vbox to80mm{}
 \stopcolumnsetspan

 \input knuth
   \stopcolumnset
\stoptext


The last two lines in the first column overlap (it seems that the last line is 
typeset a bit higher than the pre-last line) - how to avoid it?

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




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Column(set)s & overlapping lines

2019-10-01 Thread Procházka Lukáš Ing .

Hello,

I have the following code:


\definecolumnset[example][n=3,balancing=no]
\definecolumnsetspan[wide][n=2]

\setupexternalfigures[location=default]

%

\starttext
  \startcolumnset[example]
\startcolumnsetspan[wide]
  %\externalfigure[hacker][width=120mm] % Produces overlapping last two 
lines in the first column, too
  \vbox to80mm{}
\stopcolumnsetspan

\input knuth
  \stopcolumnset
\stoptext


The last two lines in the first column overlap (it seems that the last line is 
typeset a bit higher than the pre-last line) - how to avoid it?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Options for \column (was: Columns with non-equal width; nested columns)

2019-09-25 Thread Procházka Lukáš Ing .

Hello,

I extended the "Description" section at 
https://wiki.contextgarden.net/Command/column#Description by an incomplete list of 
options.


Please try it and report back, i.e. document it in the wiki. Someone has to do 
it…


The only effect I can see is when I use \column (= go to next column) and 
\column[last] (go to last column);
just guessing what other options mean;
and no idea what [3*5] does.


I only ever used plain \column.


So did I. And I tried \column[last] this time, too.

So - anyone with better knowledge to fill meaning of the unknown \column 
options?

BTW, what effect has using \column more times than \startcolumns[n=...] 
predicts?

Best,

Lukas

NB: I've noticed many changes on wiki 
(https://wiki.contextgarden.net/Special:RecentChanges) in last days issued by 
you, Hraban, so thank you for maintaining wiki.



Maybe the source helps further: 
https://source.contextgarden.net/tex/context/base/mkiv/page-cst.mkiv



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



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Columns with non-equal width; nested columns

2019-09-25 Thread Procházka Lukáš Ing .

Hello Hraban,

On Wed, 25 Sep 2019 13:07:50 +0200, Henning Hraban Ramm  wrote:


If your ConTeXt installation is quite recent, you have 
texmf-context/doc/context/documents/general/manuals/pagecolumns.pdf
This is quite new and I don’t know how usable.


useful, thanks.


(Hint for everyone: the "manuals" directory is a tresure trove!)


(I can confirm!)

BTW, following "columnsets.pdf", \column has many options, unfortunately not so 
clear for me; so:

\column-> go to next column?
\column[]  -> = \column?
\column[yes]   -> = \column?
\column[page]  -> go to first column on the new page?
\column[3] -> go to 3rd column - or skip 3 columns?
\column[first] -> go to first column, also go to next page if currently on 2+th 
column?
\column[last]  -> go to last column?
\column[3*5]   -> ???

Any explanation would be nice.

Best regards,

Lukas



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



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Columns with non-equal width; nested columns

2019-09-25 Thread Procházka Lukáš Ing .

Hello,

thanks for reaction - so I'm starting with column sets (@Wolfgang: text from 
column 2a may flow into 2b).

My code so far:


\definecolumnset[example][n=3,balancing=no]
\definecolumnsetspan[wide][n=2,background=contrast]

\setupexternalfigures[location=default]

\setuphead[subsubsubsubsubject][style=bold]

\starttext
  \startcolumnset[example]
\startcolumnsetspan[wide]
  \externalfigure[hacker][width=95mm]
\stopcolumnsetspan

\dorecurse{2}{
  \subsubsubsubsubject{Sub}
  \input ward
}

\column
\column

\darkred
  \starttabulate[|rB|lp|]
\NC a
  \NC
AA
\NC\NR
\NC aa
  \NC
AAA
\NC\NR
  \stoptabulate
  \stopcolumnset
\stoptext


produces overlapping lines at the end of the first column.
- How to avoid this?

- Being in a columnset environment, is there a way to tell context "go to third 
column" (regardless in which column I am currently typing)?

- Altough I found some wiki material about column sets (e.g. 
https://wiki.contextgarden.net/Command/setupcolumnsetstart or columns.pdf), I found 
nothing about "page columns" - can you give me a link?

- All wiki examples use "1" at the place of "nesting level":

"
\setupcolumnsetstart[...][...][...][...]
[...]   columnset name
[...]   nesting level
[...]   number of individual column in columnset
[...]   starting line (1 = start at the top)

...

\setupcolumnsetstart[three][1][1][15]
^
| -- HERE
"

Is there a sample which would use an other number? - I'm asking as I guess my 
task has to do with nested column sets.

Best regards,

Lukas


On Tue, 24 Sep 2019 18:47:18 +0200, Henning Hraban Ramm  wrote:




Am 2019-09-24 um 15:44 schrieb Procházka Lukáš Ing. :

I need to get columns like this:


| | 1b |
| 1a  ||
+-+|
|  2a  |  2b  ||
|  |  ||

I tried the following:


\starttext
 \startcolumns[n=2] % How to tell that ratio between columns should be 2:1?
   \input knuth % Be 1a


Such a layout is not possible with simple old columns.
Try columnsets or page columns (see manuals of the same name).


Greetlings, Hraban



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t4.mkiv
Description: Binary data


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

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


[NTG-context] Columns with non-equal width; nested columns

2019-09-24 Thread Procházka Lukáš Ing .

Hello,

I need to get columns like this:


| | 1b |
| 1a  ||
+-+|
|  2a  |  2b  ||
|  |  ||

I tried the following:


\starttext
  \startcolumns[n=2] % How to tell that ratio between columns should be 2:1?
\input knuth % Be 1a

\startcolumns[n=2]
  \input ward % Be 2a

  \column

  \input ward % Be 2b
\stopcolumns

\column

\input knuth % Be 1b
  \stopcolumns
\stoptext


- Is it possible to nest columns?
 - If not, is there another solution?

- How to specify ratio of widths of columns?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Wiki update

2019-05-30 Thread Procházka Lukáš Ing .

Hello Taco,


From now on, when you are editing the wiki (especially the /Command/CMD pages), you can use 
CMD to output the formal table of arguments
for that CMD (omit the backslash)

For example,

  section

outputs a table with the formal calling convention(s) for the \section command. 
Multiple tables actually, as it also outputs the alternative calls with 
different arguments, and it outputs the definition of the internal \*section* 
command, of which \section is an instance. (The parents of instances are 
printed in a slanted font).


this is really great!

This gives idea what syntax "sugars" (alternatives) are possible and what args 
may be used! This lacked for years!


===

I have not auto-replaced any of the handcrafted command page syntax tables in 
the existing wiki pages, because quite often the current syntax table has 
manual additions explaining various options. In the formal version these are 
obviously not present, and I did not want to remove any of that extra 
information.

Anyway, the nice thing about this new wiki plugin is that if you want to create a 
page for a specific command that is not in existence right now, it is a simple matter 
of going to the expected url, and creating a page with just a Syntax heading and a 
 tag.

For example (created a minute ago):

url:
  https://wiki.contextgarden.net/Command/setupdescription

content:
  == Syntax ==

  setupdescription


My suggestions is to add an auto-generated-command-syntax wiki-page-section, 
too.

I find it very useful - just now one can see what are possibilities!

I added the following code into wiki page - just for testing purposes, anyone 
can alter the page:

https://wiki.contextgarden.net/Command/section#Syntax



== [[Help:Reference|Syntax (generated automatically from ConTeXt definition)]] 
==
section



And just now I can see that \section accepts syntax of the forms:

\section[MyRef]{My title}
\section[MyRef]{4.0}{My title}
\section[reference=MyRef,ownnumber=4.0,title={My title}]

So better for us if we find a way to COMBINE command descriptions already existing on wiki 
WITH those generated via command injection.

Thanks again for the great job.

Best regards,

Lukas


Thanks go to Wolfgang for all the hard work!



Best wishes,
Taco



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] XML export: basic questions

2019-05-22 Thread Procházka Lukáš Ing .

Hello,

suppose having "Main.mkiv":


\setupbackend[export=yes]

\starttext
  \startsection[title={Sec},MyPar=MyVal]
\input knuth
  \stopsection
\stoptext


Some questions concerning XML export:

1. Normally, with \setupbackend[export=yes], Ctx creates "Main-export" 
directory containing (among others) Main-raw.xml, and Main-tag.xhtml and some subdirs.

Is there a way to tell Ctx to produce just one XML file with a prescribed name 
which wouldn't be placed in any subdir?
In my case - to produce "Main.xml" (instead of "Main-export/Main-raw.xml"), 
other files to be omitted?

2. Is there a way to export user parameters used in \section?

In my case: \startsection[title={Sec},MyPar=MyVal] uses user parameter "MyPar" with value 
"MyVal", but "MyPar" is not transmitted into XML;
the goal is to have

which would allow some filtering when reprocessing that XML.

- Or is there another way, like enclosing into a user tag:

  \starttag[MyTag]
\startsection[title={Sec},MyPar=MyVal]
  \input knuth
\stopsection
  \stoptag

which would export into:


  
  ...
  


Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] section to have different conversion in body part and appendices

2019-05-22 Thread Procházka Lukáš Ing .

Hello,

that's it - thanks!

The following code seems to be even more minimal & working:


\definestructureconversionset[appendix:sectionnumbers][,,A,]

\setupheads[sectionconversionset=sectionnumbers]

\starttext
  \completecontent

  \startbodymatter
\part{Part}
  \chapter{Chap}
\section{In body}
  \subsection{SSec}
  \stopbodymatter

  \startappendices
\part{Part}
  \chapter{Chap}
\section{In apps}
  \subsection{SSec}
  \stopappendices
\stoptext


Best regards,

Lukas


On Tue, 21 May 2019 16:14:45 +0200, Pablo Rodriguez  wrote:


On 5/21/19 3:10 PM, Procházka Lukáš Ing. wrote:

Hello,

is there a way to tell \section (or other heads) to be "number-converted" 
differently in bodypart and appendices?


Hi Lukáš,

I think this is what you want to achieve:

\definestructureconversionset
[sectionnumbers]
[0,R,n,n,g]
[n]

\definestructureconversionset
[appendix:sectionnumbers]
[0,R,Characters,g,characters]
[n]

\setupheads
[sectionconversionset=sectionnumbers]

\setuphead[section][] % e.g. "appendices:numberconversion=A"?
\starttext
   \startbodymatter
 \section{In body} % To produce "1. In body"
   \stopbodymatter
   \startappendices
 \section{In apps} % To produce "A In apps"
   \stopappendices
\stoptext

I hope it helps,

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
___




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

AppNum2.mkiv
Description: Binary data


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

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


[NTG-context] section to have different conversion in body part and appendices

2019-05-21 Thread Procházka Lukáš Ing .

Hello,

is there a way to tell \section (or other heads) to be "number-converted" 
differently in bodypart and appendices?

Something like:


\setuphead[section][] % e.g. "appendices:numberconversion=A"?
\starttext
  \starbodyamtter
\section{In body} % To produce "1. In body"
  \stopbodymatter
  \startappendices
\section{In apps} % To produce "A In apps"
  \stopappendices
\stoptext


Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] joinedup not working within footnote within itemize

2019-05-08 Thread Procházka Lukáš Ing .

Hello,

I need to have itemize with "joinedup" option inside footnote which comes 
within itemize:


\starttext
  A%
  \startitemize[][]
\item ItemA%
  \footnote{%
Some text
\startitemize[joinedup][] % <<< "joinedup" doesn't work here <<<
  \item Item1
  \item Item2
\stopitemize
  }

\item ItemB%
  \stopitemize
\stoptext


Here, there is an unwanted blank line between "Item 1" and "Some text".
How to avoid or to remove the unwanted blank line?

(A solution for ConTeXt "pre-LMTX" would be preferred, due to the fact that I was not able (so far) 
to rebuild all Lua extensions (.dll) from 5.3 ("pre-LMTX" Ctx) to 5.4 (Ctx - "LMTX") 
version.)

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

Itm.mkiv
Description: Binary data


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

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


Re: [NTG-context] Prevent indentation after itemize

2019-04-12 Thread Procházka Lukáš Ing .

Hello,

thanks Aditya for the explaining example!

I added the sample to wiki:

https://wiki.contextgarden.net/Indentation

Best regards,

Lukas



indentnext=auto means that the next paragraph will be indented when there
is a blank space and not indented when there is no blank space.

So (untested)

\setupindenting[medium,yes]
\setupitemize[indentnext=auto]
\starttext
\startitem
   \item One
\stopitem

This paragraph should be indented.

\startitemize
   \item Two
\stopitemize
This paragraph should not be indented.
\stoptext

Aditya



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Prevent indentation after itemize

2019-04-11 Thread Procházka Lukáš Ing .

Hello,

On Thu, 11 Apr 2019 14:44:39 +0200, Aditya Mahajan  wrote:


On Thu, 11 Apr 2019, Procházka Lukáš Ing. wrote:


... Great, perfect, thank you! Lukas


The wiki page also explains the details of indentation:

https://www.contextgarden.net/Indentation


thank you for pointing the link.

(From the manual and the Ctx test suite, I cannot see how exactly 
"indentnext=auto" works. But thank you anyway.)

Lukas


Aditya



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Prevent indentation after itemize

2019-04-11 Thread Procházka Lukáš Ing .

... Great, perfect, thank you! Lukas


On Thu, 11 Apr 2019 12:48:25 +0200, Mikael P. Sundqvist  
wrote:


On Thu, Apr 11, 2019 at 10:02 AM Procházka Lukáš Ing.  wrote:


Hello,

Czech typo rules prefer not indenting paragraphs after itemization.

How to setup indenting best to achieve this?

The following code gives the desired output:


\setupindenting[yes,big]

\starttext
   \section{Sec}

   \input knuth

   \startitemize[][after={\blank\noindent}]
 \item Aaa
 \item Bbb
   \stopitemize
% "%" JUST TO SUPPRESS BLANK LINE
   \input knuth
\stoptext


but (obviously) forces user to suppress a blank line between \stopitemize and next text 
(thus "% JUST TO SUPPRESS BLANK LINE").

Is there a way which would "gobble" next \par after \stopitemize to allow to write simply 
(without "% ... "):


...
   \stopitemize
  <- EMPTY LINE TO BE ALLOWED HERE
   \input knuth
...


(I tried to play with \ingnorespaces, \removeunwantedspaces and so but with no 
effect.)

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 
396___
If your question is of interest to others as well, please add an 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
___


Try the indentnext key. Either locally

\startitemize[][indentnext=no]

or, globally,

\setupitemize[
indentnext=no,
]

/Mikael
___
If your question is of interest to others as well, please add an 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
___




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Prevent indentation after itemize

2019-04-11 Thread Procházka Lukáš Ing .

Hello,

Czech typo rules prefer not indenting paragraphs after itemization.

How to setup indenting best to achieve this?

The following code gives the desired output:


\setupindenting[yes,big]

\starttext
  \section{Sec}

  \input knuth

  \startitemize[][after={\blank\noindent}]
\item Aaa
\item Bbb
  \stopitemize
% "%" JUST TO SUPPRESS BLANK LINE
  \input knuth
\stoptext


but (obviously) forces user to suppress a blank line between \stopitemize and next text 
(thus "% JUST TO SUPPRESS BLANK LINE").

Is there a way which would "gobble" next \par after \stopitemize to allow to write simply 
(without "% ... "):


...
  \stopitemize
 <- EMPTY LINE TO BE ALLOWED HERE
  \input knuth
...


(I tried to play with \ingnorespaces, \removeunwantedspaces and so but with no 
effect.)

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

NoIndAftIt.mkiv
Description: Binary data


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

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


[NTG-context] Ctx LMTX + Lua 5.4

2019-04-08 Thread Procházka Lukáš Ing .

Hello,

I'm using a custom .dll in Ctx (my own .dll written in C with some extensions 
to Lua).

Whenever Ctx started to use a newer version of Lua, I rebuilt the .dll with the 
appropriate version of lua*.dll.

With the latest (non-LMTX) Ctx, I used Lua53.dll from:

http://www.w32tex.org/toolsw32/lua53lib.zip (THIS LINK IS NO MORE 
VALID!)
and
https://www.tug.org/svn/texlive/trunk/Master/bin/win32/lua53.dll

(thanks Akira in the mailing thread "Building a custom .dll to work with ConTeXt 
(LuaTeX)").

I would like to "upgrade" my .dll to work with Ctx LMTX - where could I find 
the appropriate lua54lib.zip (.lib and Lua54.dll for Ctx LMTX)?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Cascaded description

2019-04-06 Thread Procházka Lukáš Ing .

Hello,

I finally found a solution (which doesn't use \description or any other Ctx 
command) (and which may be clumsy - I'm not so good in tex programming):


\def\IndByText#1{%
  \newbox\IndByTextBox
  \newdimen\IndByTextBoxWd
  \setbox\IndByTextBox\hbox{#1}%
  \IndByTextBoxWd=\wd\IndByTextBox
  \advance\leftskip by\IndByTextBoxWd
  \def\Left##1{%
\hskip-\IndByTextBoxWd
\hbox to\IndByTextBoxWd{##1\hfill}%
\ignorespaces
  }%
  \ignorespaces
  \setupindenting[no]%
}

\starttext
  \input knuth

  \bgroup
\IndByText{\bold{Abcdef~}}
\Left{\bold{Abcdef}}
  \input knuth

  \bgroup
\IndByText{\bold{Klmnopqr~}}
\Left{\bold{Klmnopqr}}
  Something

\Left{\bold{Shorter}}
  \input knuth
  \egroup
  \egroup
\stoptext


The only thing I cannot get rid of is a warning in the log:

"
warning > \box \IndByTextBox is already defined (\relax it first)
warning > \dimen \IndByTextBoxWd is already defined (\relax it first)
"

How & where to "relax the box"?

Best regards,

Lukas


On Tue, 02 Apr 2019 11:38:18 +0200, Procházka Lukáš Ing.  wrote:


Hello,

I'm trying to get nested descriptions (using "tab") to form a "cascade". The 
result should look like:

AAA ababababababab
 ababababababab

 BBB ababababab
 ababababab

 CCC ababab
 ababab

<--> indent (margin?) of the first nested description in relation to its parent
  should equal width of parent's head (+ distance?), i.e. width of "AAA ",

 <--> indent (margin?) of the second nested description in relation to its 
parent
  should equal width of parent's head (+ distance?), i.e. width of "BBB 
",

<--> so it should be width of "AAA " + 'width of "BBB " in total.

I'm not able to achieve this. My code so far is (and I also played with various 
combinations of alternative, margin, hang, indent...):


\starttext
   A

   \bgroup
 \setuptab[headstyle={\bold\tt},sample=123,width=fit,alternative=left]
   \starttab{abc}
 \input knuth

 \starttab{def}
   \input knuth

 \stoptab
   \stoptab
   \egroup

   \bgroup
 \setuptab[headstyle={\bold\tt},sample=123456,width=fit,alternative=hanging]
   \starttab{ghijkl}
 \input knuth

 \starttab{mnopqr}
   \input knuth

 \stoptab
   \stoptab
   \egroup
\stoptext


- Paragraphs of "abc" and "def": size of indentation of the paragraphs is good in relation to width 
of head, but paragraph "def" is not "cascaded".

- Paragraphs "ghijkl" and "mnopqr" are "cascaded" well; but width of (margin?) 
is any - it is not related to the width of the sample text.

So how to combine both approaches to get the desired result?

Best regards,

Lukas





--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

IndByTex.mkiv
Description: Binary data


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

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


[NTG-context] Cascaded description

2019-04-02 Thread Procházka Lukáš Ing .

Hello,

I'm trying to get nested descriptions (using "tab") to form a "cascade". The 
result should look like:

AAA ababababababab
ababababababab

BBB ababababab
ababababab

CCC ababab
ababab

<--> indent (margin?) of the first nested description in relation to its parent
 should equal width of parent's head (+ distance?), i.e. width of "AAA ",

<--> indent (margin?) of the second nested description in relation to its 
parent
 should equal width of parent's head (+ distance?), i.e. width of "BBB 
",

<--> so it should be width of "AAA " + 'width of "BBB " in total.

I'm not able to achieve this. My code so far is (and I also played with various 
combinations of alternative, margin, hang, indent...):


\starttext
  A

  \bgroup
\setuptab[headstyle={\bold\tt},sample=123,width=fit,alternative=left]
  \starttab{abc}
\input knuth

\starttab{def}
  \input knuth

\stoptab
  \stoptab
  \egroup

  \bgroup
\setuptab[headstyle={\bold\tt},sample=123456,width=fit,alternative=hanging]
  \starttab{ghijkl}
\input knuth

\starttab{mnopqr}
  \input knuth

\stoptab
  \stoptab
  \egroup
\stoptext


- Paragraphs of "abc" and "def": size of indentation of the paragraphs is good in relation to width 
of head, but paragraph "def" is not "cascaded".

- Paragraphs "ghijkl" and "mnopqr" are "cascaded" well; but width of (margin?) 
is any - it is not related to the width of the sample text.

So how to combine both approaches to get the desired result?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

2~.mkiv
Description: Binary data
___
If your question is of interest to others as well, please add an 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] Showing value of a MP variable

2019-03-08 Thread Procházka Lukáš Ing .

Hello,

is it possible (namely for debugging) values of MP variables (be it on the 
console or in the log)?

I thought there is MP command "show" (mentioned in mpman.pdf) for this; but:


\starttext
  A
  \startMPcode
newpair pt; pt := (10,20);
show pt; % <-- How to show the value?
drawdot pt;
  \stopMPcode
\stoptext


doesn't show value of 'pt' variable.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

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

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


Re: [NTG-context] context --ansi creates empty log file

2019-03-08 Thread Procházka Lukáš Ing .

Hello,

I encountered the same with the minimal:


\starttext
  \nonexisting
\stoptext


Messages displayed on the console are "full-fledged" both with "--ansi" switch 
or without it.
But the resulting .log file is incomplete with "--ansi".

Would it be possible to adapt loggers to write the same messages to .log like 
without --ansi?

Best regards,

Lukas


On Fri, 08 Feb 2019 12:04:35 +0100, Marco Patzer  wrote:


Hi!

Is it expected behaviour that --ansi creates an empty log file?
Example:

%% foo.tex
\startext\null\stoptext

# context foo
# wc -c foo.log
7501 foo.log

# context --ansi foo
# wc -c foo.log
1 foo.log

ctx 2019.01.28 16:58

Marco
___
If your question is of interest to others as well, please add an 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
___




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t.mkiv
Description: Binary data


t-ansi-off.log
Description: Binary data


t-ansi-on.log
Description: Binary data
___
If your question is of interest to others as well, please add an 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] Modes and conditional part of the source

2019-02-28 Thread Procházka Lukáš Ing .

Hello Aditya,

thanks for the code, I'll try something like that.

Best regards,

Lukas


On Thu, 28 Feb 2019 12:54:06 +0100, Aditya Mahajan  wrote:


On Thu, 28 Feb 2019, Procházka Lukáš Ing. wrote:


Hello,

I'm struggling with using modes to make a part of the text conditional.

Here is my code:


\def\b#1{\startmode[#1]}
\def\e{\stopmode}

% \enablemode[100] % For optional usage

\starttext
A
\b{100} % Should be start of some conditional text from here ...
  B
\e % ... to here
\stoptext


Modes don't work that way. You can do something like this:

\define[1]\bbb
 {\doifnotmode{#1}
 {\grabbufferdata[dummy][bbb][eee]}}

\let\eee\relax

\enablemode[100]

\starttext
A

\bbb{100}
   Inside mode 100
\eee

\bbb{101}
   Inside mode 101
\eee

\stoptext


Depending on the actual use case, there might be simpler ways.

Aditya



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Modes and conditional part of the source

2019-02-28 Thread Procházka Lukáš Ing .

Hello,

I'm struggling with using modes to make a part of the text conditional.

Here is my code:


\def\b#1{\startmode[#1]}
\def\e{\stopmode}

% \enablemode[100] % For optional usage

\starttext
  A
  \b{100} % Should be start of some conditional text from here ...
B
  \e % ... to here
\stoptext


Compilation fails with:

"
tex error   > tex error on line 0 in file : ! Emergency stop
<*> cont-yes.mkiv

*** (job aborted, no legal \end found)
"

How to make the sample work?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t.log
Description: Binary data


t.mkiv
Description: Binary data
___
If your question is of interest to others as well, please add an 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] Mapping TABLE to xtable (module "ntb-to-xtb") doesn't recognize "c" option for columns

2019-02-20 Thread Procházka Lukáš Ing .

Hello Hans,

On Wed, 20 Feb 2019 09:15:40 +0100, Hans Hagen  wrote:


as column setup for TABLEs by "\setupTABLE[c][1][width=1in]" is handy
and is used frequently, would it be possible to provide identical
mechanism for xtables?


all is possible but it won't happen ... different approach ... you can use 
named setups here


should you provide a MWE? - I cannot find an example of usage setups for 
setting column width; something like:

\startsetups MyXTable
  % How to specify the width of the first column here?
\stopsetups

\startxtable[setup=MyXTable]
...
\stopxtable

Best regards,

Lukas


Hans



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Mapping TABLE to xtable (module "ntb-to-xtb") doesn't recognize "c" option for columns

2019-02-20 Thread Procházka Lukáš Ing .

Hello,

On Tue, 19 Feb 2019 21:35:41 +0100, Wolfgang Schuster 
 wrote:




Procházka Lukáš Ing. schrieb am 19.02.19 um 21:27:

Hello,

it seems that xtable setup doesn't recognize the "c" option, which is
recognized successfully by TABLE setup;
tested on mapping provided by "ntb-to-xtb" module:


\usemodule[ntb-to-xtb] \restoreTABLEfromxtable

\starttext
  \bTABLE
\setupTABLE[c][1][width=1in] % Set 1st column width - OK with TABLE
\bTR
  \bTD A
  \eTD
\eTR
  \eTABLE

  \bgroup
\mapTABLEtoxtable
\bTABLE
  \setupTABLE[c][1][width=1in] % <- This line causes error - not
recognized by xtable setup


xtables don’t support row/column settings like natural table and the
mapping doesn’t change this.

Wolfgang


as column setup for TABLEs by "\setupTABLE[c][1][width=1in]" is handy and is 
used frequently, would it be possible to provide identical mechanism for xtables?

From what I read in the manual, setting width of a column for xtable is 
provided by \startxcell[width=...] at the place of the first 
cell-in-that-column usage.

Moreover, when xtable is built in two passes, in the first pass it might take a 
column (width) specification(s), if provided, and keep on reading xcell 
specification(s), considering xcell width, if provided.

I guess to be handy to implement both \setupTABLE[c][...] and 
\setupxtable[c][...] in a similar way, especially when there is a simple 
mechanism which allows TABLE/xtable switching (ntb-to-xtb module).

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Mapping TABLE to xtable (module "ntb-to-xtb") doesn't recognize "c" option for columns

2019-02-19 Thread Procházka Lukáš Ing .

Hello,

it seems that xtable setup doesn't recognize the "c" option, which is 
recognized successfully by TABLE setup;
tested on mapping provided by "ntb-to-xtb" module:


\usemodule[ntb-to-xtb] \restoreTABLEfromxtable

\starttext
  \bTABLE
\setupTABLE[c][1][width=1in] % Set 1st column width - OK with TABLE
\bTR
  \bTD A
  \eTD
\eTR
  \eTABLE

  \bgroup
\mapTABLEtoxtable
\bTABLE
  \setupTABLE[c][1][width=1in] % <- This line causes error - not recognized 
by xtable setup
  \bTR
\bTD A
\eTD
  \eTR
\eTABLE
  \egroup
\stoptext


Gives:

"
...
setup   > error in line 1, namespace 'xtable', key 'c'
setup   > error in line 1, namespace 'xtable', key 'c'
setup   > error in line 1, namespace 'xtable', key 'c'
...
"

It might be useful to extend the module to understand "c" setup option as well.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

Ntb2Xtb.log
Description: Binary data


Ntb2Xtb.mkiv
Description: Binary data


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

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


[NTG-context] Weird TABLE split across pages

2019-02-19 Thread Procházka Lukáš Ing .

Hello,

a TABLE is split weirdly over two pages:

- on the first page (here: page 8): the (repeated) header of the TABLE and the 
first body row followed by void space,
- then (here: on the page 9) the remaining part of the TABLE;

- see the sample attached.

I'm not able to strip my real case more to make the example "more MINIMAL" - 
whatever next I delete, the problem disappears.

Image of the bad break is attached; so are the source files.

The resulting .pdf (~53 kB, bad TABLE break between page 8 and 9) is available 
here:

http://leteckaposta.cz/330923784

Any idea what's going wrong?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396<>
___
If your question is of interest to others as well, please add an 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] New logo proposal

2019-01-30 Thread Procházka Lukáš Ing .

Hello,

thanks Paul for the nice job! The colorful hexa-shaped logo seems much prettier.

One point/suggestion - if the letters "TEX" shared the same background - be it e.g. light gray - it might be 
cleaner how to read ("discover") the word "ConTeXt"; it would also keep the hexagonal shape, 
associating chemistry; and it would also indicate or highlight relation to "TeX".

But keep my notion or feeling just personal; the new logo is "nice enough" as 
published on wiki.

Best regards,

Lukas


On Tue, 29 Jan 2019 19:58:40 +0100, Paul Schalck  wrote:


Hello,

thanks for your feedback. Again, I don't want to impose or dismiss anything. I 
wanted to share this because I believed somebody else in the ConTeXt community 
could be interested.

@Taco: Actually, I stumbled upon the nice ConTeXt group logo recently and was wondering who made 
it. To answer your questions: I tried to avoid any logic or rainbow-type color sequence to create 
something more unique. The first square had to be in blue and the middle area in a warm color. (I 
played around a lot with the color combinations.) Regarding the outside circle: I tried different 
variations, with and without a surrounding circle or round background, with and without rounded 
squares, and was most pleased with this solution. It's true, "clean and simple" can 
easily lead to "too informal".

@Clyde J: Valid point. I use the logotype with the subscript 'E' whenever I can 
in inline text.

@Floris vM: Font, spacing, overall appealingness. No Helvetica/Nimbus Sans, 
which has less meaning to me for ConTeXt than a DIN-ish/technical one. Colors 
are fun. If you don't see it this way, it's perfectly fine.

@Alan B: I've uploaded MetaPost files of the main version.

Yes, the horizontal version is not very exciting nor very TeX-aware. I made 
this one primarily because I wanted something small for a little GUI script. 
Now I think it's just superfluous.

Greetings!

Paul



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Process file with '#' in the file name

2019-01-07 Thread Procházka Lukáš Ing .

Hello,

is there a way to process a file with '#' in the file name by ConTeXt?

E.g. file "T#.mkiv" with

\starttext
A
\stoptext

fails - not so surprisingly; but anyway - is there a way or "trick" to process 
it?

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

Re: [NTG-context] 'figures.getinfo()' not to exit ConTeXt

2018-12-06 Thread Procházka Lukáš Ing .

Hello Luigi,

On Thu, 06 Dec 2018 11:23:25 +0100, luigi scarso  wrote:


On Thu, Dec 6, 2018 at 11:17 AM Procházka Lukáš Ing.  wrote:


Hello,

I'm using the following code, mentioned here some time ago, to get some
info about PDF:


\startluacode
figures.getinfo = function(name, page)
 if type(name) == "string" then
 name = { name = name, page = page }
 end
 if name.name then
 local data = figures.push(name)

 --figures.identify()
local ok, res = pcall(figures.identify)
print(">>1", ok, res)

 --figures.check()
local ok, res = pcall(figures.check)
print(">>2", ok, res)

 figures.pop()
 return data
 end
end

local data = figures.getinfo("NonExisting.pdf")

\stopluacode


The problem is that once the PDF file doesn't exist, the function causes
ConTeXt to exit, even when I enclose 'figure.check()' into the 'pcall' (to
be handled like try/catch mechanism).

Is there a way so that the function 'figures.getinfo()' does't exit
ConTeXt, it just returns 'nil', or even gives info which directories (or
even which file types) were searched?

TIA.

something like that (untested), eventaully to be wrapped  in a your

function
local fileone = "NonExisting.pdf"
local data
if not lfs.isfile(fileone) then
report("unknown file %a",fileone)


well, yes, this should work; but \externalfigure uses a mechanism to lookup for a file which combines paths 
specified by "location=", "directory=", "order=" and maybe some more.

And whilst \externalfigure should find a file (whose location may not be known exactly, it just may 
use e.g. "directory=" spec), simple "lfs.isfile(fileone)" could not find the 
file since the exact path has not been specified.

IOW, I need to combine searching-for-file mechanism which is used inside 
\externalfigure with 'figures.getinfo()' so the 'getinfo()' should return 'nil' 
when no file (being specified like in \externalfigure, i.e. with no exact path, 
even without extension) is found.

BTW:  Ctx tells me "attempt to call a nil value (global 'report')" on "report("unknown 
file %a",fileone)" - do I have to enable/load something?

Lukas



else
 data = figures.getinfo("NonExisting.pdf")
end




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] 'figures.getinfo()' not to exit ConTeXt

2018-12-06 Thread Procházka Lukáš Ing .

Hello,

I'm using the following code, mentioned here some time ago, to get some info 
about PDF:


\startluacode
figures.getinfo = function(name, page)
if type(name) == "string" then
name = { name = name, page = page }
end
if name.name then
local data = figures.push(name)

--figures.identify()
local ok, res = pcall(figures.identify)
print(">>1", ok, res)

--figures.check()
local ok, res = pcall(figures.check)
print(">>2", ok, res)

figures.pop()
return data
end
end

local data = figures.getinfo("NonExisting.pdf")

\stopluacode


The problem is that once the PDF file doesn't exist, the function causes 
ConTeXt to exit, even when I enclose 'figure.check()' into the 'pcall' (to be 
handled like try/catch mechanism).

Is there a way so that the function 'figures.getinfo()' does't exit ConTeXt, it 
just returns 'nil', or even gives info which directories (or even which file 
types) were searched?

TIA.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] graphics

2018-12-05 Thread Procházka Lukáš Ing .

Hello,

would it be possible to provide some samples finally?

That would be very handy especially for those who are used to create plots via 
"several clicks on Excel ribbon".

Personally, I am interested in 2D plots to be created loading (an) external data file(s) 
(text files formed into tables with some headers and comments marked by a letter in the 
beginning of the line), often altered by Lua somehow (e.g. trimming "bad" 
values).
I am used to use tickz/pgfplots for this purpose; use of pgfplots is (probably) 
very powerful but one has to study a lot of pages to create a simple plot 
followed by many try-and-see.
Also, support for showing extremal values (local extremes) in 2d plots is 
something handy.

"My" typical 2d plot looks:

A
|
30  | 24.1 <- local extreme
| +
20  |  --- ---   15.6 <- local extreme
|/ \  +
10  |   -- ---
|
+->
10. 20.  30.  40.

Best regards,

Lukas


On Tue, 04 Dec 2018 19:54:54 +0100, Alan Braslau  
wrote:


On Tue, 4 Dec 2018 18:03:14 +0100
Hans Hagen  wrote:


Hi,

As most mechanism are reasonable okay now we can look into what
future versions of ConteXt should provide in terms of functionality.
The (luatex) engine is also more of less finished or at least stable
in terms of functionality.

One possible area of further development is graphics so I'd like to
know if there are (reasonable) demands for more graphics support
using metapost. Alan and I are on-and-off working on some extensions
and one of the things we discuss is visualization of data. The
question is of course what should be done in the lua/mp/tex
combination and what externally but the combination has some
advantages. There has been presentations and discussions at the last
meeting and graphics is always a nice topic, and also kind of
rewarding in terms of development.

Of course other demands can be formulated too, but these then need to
come with well defined descriptions (or mockup examples).


Hans is alluding to work that we are doing to explore the possibilities
of lua + MetaPost in the treatment and visualization of data,
efficiently, with the possibility of handling large quantities of data.
Lua does this particularly well.

My first exercise has been a complete rewrite of the John Hobby graph
macros. It was/is an exercise in recreating the functionality "from
scratch", trying to use lua effectively when needed. The code and
approach is entirely new. My use case was the analysis of a large set
of data - entirely ridiculous for graphical display but containing
"outliers" or instances that are significant, and it works! I am
trying to generalize, and am doing this in my "free time".

So the aim is two-fold:

1) to efficiently handle large datasets through the use of lua

2) to generalize the notion of user data space from the
two-dimensional drawing space of MetaPost (and the represented page),
and affine transformations of this 2D space to other coordinate
systems and dimensions. We are not thinking about 3D rendering or
raytracing, but rather simple projections and other transformations
such as polar coordinates. (Of course, log scales, for example are a
"simple" non-linear transformation.)

I guess that Hans would like to expand the discussion to the future of
graphics in general, inviting input from everybody.

Alan



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Completecontent has problems with chapter in table

2018-11-23 Thread Procházka Lukáš Ing .

Hello,

something like this?


\setupexternalfigures[location=default]

\define[1]\MyNumCmd{%
  \externalfigure[hacker][height=2cm]
}

\setuphead[chapter][numbercommand=\MyNumCmd]

\starttext
  \chapter{Ch}

  \input knuth
\stoptext


Best regards,

Lukas


On Fri, 23 Nov 2018 09:13:39 +0100, Huseyin Özoguz  wrote:


Hi Wolfgang,

thank you. I work currently with version 2015.04.15 01:44

Can I safely update without any major changes, so all my projects
(hundrets of books, working in a publishing house) can be compiled as
usual? Maybe my issue of the chapter in table and the toc is solved in
the newest update as you say.


BTW: What if your goal with the \chapter in the table because this
creates a wrong value for the chapter counter. If your goal is to put
a frame around the chapter you can use the framedtext environment
which doesn’t lead to a wrong chapter number.


No, its not the frame, but the design. That was only a min-example to
reproduce my problem. The original table in my current project looks
like this:

\setupTABLE[c][each][align={high},frame=off]
\bTABLE
\bTR \bTD \externalfigure[path/image.jpg][height=2cm] \eTD \bTD
\vskip-4\lineheight
\chapter{chapter title}
\eTD \eTR
\eTABLE

So I have a chapter with a image on the left. I dont need chapter
numbers in this particular project, but anyhow: Is there a better way to
achieve my result without using tables?

Thanks.

Huseyin

Huseyin Özoguz

E-Mail: h.oezo...@mmnetz.de

Am 22.11.2018 um 22:31 schrieb Wolfgang Schuster:

Hi Huseyin,

I can’t reproduce your problem with the table of contents with the
current beta.

BTW: What if your goal with the \chapter in the table because this
creates a wrong value for the chapter counter. If your goal is to put
a frame around the chapter you can use the framedtext environment
which doesn’t lead to a wrong chapter number.

Wolfgang


Huseyin Özoguz schrieb am 22.11.18 um 14:37:

Hello together,

I have this min-example:

\starttext

\completecontent[criterium=all]

\chapter{craigs}

{\bTABLE
\bTR\bTD
\chapter{whatever}
\eTD \eTR
\eTABLE}

\chapter{gooff}

\completecontent[criterium=previous]

\stoptext

As you see, the \completecontent[criterium=previous] works fine, it
lists all chapters. But the \completecontent[criterium=all] does not,
only lists the first chapter. How to fix this?

Thank you!
Huseyin

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



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

ChapWithImg.mkiv
Description: Binary data
___
If your question is of interest to others as well, please add an 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] debug.getinfo

2018-11-22 Thread Procházka Lukáš Ing .

Hello,

the function 'debug.getinfo' was removed?

The following code:


\startluacode
  print(debug.getinfo)
\stopluacode

\starttext
  A \cldcontext{tostring(debug.getinfo)}
\stoptext


gives/prints 'nil'.

IIRC, the function was non-nil some weeks ago...

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

T~.mkiv
Description: Binary data


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

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

[NTG-context] Tabulate & repeating header

2018-11-12 Thread Procházka Lukáš Ing .

Hello,

the following code:


\starttext
  \bgroup
\setuptabulate[split=yes,header=repeat]

\starttabulatehead
  \FL
  \NC {\bf format char} \NC {\bf meaning} \NC \AR
  \LL
\stoptabulatehead

\starttabulate[|r|l|]
  \NC c \NC centered  \NC \AR
  \NC l \NC left aligned  \NC \AR
  \NC r \NC right aligned \NC \AR
\stoptabulate
  \egroup
\stoptext


has been copied from wiki - https://wiki.contextgarden.net/Tabulate#Headers and 
it should generate (repeating) header,
but no header appears.

Has anything changed?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Keeping Ctx versions (was: Re: spacing)

2018-11-11 Thread Procházka Lukáš Ing .

Hello Henning,

I go similar way as Alan does - I'm updating ConTeXt (usually) once a week 
while keeping backups of the previous versions.

My experience is that cca once a year I'm forced to get back to a previous Ctx copy as something 
stops working (IIRC, there some issues with switching to Lua 5.2 and now to Lua 5.3, an issue with 
Lua sorting alg which probably added a sortaity check at a point, a TickZ issue - all has been 
passed successfully over time (.dll rebuild with upper Lua releases, my fault in sorting alg, 
...)), but some time later I "boarded" back to the 
"train-of-ConTeXt-beta-releases".

I'm working on Windows (W7 and WX) - so for the case you were interested, I'm 
attaching some batches to save & update ConTeXt beta (call ReNew.bat from your 
Ctx installation direcory (d:\Ctx-Beta in my case); and also you need to have 7z 
installed which is used to zip the latest ConTeXt installation before update; .ba_ 
to be renamed to .bat).

Best regards,

Lukas


On Fri, 09 Nov 2018 16:23:55 +0100, Alan Braslau  
wrote:


On Fri, 9 Nov 2018 15:05:59 +0100
Tomas Hala  wrote:


I solve the same problem for ages... I decided for fixed time points


If it may be useful: I keep a very short-term backup so that when
things "break" or change, I can easily backtrack to a working copy.
I update using the following shell script:

#!/bin/sh
CONTEXTHOME=${HOME}/context
if [ ! -d ${CONTEXTHOME}/beta ] ; then
mkdir -p ${CONTEXTHOME}/beta
fi
if [ ! -d ${CONTEXTHOME}/previous ] ; then
mkdir -p ${CONTEXTHOME}/previous
fi
cd ${CONTEXTHOME}/beta
echo "*** move current to previous ***"
rsync -av --delete --progress . ../previous
echo "*** update beta ***"
rsync -ptv --progress rsync://contextgarden.net/minimals/setup/first-setup.sh . 
2>&1 | tee first-setup.log

./first-setup.sh --modules=all --fonts=all --engine=luatex 2>&1 | tee -a 
first-setup.log



This will not help against any undetected changes that may go unnoticed
for a while between different projects, but does protect me against
immediate "bugs".

Hans has suggested keeping a ConTeXt standalone copy in each separate
project file, as it is small enough that such duplication does not take
up too much space. (As we strip-down the distribution and as storage
space becomes bigger and bigger, this should not be a problem.) The
advantage of having a copy associated with a project is that one can
come back, years later even, and produce *exactly* the same output.

Alan



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396<>
___
If your question is of interest to others as well, please add an 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 installing a new font

2018-11-11 Thread Procházka Lukáš Ing .

Hello,

-- all attachments packed into one .zip --

probably one of the basic questions and skills in ConTeXt, but the first case 
for me: how to install a (downloaded third-party) font into ConTeXt:

I downloaded font source files from 
https://www.ctan.org/tex-archive/fonts/aurical/ and I unpacked the .zip 
content, so I have now (see FileList.txt for full info):


d:\Lukas\ConTeXt\Fonts\Aurical\fonts\afm
d:\Lukas\ConTeXt\Fonts\Aurical\fonts\FileList.txt
d:\Lukas\ConTeXt\Fonts\Aurical\fonts\map
d:\Lukas\ConTeXt\Fonts\Aurical\fonts\tfm
d:\Lukas\ConTeXt\Fonts\Aurical\fonts\type1
d:\Lukas\ConTeXt\Fonts\Aurical\fonts\afm\public
d:\Lukas\ConTeXt\Fonts\Aurical\fonts\afm\public\aurical
d:\Lukas\ConTeXt\Fonts\Aurical\fonts\afm\public\aurical\AmiciLogo.afm
d:\Lukas\ConTeXt\Fonts\Aurical\fonts\afm\public\aurical\AmiciLogoBold.afm
d:\Lukas\ConTeXt\Fonts\Aurical\fonts\afm\public\aurical\AmiciLogoBoldRslant.afm
...
d:\Lukas\ConTeXt\Fonts\Aurical\fonts\type1\public\aurical\LukasSvatbaSlant.pfb


Trying to install the font the easiest way, I also copied files into my ConTeXt 
dir, so I have also (see FileList2.txt):


d:\Ctx-Beta\tex\texmf\fonts\afm\public\aurical\AmiciLogo.afm
d:\Ctx-Beta\tex\texmf\fonts\afm\public\aurical\AmiciLogoBold.afm
d:\Ctx-Beta\tex\texmf\fonts\afm\public\aurical\AmiciLogoBoldRslant.afm
d:\Ctx-Beta\tex\texmf\fonts\afm\public\aurical\AmiciLogoBoldSlant.afm
...
d:\Ctx-Beta\tex\texmf\fonts\type1\public\aurical\AmiciLogo.pfb
d:\Ctx-Beta\tex\texmf\fonts\type1\public\aurical\AmiciLogoBold.pfb
d:\Ctx-Beta\tex\texmf\fonts\type1\public\aurical\AmiciLogoBoldRslant.pfb
d:\Ctx-Beta\tex\texmf\fonts\type1\public\aurical\AmiciLogoBoldSlant.pfb
...


I tried to follow instructions in 'mfonts.pdf' mentioned at 
https://wiki.contextgarden.net/Fonts, but early I failed with (unknown) 
"texfont" command cited here frequently.

I also experimented somehow with "mtxrun --make --generate" and "mtxrun script 
--font --reload --force" and with a simple show-font file which starts with:


\definefont[FONT][AmiciLogo.afm]
...


but the result is not written by AmiciLogo font.

So - how to make ConTeXt aware of a third-party font and how to use the font in 
the document?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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 updating 32b version

2018-10-24 Thread Procházka Lukáš Ing .

Hello Pablo,

thank you for testing, it's OK also on another computer with WinX 64b...

Best regards,

Lukas


On Wed, 24 Oct 2018 17:38:17 +0200, Pablo Rodriguez  wrote:


On 10/24/18 2:58 PM, Procházka Lukáš Ing. wrote:

Hello,

I encountered problem updating ConTeXt.

I'm still using 32b built due to some deps on 3rd party libs (32b, too).

Running 'first-setup.bat' doesn't create 'tex\texmf-mswin\' directory as 
usually.
[...]
Could anyone test obtaining 32b version of ConTeXt?


Hi Lukáš,

I’m on Linux 64bit, but how about specifying the platform such as in:

first-setup.sh --platform=mswin --modules=all

So I get Windows 32bit binaries.

Just in case it helps,

Pablo



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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 updating 32b version

2018-10-24 Thread Procházka Lukáš Ing .

Hello,

I encountered problem updating ConTeXt.

I'm still using 32b built due to some deps on 3rd party libs (32b, too).

Running 'first-setup.bat' doesn't create 'tex\texmf-mswin\' directory as 
usually.

I also modified the first-setup.bat to avoid 64b platform testing - see the 
first-setup.txt attached (.bat renamed to .txt due to mail filters).

The 'tex' dir has now:

texmf\
texmf-cache\
texmf-context\
texmf-fonts\
texmf-local\
texmf-modules\
texmf-project\
texmf-win64\
setuptex
setuptex.bat
setuptex.csh

but it used to be:

texmf\
texmf-cache\
texmf-context\
texmf-fonts\
texmf-local\
texmf-modules\
texmf-mswin\    WAS HERE
texmf-project\
texmf-win64\
setuptex
setuptex.bat
setuptex.csh

The log (first-setup.bat > Upd.log) may be downloaded here (~700 kB):

http://leteckaposta.cz/260806806

Could anyone test obtaining 32b version of ConTeXt?

TIA.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396@echo off

setlocal

:fetch

set OWNPATH=%~dp0
set PATH=%OWNPATH%bin;%PATH%
set PLATFORM=mswin

set CYGWIN=nontsec

rem if defined ProgramFiles(x86) (
rem set PLATFORM=win64
rem ) else (
rem if "%PROCESSOR_ARCHITEW6432%"=="AMD64" set PLATFORM=win64
rem )

REM ~ copy /y bin\mtx-update.lua bin\x.lua

rem if "%PLATFORM%" == "win64" goto update-win64

:update-win32

rsync -av --exclude 'rsync.exe' --exclude 'cygwin1.dll' --exclude 
'cygiconv-2.dll' rsync://contextgarden.net/minimals/setup/mswin/bin/ bin

goto update

rem :update-win64

rem rsync -av --exclude 'rsync.exe' --exclude 'cygwin1.dll' --exclude 
'cygiconv-2.dll' rsync://contextgarden.net/minimals/setup/win64/bin/ bin

rem goto update

:update

REM ~ copy /y bin\x.lua bin\mtx-update.lua

REM --mingw --nofiledatabase --engine=luatex

mtxrun --script ./bin/mtx-update.lua --update --force --make --engine=all 
--context=beta --texroot="%OWNPATH%tex" %*

echo.
echo.
echo When you want to use context, you need to initialize the tree with:
echo.
echo   %OWNPATH%tex\setuptex.bat %OWNPATH%tex
echo.
echo You can associate this command with a shortcut to the cmd prompt.
echo.
echo Alternatively you can add %OWNPATH%tex\texmf-%PLATFORM%\bin to your PATH
echo variable.
echo.
echo If you run from an editor you can specify the full path to mtxrun.exe:
echo.
echo.  %OWNPATH%tex\texmf-%PLATFORM%\bin\mtxrun.exe --autogenerate --script 
context --autopdf ...
echo.

:ruby

echo okay > ok.log

ruby -e "File.delete('ok.log')"

if not exist "ok.log" goto end

echo.
echo The distribution has been downloaded but if you want to run pdfTeX and/or 
XeTeX you
echo need to run this script with the following directive:
echo.
echo   --platform=all
echo.
echo You then also need to install Ruby in order to be able to use texexec. 
After
echo installing Ruby you can run this script again which will give you the 
formats
echo needed, or you can run:
echo.
echo   texexec --make --pdftex
echo   texexec --make --xetex
echo.

:okay

del /q ok.log

:end

endlocal
___
If your question is of interest to others as well, please add an 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] Odd/even page test

2018-10-17 Thread Procházka Lukáš Ing .

Hello Pablo,

that's it, thank you!

Lukas


On Tue, 16 Oct 2018 17:58:04 +0200, Pablo Rodriguez  wrote:


On 10/16/18 4:25 PM, Procházka Lukáš Ing. wrote:

Hello,

I need to check whether even or odd page is to be printed. I'm starting with 
the following simple code:


\def\T{\ifodd\pagenumber ODD\else EVEN\fi}

\starttext
   \dorecurse{2}{\T\page}
   \startTEXpage[width=50mm,height=150mm]\stopTEXpage
   \dorecurse{2}{\T\page}
\stoptext



Hi Lukáš,

both makeups and fitting pages aren’t numbered by default.

Either you add this to the preamble:

  \setupfittingpage[TEXpage][pagestate=start]

or you add the option "pagestate=start" to \startTEXpage.

I hope it helps,

Pablo



Why "user defined page" #3 is skipped in page numbering, so headers shown are:
1 - 2 - (nothing) - 3 - 4 and "ODD"/"EVEN" and text is "ODD" - "EVEN" - (nothing) - 
"ODD" - "EVEN"
instead of:
1 - 2 - (nothing) - 4 - 5 and "ODD"/"EVEN" and text be "ODD" - "EVEN" - (nothing) - 
"EVEN" - "ODD"?

TIA.

Best regards,

Lukas



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Odd/even page test

2018-10-16 Thread Procházka Lukáš Ing .

Hello,

I need to check whether even or odd page is to be printed. I'm starting with 
the following simple code:


\def\T{\ifodd\pagenumber ODD\else EVEN\fi}

\starttext
  \dorecurse{2}{\T\page}
  \startTEXpage[width=50mm,height=150mm]\stopTEXpage
  \dorecurse{2}{\T\page}
\stoptext


Why "user defined page" #3 is skipped in page numbering, so headers shown are:
1 - 2 - (nothing) - 3 - 4 and "ODD"/"EVEN" and text is "ODD" - "EVEN" - (nothing) - 
"ODD" - "EVEN"
instead of:
1 - 2 - (nothing) - 4 - 5 and "ODD"/"EVEN" and text be "ODD" - "EVEN" - (nothing) - 
"EVEN" - "ODD"?

TIA.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t.mkiv
Description: Binary data


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

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

[NTG-context] \noheaderandfooterlines to suppress header frame, too

2018-10-10 Thread Procházka Lukáš Ing .

Hello,

this may have been posted here some time before, but - would it be possible to 
extend \noheaderandfooterlines command to temporarily suppress bottom frame, 
too?

Suppose having the following code:


\setupheadertexts[left][right]
\setupbackgrounds[header][bottomframe=on]

\starttext
  \input knuth
  \page
  \noheaderandfooterlines
  \input knuth
\stoptext


- On the page #2, header is not shown, which is OK, but header (bottom-)frame 
is still drawn, which is unwanted...

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

NoHead.mkiv
Description: Binary data


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

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

Re: [NTG-context] OT: mupdf 1.14

2018-10-09 Thread Procházka Lukáš Ing .

Hello Luigi,

BTW, I have problem converting/compressing a scanned ~.pdf (~77 kB; of course, 
I have some bigger PDFs) via:

mutool.exe convert -F pdf -O resolution=150,compress-images -o ~~.pdf 
~.pdf

- The mutool.exe crashes (here on Win7 64b). (Is my understanding of mutool 
command line options OK?)

Lukas


On Tue, 09 Oct 2018 07:19:57 +0200, luigi scarso  wrote:


https://mupdf.com

The basic viewer mupdf-gl has now a minimal UI interface and  an add
annotation mode ('a' ) .
The mutool show command line tool  is  useful to inspect pdf .



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] wrapup

2018-09-21 Thread Procházka Lukáš Ing .

Hello,

just a note:

whilst command line option "--result=..." must point to the dir where the processed file is 
located, "os.rename()" allows to move files across dirs (at least on Win7), so this might be a way 
to evade "--result" limitation.

Best regards,

Lukas


On Fri, 21 Sep 2018 13:01:14 +0200, Hans Hagen  wrote:


I'll add documentdata.variable so that one can do this:

\setupdocument
   [id=foo]

\startluacode

 luatex.wrapup(function()
 local id = documentdata.variable("id")
 if id and id ~= "" then
 local oldname = file.addsuffix(environment.jobname,"pdf")
 local newname = file.addsuffix("doc-"..id,"pdf")
 if lfs.isfile(newname) then
  -- print("removing",newname)
 os.remove(newname)
 end
 if not lfs.isfile(newname) then
  -- print("renaming",oldname,newname)
 os.rename(oldname,newname)
 end
 if not lfs.isfile(newname) then
  -- print("error in renaming")
 end
 end
 end)

\stopluacode

\starttext

 test

\stoptext




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

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

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

Re: [NTG-context] how to set the name of outputfile using a value defined in the source

2018-09-21 Thread Procházka Lukáš Ing .

Hello,

On Fri, 21 Sep 2018 10:30:34 +0200, Henri Menke  wrote:


You could still do it, but it would require two passes.  In the first
pass to identify that you want to change the output file and write the
new name to an auxiliary file.  In the second file, you use your
automation script to read that file back in and call

context --result=test- test.tex


Or you can do it processing your source file by a batch, which:

1. calls context.exe with appropriate args,
2. checks for existence of a , which - being created during compilation - 
is processed somehow then.

Cheers,

Lukas





Thanks,

Jelle


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] tatoolbar

2018-09-07 Thread Procházka Lukáš Ing .

Hello,

due to great TextAdept (TA) [1] extendibility, I'd like to try to program a TA add-on 
which would provide a ConTeXt source "browser".

The idea is to create an independent window in the TA which will show the 
current document structure, or even the project structure, and provide some 
click-in-browser-go-to-source functionality.

Suppose having a source file with the following content (line numbers in (...) 
just for referring):

 a.tex
(1) \section{Sec}
(2)
(3) Hello
(4)
(5)  \subsection{Subsec}
(6)
(7)  Word


The "browser" should display this:


Sec (section)
Subsec (subsection)


After some investigation and some questioning in TA mailing list, it seem that 
"tatoolbar" [2] might bu useful for this purpose.

Unfortunately, there is an initial problem: the tatoolbar is not pre-compiled 
for Windows [3] and compilation under Windows is not so easy (I tried with 
GnuWin32 and MinGW installed on my WinX computer); getting Win bins is done by 
cross compiling under Linux.

Is there someone here - who is familiar with Linux - who could compile 
tatoolbar first - and provide it for trying to write the source browser?

Thank you in advance.

Best regards,

Lukas

[1] https://foicica.com/textadept/
[2] https://github.com/gabdub/ta-tweaks/wiki/tatoolbar
[3] https://foicica.com/textadept/manual.html#Compiling


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Synctex + Sumatra + TextPad

2018-08-21 Thread Procházka Lukáš Ing .

Hello,

this question extends the "[NTG-context] future versions - synctex" thread.

I'm using TextPad for editing Ctx source files, PdfXChange Viewer to view PDFs, 
both on Windows.

After reading some recent posts and after studying some web sources - especially

[a] https://www.sumatrapdfreader.org/docs/DDE-Commands.html for 
SumatraPDF viever and

[b] 
https://tex.stackexchange.com/questions/116981/how-to-configure-texniccenter-2-0-with-sumatra-2013-2016-version/116994#116994
 for inspiration how to make TXC interoperate with Sumatra,

I would like to provide "click-in-PDF-go-to-source" functionality - be Sumatra 
the viewer for this case.

Questions are:


1. How to run Sumatra so that it opens a PDF file AND reacts somehow to a mouse 
click, in order to provide a command to get to the corresponding place in the 
source file?

(IIUC, Sumatra provides such functionality, as e.g. TeXnic Center use 
it. [b].)

I guess that I have to configure Sumatra somehow, or to launch Sumatra with 
some command line parameters, so that when I click a point in the PDF (maybe 
while also holding CTRL or something - but it is a detail), a command is 
launched to open the source file in the editor and go to a particular line.


2. What should be the command line parameters passed to Sumatra to provide the linkage 
"open PDF-source at line"?

I deduce also that such command should call "mtxrun --script synctex" somehow (which will call 
"...\tex\texmf-context\scripts\context\lua\mtx-synctex.lua") as the "mtx-synctex" is able 
to read the .synctex produced during compilation of .tex files.

I deduce also that "mtx-synctex" calls the editor (which the user uses to edit 
source files) in the manner that it tells the editor "open file (...) and go to line 
(...).
Existing "mtx-synctex" is "aware" of "scite" editor, which is - next to 
"console" - the only editor pre-configured.

So:


3. What code should be added into "mtx-synctex" in order to make TextPad an editor known 
to "mtx-synctex"?

I found and tried that command e.g. 'C:\Program Files\TextPad 7\system\ddeopn32.exe" 
TextPad.dde Test.mkiv(40)' successfully opens "Test.mkiv" (being open before) and 
scrolls to line #40.

(TextPad location may vary - depending on version installed - can be e.g.:

C:\Program Files\TextPad 7
C:\Program Files (x86)\TextPad 7
C:\Program Files\TextPad 8
...
)

Any idea would be appreciated...

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] future versions - synctex

2018-08-21 Thread Procházka Lukáš Ing .

Hello,

a bit later - I was thinking if to react here, after reading all about synctex 
and complicated support for complicatedly assembled source files - but my 
personal experience/wish...


On 7/24/2018 11:02 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Hi Hans, all,



One needed feature that would be of general use is better support for
synctex. Thinking especially of structural elements such as headings,
footnotes, etc. which mostly do not work with synctex - i.e., clicking
on these elements in the pdf do not take one back to the correct
location in the relevant TEX file.


When building a document (or more precisely: documentation which consists of 
many documents), I'm widely referring to other files via \input, \component 
etc., I'm widely using \defs, \defines and \buffers defined in separate files 
(as these defs are used at more places - so let them being defined in one 
source file) and I'm often generating texts by Lua (e.g. tables - being read 
and parsed from a text in a \start/\stopluacode block or e.g. Excel named range 
read via LuaXls or from a .xml - and typeset by a Lua function, which allows 
simply change all \NC into \VL in a particular place).

The lengthy process is to EDIT (almost) finished docs/documentation. And at 
this place, it would be very handy if synctex worked. So I vote for a better 
click-in-PDF-go-to-source support.

On Wed, 25 Jul 2018 01:21:48 +0200, Hans Hagen  wrote:


Synctex is a beast. Basically it is not that useable for context which
is why we have a different implementation with a rather clean, minimal,
and predictable output. Unfortunately the usual approahc is to use a
library for interoreting the synctex files which has too much heuristics
built in. More flexible would be to let the viewer cann an external
program which then can interpret the synctex file based on a page and
position. This also would make it possible to have more clever
synchronization and/or adapt to a macro package. Anyway, were sort of
stuck and can only try to make the best of it.

That said, the context generated synctex file is nornally okay unless we
render from lua, which happens for instance with titles. Just try

\ctxlua{context("foo bar")}

and you will also see that there is no line related positioning.
Tweaking luatex for this is not really an options because whatever
decision we make here will backfire at some point. (I can look into some
option later but it needs bit of thinking)


I don't know anything deep about how sync is provided. But my layman point of view would be that whenever a 
character (or a "box") is to be placed on the page (or into output stream), ConTeXt should know 
which is the "deepest - currently read" source file, the line, moreover the column - and that 
position could result into "pick-and-go" position.

In this approach - "boxes" generated by Lua-in-ConTeXt should "jump" on 
\startluacode, \ctxlua, \cldcommand statement...


Anyway, i can cheat at the tex/lua end if needed and support e.g. titles
but i'm not going to pollute the code with every place where we come
from lua (also because in most cases there is no relation with the
source anyway then). Also, I will not add code that can have an impact
on performance when synctex is turned off.


Synctex should be turned on/off before source files are compiled into PDF - via command line option 
"--synctex" or \enabledirectives[system.synctex] before \starttext 
(\enabledirectives[system.synctex] after \starttext (\startcomponent) should be ignored?) - that 
could cause hooking picked Lua functions (or taking their "synctex-on" alternatives) - so 
normally (with synctex off) there wouldn't be any performance impact; worse performance would come 
only with synctex on - but it's user's choice.


But for a subset of
constructs that are relatively short in usage it is doable (but doesn't
really qualify as fun -- also, i don't use it myself).


Anyway, a better support for "pick-in-PDF-and-go-to-source" (synctex), namely when user 
"tunes" the docs to their final stage, would be great.

Best regards,

Lukas


(One complication is that for instance fixing it for some constructs
will break it for xml input which also supports synctex.)

Hans



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Buffer within a \def

2018-08-10 Thread Procházka Lukáš Ing .

Hello,

I'm not very familiar with using buffers, so a basic question:

Is it possible to use buffers within a \def?

The following sample doesn't compile:


\def\T{
  \startbuffer[Buf]
a b ccc
d e f
  \stopbuffer
  \getbuffer[Buf]
}

\starttext
  \T

  A
\stoptext


What's wrong?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t2.mkiv
Description: Binary data
___
If your question is of interest to others as well, please add an 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] btex ... etex within MP with 1 letter ignored?

2018-07-17 Thread Procházka Lukáš Ing .

Hello,

I encountered a weird thing - words of 1 letter inside btex ... etex within MP 
are not shown - check:


\setuplayout[page]

\startluacode
  context.setMPtext("Pare", "1")
  context.setMPtext("Pare2", "22")
  context.setMPtext("Pare3", "333")
\stopluacode

%

\startuseMPgraphic{Pare}
  draw thelabel(btex \switchtobodyfont[20mm]\sans\bold TTT etex, (0, 150))
withcolor red
;
  draw thelabel(btex \switchtobodyfont[20mm]\sans\bold U etex, (0, 100))
withcolor magenta
;
  draw thelabel(btex \switchtobodyfont[20mm]\sans\bold \MPtext{Pare} etex, (0, 
50))
withcolor green
;
  draw thelabel(btex \switchtobodyfont[20mm]\sans\bold \MPtext{Pare2} etex, (0, 
0))
withcolor blue
;
  draw thelabel(btex \switchtobodyfont[20mm]\sans\bold \MPtext{Pare3} etex, (0, 
-50))
withcolor yellow
;

\stopuseMPgraphic

% Overlays

\defineoverlay[Pare][\useMPgraphic{Pare}]

\setupbackgrounds[page][background={foreground,Pare}]

\starttext
  \startTEXpage[width=210mm,height=297mm]
Aaa
  \stopTEXpage
\stoptext


Here, texts "1" and "U" are not rendered; if you change them to e.g. "11" and 
"UU", all works fine.

Am I missing something? Bug?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

Pare.log
Description: Binary data


Pare.mkiv
Description: Binary data


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

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

[NTG-context] Storing Lua values between Ctx "*first* and next runs

2018-07-14 Thread Procházka Lukáš Ing .

Hello,

is there a Lua variable/namespace which is stored automatically between Ctx 
"*first" and following runs?

I thought 'userdata' is intended for this, but it seems it's not; I'd like to 
achieve something like:


\startluacode
  if tex.modes["*first"] then
userdata.LPr = "Something"
-- Is there a variable which is shared between Ctx runs?
  else
assert(userdata.LPr == "Something")
  end
\stopluacode


Of course, I can store the table via serialization functions to an extra file, 
but I thought there is already a variable/mechanism for this (e.g. using 
.tua/.tuc file) ... is it?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] *** Spam *** Figure captions: "Fig." instead "Figure"

2018-07-13 Thread Procházka Lukáš Ing .

Hello,

thank you - I supposed another \setup for changing the text...

Bets regards,

Lukas


On Fri, 13 Jul 2018 10:44:56 +0200, Lutz Haseloff 
 wrote:


Hi Lukas,

I use
\setuplabeltext[de][figure=Bild ]

You should use
\setuplabeltext[en][figure=Fig. ]

Greetings Lutz

Am 13. Juli 2018 10:30:22 MESZ schrieb "Procházka Lukáš Ing." :

Hello,

what is the way to change caption text for figures to be "Fig." instead
of "Figure"?

\setupcaptions[numberstopper={.},] changes "Figure 1" to "Figure 1.",
but is there a similar key for the text?

(\setupcations[prefix=] allows only "yes" or "no" -
http://wiki.contextgarden.net/Command/setupcaptions )

Best regards,

Lukas



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Figure captions: "Fig." instead "Figure"

2018-07-13 Thread Procházka Lukáš Ing .

Hello,

what is the way to change caption text for figures to be "Fig." instead of 
"Figure"?

\setupcaptions[numberstopper={.},] changes "Figure 1" to "Figure 1.", but is 
there a similar key for the text?

(\setupcations[prefix=] allows only "yes" or "no" - 
http://wiki.contextgarden.net/Command/setupcaptions )

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Parallel output of source data

2018-07-03 Thread Procházka Lukáš Ing .

Hello Wolfgang,

On Tue, 03 Jul 2018 09:07:23 +0200, Wolfgang Schuster 
 wrote:


Hi Lukas,

when you create the buffer with the grabbufferdata-command you already set
the delimiter for the environment with the third argument, in the
example below
this is the \stopcontentexport command.

To have different start/stop-commands for your environment means you have
to change all names in the implementation of the contentxport-environment.

%%
\unexpanded\def\bH{}

\def\dobH[#1]%
{...
 \grabbufferdata[...][bH][eH]}

\def\eH
   {}
%%


thank you for the explanation! - Much clearer for me how buffers work!

Best regards,

Lukas



Wolfgang

Procházka Lukáš Ing. <mailto:l...@pontex.cz>
3. Juli 2018 um 08:52
Hello,

I tried to \let shortcuts for \startcontentexport and
\stopcontentexport, but Ctx run fails.

I guess this is a basic misunderstanding, but - why?


\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]
}

\let\bX=\startcontentexport % < Use of these two "shortcuts" is
not possible,
\let\eX=\stopcontentexport  % < I'm getting : ! TeX capacity
exceeded, sorry [input stack size=1]

\starttext

  A

  \startcontentexport[t~.out.mkiv]
Hello!
\startitemize
\item Item
\stopitemize
  \stopcontentexport

  B

  \bX[t2~.out.mkiv]
Ahoj
  \eX

\stoptext


HSo how to define "shortcuts" properly?

Best regards,

Lukas



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Parallel output of source data

2018-07-03 Thread Procházka Lukáš Ing .

Hello,

I tried to \let shortcuts for \startcontentexport and \stopcontentexport, but 
Ctx run fails.

I guess this is a basic misunderstanding, but - why?


\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]
}

\let\bX=\startcontentexport % < Use of these two "shortcuts" is not 
possible,
\let\eX=\stopcontentexport  % < I'm getting : ! TeX capacity exceeded, 
sorry [input stack size=1]

\starttext

  A

  \startcontentexport[t~.out.mkiv]
Hello!
\startitemize
\item Item
\stopitemize
  \stopcontentexport

  B

  \bX[t2~.out.mkiv]
Ahoj
  \eX

\stoptext


HSo how to define "shortcuts" properly?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t.mkiv
Description: Binary data
___
If your question is of interest to others as well, please add an 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] space sectioning control

2018-06-26 Thread Procházka Lukáš Ing .

Hello,

there was no key "textdistance" described on wiki, so I added the option into 
key-value list:

http://wiki.contextgarden.net/Command/setuphead

Lukas


On Mon, 25 Jun 2018 15:20:43 +0200, Wolfgang Schuster 
 wrote:


You have to change the value of textdistance.

\setuphead
   [subsubsection]
   [alternative=text,
distance=0pt,
textdistance=.5em]

\starttext

\startchapter[title={First}]

\startsubsubsection
\input ward
\stopsubsubsection

\stopchapter

\stoptext

Wolfgang

Idris Samawi Hamid ادريس سماوي حامد 
25. Juni 2018 um 04:45
Dear gang,

Here's an interesting one, attached and below:

===
\setuphead[chapter]   [alternative=normal]
\setuphead[subsection][alternative=text]
\setuphead[subsection][criterium=local,distance=0em,sectionstopper=.]

\starttext

\startchapter[title={First},reference={}]
\startsubsection%[title={First}]
\input ward
\stopsubsection
\startsubsection%[title={Second}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second},reference={}]
\startsubsection%[title={}]
\input ward
\stopsubsection
\startsubsection%[title={}]
\input ward
\stopsubsection
\stopchapter
\stoptext
===

Our subsections do not have titles. The space between the subsection
numeral and the text is too large, even with

distance=0em

Negative distances don't behave well - toggle lines 4 and 5.

What can we do to control the space between numeral and text? Thank
you in advance.

Best wishes
Idris
___
If your question is of interest to others as well, please add an 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
___
Wolfgang Schuster 
25. Juni 2018 um 13:41
To number paragraphs you can create a counter with \definelabel.


\definelabel[Paragraph][text=,numberstopper={.},headcommand=\groupedcommand{}{ 
}]

\starttext

\startchapter[title={First},reference={}]

\Paragraph\input ward

\Paragraph\input ward

\stopchapter

\startchapter[title={Second},reference={}]

\Paragraph\input ward

\Paragraph\input ward

\stopchapter

\stoptext


Wolfgang


Idris Samawi Hamid ادريس سماوي حامد 
25. Juni 2018 um 14:58
On Mon, 25 Jun 2018 05:41:15 -0600, Wolfgang Schuster
 wrote:


To number paragraphs you can create a counter with \definelabel.


Yes - and tested some paragraph options yesterday. Many thanks for the
sample below.

But this particular project is very large with countless
cross-references already in place that depend on the subsectioning
mechanism. Is there a workaround that will avoid major surgery to the
main text?

Also, subsubsections and subsubsubsections are still needed, as well
as resetting the counters after each chapter etc..

In other words, what's needed is all the features of subsection
without the titling. Just as

\start|stoptitle \start|stopsubject [etc.]

give titling without sectioning numerals, we need something like

\start|stoplabeling \start|stopsublabeling

to get sectioning numerals without titling.

(This is usually not a big deal except in cases like [alternative=text])

(And on a very tight deadline so there is little (‍= no) time to
rebuild structure from scratch. Better to configure subsection to do
what's needed, and perhaps use a different method for the next big
project.)

So is there a way this can be done? Many thanks for your insights and
help.

Idris


\definelabel[Paragraph][text=,numberstopper={.},headcommand=\groupedcommand{}{
}]

\starttext

\startchapter[title={First},reference={}]

\Paragraph\input ward

\Paragraph\input ward

\stopchapter

\startchapter[title={Second},reference={}]

\Paragraph\input ward

\Paragraph\input ward

\stopchapter

\stoptext


Can this be made into


Wolfgang


Idris Samawi Hamid ادريس سماوي حامد 
25. Juni 2018 um 04:45
Dear gang,

Here's an interesting one, attached and below:

===
\setuphead[chapter]   [alternative=normal]
\setuphead[subsection][alternative=text]
\setuphead[subsection][criterium=local,distance=0em,sectionstopper=.]

\starttext

\startchapter[title={First},reference={}]
\startsubsection%[title={First}]
\input ward
\stopsubsection
\startsubsection%[title={Second}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second},reference={}]
\startsubsection%[title={}]
\input ward
\stopsubsection
\startsubsection%[title={}]
\input ward
\stopsubsection
\stopchapter
\stoptext
===

Our subsections do not have titles. The space between the subsection
numeral and the text is too large, even with

distance=0em

Negative distances don't behave well - toggle lines 4 and 5.

What can 

Re: [NTG-context] TABLE: centering splitted TABLE; suppressing vertical space btw two TABLEs

2018-06-21 Thread Procházka Lukáš Ing .

Hello,

On Wed, 20 Jun 2018 13:13:08 +0200, Aditya Mahajan  wrote:


- How to suppress the vertical space between the last row of "aaa - bbb"
table and the first row of the "AAA - BBB" table?


(Untested) Try `\blank[none]` instead of `\crlf`.

Aditya


actually, \blank[none] was not "enough", \blank[-1pt] dismissed the empty space.

Thank you for inspiration.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] TABLE: centering splitted TABLE

2018-06-21 Thread Procházka Lukáš Ing .

Hello,

thanks, it works:


  \startalignment[middle]
\startplacetable[location={split,force,none}]
  \bTABLE[split=repeat]
\bTABLEhead
  \bTR\bTH A\eTH\bTH B\eTH\eTR
\eTABLEhead
\bTABLEbody
  \dorecurse{60}{
\bTR
  \bTD uuu\eTD
  \bTD vvv\eTD
\eTR
  }
\eTABLEbody
  \eTABLE
\stopplacetable
  \stopalignment


Best regards,

Lukas


On Wed, 20 Jun 2018 07:59:28 +0200, Wolfgang Schuster 
 wrote:




Procházka Lukáš Ing. <mailto:l...@pontex.cz>
20. Juni 2018 um 07:43
Hello,

On Sat, 09 Jun 2018 20:33:30 +0200, Procházka Lukáš Ing.
 wrote:


any reaction?

E.g.
"splitted TABLE cannot be centered on pages - the alg is not
implemented, and won't be" or
"splitted TABLE cannot be centered on pages - the alg is not
implemented, but will be" or
"splitted TABLE cannot be centered on pages - use xtable instead with
[key=value]" or
"use \setupTABLE[something=here] - it will center splitted TABLE on
each page"?


Place the table as float and disable the caption, e.g.

\startplacetable[location={split,force,none}]
...
\stopplacetable

Wolfgang




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] TABLE: centering splitted TABLE

2018-06-19 Thread Procházka Lukáš Ing .

Hello,

On Sat, 09 Jun 2018 20:33:30 +0200, Procházka Lukáš Ing.  wrote:


- How to make the "uuu - vvv" table - which goes into several pages - centered on each 
page, like "aaa - bbb" (non splitting) table is?


any reaction?

E.g.
"splitted TABLE cannot be centered on pages - the alg is not implemented, and won't 
be" or
"splitted TABLE cannot be centered on pages - the alg is not implemented, but will 
be" or
"splitted TABLE cannot be centered on pages - use xtable instead with 
[key=value]" or
"use \setupTABLE[something=here] - it will center splitted TABLE on each page"?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Parsing \...luacode within a \def

2018-06-18 Thread Procházka Lukáš Ing .

Hello,

thanks for explanation -
I could not understand difference in behavior inside \def ("--" dismiss all following) 
and out of \def ("--" acts on the one line only);
so the explanation is "\startluacode INSIDE MACRO body acts like any such catcode 
regime changing operation"...

Best regards,

Lukas


On Thu, 14 Jun 2018 21:41:28 +0200, Hans Hagen  wrote:


On 6/14/2018 9:20 PM, Tomas Hala wrote:

Hi Lukáš,

I am not sure but I guess that the problem is related with the behaviour of
the input processor which erases characters at the end of line (CR, LF) and
replace them by a space. Then, the whole content between \start/stopluacode
is at only one line. If you the second way of comment marks, the letter "u"
will be shown at the output.

Tomáš

\def\U{%
   \startluacode
--[[ blahblah
]]--

 context("u")
   \stopluacode
}

indeed, \startluacode inside a macro body acts like any such catcode
regime changing operation ..

\def\foo{%
   f%oo
}

Hans

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


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Parsing \...luacode within a \def

2018-06-14 Thread Procházka Lukáš Ing .

Hello,

I encountered a phenomena that I cannot understand. Let's have the following 
code:


\def\T{%
   \startluacode
 context("t")
   \stopluacode
}

\def\U{%
   \startluacode
 --

 context("u")
   \stopluacode
}

\starttext
   A
   \startluacode
 --

 context("b")
   \stopluacode
   \T
   \U
\stoptext


This gives "Abt" - but there is no "u".

It seems that the (first) comment mark "--" within a \startluacode within \def 
(here: \def\U) causes all code till \stopluacode is being ignored.

But why?

Maybe I'm missing something very basic...

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t3.mkiv
Description: Binary data


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

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

[NTG-context] Parsing \...luacode within a \def

2018-06-14 Thread Procházka Lukáš Ing .

Hello,

I encountered a phenomena that I cannot understand. Let's have the following 
code:


\def\T{%
  \startluacode
context("t")
  \stopluacode
}

\def\U{%
  \startluacode
--

context("u")
  \stopluacode
}

\starttext
  A
  \startluacode
--

context("b")
  \stopluacode
  \T
  \U
\stoptext


This gives "Abt" - but there is no "u".

It seems that the (first) comment mark "--" within a \startluacode within \def 
(here: \def\U) causes all code till \stopluacode is being ignored.

But why?

Maybe I'm missing something very basic...

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] OT: Pexeso (one missing rule)

2018-06-11 Thread Procházka Lukáš Ing .

Hello,

there is a card game called "Pexeso".

It is played by two or more players with pairs of cards of identical pictures.
Initially, cards are spread regularly and are turned upside down.
The first player turns two cards; if they are identical, he picks them and 
continues turning two more cards.
If both cards do not show the same picture,
--->THEY ARE TURNED BACK UPSIDE DOWN
and the next payer follows.
(So the game is about to remember as many cards as possible which have been 
turned/shown.)
The game stops when there are no more cards to turn.
Who collects more pairs of cards is winner.

Usually, you can buy Pexeso of Barbies, princesses, road signs, castles, ...

My little son (of nearly 4 years) ignores all above as he is interested (or 
even fascinated) by construction machinery and woodworking tools.

So I decided to create a Pexeso of woodworking tools for him with the following 
points:

- Pictures to be processed are placed in the subdirectory called "1" (may be 
changed).

- Pictures whose name do not start by "-" have the first letter uppercased shown on the 
card ("education" for letters).

- You may simply change the text or MP code to draw the card back.

- Backs of cards are intentionally a bit randomized (I am curious how quickly 
children are able to recognize some cards by their backs).

- When the number of cards is not multiple of two (also my case), two more 
backs of cards will be drawn.
This is intended and it comes due to some simplicity of the code; and 
it doesn't matter to anything.

- Source uses UTF-8 coding.

- There are no dependencies to external files (excluding pictures).

- The source file is attached.
Due to the size (~2.3 MB), all data including the result and source 
pictures are available for download here:

http://leteckaposta.cz/611754576

(The link will be valid for ~27 days from now.)

Enjoy!

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

Pexeso2.mkiv
Description: Binary data
___
If your question is of interest to others as well, please add an 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] OT: Pexeso

2018-06-11 Thread Procházka Lukáš Ing .

Hello,

there is a card game called "Pexeso".

It is played by two or more players with pairs of cards of identical pictures.
Initially, cards are spread regularly and are turned upside down.
The first player turns two cards; if they are identical, he picks them and 
continues turning two more cards.
Once both cards do not show the same picture, the next payer follows.
The game stops when there are no more cards to turn.
Who collects more pairs of cards is winner.

Usually, you can buy Pexeso of Barbies, princesses, road signs, castles, ...

My little son (of nearly 4 years) ignores all above as he is interested (or 
even fascinated) by construction machinery and woodworking tools.

So I decided to create a Pexeso of woodworking tools for him with the following 
points:

- Pictures to be processed are placed in the subdirectory called "1" (may be 
changed).

- Pictures whose name do not start by "-" have the first letter uppercased shown on the 
card ("education" for letters).

- You may simply change the text or MP code to draw the card back.

- Backs of cards are intentionally a bit randomized (I am curious how quickly 
children are able to recognize some cards by their backs).

- When the number of cards is not multiple of two (also my case), two more 
backs of cards will be drawn.
This is intended and it comes due to some simplicity of the code; and 
it doesn't matter to anything.

- Source uses UTF-8 coding.

- There are no dependencies to external files (excluding pictures).

- The source file is attached.
Due to the size (~2.3 MB), all data including the result and source 
pictures are available for download here:

http://leteckaposta.cz/611754576

(The link will be valid for ~27 days from now.)

Enjoy!

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

Pexeso2.mkiv
Description: Binary data
___
If your question is of interest to others as well, please add an 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] TABLE: centering splitted TABLE; suppressing vertical space btw two TABLEs

2018-06-09 Thread Procházka Lukáš Ing .

Hello,

I have two questions about TABLEs. Suppose having the following code:


\setuplayout[page]



\starttext
  \startalignment[middle]
\dontleavehmode
\bTABLE[before=,after=,inbetween=]
  \bTABLEbody
\dorecurse{10}{
  \bTR
\bTD aaa\eTD
\bTD bbb\eTD
  \eTR
}
  \eTABLEbody
\eTABLE
\crlf
\bTABLE[before=,after=,inbetween=]
  \bTABLEbody
\bTR
  \bTD AAA\eTD
  \bTD BBB\eTD
\eTR
  \eTABLEbody
\eTABLE
  \stopalignment
  %
  \page
  \startalignment[middle]
\dontleavehmode
\bTABLE[split=yes]
  \bTABLEbody
\dorecurse{60}{
  \bTR
\bTD uuu\eTD
\bTD vvv\eTD
  \eTR
}
  \eTABLEbody
\eTABLE
  \stopalignment
\stoptext


- How to make the "uuu - vvv" table - which goes into several pages - centered on each 
page, like "aaa - bbb" (non splitting) table is?

- How to suppress the vertical space between the last row of "aaa - bbb" table and the 
first row of the "AAA - BBB" table?

(I'm trying to typeset some picture playing cards, so usual typographic rules 
don't apply here...)

Any help would be appreciated.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t.mkiv
Description: Binary data


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

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

Re: [NTG-context] Problem defining macro with Lua inside

2018-05-30 Thread Procházka Lukáš Ing .

... Great, thank you!

Lukas


On Wed, 30 May 2018 13:47:12 +0200, Henri Menke  wrote:


On 05/30/2018 08:19 PM, Procházka Lukáš Ing. wrote:

Hello,

I'm trying to define a macro (a MS Word -> clipboard -> Ctx tool), whose
simplified form is the following:



This cannot work \startluacode has to “see” \stopluacode.  Use buffers:

\unexpanded\def\startWord
  {\grabbufferdata[Word][startWord][stopWord]}

\unexpanded\def\stopWord
  {\startluacode
print(buffers.prepend("Word","context[["))
print(buffers.append("Word","]]"))
  \stopluacode
  \ctxluabuffer[Word]}

\starttext

\startWord
  abc
  def

  ghi
\stopWord

\stoptext




\def\startWord{%
  \startluacode
context[[
}

\def\stopWord{%
]]
  \stopluacode
}

\starttext
  aaa

  \startWord
abc
def

ghi
  \stopWord
\stoptext


Unfortunately, I'm not able to define \startWord and \stopWord in a way
that Ctx would accept.

How to define it?

Any help would be appreciated.

Best regards,

Lukas



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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 defining macro with Lua inside

2018-05-30 Thread Procházka Lukáš Ing .

Hello,

I'm trying to define a macro (a MS Word -> clipboard -> Ctx tool), whose 
simplified form is the following:


\def\startWord{%
  \startluacode
context[[
}

\def\stopWord{%
]]
  \stopluacode
}

\starttext
  aaa

  \startWord
abc
def

ghi
  \stopWord
\stoptext


Unfortunately, I'm not able to define \startWord and \stopWord in a way that 
Ctx would accept.

How to define it?

Any help would be appreciated.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t6.log
Description: Binary data


t6.mkiv
Description: Binary data
___
If your question is of interest to others as well, please add an 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] Referring to \head

2018-05-23 Thread Procházka Lukáš Ing .

Hello,

deducing:


\starttext
  \startitemize[i][stopper=),headstyle=bold]
\starthead[h]{Head}

  Some text.

\stophead

\item[i] Item.
  \stopitemize

  See \in[h] and \in[i].
\stoptext


Thank you.

Lukas


On Wed, 23 May 2018 13:18:27 +0200, Wolfgang Schuster 
<schuster.wolfg...@gmail.com> wrote:


\starthead takes takes the title as argument, i.e.

\starthead {…}
…
\stophead

Wolfgang

Procházka Lukáš Ing. <mailto:l...@pontex.cz>
23. Mai 2018 um 11:11
Hello,

referring to \head doesn't work in the ME bellow:


\starttext
  \startitemize[n][]
\item[a] A

\head[b] B

  bbb

\item See \in[a] and \in[b].
  \stopitemize

  \startitemize[n][]
\item See \in[a] and \in[b].
  \stopitemize
\stoptext


\head doesn't recongize its reference name (ignores [] after it),
although it should not:

http://wiki.contextgarden.net/Command/head

What am I doing wrong? - How to refer to a \head? (Referring to \item
works well.)

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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___
Wolfgang Schuster <mailto:schuster.wolfg...@gmail.com>
23. Mai 2018 um 11:44
Use \starthead.

Wolfgang

Procházka Lukáš Ing. <mailto:l...@pontex.cz>
23. Mai 2018 um 12:53
Hello Wolfgang,

thank you for the answer, wikified:

http://wiki.contextgarden.net/Command/head

Best regards,

Lukas


On Wed, 23 May 2018 11:44:17 +0200, Wolfgang Schuster
<schuster.wolfg...@gmail.com> wrote:









--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Referring to \head

2018-05-23 Thread Procházka Lukáš Ing .

Hello,

the "headstyle" option in \startitemize affect undesirably all text following 
\head in the itemize scope:


\starttext
  \startitemize[i][stopper=),headstyle=bold]
\starthead[h] Head \stophead

  Some text.

\item[i] Item.
  \stopitemize

  See \in[h] and \in[i].
\stoptext


- All text between \starthead and \stopitemize gets bold. Is it a bug or am I 
still missing something?

Lukas



On Wed, 23 May 2018 11:44:17 +0200, Wolfgang Schuster 
 wrote:


Use \starthead.

Wolfgang



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t3.mkiv
Description: Binary data


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

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

Re: [NTG-context] Referring to \head

2018-05-23 Thread Procházka Lukáš Ing .

Hello Wolfgang,

thank you for the answer, wikified:

http://wiki.contextgarden.net/Command/head

Best regards,

Lukas


On Wed, 23 May 2018 11:44:17 +0200, Wolfgang Schuster 
<schuster.wolfg...@gmail.com> wrote:


Use \starthead.

Wolfgang

Procházka Lukáš Ing. <mailto:l...@pontex.cz>
23. Mai 2018 um 11:11
Hello,

referring to \head doesn't work in the ME bellow:


\starttext
  \startitemize[n][]
\item[a] A

\head[b] B

  bbb

\item See \in[a] and \in[b].
  \stopitemize

  \startitemize[n][]
\item See \in[a] and \in[b].
  \stopitemize
\stoptext


\head doesn't recongize its reference name (ignores [] after it),
although it should not:

http://wiki.contextgarden.net/Command/head

What am I doing wrong? - How to refer to a \head? (Referring to \item
works well.)

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






--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Referring to \head

2018-05-23 Thread Procházka Lukáš Ing .

Hello,

referring to \head doesn't work in the ME bellow:


\starttext
  \startitemize[n][]
\item[a] A

\head[b] B

  bbb

\item See \in[a] and \in[b].
  \stopitemize

  \startitemize[n][]
\item See \in[a] and \in[b].
  \stopitemize
\stoptext


\head doesn't recongize its reference name (ignores [] after it), although it 
should not:

http://wiki.contextgarden.net/Command/head

What am I doing wrong? - How to refer to a \head? (Referring to \item works 
well.)

TIA.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t3.mkiv
Description: Binary data


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

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

[NTG-context] Question about \definedescription

2018-05-22 Thread Procházka Lukáš Ing .

Hello,

the following defintions:


\definedescription[A][alternative=top]

\A{Aaa} \input knuth

\definedescription[B][alternative=hanging]

\B{Bbb} \input knuth


generate texts shaped:


Aaa
Thus, I came to the
conclusion that the
designer

BbbThus, I came
  to the conclusion
  that the designer


How to \definedescription so to get:


QQQ
  Thus,  I  came to
  theconclusion
  that the designer


IOW, to keep "alternative=top" (= next text from a new line) but to keep some 
indenting from left?

TIA.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Trim blank space of a PDF page

2018-05-22 Thread Procházka Lukáš Ing .

Hello,

just curious - is threre a way how to crop a page of a PDF via ConTeXt?

Ideally - to process a single page PDF into another file, with the one page 
cropped...

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Framed & before/after

2018-03-21 Thread Procházka Lukáš Ing .

Hello,

does \framed recognize before and after keys, as mentioned here:

http://wiki.contextgarden.net/Command/defineframed
or: http://wiki.contextgarden.net/Command/setupframedtexts ?

In the following example it seems both keys are ignored:


\defineframed[AddressBox][before=\red,after=\small]

\starttext
  \green A
  \AddressBox{\cldcontext{"Hele"}}
  B
\stoptext


Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

~2~.mkiv
Description: Binary data


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

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

[NTG-context] Problem with Lua: context.component()

2018-02-23 Thread Procházka Lukáš Ing .

Hello,

suppose having:

 t1.mkiv
\starttext
  a

  \startluacode
context.setvalue("b", "bbb")
context.setvalue("c", 2)
context.component("t2.mkiv")
  \stopluacode
\stoptext


and

 t2.mkiv
\startcomponent *
  \b\c
\stopcomponent


I get no result when trying to compile t1.mkiv - log tells:

"
...
system  > jobfiles > unknown tex file '{t2.mkiv}\stoptext \finishjob ' 
< 
close source> level 1, order 3, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

tex error   > tex error on line 0 in file : ! Emergency stop

<*> cont-yes.mkiv




*** (job aborted, no legal \end found)
"

So - how to use 'context.component()' (input a component within Lua) well?

Thank you in advance.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t1.log
Description: Binary data


t1.mkiv
Description: Binary data


t2.mkiv
Description: Binary data
___
If your question is of interest to others as well, please add an 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] Feature request: display Lua version

2018-02-22 Thread Procházka Lukáš Ing .

Hello,

namely due to planned embedding Lua 5.3 into ConTeXt, would it be possible 
ConTeXt to show Lua version being used?

Something like:


d:\Lukas\ConTeXt\Test>context.exe --version

mtx-context | ConTeXt Process Management 1.02
mtx-context |
mtx-context | main context file: 
d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2018.02.21 18:19
mtx-context | Lua version: 5.2.1


Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396___
If your question is of interest to others as well, please add an 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] Substitution for ". . ."

2018-02-16 Thread Procházka Lukáš Ing .

Hello,

suppose having code:


\starttext
  \section[sec]{This is a very long and important and unshortenable section 
title}

  See \about[sec].
\stoptext


It produces:

"
1 This is a very long and important and unshortenable section title
See “This is a very long and important and unshortenable . . .”.
"

Is there a way to replace ". . ." in the link "See ---"?

I'd rather use "\textellipsis" or text "(\textellipsis)" at the place of shortening 
(instead of ". . .").

Is it possible?

Thank you in advance.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

~.mkiv
Description: Binary data


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

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

Re: [NTG-context] Testing value of a \def

2018-02-08 Thread Procházka Lukáš Ing .

Great, thank you!

Lukas


On Thu, 08 Feb 2018 11:06:29 +0100, Wolfgang Schuster 
<schuster.wolfg...@gmail.com> wrote:




Procházka Lukáš Ing. <mailto:l...@pontex.cz>
8. Februar 2018 um 10:50
Hello,

I'm trying to test whether value of \jobname is "Test"; I suppose it
should be as the file name is "Test.mkiv".

But the code:


\starttext
  \jobname
  \doifelse{\jobname}{Test}{Yes}{No}
  \def\T{Test}
  \ifx\jobname\T True\else False\fi
  \ctxcommand{doifelse("\jobname" == "Test")}{1}{0}
\stoptext


yields "No", "False" and "1", so only the printed "1" is what I expect.

Why \doifelse and \ifx are evaluated as false?


The string from \jobname consists of catcode 12 letters while normal text
consists of catcode 11 letters. If you need the name of the file use one
of the commands below.


\starttext

\starttabulate
\NC \tex{jobfilefullname} \NC \jobfilefullname \NC\NR
\NC \tex{jobfilename} \NC \jobfilename \NC\NR
\NC \tex{jobfilesuffix}   \NC \jobfilesuffix   \NC\NR
\TB
\NC \tex{inputfilebarename}   \NC \inputfilebarename   \NC\NR
\NC \tex{inputfilerealsuffix} \NC \inputfilerealsuffix \NC\NR
\NC \tex{inputfilesuffix} \NC \inputfilesuffix \NC\NR
\NC \tex{inputfilename}   \NC \inputfilename   \NC\NR
\stoptabulate

\stoptext

Wolfgang




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

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

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

Re: [NTG-context] Change of font size affects header text size, too

2018-02-08 Thread Procházka Lukáš Ing .

Hello,

thanks both for quick answer.

Best regards,

Lukas


On Thu, 08 Feb 2018 12:49:53 +0100, Wolfgang Schuster 
<schuster.wolfg...@gmail.com> wrote:




Procházka Lukáš Ing. <mailto:l...@pontex.cz>
8. Februar 2018 um 12:14
Hello,

in the following example:


\setupheadertexts[Left][Right]

\starttext
  Aaa

  \page

  \startsection[title={Sec}]
\start
  \setupbodyfont[6pt]
  \dorecurse{12}{\input knuth}
\stop
  \stopsection
\stoptext


header text size on page #2 is small (6 pt) although body font change
was intended only to text inside section "Sec" -
thus the text "\input knuth" is surrounded by \start ... \stop.

How to change the bodyfont size of the running text only (ad-hoc in
the middle of the document), without changing header text size?


Use \switchtobodyfont[6pt].

Wolfgang




--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Change of font size affects header text size, too

2018-02-08 Thread Procházka Lukáš Ing .

Hello,

in the following example:


\setupheadertexts[Left][Right]

\starttext
  Aaa

  \page

  \startsection[title={Sec}]
\start
  \setupbodyfont[6pt]
  \dorecurse{12}{\input knuth}
\stop
  \stopsection
\stoptext


header text size on page #2 is small (6 pt) although body font change was intended only 
to text inside section "Sec" -
thus the text "\input knuth" is surrounded by \start ... \stop.

How to change the bodyfont size of the running text only (ad-hoc in the middle 
of the document), without changing header text size?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

HdrSz.mkiv
Description: Binary data


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

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

[NTG-context] Testing value of a \def

2018-02-08 Thread Procházka Lukáš Ing .

Hello,

I'm trying to test whether value of \jobname is "Test"; I suppose it should be as the 
file name is "Test.mkiv".

But the code:


\starttext
  \jobname
  \doifelse{\jobname}{Test}{Yes}{No}
  \def\T{Test}
  \ifx\jobname\T True\else False\fi
  \ctxcommand{doifelse("\jobname" == "Test")}{1}{0}
\stoptext


yields "No", "False" and "1", so only the printed "1" is what I expect.

Why \doifelse and \ifx are evaluated as false?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

Test.mkiv
Description: Binary data


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

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

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

2018-02-06 Thread Procházka Lukáš Ing .

Hello Henning,

On Tue, 06 Feb 2018 13:13:12 +0100, Henning Hraban Ramm  wrote:


I’ll try as soon as I get some time, since algorithmic image placement is a 
recurring problem for me, as I try to replace InDesign in my workflow.

I thought about providing a module, but each of my projects has so differing 
needs that either every macro would need a bunch of options, or I need a lot of 
similar macros. We’ll see...



my experience in these situations:

I'm usually implementing complicated solutions via Lua, with functions with 
obligatory arg(s) first followed by one optional argument of table type:

- it's  easy to investigate this optional argument and alter the algorithm 
depending on table keys (presence and/or value),
- you don't have to be afraid of optional arg(s) rearrangement.

To be more concrete:

 Sample Lua code

MyPlaceFigure = function(figname,
 opts) -- Optional; .scale = .sc, .rotation = .rot, 
.label, ...
  opts = opts or {} -- To simplify code bellow

  local scale, rot, lab =
opts.scale or opts.sc, -- I.e. more keys are allowed in long/short 
alternative
opts.rotation or opts.rotate or opts.rot, -- dtto
opts.label or opts.lab,
nil

  if label then
-- E.g. use context.placefloat(...)
  else
context.externalfigure({figname}, {scale = 1000 * scale, orientation = rot, 
})
  end
end



Best regards,

Lukas



Greetlings, Hraban



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

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

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

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

2018-02-06 Thread Procházka Lukáš Ing .

Hello Henning,


This is really interesting, but my original question was about the file path resolver, i.e. how to 
get "t:/sources/cow.pdf" from just "cow"?



I guess there was a similar question here:

https://mailman.ntg.nl/pipermail/ntg-context/2017/088324.html

Reading till the end, I deduce one has to collect snippets which appear in the code to build its 
own "file locator" as no function like "MyExternalFigureLocator()" exists in 
ConTeXt/Lua API.

Some highlights:



Personally I use the lua variable named : figures.path

It’s a lua table which contains directories names you provide in directory= in 
\setupexternalfigures:

for _, path in ipairs(figures.paths) do
 local figure_file = path .. '/' .. file
  local doc = lpdf.epdf.load(figure_file)  -- assume pdf (just an example)
 if doc then
  ….
 end
done



Unfortunately, this code supposes the figure name was passed WITH extension, as 
no lookup in table-of-valid-extensions is performed (maybe no such table nor 
iterator exists).


There should be also:


local n = 
"x:/Users/MMi/Akce/I-6_Krusovice.DSP-ZDS/Admin/Jednani/2017-07-07-SU-Rakovnik/ZJ.pdf"
local d = figures.getinfo(n)

inspect(d)


And a snippet from another mailing thread:

 (Hans' answer)
\getfiguredimensions[test.pdf]
\dorecurse {\noffigurepages} {
 \getfiguredimensions[test.pdf][page=#1]
 \figurenaturalwidth
,\figurenaturalheight,\figureorientation,\figurerotation\par
}

in lua you can either use the img library (see luatex manual) or context
helpers

 local data = figures.push("foo.pdf")
 figures.identify()
 figures.check()
 figures.pop()
inspect(data)

i'll add:

function figures.getinfo(name,page)
 if type(name) == "string" then
 name = { name = name, page = page }
 end
 if name.name then
 local data = figures.push(name)
 figures.identify()
 figures.check()
 figures.pop()
 return data
 end
end

so that one can do

local n = "ms.pdf"
local d = figures.getinfo(n)

if d then
 for i=1,d.used.pages do
 local p = figures.getinfo(n,i)
 if p then
 local u = p.used
 print(u.width,u.height,u.orientation)
 end
 end
end


Hope this helps.

Best regards,

Lukas


On Sun, 04 Feb 2018 19:04:28 +0100, Henning Hraban Ramm  wrote:



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

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

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



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

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

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

Re: [NTG-context] How to make the first chapter number 0?

2018-01-27 Thread Procházka Lukáš Ing .

Hello Jeong,

see both solutions attached. Check them in relation to TOC.

Best regards,

Lukas


On Sat, 27 Jan 2018 16:08:03 +0100, Jeong Dal  wrote:


Hi,

I’d like to start the chapter number from 0.
So I tried “\setcounter[chapter][-1]” or “\setcounter[chapter][0]” to test, but 
it doesn’t work.
Is there any good method to make the number of the first chapter 0?

Thank you for reading.

Best regards,

Dalyoung



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

ZeroStart.mkiv
Description: Binary data


ZeroStart.pdf
Description: Adobe PDF document


Sec0.mkiv
Description: Binary data


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

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

Re: [NTG-context] TOC and appendices

2018-01-08 Thread Procházka Lukáš Ing .

Hello,

thanks for inspiration in the matter of scoping.

It seems rather than the problem was that conversion has been undefined in 
place of TOC, not that I've been using \section without \chapter.

When I've defined the conversion before \starttext, all seems work OK, see:


\environment TZ.sty

\definestructureconversionset[Sec2A][,,A][n]

%\definehead[SectionA][section]
%\definehead[SubSectionA][subsection]
%\definehead[SubSubSectionA][subsubsection]
%\setuphead[SectionA,SubSectionA,SubSubSectionA][sectionconversionset=Sec2A]

%\setupcombinedlist[content][list={chapter,section,subsection,subsubsection,SectionA,SubSectionA,SubSubSectionA}]

\starttext
  \placecontent

  \startbodymatter
%\chapter{Ch}
\section{Sec1}
  In sec 1
  \subsection{SSec}
\subsubsection{SSSec}
  \stopbodymatter

  \startappendices

%\let\section=\SectionA
%\let\subsection=\SubSectionA
%\let\subsubsection=\SubSubSectionA

\setuphead[section,subsection,subsubsection][sectionconversionset=Sec2A]

\section{SecA}
  In sec A
  \subsection{SSec}
\subsubsection{SSSec}
  \stopappendices
\stoptext


Thank you anyway.

Best regards,

Lukas


On Sun, 07 Jan 2018 21:40:54 +0100, Lars <axteff...@gmail.com> wrote:


Hi there,

it's because you're trying to place subtitles only.

Try it with main tile chapter before your section, then you'll see yourself:

\starttext
   \placecontent

   \startbodymatter
 \section{Sec1}
   In sec 1
   \stopbodymatter
  \startappendices
 %\definestructureconversionset[T][][A]
 %\setupheads[sectionconversionset=T]
\chapter{ChapB}
   In chap B
   \section{SecA}
   In sec A
   \stopappendices

\stoptext

Cheers.



Am 06/01/2018 um 14:32 schrieb Procházka Lukáš Ing.:

\starttext
  \placecontent

  \startbodymatter
\section{Sec1}
  In sec 1
  \stopbodymatter

  \startappendices
\definestructureconversionset[T][][A]
\setupheads[sectionconversionset=T]

\section{SecA}
  In sec A
  \stopappendices
\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
___



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

TOCApp~.mkiv
Description: Binary data


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

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

[NTG-context] TOC and appendices

2018-01-06 Thread Procházka Lukáš Ing .

Hello,

I have document which contains Appendices.

The part of appendices should be numbered form "A", contrary to the rest of the 
document (body part), which is to be numbered naturally from 1.

Sections, even these in appendices, are numbered OK;
the problem is that even sections of appendices in TOC are numbered by 
NUMBERS, not by letters.

In the example, section "Sec A" is numbered well as "A SecA in the document", whilst in 
TOC it is marked as "1 SecA".

So - how to tell TOC to use the same numbers (sectionconversionset?) to 
sections of appendices?

Here is my ME:


\starttext
  \placecontent

  \startbodymatter
\section{Sec1}
  In sec 1
  \stopbodymatter

  \startappendices
\definestructureconversionset[T][][A]
\setupheads[sectionconversionset=T]

\section{SecA}
  In sec A
  \stopappendices
\stoptext


Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

TOCApp~.mkiv
Description: Binary data


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

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

[NTG-context] \setupinteraction "author" adds '"'

2018-01-06 Thread Procházka Lukáš Ing .

Hello,

once the "author" member in \setupinteraction contains ",", Ctx adds (unwanted) quation 
marks into "author" field in PDF.

So - how to avoid these '"'?

My MWE:


\setupinteraction[author={Foo, Bar}]

\starttext
  A
\stoptext


Result - see the picture.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

2~.mkiv
Description: Binary data
___
If your question is of interest to others as well, please add an 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] Small caps and bold

2017-12-14 Thread Procházka Lukáš Ing .

Hello,

On Thu, 14 Dec 2017 10:16:33 +0100, Hans Hagen <pra...@wxs.nl> wrote:


On 12/14/2017 8:37 AM, Procházka Lukáš Ing. wrote:

Hello,

I'm trying to typeset some text in bold + smallcaps.

But even the sample on wiki:

 http://wiki.contextgarden.net/Bold_small_caps

extended to:


\starttext
   \setff{smallcaps} Normal and \bf bold Small Caps.

   {\sc Normal and \bf bold Small Caps.}
\stoptext


doesn't produce bold small caps - see the attached files.

So - how to get bold small caps?

at least you need a bold font that has smallcaps ...


how do I get list of fonts which provide bold+smallcaps?

With "mtxrun --script font --list --all ..." somehow?

Rest regards,

Lukas



Hans



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Small caps and bold

2017-12-13 Thread Procházka Lukáš Ing .

Hello,

I'm trying to typeset some text in bold + smallcaps.

But even the sample on wiki:

http://wiki.contextgarden.net/Bold_small_caps

extended to:


\starttext
  \setff{smallcaps} Normal and \bf bold Small Caps.

  {\sc Normal and \bf bold Small Caps.}
\stoptext


doesn't produce bold small caps - see the attached files.

So - how to get bold small caps?

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

BfSc.mkiv
Description: Binary data


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

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

Re: [NTG-context] Metapost: How to get total number of pages?

2017-11-17 Thread Procházka Lukáš Ing .

Hello Thomas,

thank you, I'll keep it in mind!

Best regards,

Lukas


On Fri, 17 Nov 2017 14:42:58 +0100, Thomas A. Schmitz 
<thomas.schm...@uni-bonn.de> wrote:


On 17.11.2017 14:02, Procházka Lukáš Ing. wrote:

it seems that there is 'PageNumber' variable (macro) available within MP
code, maybe introduced by 'StartPage', within MP.

How do I get total number of pages or last page number within MP (in
Ctx: \totalnumberofpages, \lastpage)?


NOfPages

If you had grepped the source for PageNumber, you would have discovered
that all of this is defined in meta-pag.mkiv.

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



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Metapost: How to get total number of pages?

2017-11-17 Thread Procházka Lukáš Ing .

Hello,

it seems that there is 'PageNumber' variable (macro) available within MP code, 
maybe introduced by 'StartPage', within MP.

How do I get total number of pages or last page number within MP (in Ctx: 
\totalnumberofpages, \lastpage)?

TIA.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Tabulate containing high element

2017-11-01 Thread Procházka Lukáš Ing .

Hello Taco,

thank you for the hack.

\tabulatesplitlinemode=0 has local effect, so one may enclose it into group to 
protect global setting.

I also had to enclose some elements into \tbox to get proper vertical alignment 
- see the MWE attached.

Thank you anyway.

Best regards,

Lukas


On Tue, 31 Oct 2017 13:37:00 +0100, Taco Hoekwater  wrote:



Hi,

This should work:

  \tabulatesplitlinemode=0 % 1 | 2, default: 1
  % controls the splitting dimensions for lines in ‘p’ mode
  % 0: do nothing
  % 1: make each line exactly the height and depth of \strut
  % 2: make each line at least the height and depth height of \strut


Undocumented, so likely to change in the next beta ;)

Best wishes,
Taco



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

Tabul-with-HighElem.mkiv
Description: Binary data


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

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

Re: [NTG-context] Tabulate containing high element

2017-10-31 Thread Procházka Lukáš Ing .

Hello,

any idea?

My other attempts to constrain the row height to reflect its highest member 
fail, too.

Is it possible in the tabulate environment at all?

Best regards,

Lukas


On Mon, 30 Oct 2017 09:04:18 +0100, Procházka Lukáš Ing. <l...@pontex.cz> wrote:


Hello,

On Sun, 29 Oct 2017 23:50:51 +0100, Aditya Mahajan <adit...@umich.edu> wrote:


On Sun, 29 Oct 2017, Procházka Lukáš Ing. wrote:


Hello,

how to make tabulate row "aware" of some content of some "bigger" height?

In the following sample:


\starttext
\starttabulate[|pd(.4\textwidth)|p|]
  \HL
  \NC
\framed[location=top,width=1in,height=1in]{Abc}
  \VL
Def
  \NC\NR
  \HL
\stoptabulate
\stoptext



(Untested): Does

\dontleavehmode \framed 


unfortunately, it does not...

Lukas


work better?

Aditya






--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

Tabul-with-HighElem.mkiv
Description: Binary data


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

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

Re: [NTG-context] Tabulate containing high element

2017-10-30 Thread Procházka Lukáš Ing .

Hello,

On Sun, 29 Oct 2017 23:50:51 +0100, Aditya Mahajan <adit...@umich.edu> wrote:


On Sun, 29 Oct 2017, Procházka Lukáš Ing. wrote:


Hello,

how to make tabulate row "aware" of some content of some "bigger" height?

In the following sample:


\starttext
\starttabulate[|pd(.4\textwidth)|p|]
  \HL
  \NC
\framed[location=top,width=1in,height=1in]{Abc}
  \VL
Def
  \NC\NR
  \HL
\stoptabulate
\stoptext



(Untested): Does

\dontleavehmode \framed 


unfortunately, it does not...

Lukas


work better?

Aditya



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Tabulate containing high element

2017-10-29 Thread Procházka Lukáš Ing .

Hello,

how to make tabulate row "aware" of some content of some "bigger" height?

In the following sample:


\starttext
  \starttabulate[|pd(.4\textwidth)|p|]
\HL
\NC
  \framed[location=top,width=1in,height=1in]{Abc}
\VL
  Def
\NC\NR
\HL
  \stoptabulate
\stoptext


content of the \framed flows out of the height of the first row;
I'd like the first row to have height of the highest element (here: the \framed 
- be 1 in).

How to achieve this?

Thank you in advance.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t2.mkiv
Description: Binary data


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

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

Re: [NTG-context] hvdm-plc module

2017-10-27 Thread Procházka Lukáš Ing .

Hello,

some time passed...

I'm still trying to:

- download hvdm-plc documentation (link http://www.hvandermeer.com/publications 
is broken)
- install & use hvdm-plc module (which may be named differently under ConTeXt 
distribution).

There was a mail traffic on this theme but I'm not sure all has been finished so that 
there is a HvdM's "place-block" module available under Ctx.

So - what is the state of the module, in relationship with Ctx?

Best regards,

Lukas


On Mon, 14 Aug 2017 13:37:12 +0200, Mojca Miklavec 
<mojca.miklavec.li...@gmail.com> wrote:


Hi,

All we need is a module upload to
https://modules.contextgarden.net/
and then a note saying you did so, so that we can add it to the
distribution and to CTAN. Taco or someone else might provide further
feedback in case some minor modifications would be needed.

Ideally the upload should be done by Hans (vdM, not Hagen).

I'm not sure where and how to see the module at this moment.

(And in case I miss an email, just repeat the request :) :) :)

Mojca


On 14 August 2017 at 13:09, Meer, Hans van der <h.vanderm...@uva.nl> wrote:

With regard to the use of my plc-module.

Should the maintainers of ConTeXt express the wish to include this module into 
ConTeXt mkiv, then I will gladly grant permission. The one condition being that 
my name as the original author of the package will remain inside.
Because I was relying on other modules of mine, I have made an independent 
version.
I like to hear if my offer is accepted, but I will not feel disappointed if it 
is decided not to incorporate it into mkiv.

Hans van der Meer





On 2 Aug 2017, at 17:47, Procházka Lukáš Ing. <l...@pontex.cz> wrote:

Hello Mojca, hello Hans,

would it be possible to include the hdvm-plc package into ConTeXt garden 
minimals?

The module seems very useful - guessing from what I read in MAPS magazine...

Thank you in advance.

Best regards,

Lukas


--- Forwarded message ---
From: "Hans Hagen" <pra...@wxs.nl>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>, "Procházka Lukáš Ing." 
<l...@pontex.cz>
Cc:
Subject: Re: [NTG-context] hvdm-plc module
Date: Wed, 02 Aug 2017 11:24:08 +0200

On 8/1/2017 6:05 PM, Procházka Lukáš Ing. wrote:

Hello,

just to check: is


https://www.google.cz/search?q=hvdm-plc+context=utf-8=utf-8=firefox-b-ab_rd=cr=4o-AWfa3Fa6E8QeZmYH4Bw

available for download?

I'd like to test/use the hvdm-plc module (probably here:
hvdmeer.myqnapcloud.com/pubs),
which is mentioned in one of the MAPS magazine;
but I need to download the module (and the manual) first...

you have to bribe mojca in adding the module to the garden given that it
is packaged as a t-* module achive

Hans

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



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Tabulate and \VL

2017-10-24 Thread Procházka Lukáš Ing .

Hello,

I noticed that \VL's behavior over several lines has been fixed - thank you, 
Hans!

Best regards,

Lukas


On Thu, 05 Oct 2017 15:28:54 +0200, Hans Hagen <pra...@wxs.nl> wrote:


On 10/5/2017 8:57 AM, Procházka Lukáš Ing. wrote:

Hello,

maybe a very basic question -
- but in the sample bellow the VL of the first row is drawn only to
height of the first line of the 2line paragraph;
how to make the VL "full-height"?

it needs an extension so you have to be patient



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
If your question is of interest to others as well, please add an 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] Tabulate and \VL

2017-10-05 Thread Procházka Lukáš Ing .

Hello,

maybe a very basic question -
- but in the sample bellow the VL of the first row is drawn only to height of 
the first line of the 2line paragraph;
how to make the VL "full-height"?


\starttext
  \starttabulate[|l|p|]
\NC Hello \VL This is a dummy but very lng text which goes into 
several (one, two, three?) lines \NC\NR
\NC Something \VL else \NC\NR
  \stoptabulate
\stoptext


Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

TabulVL.mkiv
Description: Binary data


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

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

Re: [NTG-context] itemtag

2017-09-26 Thread Procházka Lukáš Ing .

... Great, thank you, Hans!

(A demo/result involved.)

Lukas


On Mon, 25 Sep 2017 19:13:03 +0200, Hans Hagen  wrote:


Hi,

At the context meeting there was some request / mentioning of a itemized
tabulate. In fact we already have \itemtag. I've now added \NI too.

\starttext

\startitemize[n]
\starttabulate[|]
\NC p \NC \itemtag \NC q \NC r \NC \NR
\NC p \NC \itemtag \NC q \NC r \NC \NR
\NC p \NC \itemtag \NC q \NC r \NC \NR
\NC p \NC \itemtag \NC q \NC r \NC \NR
\stoptabulate
\stopitemize

\startitemize[n]
\starttabulate[|]
\NI x \NC y \NC z \NC \NR
\NI x \NC y \NC z \NC \NR
\NI x \NC y \NC z \NC \NR
\NI x \NC y \NC z \NC \NR
\stoptabulate
\stopitemize

\startitemize[n]
\starttabulate[|]
\NI b \NC c \NC d \NC \NR
\NC a \NI c \NC d \NC \NR
\NC a \NC b \NI d \NC \NR
\NC a \NC b \NC c \NI \NR
\stoptabulate
\stopitemize

\stoptext

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

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



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

ItemTag.mkiv
Description: Binary data


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

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

Re: [NTG-context] Increment the section counter

2017-09-14 Thread Procházka Lukáš Ing .

Hello,

BTW, I needed to add a section numbered by zero some time ago;
there is a solution which uses "conversion" parameter.

When one needs to add a zero based section "manually" (ad hoc), there is 
another solution, too:


\starttext
  \bgroup
\setuphead[section][ownnumber=yes]
\section{0}{Zero}
  \subsection{SSecA}
\setupheadnumber[section][0]
  \egroup
  %
  \section{Sec}
\subsection{SSecB}
  \section{Sec2}
\stoptext


Best regards,

Lukas


On Tue, 12 Sep 2017 19:59:30 +0200, Wolfgang Schuster 
 wrote:


You can enable manual numbering


\setuphead[section][ownnumber=yes]

\starttext

\section{3}{Section 1}

\section{5}{Section 1}

\section{6}{Section 1}

\stoptext


or use a custom conversion


\defineconversion[drunk][3,5,6]

\setuphead[section][conversion=drunk]

\starttext

\dorecurse{3}{\expanded{\section{Section \recurselevel}}}

\stoptext


Wolfgang



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

Sec0.mkiv
Description: Binary data


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

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

  1   2   3   4   5   6   7   8   >