[NTG-context] Empty with s-pre-61?

2016-09-12 Thread Lukáš Procházka

Hello,

I start playing with presentations with ConTeXt.

With the following code:


\usemodule[s-pre-61]

\starttext
  \TitlePage{Hello}

  \Topics{Topics}
\Topic{Topic}
\stoptext


I'm getting pages with no text, just pages with navigation bar.

What am I doing wrong?

Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

t.log
Description: Binary data


t.pdf
Description: Adobe PDF document


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

[NTG-context] Pretty print Ctx code into HTML

2016-08-23 Thread Lukáš Procházka

Hello,

does anybody know about a tool (maybe ConTeXt has something like this built-in) 
which would convert ConTeXt code into pretty-printed HTML code?

E.g.:

 t.mkiv
\starttext
  \foo[bar] baz
\stoptext


to be rewritten into e.g.:

 t.html
\starttext
  \foo[bar] baz
\stoptext


Best regards,

Lukas

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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

Re: [NTG-context] Dotted characters

2016-08-20 Thread Lukáš Procházka

Hello again,

the dotted font works perfectly.

I'm using Lua to generate sheets from a database which contains 
word-picture-picture2 records (see attached single page sample; I had to 
convert the image to .jpg to reduce file size).

One more question - is there a ConTeXt/Lua function which would assign a 
non-diacritical-character to that with diacritics, like:

Á => A
Š => S
Ý => Y etc.?

I'm asking as the "Trace Font for Kids" doesn't contain characters with 
diacritics...

Simple Lua table would do the job, like


remove_dia_czech =
{ ["é"] = "e",
  ["š"] = "s",
  ...
}


But string pattern in Lua with cp1250/UTF-8 might not be so easy as Lua pattern 
"." matches single char (or - better - one byte - I guess), so with UTF-8, 
chars with diacritics need more bytes; so the code


str = ("Řetězec with diacritics"):gsub(".", remove_dia_czech)


probably won't work.

And Ctx Lua could have a mechanism already...

Best regards,

Lukas

On Tue, 16 Aug 2016 09:43:12 +0200, Taco Hoekwater <t...@elvenkind.com> wrote:


there is no easy way to convert that into a dotted line that matches the ‘black 
parts’ of the glyph shape. Perhaps you could use two regular fonts: one 
sans-serif and one with dotted lines? There are some free fonts with dotted 
lines that can be found on the web, e.g. here: 
http://www.fontspace.com/category/dotted-line

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

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] How to define section with midaligned number and midaligned text?

2016-08-09 Thread Lukáš Procházka

... How easy! Thank you. Lukas

On Tue, 09 Aug 2016 22:50:05 +0200, Wolfgang Schuster 
<schuster.wolfg...@gmail.com> wrote:


Lukáš Procházka <mailto:l...@pontex.cz>
9. August 2016 um 22:43
Hello,

I need to produce a \section with midaligned number and midaligned
text bellow the number, like:

|<- text width -->|
"

I.
 Section

Bla bla
...
"

I tried this:


\define[2]\Sec{\midaligned{#1.}\midaligned{#2}}

\setuphead[section][command=\Sec,conversion=R]

\starttext
  \section{Section}
\stoptext


but it seems that text "Section" is shifted out somewhere...

How to \setuphead[section] in a proper way?

\setuphead[section][alternative=middle,conversion=R,sectionstopper=.]

\starttext
   \section{Section}
\stoptext

Wolfgang




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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

[NTG-context] How to define section with midaligned number and midaligned text?

2016-08-09 Thread Lukáš Procházka

Hello,

I need to produce a \section with midaligned number and midaligned text bellow 
the number, like:

|<- text width -->|
"

I.
 Section

Bla bla
...
"

I tried this:


\define[2]\Sec{\midaligned{#1.}\midaligned{#2}}

\setuphead[section][command=\Sec,conversion=R]

\starttext
  \section{Section}
\stoptext


but it seems that text "Section" is shifted out somewhere...

How to \setuphead[section] in a proper way?

Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

[NTG-context] Clearest way to call a {\command } in Lua?

2016-07-23 Thread Lukáš Procházka

Hello,

what is the clearest way to call a {\command ...} (i.e. a command which is to 
be wrapped in curly braces, like \em, \bf etc.) in Lua?

Let's have:


bla {\em haha} bla


Should be the Lua transcription be:


bla
\ctxlua{context(false, context.delayed.em("haha"))} % <--- The clearest 
("nicest") way?
bla


Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

[NTG-context] TABLE: Problem with column widths

2016-07-22 Thread Lukáš Procházka

Hello,

I'd like to typeset a very simple natural table:

- table width to be "maximum of the current scope" (typically \textwidth) 
(option = stretch)
- 1st column to have width of 1 in,
- 2nd column to have (maximum) remaining width (typically \textwidth - 1 in)

Let's have two (almost identical) TABLEs - the only difference is that the 
latter inputs zapf whilst the former doesn't:


%\showframe
\starttext
  Table 1:

  \bTABLE[option=stretch]
\setupTABLE[column][1][width=1in]
\bTR
  \bTD Col1 \eTD
  \bTD
%\input zapf % !!!
  \eTD
\eTR
\bTR \bTD Col1 \eTD \bTD abc \eTD \eTR
  \eTABLE

  \blank

  Table 2:

  \bTABLE[option=stretch]
\setupTABLE[column][1][width=1in]
\bTR
  \bTD Col1 \eTD
  \bTD
\input zapf
  \eTD
\eTR
\bTR \bTD Col1 \eTD \bTD abc \eTD \eTR
  \eTABLE
\stoptext


What's wrong with the Table 1? Its first column should have width of 1 in!?

Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

Table2.mkiv
Description: Binary data


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

Re: [NTG-context] Thick border of one side of TR/TD

2016-05-22 Thread Lukáš Procházka

Hello,

thanks for the answers.

So my solution now is:


\startuseMPgraphic{MP:ThickBtm}
  draw bottomboundary OverlayBox withpen pensquare scaled 1mm withcolor black;
  clip currentpicture to OverlayBox;
\stopuseMPgraphic

\installbottomframerenderer{Thick}{\useMPgraphic{MP:ThickBtm}}

\starttext
  \bTABLE[width=.4\textwidth,frame=on,align={middle,lohi}]
\bTR[bottomframe=Thick]
  \bTD a \eTD\bTD b \eTD
\eTR
\bTR
  \bTD A \eTD\bTD B \eTD
\eTR
  \eTABLE
\stoptext


Best regards,

Lukas


On Wed, 18 May 2016 00:25:26 +0200, Wolfgang Schuster 
<schuster.wolfg...@gmail.com> wrote:


Alan BRASLAU <mailto:alan.bras...@cea.fr>
18. Mai 2016 um 00:17
On Tue, 17 May 2016 23:09:16 +0200

In case Wolfgang's answer was not clear: use "extreme" tables
(\startxtable) rather than "natural" tables (\bTABLE). This mechanism
uses 'framed' and is more flexible.

There is no need to switch from natural to extreme tables because both
tables uses framed for the cells. What is necessary to create individual
borders for a cell is either a metapost background where you can solid,
dashed etc. lines or custom frame types which can be defined with
the \install(left|right|top|bottom)framerenderer command.

Wolfgang




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

Tel: +420 241 096 751
Fax: +420 244 461 038

TabThick2.mkiv
Description: Binary data


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

Re: [NTG-context] Redirect compilation to another .pdf?

2016-04-10 Thread Lukáš Procházka

Hello,

On Sun, 10 Apr 2016 18:07:54 +0200, Aditya Mahajan <adit...@umich.edu> wrote:


This should have worked, but for some reason it does not:

context --jobname=shadow main.tex

The output says:

system  > files > jobname 'shadow', input './main', result 'shadow'
.
mkiv lua stats  > result saved in file: shadow.pdf, compresslevel 3,
objectcompresslevel 3

but no shadow.pdf file is created.


I can fully confirm this behavior;

- the option "--jobname" is not listed when you type "context.exe" (= help), so it seems 
like a "hidden" option;

- but ConTeXt seems to use this option somehow, as
"context.exe --jobname=C A.mkiv"
produces
"system  > files > jobname 'C', input './A.mkiv', result 'C'"
to the console;

- but the result file is still A.pdf.

- Suggestion: would it be possible to use "--result=OutputFileName" as the name 
for the output stream immediately,
i.e. not to produce "default PDF file" + rename it to "OutputFileName" 
(= --result),
but to use the "OutputFileName" initially as the output stream?

I guess I explained why I'd like to use "non-default" PDF stream (to allow 
working with the default PDF file during the compilation)...

Best regards,

Lukas

(BTW: The PdfXChange Viewer has commands open/close PDF file similar to that of 
AR; unlike AR, these commands are still the same as far as I'm using PdfXCh.)


Aditya



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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

Re: [NTG-context] Redirect compilation to another .pdf?

2016-04-10 Thread Lukáš Procházka

Hello,

thanks for the tip,

the issue here is that I'm not using AR but PdfXChange Viewer (and yes, there 
is also at least SumetraPPDF and Foxit Reader).

I don't use --autopdf as it closes the .pdf as soon as the compilation is to 
start.

My way is to compile into a "shadow copy" which allow use to view the document 
even during its compilation.
Once the compilation is done, I close the .pdf, I move the compiled "shadow 
copy" to the well-named .pdf and I open it in a viewer.

So I'm trying find a way to redirect ConTeXt to that "shadow copy"...

Best regards,

Lukas (and yes, WinXP)


On Sun, 10 Apr 2016 00:02:24 +0200, Pablo Rodriguez <oi...@gmx.es> wrote:


On 04/09/2016 11:47 PM, Pablo Rodriguez wrote:

On 04/09/2016 10:11 PM, Lukáš Procházka wrote:

Hello,

is there a way to tell ConTeXt to generate a .pdf named othe
instead of the name derived from file to be compiled?

[...]
BTW, ---auto may achieve what you intend. I have never used it.


Sorry, the option is --autopdf, not --auto.

Pablo



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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

[NTG-context] Redirect compilation to another .pdf?

2016-04-09 Thread Lukáš Procházka

Hello,

is there a way to tell ConTeXt to generate a .pdf named otherwise instead of 
the name derived from file to be compiled?

Let's have A.tex to be compiled and an existing A.pdf which cannot be written 
into, e.g. due to being open by a viewer.

The "context.exe A.tex" fails as the A.pdf cannot be open for writing.

The "context.exe A.tex --result=A2.pdf" fails too, as Ctx tries to write into 
A.pdf (derived from A.tex) first and later tries to rename A.pdf to A2.pdf.

There is a way - "copy /y A.tex A2.tex & context.exe A2.tex" but it has some disadvantages - the 
.log, .tuc etc. will be named A2.log, A2.tuc etc., messages will refer to "A2" rather than to 
"A" etc.

So best seems to me to have an option to tell ConTeXt to produce a .PDF WITH A 
DESIRED NAME from the beginning... Is there a way to do so?

Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

[NTG-context] How to get the current section level?

2016-04-03 Thread Lukáš Procházka

Hello,

is there a (Lua) way how to get the current section level?

Something like:


\def\GetCurrentSectionLevel{%
  % What to come here?
}

\starttext
  \chapter{Ch}
\GetCurrentSectionLevel % Should yield "chapter" or e.g. 1 (meaning 
"chapter")

\section{Sec}
  \GetCurrentSectionLevel % Should yield "section" or e.g. 2 (meaning 
"section")

\subsubsection{SSSec}
  \GetCurrentSectionLevel % Should yield "subsubsection" or e.g. 4 (meaning 
"subsubsection")
\stoptext


Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

[NTG-context] Job done event

2016-02-13 Thread Lukáš Procházka

Hello,

during typesetting a document I'm collecting some information.

At the end (i.e. right before \stoptext or right after \stoptext), I'd need to 
perform an operation.

The way is to place some code before my code:

\starttext
  ...

  \DoSomethingMine
\stoptext

But I'm looking for a way that the code inside document prepares the final operation and 
a way to avoid writing "\DoSomethingMine" before \stoptext (or \stopcomponent) 
- something being processed by ConTeXt naturally.

Something like:

\starttext
  ...
  \startluacode
context.reactors.jobfinished = function(prev_op)
  -- Do something mine
  prev_op()
end
  \stopluacode
  ...
\stoptext % ConTeXt to call "context.reactors.jobfinished" or similar implicitly

Does ConTeXt offer something like described? (Would be nice...)

Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

Re: [NTG-context] How to test which is current "mainlanguage"?

2015-12-31 Thread Lukáš Procházka

... Great, thank you! Lukas


On Thu, 31 Dec 2015 11:52:46 +0100, Wolfgang Schuster 
<schuster.wolfg...@gmail.com> wrote:


Lukáš Procházka <mailto:l...@pontex.cz>
31. Dezember 2015 um 11:07
Hello,

how to detect which language set by \mainlanguage[xy] is active?
How to detect it by a) ConTeXt and b) Lua?

Something like:

\mainlanguage[cz]

\ifmainlanguage{cz}
  Do someting
\fi

and

if context.languages.active() == "cz" then
  -- Do somthing
end

You can use the modes mechanism for this because you can use ** to
check for the main language (set by \mainlanguage) and * for the
current language (set by \language).

\mainlanguage[cs]
%\language[en]

\starttext

\doifelsemode{**cs}{The main language is Czech.}{The main language is
“\currentmainlanguage”.}

\startluacode
if tex.modes["**cs"] then
 context("The main language is Czech.")
else
 context("The main language is “\\currentmainlanguage”.")
end
\stopluacode

\blank

\doifelsemode{*cs}{The current language is Czech.}{The current language
is “\currentlanguage”.}

\startluacode
if tex.modes["*cs"] then
 context("The current language is Czech.")
else
 context("The current language is “\\currentlanguage”.")
end
\stopluacode

\stoptext

Wolfgang




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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

[NTG-context] How to test which is current "mainlanguage"?

2015-12-31 Thread Lukáš Procházka

Hello,

how to detect which language set by \mainlanguage[xy] is active?
How to detect it by a) ConTeXt and b) Lua?

Something like:

\mainlanguage[cz]

\ifmainlanguage{cz}
  Do someting
\fi

and

if context.languages.active() == "cz" then
  -- Do somthing
end

Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

[NTG-context] Switching to landscape

2015-12-27 Thread Lukáš Procházka

Hello,

I have problem switching to landscape paper size (and landscape printing).

Based on

http://wiki.contextgarden.net/PaperSetup

I have:


\definepapersize[A4L][A4,landscape]

\starttext
  Aaa
  \page
  %\setuppapersize[A4,landscape]
  \setuppapersize[A4L]
  Bbb
\stoptext


But neither "\setuppapersize[A4,landscape]" nor "\setuppapersize[A4L]" works - 
still portrait paper orientation;
so how to switch to landscape page orientation?

Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

PapSz.mkiv
Description: Binary data


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

Re: [NTG-context] Pgfplots - "reverse legend" by Lua

2015-12-24 Thread Lukáš Procházka

Hello,

On Tue, 22 Dec 2015 18:21:01 +0100, Hans Hagen <pra...@wxs.nl> wrote:


t = {["legend entries"]="{Cos,Sin2,Sin}", "reverse legend"}


such a table is valid lua (mixture of indexed and hashed) but of course
the application using it has to know how to use it


OK, so when '{["legend entries"]="{Cos,Sin2,Sin}", "reverse legend"}' is a 
valid Lua call and, what I guess, a valid Lua-to-context call -
- why the code doesn't work?

I also tried Aditya's way II - to build the "command-string" and to pass it to 
context:

"
  context(string.format("\\startaxis[legend entries={%s},reverse legend]", 
"Sin,Cos"))
"

It works, although I'd rather use "context.startaxis{...options...}" style as it looks 
"nicer".

Next question - why

"
  context[[\startaxis]]
"

doesn't work, whilst

  context"\\startaxis"

does?

(See attached files.)

Best regards,

Lukas


Hans


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

Tel: +420 241 096 751
Fax: +420 244 461 038

t-Plot4.mkiv
Description: Binary data


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

[NTG-context] Synchronize ERROR: unknown node type 12

2015-12-20 Thread Lukáš Procházka

Hello,

I'm getting many error messages:

"
Synchronize ERROR: unknown node type 12
"

with the latest beta:

"
mtx-context | warning: synctex is enabled
...
This is LuaTeX, Version beta-0.87.0 (TeX Live 2016/W32TeX/dev)
"

and with the MWE:


\starttext
\section{Principy}
\stoptext


- see the attached log.

The error messages are printed only to the stdout, not in the compilation log 
file.

Anyway, a valid .pdf file is successfully produced, so it seems "Synchronize 
ERROR" is rather warning.

So what's going on?

Note that I'm running test with synctex enabled - the message might be related 
to synctex.

Best regards,

Lukas

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

Tel: +420 241 096 751
Fax: +420 244 461 038

t.log
Description: Binary data


Test.log
Description: Binary data


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

Re: [NTG-context] Bibliography - biblio error with the latest beta

2015-07-11 Thread Lukáš Procházka
, compresslevel 3, 
objectcompresslevel 3
mkiv lua stats   loaded fonts: 3 files: latinmodern-math.otf, 
lmmono12-regular.otf, lmroman12-regular.otf
mkiv lua stats   fonts load time: 0.212 seconds
mkiv lua stats   publications load time: 0.001 seconds, 515 bytes, 3 
definitions, 0 shortcuts
mkiv lua stats   used platform: mswin, type: windows, binary subtree: 
texmf-mswin
mkiv lua stats   luatex banner: this is luatex, version beta-0.79.1 (tex live 
2014/w32tex) (rev 5041)
mkiv lua stats   control sequences: 39036 of 65536 + 10
mkiv lua stats   lua properties: engine: lua, used memory: 29 MB (ctx: 28 MB), 
hash type: lua, hash chars: min(64,40), symbol mask: utf (¤ä╬Á¤ç)
mkiv lua stats   runtime: 0.605 seconds, 1 processed pages, 1 shipped pages, 
1.653 pages/second

mtx-context | fatal error: return code: 1


It seems to be related to the latest beta recoding.

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

Bib64.log
Description: Binary data


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

Re: [NTG-context] new beta - \pushbackground broken

2015-07-11 Thread Lukáš Procházka

Hello,

\pushbackground seems to be broken in the last beta - this doesn't compile (but 
it did till now):


\defineheadalternative
  [PartAlt]
  [renderingsetup=set:PartPage]

\startsetups[set:PartPage]
  \startmakeup[mu:PartPage]
\white
  \headnumbercontent
  \blank[2*big]
  \headtextcontent
  \stopmakeup
\stopsetups

\definemakeup
  [mu:PartPage]
  [align=middle,
   top=\vfill\vfill,
   bottom=\vfill\vfill\vfill,
  ]

\definefont[PartText][SerifBold sa 5]

% Method 1: change the values of the predefined default conversion set,
% you can use name of the sectionblock as prefix (separated by a :) to set
% the values only for a certain part (e.g. the appendix) of your document

\defineconversionset[appendix:default][A,R][n]

% Method 2: Create your own conversion set and apply it to all sections
%
% \defineconversionset[bodypart:myconversion][n,n][n]
% \defineconversionset[appendix:myconversion][A,R][n]
% \setuphead[part,chapter,section][sectionconversionset=myconversion]

\setuphead
  [part]
  [placehead=yes,
   alternative=PartAlt,
   page=right,
   header=none,
   before={\pushbackground[page]
   \setupbackgrounds[page][background=color,backgroundcolor=black]},
   after={\page\popbackground},
   bodypartlabel=MyPart:body,
   appendixlabel=MyPart:appx,
   align=middle,
   numberstyle=\bfc,
   textstyle=PartText,
  ]

\setuplabeltext[en][MyPart:body=Díl ,MyPart:appx=Dodatek ]

\starttext
  \startbodymatter
\part{My First Part}
  \input knuth
  \stopbodymatter
  \startappendices
\part{My First Appendix}
  \input tufte
  \stopappendices
\stoptext


Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

Ull-Gra.test2.pdf
Description: Adobe PDF document


Ull-Gra.test22.log
Description: Binary data


Ull-Gra.test22.mkiv
Description: Binary data


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

Re: [NTG-context] Bibliography (bug compiling components-001.tex?)

2015-07-08 Thread Lukáš Procházka

Hello,

On Wed, 08 Jul 2015 20:53:10 +0200, Hans Hagen pra...@wxs.nl wrote:


On 7/8/2015 4:06 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,

I also tried one of the ConTeXt suite test files, namely:

test\doc\context\tests\mkiv\bibtex\components-002.tex

where I just commented two lines, so I got:


% Was: components-001.tex

% \endinput % to be adapted


that file is not working now which is why it had an \endinput


OK.

Is there a way to have list of publications... - something like this to work:


\startpublication
  [k=me,
   t=article,
   a=LPr,
   y=2000,
   s=Shr,
   n=1,
  ]
  \city{Prg}
\stoppublication

\starttext
  Hello \cite[me].

  \placepublications[criterium=all]
\stoptext


So:

- publications to be defined before \starttext, with each publication enclosed 
in \startpublication ... \stoppublication pairs,
- \cite command to work,
- list of publications via \placepublications to work.

I mentioned this theme once in the mailing list - with subject Bibliography - 
but with no response...
The bibtex/components-002.tex seemed to be quite close...

Or: which is the recommended way to:

- have a DB of publications (preferably in standard ConTeXt space, not in a 
.bib file)
- to refer to a publication
- to build a list of publications?

(A MWE or a link would be appreciated...)

Best regards,

Lukas



Hans



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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

Re: [NTG-context] \setuphead for all existing sections

2015-04-20 Thread Lukáš Procházka

Hello Pablo,

\setupheads doesn't work for this - see the test:


\setupheads[distance=1in]
\setuphead[subsection][distance=2in]

\starttext
  \section{Sec}
\subsection{Subsec}
\stoptext


Subsection has the specified distance of 1 in, whilst the section doesn't.

Section was altered by \setupheads, whilst subsection by \setuphead.

Wiki http://wiki.contextgarden.net/Command/setupheads says that \setuphead has 
some more options than \setupheads.

- I guess it would be nice that \setupheads handles the distance key, too.

Best regards,

Lukas


On Fri, 17 Apr 2015 18:35:18 +0200, Pablo Rodriguez oi...@gmx.es wrote:


On 04/17/2015 12:00 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,

is there a way to affect (setup) all sections that have been defined, like:


\setuphead[*][distance=1.5em]


instead of:


\setuphead[part,chapter,section,subsection,subsubsection][distance=1.5em]



Hi Lukáš,

\setupheads[distance=1.5em] should do the work.

I hope it helps,


Pablo



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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

[NTG-context] Ctx XML

2014-12-10 Thread Lukáš Procházka

Hello,

I'm having problem using LuaXml library with Ctx, both using Lua ver. 5.2.

LuaXml works fine with Lua standalone programs/scripts;
but something weird occurs when used from within Ctx (e.g. a .xml file can be read 
successfully from standalone Lua with LuaXml lib; but the same code doesn't give 
the desired result when used in combination with Ctx; a problem might be version 
mismatch - I'm still using both Lua 5.1 and 5.2 including 3rd party modules in my 
scripts - but my latest tests with Ctx  LuaXml should have avoid this; or 
namespace mismatch...?).

Anyway, does native Ctx XML API (has it its own namespace, like 'context.xml'?) provide a 
function to load a .xml file and to return its XML tree as a table, with nodes (as a 
table with node attributes as table members) in a proper sequence... something like 
LuaXml's 'xml.load(file.xml)' does?

Or how to achieve this in a best way under Ctx: XML file - Lua table/tree?

Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

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

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

Re: [NTG-context] Ctx goes into infinite loop?

2014-05-25 Thread Lukáš Procházka

Hello,

I solved the problem.

I was requiring a Lua .dll at some place in Ctx \s...luacode, namely 
LuaXml_Lib.dll.

I didn't realize that Ctx found the lib, but that have been compiled for Lua 
5.1.

So, with my ancient Ctx version (5/2012, which I've been using often so far), 
all worked well as LuaXml_Lib was compatible with that version of Ctx.

Once I tried the latest Ctx beta, there was a failure;
and it appeared like cannot locate file ...  error.

I built a Lua 5.2 version of LuaXml_Lib and all works well now with the latest 
Ctx.

- If some interested why I'm using LuaXml_Lib with Ctx, when Ctx provides its 
own XML API,
the reason is that I often save Excel tables as Excel XML table to allow Lua scripts 
access them, especially I'm using Excel named regions/variables which are later 
transformed into Lua tables.
I need an independent XML tool for this; LuaXML_Lib 
(http://viremo.eludi.net/LuaXML) does the job.

And also I need to do similar things with Ctx;
thus I need LuaXML_Lib to be accessible from within Ctx.

- Question: when is Ctx supposed to adopt Lua 5.3?

Best regards,

Lukas



On Fri, 23 May 2014 16:18:33 +0200, Peter Rolf indi...@gmx.net wrote:


Am 23.05.2014 13:50, schrieb Hans Hagen:

On 5/23/2014 1:30 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,


\input \HOME/Common/_Defs_.ctx


at least put { } around the input name


--
\startluacode
   local home = (os.getenv(HOME.ORG) or os.getenv(HOME) or
?):gsub(\\, /)

   context.setvalue(HOME, home)
\stopluacode

\input{\HOME/Common/_Defs_.ctx}

\starttext
   Test
\stoptext




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

Tel: +420 241 096 751
Fax: +420 244 461 038


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

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

[NTG-context] Interactive U3D in .pdf via ConTeXt?

2014-05-16 Thread Lukáš Procházka

Hello,

is there way to include U3D (or X3D after conversion) into a .pdf via ConTeXt?

- An example of such an embed object and its capabilities at 
http://www.behaviometrix.com/public_html/brain.pdf

LaTeX offers this via movie15 package; is it possible to produce such document 
with ConTeXt?

Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038


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

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

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

2014-02-16 Thread Lukáš Procházka

Hello Herbert,

On Sun, 16 Feb 2014 20:32:11 +0100, Herbert Voss herbert.v...@fu-berlin.de 
wrote:


As far as I know \addplot scans the coordinates in a way that a
macro is not possible here . However, write your coodinates into an
external file  and read it with


I was aware of this solution; however, I was looking for another way due to 
performance reason and to avoid having too many temporary (data) files.



\addplot table {file.data};

  That will work.


It seems I found a more Lua way:


\usemodule[pgfplots]

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

  data2crds = function(data)
local str

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

print(Crds=, str)

return str
  end

  --

  plot = function(data)
context.starttikzpicture()
  context.startaxis{}
context.addplot{mark=none,color=red}
  context(coordinates { .. data2crds(data) .. };)
  context.stopaxis()
context.stoptikzpicture()
  end
\stopluacode

\starttext
  \starttikzpicture
\startaxis[]
  \addplot[mark=none,color=red] coordinates {(11, 5) (12, 18)};
\stopaxis
  \stoptikzpicture

  \ctxlua{plot(data)}
\stoptext


Anyway, thanks.

Best regards,

Lukas



Herbert



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

Tel: +420 241 096 751
Fax: +420 244 461 038

t-Plot3.mkiv
Description: Binary data


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

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

2014-02-15 Thread Lukáš Procházka

Hello,

I just started experimenting with pgfplots package.

I'd have two questions:

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

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

The following code:


\usemodule[tikz]
\usemodule[pgfplots]

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

  plot = function(data)
local str

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

print(Crds=, str)

context(str)
  end
\stopluacode

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


gives error:


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


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

TIA.

Best regards,

Lukas


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

Tel: +420 241 096 751
Fax: +420 244 461 038

t-Plot2.mkiv
Description: Binary data


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

Re: [NTG-context] Sectioning from 0?

2013-10-06 Thread Lukáš Procházka

On Fri, 04 Oct 2013 16:53:58 +0200, Mari Voipio mari.voi...@iki.fi wrote:


On Fri, Oct 4, 2013 at 5:11 PM, Peter Münster pmli...@free.fr wrote:

\startsection[ownnumber=123, title=A]
bla
\stopsubsection


?


That was a typo, I guess; it should have been:

\startsubsection[ownnumber=123,title=A]
  bla
\stopsubsection

Lukas



(They should be a pair, shouldn't they? Just in case somebody tries to
cut-and-paste the code...)

Mari



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

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

Re: [NTG-context] Alternative rendering of some TOC levels

2013-05-04 Thread Lukáš Procházka

On Sat, 04 May 2013 09:31:45 +0200, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:



Am 03.05.2013 um 16:27 schrieb Procházka Lukáš Ing. - Pontex s. r. o. 
l...@pontex.cz:


Hello,

how to change the way (alternative) how a particular level - e.g. sections - 
are rendered in TOC?

I tried:


\setupcombinedlist
 [content]
 [alternative=c]

\setuplist
 [section]
 [alternative=b]

%\setupcombinedlist
%  [content]
%  [section]
%  [alternative=b]

\starttext
 \placecontent

 \chapter{Ch}
   \section{Sec}
 \subsection{SSec}
   \input knuth
\stoptext


This should change the alternative for section to be b (i.e. page numbers without filling 
dots), whilst the default look should be alternative c (i.e. dots and page numbers).


When you use \setupcombinedlist to change the alternative values this applies 
to all levels and individual settings are ignored.

The global setup can be better done with \setuplist[alternative=c].

Wolfgang


... OK, thanks for explanation.

Best regards,

Lukas


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

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