Re: [NTG-context] lua code prevents compilation

2015-04-02 Thread Pablo Rodriguez
On 04/02/2015 02:23 AM, Hans Hagen wrote:
 On 4/2/2015 1:21 AM, Pablo Rodriguez wrote:
 [...]
 Both lack the underscore glyph. This causes the crash, since it works
 fine if I replace the glyph with an existing glyph in the font.
 [...]
 Would it be possible that ConTeXt silently ignores that the font doesn’t
 contain the glyph?
 
 the message is fuzzy (and i have to check a lua stack issue maybe but 
 not now) ... if char is nil then char.depth is an error
 
 I think this might be a bug.
 
function document.addfunnyhyphen(tfmdata)
local underscore = utf.byte(_)
local char   = tfmdata.characters[underscore]
 
 if not char then return end

Many thanks for your help, Hans.

This solves my issue.


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] Forms and JavaScript

2015-04-02 Thread Henning Hraban Ramm
Hello,

while trying to create some interactive forms using latest beta (MkIV), I found 
that JavaScripts are only then copied into the PDF, if there’s a \goto 
referencing a JS function.

According to the old widgets manual I thought I could set default values of 
fields calling JS functions or variables as [JS(MyFunc)], but that doesn’t work.


\starttext

\setupinteraction   [state=start]

\startJSpreamble{formtest}
% this JS code is only copied to the PDF if the \goto below is uncommented!
var d = new Date();
var df = this.getField(Datum);
var CurDate = util.printd(dd.mm., d);
df.value = CurDate;

function toggleField(){
var f = this.getField(Datum);
f.display = ! f.display;
}
\stopJSpreamble

%\goto{toggle}[JS(toggleField)]
\blank

\setupfield[MMshortString][reset,horizontal][height=5mm, width=50mm, frame=off, 
bottomframe=on]

\definefield[Datum][line][MMshortString][][JS(CurDate)] % JS(CurDate) ends up 
verbatim in the field


Date: \field[Datum]


\stoptext


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
___

Re: [NTG-context] line break between number and footnote text in paragraph footnotes

2015-04-02 Thread mf
Il giorno ven, 03/04/2015 alle 00.36 +0200, Hans Hagen ha scritto:
 On 4/3/2015 12:31 AM, mf wrote:
  Hello,
  I have a problem with paragraph footnotes. I don't know how to prevent a
  line break occurring between the footnote number and the footnote text.
  Sometimes a thing like this happens:
 
  ... [main text] ...
 
  --
  1. text of the first footnote --- 2. text of the second one --- 3.
  text of the third one
 
  Is there a way to force ConTeXt to keep the 3. with text of the third
  one?
 
  Thanks in advance,
  Massi
  ...
 
  \definenote[footnote]
  \setupnotation[footnote][
 alternative=serried,
 numberstopper=,
 numbercommand={\high},
 numberconversion=a,
 way=bypage,
 width=0.5pt,
 location=page]
 
  \setupnote[footnote][
 alternative=serried,
 paragraph=yes,
 inbetween= \emdash{} ,
 location=page,
 before={\blank[2*line]}]
 
  \starttext
  First footnote\footnote{this is the text of the first footnote}.
  Another
  one\footnote{the second one, longer to get to the right margin}.
  And the third one,\footnote{third footnote} with the “c” letter
  separated by a line break from the footnote text.
  \stoptext
 
  I found a solution: adding a negative penalty at the end of the
  inbetween parameter:
 
  \setupnote[footnote][
 alternative=serried,
 paragraph=yes,
 inbetween= \emdash{} \penalty-1000,
 location=page,
 before={\blank[2*line]}]
 
  The footnotes' area was like this:
  -
  ^a this is the text of the first footnote --- ^b the second... --- ^c
  third footnote
 
  Now it is like this:
  -
  ^a this is the text of the first footnote --- ^b the second... ---
  ^c third footnote
 
  The first line ends with an em dash: it's not so fine, but it's better
  than a letter (footnote number) split from the text of the footnote by a
  line break.
 
 it is already handled in the beta
 

I've downloaded it and I was glad to see the result.
Now the footnotes' area looks like this:
-
^a this is the text... --- ^b the second... --- ^c third
footnote

It's much better. Thank you, Hans.

___
If your question is of interest to others as well, please add an 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] line break between number and footnote text in paragraph footnotes

2015-04-02 Thread Hans Hagen

On 4/3/2015 12:31 AM, mf wrote:

Hello,
I have a problem with paragraph footnotes. I don't know how to prevent a
line break occurring between the footnote number and the footnote text.
Sometimes a thing like this happens:

... [main text] ...

--
1. text of the first footnote --- 2. text of the second one --- 3.
text of the third one

Is there a way to force ConTeXt to keep the 3. with text of the third
one?

Thanks in advance,
Massi

...


\definenote[footnote]
\setupnotation[footnote][
   alternative=serried,
   numberstopper=,
   numbercommand={\high},
   numberconversion=a,
   way=bypage,
   width=0.5pt,
   location=page]

\setupnote[footnote][
   alternative=serried,
   paragraph=yes,
   inbetween= \emdash{} ,
   location=page,
   before={\blank[2*line]}]

\starttext
First footnote\footnote{this is the text of the first footnote}.
Another
one\footnote{the second one, longer to get to the right margin}.
And the third one,\footnote{third footnote} with the “c” letter
separated by a line break from the footnote text.
\stoptext


I found a solution: adding a negative penalty at the end of the
inbetween parameter:

\setupnote[footnote][
   alternative=serried,
   paragraph=yes,
   inbetween= \emdash{} \penalty-1000,
   location=page,
   before={\blank[2*line]}]

The footnotes' area was like this:
-
^a this is the text of the first footnote --- ^b the second... --- ^c
third footnote

Now it is like this:
-
^a this is the text of the first footnote --- ^b the second... ---
^c third footnote

The first line ends with an em dash: it's not so fine, but it's better
than a letter (footnote number) split from the text of the footnote by a
line break.


it is already handled in the beta



--

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

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

Re: [NTG-context] line break between number and footnote text in paragraph footnotes

2015-04-02 Thread mf
 Hello,
 I have a problem with paragraph footnotes. I don't know how to prevent a
 line break occurring between the footnote number and the footnote text.
 Sometimes a thing like this happens:
 
 ... [main text] ...
 
 --
 1. text of the first footnote --- 2. text of the second one --- 3.
 text of the third one
 
 Is there a way to force ConTeXt to keep the 3. with text of the third
 one?
 
 Thanks in advance,
 Massi
...

 \definenote[footnote]
 \setupnotation[footnote][
   alternative=serried,
   numberstopper=, 
   numbercommand={\high},  
   numberconversion=a, 
   way=bypage, 
   width=0.5pt,
   location=page]
 
 \setupnote[footnote][
   alternative=serried,
   paragraph=yes,
   inbetween= \emdash{} ,
   location=page,
   before={\blank[2*line]}]
 
 \starttext
 First footnote\footnote{this is the text of the first footnote}.
 Another
 one\footnote{the second one, longer to get to the right margin}.
 And the third one,\footnote{third footnote} with the “c” letter 
 separated by a line break from the footnote text.
 \stoptext

I found a solution: adding a negative penalty at the end of the
inbetween parameter:

\setupnote[footnote][
  alternative=serried,
  paragraph=yes,
  inbetween= \emdash{} \penalty-1000,
  location=page,
  before={\blank[2*line]}]

The footnotes' area was like this:
-
^a this is the text of the first footnote --- ^b the second... --- ^c
third footnote

Now it is like this:
-
^a this is the text of the first footnote --- ^b the second... ---
^c third footnote

The first line ends with an em dash: it's not so fine, but it's better
than a letter (footnote number) split from the text of the footnote by a
line break.


___
If your question is of interest to others as well, please add an 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] overlay or layer for chapter head.

2015-04-02 Thread Otared Kavian
Hi,

Maybe you need to say state=repeat in the definition of your layer:

\definelayer[chapterbackground][state=repeat]

Best regards: OK

 
 On 02 Apr 2015, at 13:15, robin.kirk...@csiro.au wrote:
 
 From: John Culleton j...@wexfordpress.com
 Subject: [NTG-context] overlay or layer for chapter head.
 Date: 2 April 2015 1:19:03 AEDT
 
 I am redoing a book for a client. Each chapter
 head has a fancy design. I want to reproduce that
 fancy page but still have the \chapter
 statement for running heads, TOC etc. 
 
 Is there a way that I can overlay the entire
 chapter first page with a graphic, ideally a one
 page pdf file. 
 
 I have tried workarounds with
 \startstandardmakeup,\writetolist,
 \definemarking etc. but the whole thing is
 getting too complicated. I just want to overlay a
 the entire page with a graphic yet have
 the real content of the page still available for
 TOC, running head, indexing terms etc.
 
 Any suggestions?
 
 -- 
 John Culleton
 Wexford Press
 
 Hi John,
 
 I did this recently by defining a layer and putting an image in it using 
 \setlayer, in a macro called just before chapters are started:
 
 \definelayer[chapterbackground]
 \setupexternalfigures[location=default]
 
 \unexpanded\def\chapterbefore{
\setlayer[chapterbackground]{%
\externalfigure[mill.png]
[width=\paperwidth,height=\paperheight]
}
\setupbackgrounds[page]
[background=chapterbackground]
 }
 
 \setuphead[chapter][before=\chapterbefore]
 
 \starttext
 \chapter{Knuth}
 \dorecurse{5}{
\input knuth
\par
 }
 
 \chapter{Dawkins}
 \input dawkins
 \stoptext
 
 No doubt there is a neater/better way to do it than that. In fact I tried to 
 set up the background only once, like this:
 
 \definelayer[chapterbackground]
 \setupexternalfigures[location=default]
 \setlayer[chapterbackground]{%
\externalfigure[mill.png]
[width=\paperwidth,height=\paperheight]
 }
 
 \setuphead[chapter]
[before={
\setupbackgrounds[page]
[background=chapterbackground]
}]
 
 \starttext
 \chapter{Knuth}
 \dorecurse{5}{
\input knuth
\par
 }
 
 \chapter{Dawkins}
 \input dawkins
 \stoptext
 
 But it looks like the layer “forgets” the image each time it is used, and the 
 second chapter does not have the image. I’d be pleased to know the “right 
 way” to do this too ...
 
 Robin
 
 
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

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

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

Re: [NTG-context] overlay or layer for chapter head.

2015-04-02 Thread Robin.Kirkham
 From: John Culleton j...@wexfordpress.com
 Subject: [NTG-context] overlay or layer for chapter head.
 Date: 2 April 2015 1:19:03 AEDT
 
 I am redoing a book for a client. Each chapter
 head has a fancy design. I want to reproduce that
 fancy page but still have the \chapter
 statement for running heads, TOC etc. 
 
 Is there a way that I can overlay the entire
 chapter first page with a graphic, ideally a one
 page pdf file. 
 
 I have tried workarounds with
 \startstandardmakeup,\writetolist,
 \definemarking etc. but the whole thing is
 getting too complicated. I just want to overlay a
 the entire page with a graphic yet have
 the real content of the page still available for
 TOC, running head, indexing terms etc.
 
 Any suggestions?
 
 -- 
 John Culleton
 Wexford Press

Hi John,

I did this recently by defining a layer and putting an image in it using 
\setlayer, in a macro called just before chapters are started:

\definelayer[chapterbackground]
\setupexternalfigures[location=default]

\unexpanded\def\chapterbefore{
\setlayer[chapterbackground]{%
\externalfigure[mill.png]
[width=\paperwidth,height=\paperheight]
}
\setupbackgrounds[page]
[background=chapterbackground]
}

\setuphead[chapter][before=\chapterbefore]

\starttext
\chapter{Knuth}
\dorecurse{5}{
\input knuth
\par
}

\chapter{Dawkins}
\input dawkins
\stoptext

No doubt there is a neater/better way to do it than that. In fact I tried to 
set up the background only once, like this:

\definelayer[chapterbackground]
\setupexternalfigures[location=default]
\setlayer[chapterbackground]{%
\externalfigure[mill.png]
[width=\paperwidth,height=\paperheight]
}

\setuphead[chapter]
[before={
\setupbackgrounds[page]
[background=chapterbackground]
}]

\starttext
\chapter{Knuth}
\dorecurse{5}{
\input knuth
\par
}

\chapter{Dawkins}
\input dawkins
\stoptext

But it looks like the layer “forgets” the image each time it is used, and the 
second chapter does not have the image. I’d be pleased to know the “right way” 
to do this too ...

Robin



___
If your question is of interest to others as well, please add an 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] small space before some characters (: ; ! ?)

2015-04-02 Thread Csikos Bela
Wolfgang Schuster  írta:

 Am 01.04.2015 um 18:46 schrieb Csikos Bela:
 
 Hello:
 
 Hungarian typography requires inserting small spaces before :, ;, ! and ? 
 characters.
 The width of this small space should be equal to that of the period (.). In 
 latex magyarlatex (magyar.ldf) module (part of biblatex) contains 
 definitions to achieve this. How could I set this in context?


You can use the french settings which also requires a small space before these 
characters.

\starttext

Take a look at this; this: this! or this?

\setcharacterspacing[frenchpunctuation]

Take a look at this; this: this! or this?

\stoptext

Thanks!
It is something I'd like to have but the space inserted is too big, it looks 
like a normal interword space. It should be 1/3 or 1/4 interword space or the 
width of the dot (the visible part), but definitely less than a normal space. 
Is it possible to redefine the inserted space width? 

Thanks,

bcsikos
___
If your question is of interest to others as well, please add an 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] small space before some characters (: ; ! ?)

2015-04-02 Thread Wolfgang Schuster

 Am 02.04.2015 um 12:05 schrieb Csikos Bela bcsikos...@freemail.hu:
 
 Wolfgang Schuster  írta:
 
 Am 01.04.2015 um 18:46 schrieb Csikos Bela:
 
 Hello:
 
 Hungarian typography requires inserting small spaces before :, ;, ! and ? 
 characters.
 The width of this small space should be equal to that of the period (.). In 
 latex magyarlatex (magyar.ldf) module (part of biblatex) contains 
 definitions to achieve this. How could I set this in context?
 
 
 You can use the french settings which also requires a small space before 
 these characters.
 
 \starttext
 
 Take a look at this; this: this! or this?
 
 \setcharacterspacing[frenchpunctuation]
 
 Take a look at this; this: this! or this?
 
 \stoptext
 
 Thanks!
 It is something I'd like to have but the space inserted is too big, it looks 
 like a normal interword space. It should be 1/3 or 1/4 interword space or the 
 width of the dot (the visible part), but definitely less than a normal space. 
 Is it possible to redefine the inserted space width? 

\definecharacterspacing [hungarian]

\setupcharacterspacing [hungarian] [003A] [left=.1,alternative=1] % :
\setupcharacterspacing [hungarian] [003B] [left=.1,alternative=1] % ;
\setupcharacterspacing [hungarian] [003F] [left=.1,alternative=1] % ?
\setupcharacterspacing [hungarian] [0021] [left=.1,alternative=1] % !

\starttext

Take a look at this; this: this! or this?

Take a look at this.; this.: this.! or this.?

\setcharacterspacing[frenchpunctuation]

Take a look at this; this: this! or this?

\setcharacterspacing[hungarian]

Take a look at this; this: this! or this?

\stoptext

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

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

Re: [NTG-context] slightly offtopic: disabling autoresizing of adobe reader window when opening pdf document

2015-04-02 Thread Henning Hraban Ramm
Am 2015-04-02 um 22:36 schrieb Csikos Bela bcsikos...@freemail.hu:

 I use Adobe Reader (acroread) 9.5.5 linux version. Frequently, when I open a 
 context
 related document, eg  NaturalTables.pdf downloaded from contextgarden
 (http://dl.contextgarden.net/myway/NaturalTables.pdf), the document triggers 
 resizing
 of adobe reader main window. This is very annoying, especially if I have 
 several other
 documents open in separate tabs; all these tabs are resized as well and I 
 have to adjust
 back the window size manually. I tried different settings in preferences but 
 couldn't find a
 way to disable this behavior. How could I block autoresizing?
 
 I also googled but could not find any answer to this (though others have the 
 same
 problem as well, eg https://forums.adobe.com/thread/793230).
 
 I write here since for me only context documents triggers this, so I guess 
 context users
 know about this more.

It’s a setting that every PDF can trigger, if it’s configured that way. 
Normally you would do that only in Acrobat Pro for interactive documents.

I guess Hans thought it would be a good idea at that time… ;)


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
___

Re: [NTG-context] Forms and JavaScript

2015-04-02 Thread Henning Hraban Ramm

Am 2015-04-02 um 21:07 schrieb Rik Kabel cont...@rik.users.panix.com:

 On 2015-04-02 03:42, Henning Hraban Ramm wrote:
 while trying to create some interactive forms using latest beta (MkIV), I 
 found that JavaScripts are only then copied into the PDF, if there’s a \goto 
 referencing a JS function.
 
 According to the old widgets manual I thought I could set default values of 
 fields calling JS functions or variables as [JS(MyFunc)], but that doesn’t 
 work.
 Greetlings Hraban,
 
 This appears to be a pdf reader problem. On Win 8.1, Windows Reader and 
 Chrome both show an editable field; Firefox and Sumatra show a non-editable 
 field.

That’s not the problem, creating fields works great. Since JS works (probably) 
only in Adobe products anyway, I don’t care about other viewers. 

But JavaScript code (within JSpreamble or JScode sections) is only copied by 
ConTeXt into the PDF if there’s a call of \goto to one of the defined JS 
functions.
Additionally, calling JS functions for default values of fields doesn’t work 
like it did in MkII (and like it’s documented in m-widgets.pdf).

JS in PDFs is not easy to handle, but ConTeXt should at least copy my code into 
the PDF as it’s documented and used to work in MkII.


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
___

Re: [NTG-context] overlay or layer for chapter head.

2015-04-02 Thread John Culleton
On Thu, 02 Apr 2015 15:10:19 +0200
Procházka Lukáš Ing. - Pontex s. r. o.
l...@pontex.cz wrote:

 Hello,
 
 On Thu, 02 Apr 2015 14:46:11 +0200, Otared
 Kavian ota...@gmail.com wrote:
 
  Hi,
 
  Maybe you need to say state=repeat in the
  definition of your layer:
 
  \definelayer[chapterbackground][state=repeat]
 
 '[state=repeat]' causes all pages have the
 'mill' background.
 
 Best regards,
 
 Lukas
 
 

I am not seeking a background but rather a
foreground. And I only need this for 7 chapter
heads. Here is how I put the page image into my
context file now:
-
\startstandardmakeup[doublesided=no]
\vskip -0.15in
 \hskip -0.7in
\hbox{\externalfigure[chaphead2.pdf][width=\paperwidth,
height=\paperheight]} \stopstandardmakeup
\writetolist[chapter]{2}{Chapter 2: Understanding
the Food Industry}%

This works but I want a less fiddly-more
reliable method.  



-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
Updated PDF e-book: Create Book Covers with
Scribus 1.4.5 coming soon at
http://www.booklocker.com/!
___
If your question is of interest to others as well, please add an 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] small space before some characters (: ; ! ?)

2015-04-02 Thread Csikos Bela
Wolfgang Schuster  írta:

 Am 02.04.2015 um 12:05 schrieb Csikos Bela :
 
 Wolfgang Schuster  írta:
 
 Am 01.04.2015 um 18:46 schrieb Csikos Bela:
 
 Hello:
 
 Hungarian typography requires inserting small spaces before :, ;, ! and ? 
 characters.
 The width of this small space should be equal to that of the period (.). 
 In latex magyarlatex (magyar.ldf) module (part of biblatex) contains 
 definitions to achieve this. How could I set this in context?
 
 
 You can use the french settings which also requires a small space before 
 these characters.
 
 \starttext
 
 Take a look at this; this: this! or this?
 
 \setcharacterspacing[frenchpunctuation]
 
 Take a look at this; this: this! or this?
 
 \stoptext
 
 Thanks!
 It is something I'd like to have but the space inserted is too big, it looks 
 like a normal interword space. It should be 1/3 or 1/4 interword space or 
 the width of the dot (the visible part), but definitely less than a normal 
 space. Is it possible to redefine the inserted space width? 

\definecharacterspacing [hungarian]

\setupcharacterspacing [hungarian] [003A] [left=.1,alternative=1] % :
\setupcharacterspacing [hungarian] [003B] [left=.1,alternative=1] % ;
\setupcharacterspacing [hungarian] [003F] [left=.1,alternative=1] % ?
\setupcharacterspacing [hungarian] [0021] [left=.1,alternative=1] % !

\starttext

Take a look at this; this: this! or this?

Take a look at this.; this.: this.! or this.?

\setcharacterspacing[frenchpunctuation]

Take a look at this; this: this! or this?

\setcharacterspacing[hungarian]

Take a look at this; this: this! or this?

\stoptext


Yes, this looks OK.
Thank you a lot!

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

2015-04-02 Thread Rik Kabel

On 2015-04-02 03:42, Henning Hraban Ramm wrote:

Hello,

while trying to create some interactive forms using latest beta (MkIV), I found 
that JavaScripts are only then copied into the PDF, if there’s a \goto 
referencing a JS function.

According to the old widgets manual I thought I could set default values of 
fields calling JS functions or variables as [JS(MyFunc)], but that doesn’t work.


\starttext

\setupinteraction   [state=start]

\startJSpreamble{formtest}
% this JS code is only copied to the PDF if the \goto below is uncommented!
var d = new Date();
var df = this.getField(Datum);
var CurDate = util.printd(dd.mm., d);
df.value = CurDate;

function toggleField(){
var f = this.getField(Datum);
f.display = ! f.display;
}
\stopJSpreamble

%\goto{toggle}[JS(toggleField)]
\blank

\setupfield[MMshortString][reset,horizontal][height=5mm, width=50mm, frame=off, 
bottomframe=on]

\definefield[Datum][line][MMshortString][][JS(CurDate)] % JS(CurDate) ends up 
verbatim in the field


Date: \field[Datum]


\stoptext


Greetlings, Hraban


Greetlings Hraban,

This appears to be a pdf reader problem. On Win 8.1, Windows Reader and 
Chrome both show an editable field; Firefox and Sumatra show a 
non-editable field.


--
Rik
___
If your question is of interest to others as well, please add an 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] overlay or layer for chapter head.

2015-04-02 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

On Thu, 02 Apr 2015 14:46:11 +0200, Otared Kavian ota...@gmail.com wrote:


Hi,

Maybe you need to say state=repeat in the definition of your layer:

\definelayer[chapterbackground][state=repeat]


'[state=repeat]' causes all pages have the 'mill' background.

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] overlay or layer for chapter head.

2015-04-02 Thread Wolfgang Schuster

 Am 02.04.2015 um 17:12 schrieb John Culleton j...@wexfordpress.com:
 
 On Thu, 02 Apr 2015 15:10:19 +0200
 Procházka Lukáš Ing. - Pontex s. r. o.
 l...@pontex.cz mailto:l...@pontex.cz wrote:
 
 Hello,
 
 On Thu, 02 Apr 2015 14:46:11 +0200, Otared
 Kavian ota...@gmail.com wrote:
 
 Hi,
 
 Maybe you need to say state=repeat in the
 definition of your layer:
 
 \definelayer[chapterbackground][state=repeat]
 
 '[state=repeat]' causes all pages have the
 'mill' background.
 
 Best regards,
 
 Lukas
 
 
 
 I am not seeking a background but rather a
 foreground. And I only need this for 7 chapter
 heads. Here is how I put the page image into my
 context file now:
 -
 \startstandardmakeup[doublesided=no]
 \vskip -0.15in
 \hskip -0.7in
 \hbox{\externalfigure[chaphead2.pdf][width=\paperwidth,
 height=\paperheight]} \stopstandardmakeup
 \writetolist[chapter]{2}{Chapter 2: Understanding
 the Food Industry}%
 
 This works but I want a less fiddly-more
 reliable method.  

\setupexternalfigures[location=default]

\definelayer[chaptertext][width=\paperwidth,height=\paperheight]

\define[2]\ChapterCommand
  {\setlayerframed
 [chaptertext]
 [x=3cm,
  y=8cm]
 [frame=off]
 {#1 – #2}}

\definemakeup[chapterpage][page]

\setupmakeup
  [chapterpage]
  [pagestate=start,
  before={\setupbackgrounds[page][background=chapterimage]},
  bottom={\placelayer[chaptertext]}]

\defineoverlay[chapterimage][\overlayfigure{\structureuservariable{image}}]

\setuphead
  [chapter]
  [   before={\startmakeup[chapterpage]},
%command=\ChapterCommand,
   placehead=empty,
   after={\stopmakeup}]

\setuphead
  [title]
  [ before={\blank[big]},
 after={\blank[2*big]},
   command=]

\starttext

\completecontent

\startchapter[title={Understanding the Food Industry}][image=mill.png]

\input knuth

\stopchapter

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] slightly offtopic: disabling autoresizing of adobe reader window when opening pdf document

2015-04-02 Thread Csikos Bela
Hello:

This is kind of offtopic, still I post it here since it only occurs when  I 
open some context manuals.

I use Adobe Reader (acroread) 9.5.5 linux version. Frequently, when I open a 
context
related document, eg  NaturalTables.pdf downloaded from contextgarden
(http://dl.contextgarden.net/myway/NaturalTables.pdf), the document triggers 
resizing
of adobe reader main window. This is very annoying, especially if I have 
several other
documents open in separate tabs; all these tabs are resized as well and I have 
to adjust
back the window size manually. I tried different settings in preferences but 
couldn't find a
way to disable this behavior. How could I block autoresizing?

I also googled but could not find any answer to this (though others have the 
same
problem as well, eg https://forums.adobe.com/thread/793230).

I write here since for me only context documents triggers this, so I guess 
context users
know about this more.

Thanks,

bcsikos

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