Re: [NTG-context] Last version standalone ConTeXt issue.

2016-02-09 Thread Jaroslav Hajtmar

Thanx Hans.
Great! It works fine now! For me it is very useful and important macro.
One more thanx for reply.

Jaroslav Hajtmar



Dne 09.02.16 v 19:50 Hans Hagen napsal(a):

On 2/9/2016 1:28 PM, Jaroslav Hajtmar wrote:

Hello ConTeXist.

In the latest version ConTeXt it stopped working my macros which
contents function  he once advised me Taco. It is low level lua code.
Can anyone advise me what the problem is, eventually. how to replace Lua
code in my function to make it work again? Macros worked at least 6
years and now crashes.

Here is my function:

function thirddata.handlecsv.texmacroisdefined(macroname) -- check
whether macroname macro is defined  in ConTeXt
-- function is used to test whether the user has defined the macro
\macroname. If not, it needs to define any default value
 if token.csname_name(token.create(macroname)) == macroname then
 return true
  else
 return false
 end
end

Is there any alternative (ConTeXt like), which is should be possible use
in Lua code?


\starttext

\startluacode

function interfaces.defined(name)
return token.get_cmdname(token.create(name)) ~= "undefined_cs"
end

if interfaces.defined("foo") then
context("foo")
else
interfaces.setmacro("foo","bar")
end

\stopluacode

\foo

\stoptext

I'll add interfaces.defined to the core.

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

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


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

webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


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

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

[NTG-context] columnsets

2016-02-09 Thread Hans Hagen

Hi,

I'm currently reimplementing columnsets and I'm wondering how many users 
there are of this mechanism. How bad is it if the more obscure features 
go away and others show up.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Last version standalone ConTeXt issue.

2016-02-09 Thread Hans Hagen

On 2/9/2016 1:28 PM, Jaroslav Hajtmar wrote:

Hello ConTeXist.

In the latest version ConTeXt it stopped working my macros which
contents function  he once advised me Taco. It is low level lua code.
Can anyone advise me what the problem is, eventually. how to replace Lua
code in my function to make it work again? Macros worked at least 6
years and now crashes.

Here is my function:

function thirddata.handlecsv.texmacroisdefined(macroname) -- check
whether macroname macro is defined  in ConTeXt
-- function is used to test whether the user has defined the macro
\macroname. If not, it needs to define any default value
 if token.csname_name(token.create(macroname)) == macroname then
 return true
  else
 return false
 end
end

Is there any alternative (ConTeXt like), which is should be possible use
in Lua code?


\starttext

\startluacode

function interfaces.defined(name)
return token.get_cmdname(token.create(name)) ~= "undefined_cs"
end

if interfaces.defined("foo") then
context("foo")
else
interfaces.setmacro("foo","bar")
end

\stopluacode

\foo

\stoptext

I'll add interfaces.defined to the core.

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Lost in letter module

2016-02-09 Thread Jan U. Hasecke
Hi all,

I am completely lost in the letter module.

I started with the tutorial "Correspondence with ConTEXt Version:
2010.08.27" but reference line does not show up at all.

So I read a little further:
http://wiki.contextgarden.net/Letter
And the PDFs that are linked under "Further information"

But I fear that I am now completely lost as some commands seems to be
old or deprecated or whatever, but they simply does not work. And there
are references to new commands in the text.

What I am trying to get is a letter with first and second page style,
where on the first page I need a special foot with accounting infos etc.

Including a background file (uncommented in the mwe) works fine.

I need a references line for customer id, invoice id and date just above
the subject.

I don't understand the setupletterlayer command as you can see in the
mwe where I use a negative value for x to push it to the right position.
I have no idea how x and y are working and what position is for.

The same is true for \setupletterframe.


I am using: Version beta-0.89.0 (TeX Live 2016/dev

Here is my mwe:

\mainlanguage[de]
\usemodule[letter]
\useletterstyle{dinb}
\setupletteroptions
  [%backgroundimage=/home/juh/Bilder/Diverses/Hintergrund.png,
   language=german]

\defineletterelement[layer][reference][rechnung]
{Kundennummer: \correspondenceparameter{kd} \|
Rechnungnummer: \correspondenceparameter{id}}

\setupletterlayer[reference]
 [ alternative=rechnung,
   style=\tfx\sans,y=10pt,
   x=-63mm,
   y=100mm,
   position=topleft]

\setupletterframe[reference][align=left]

\setupletter
  [toname={Mustermann GmbH\\Peter Mustermann},
  toaddress={Haubenweg 3\\12345 Musterstadt},
  signature={Jan Ulrich Hasecke},
  date=\currentdate,
  kd={077},
  id={2016002}]

\starttext
\startletter
  [opening={Sehr geehrte Damen und Herren},
closing={Mit freundlichen Grüßen},
  subject={Imagebroschüre Mustermann GmbH}]

Hiermit berechne ich Ihnen 100 € für Leistungen.

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

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

Re: [NTG-context] numbering problem

2016-02-09 Thread Wolfgang Schuster

dr. Hans van der Meer 
9. Februar 2016 um 11:29
The following problem in the numbering of equations, figures, tables 
has arisen.


For the subdivison of the document is wanted the numbering scheme
chapter (numbered)
  section   (numbered)
subsection  (numbered}
  subsubsection (not numbered)
Doing this with \setuphead[subsubsection][number=no], because I find 3 
levels of numbering enough.


However, the number=no on the last \setuphead has as sideeffect that 
the chapternumber is missing on equations, figures, tables. Thus for 
example instead of "table 1.4" I am seeing "Table 4".


How can I keep the numbering at 3 levels instead of 4 in still have 
tables inside subsubsections numbered as "Table 1.4"?


Use "incrementnumber=no" (unnumbered) or "incrementnumber=list" 
(unnumbered plus list entry).


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

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

[NTG-context] numbering problem

2016-02-09 Thread dr. Hans van der Meer
The following problem in the numbering of equations, figures, tables has arisen.

For the subdivison of the document is wanted the numbering scheme
chapter (numbered)
  section   (numbered)
subsection  (numbered}
  subsubsection (not numbered)
Doing this with \setuphead[subsubsection][number=no], because I find 3 levels 
of numbering enough.

However, the number=no on the last \setuphead has as sideeffect that the 
chapternumber is missing on equations, figures, tables. Thus for example 
instead of "table 1.4" I am seeing "Table 4".

How can I keep the numbering at 3 levels instead of 4 in still have tables 
inside subsubsections numbered as "Table 1.4"?

Hans van der Meer

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

2016-02-09 Thread Pablo Rodriguez
Dear list,

I’m afraid there may be a bug in betas from February (including the
latest one from 2016.02.08 15:35):

\startbuffer[demo]

 Link: http://a.b/c#d;>http://a.b/c#d

\stopbuffer

\starttext

\startxmlsetups xml:initialize
 \xmlsetsetup{#1}{p|doc|a}{xml:*}
 \xmlsetsetup{\xmldocument}{span[@label]}{xml:logo}
\stopxmlsetups

\xmlregistersetup{xml:initialize}

\startxmlsetups xml:doc
 \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:p
 \xmlflush{#1}\par
\stopxmlsetups

\startxmlsetups xml:a
\mypersonalurl{\xmlflush{#1}}
\stopxmlsetups

\def\mypersonalurl#1{\bgroup\tt\goto{%
\hyphenatedurl{#1}}[url(#1)]\egroup}%
\unexpanded\def\href#1#2{\goto{#2} [url(#1)]}

\xmlprocessbuffer{main}{demo}{}

\stoptext

Output with latest beta:

Link: http://a.b/c\Ux {23}d

Output with beta from 2016.01.14 09:55;

Link: http://a.b/c#d

I guess this is a bug. Could anyone else confirm this?

Many thanks for your help,


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

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

[NTG-context] Last version standalone ConTeXt issue.

2016-02-09 Thread Jaroslav Hajtmar

Hello ConTeXist.

In the latest version ConTeXt it stopped working my macros which 
contents function  he once advised me Taco. It is low level lua code. 
Can anyone advise me what the problem is, eventually. how to replace Lua 
code in my function to make it work again? Macros worked at least 6 
years and now crashes.


Here is my function:

function thirddata.handlecsv.texmacroisdefined(macroname) -- check 
whether macroname macro is defined  in ConTeXt
-- function is used to test whether the user has defined the macro 
\macroname. If not, it needs to define any default value

if token.csname_name(token.create(macroname)) == macroname then
return true
 else
return false
end
end

Is there any alternative (ConTeXt like), which is should be possible use 
in Lua code?


Thanx
Jaroslav Hajtmar


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

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

Re: [NTG-context] wrong xml char handling

2016-02-09 Thread Hans Hagen

On 2/9/2016 11:36 AM, Pablo Rodriguez wrote:

Dear list,

I’m afraid there may be a bug in betas from February (including the
latest one from 2016.02.08 15:35):

 \startbuffer[demo]
 
  Link: http://a.b/c#d;>http://a.b/c#d
 
 \stopbuffer

 \starttext

 \startxmlsetups xml:initialize
  \xmlsetsetup{#1}{p|doc|a}{xml:*}
  \xmlsetsetup{\xmldocument}{span[@label]}{xml:logo}
 \stopxmlsetups

 \xmlregistersetup{xml:initialize}

 \startxmlsetups xml:doc
  \xmlflush{#1}
 \stopxmlsetups

 \startxmlsetups xml:p
  \xmlflush{#1}\par
 \stopxmlsetups

 \startxmlsetups xml:a
 \mypersonalurl{\xmlflush{#1}}
 \stopxmlsetups

 \def\mypersonalurl#1{\bgroup\tt\goto{%
 \hyphenatedurl{#1}}[url(#1)]\egroup}%
 \unexpanded\def\href#1#2{\goto{#2} [url(#1)]}

 \xmlprocessbuffer{main}{demo}{}

 \stoptext

Output with latest beta:

 Link: http://a.b/c\Ux {23}d

Output with beta from 2016.01.14 09:55;

 Link: http://a.b/c#d

I guess this is a bug. Could anyone else confirm this?


fixed in next beta

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] \usemodule[pgfplots] fails

2016-02-09 Thread Mojca Miklavec
On 9 February 2016 at 13:36, Procházka Lukáš Ing. wrote:
>
> Yes, placing your pgfplots.zip in the same directory as the source file
> solves the problem - the file compiles well with no error.
>
> What is more pure or systematic solution? For now and for one directory it
> is OK, but - for the future in general?

It would help to ask the author of pgfplots to fix the problem. I can
do a temporary workaround on the server, but it would be great to fix
it uptream.

Mojca
___
If your question is of interest to others as well, please add an 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 use Helvetica Neue Light (OS X)?

2016-02-09 Thread Nicola

I am coming back to using ConTeXt after a relatively long hiatus,
so I am trying to re-learn old things and learn the new stuff.
Please bear with me.

I want to use OS X's Helvetica Neue Light in a document. How may
I do that?

I have tried:

\definefontfamily [myfamily] [serif] [Helvetica Neue Light]

but, fair enough, that results in `font with asked name 'unknown'
is not found`. If I use

\definefontfamily [myfamily] [serif] [Helvetica Neue]

then the document is typeset in Helvetica Neue, but in boldface.
Why? Using mtxrun, all the relevant files are found:

mtxrun --script fonts --list --all --pattern=neue*

helveticaneue   helveticaneuebold   
/System/Library/Fonts/HelveticaNeue.dfont  index: 13
helveticaneuebold   helveticaneuebold   
/System/Library/Fonts/HelveticaNeue.dfont  index: 13
helveticaneuedeskinterface  helveticaneuedeskinterfaceregular   
/System/Library/Fonts/HelveticaNeueDeskInterface.ttc   index:  9
helveticaneuedeskinterfacenormalhelveticaneuedeskinterfaceregular   
/System/Library/Fonts/HelveticaNeueDeskInterface.ttc   index:  9
helveticaneuedeskinterfaceregular   helveticaneuedeskinterfaceregular   
/System/Library/Fonts/HelveticaNeueDeskInterface.ttc   index:  9


How do I specify the font's weight?

Nicola


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

2016-02-09 Thread Alan BRASLAU
On Tue, 9 Feb 2016 20:05:01 +0100
Hans Hagen  wrote:

> I'm currently reimplementing columnsets and I'm wondering how many
> users there are of this mechanism. How bad is it if the more obscure
> features go away and others show up.

I have used and liked columnsets, so I vote for their improvement. I
find them particularly useful when composing A0 (scientific) posters. I
will gladly adapt to their evolution.

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

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

Re: [NTG-context] columnsets

2016-02-09 Thread Henning Hraban Ramm

Am 2016-02-10 um 05:58 schrieb Alan BRASLAU :

> On Tue, 9 Feb 2016 20:05:01 +0100
> Hans Hagen  wrote:
> 
>> I'm currently reimplementing columnsets and I'm wondering how many
>> users there are of this mechanism. How bad is it if the more obscure
>> features go away and others show up.
> 
> I have used and liked columnsets, so I vote for their improvement. I
> find them particularly useful when composing A0 (scientific) posters. I
> will gladly adapt to their evolution.

The same. I need to adapt my ConTeXt sources anyway every time I try to use 
them...

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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