Re: [NTG-context] Specifying leading?

2012-05-14 Thread Bill Meahan
Wiki updated. Can find entry using "leading" as well. Of course it is 
mixed in the search results for the term "leading" (as in "leading 
zeroes"). Ah, the vagaries of the English language.


Bill Meahan K8QN

"I want to live other lives. I've never quite believed that
one chance is all I get. Writing is my way of making
other chances."
   --  Anne Tyler


On 05/14/2012 17:42, Aditya Mahajan wrote:

On Mon, 14 May 2012, Bill Meahan wrote:


Thanks, Wolfgang! I knew there had to be an easy way to do it.

ConTeXt is wonderful but there are so many "knobs" and "levers" it is 
pretty easy for us folks moving to ConTeXt from LaTeX to get lost. :-)


Since you had difficulty in finding this solution, please add some 
comments to http://wiki.contextgarden.net/Command/setupinterlinespace 
so that others searching using the same keywords can find it.


Aditya
___ 

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


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

webpage  : http://www.pragma-ade.nl / http://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] Specifying leading?

2012-05-14 Thread Aditya Mahajan

On Mon, 14 May 2012, Bill Meahan wrote:


Thanks, Wolfgang! I knew there had to be an easy way to do it.

ConTeXt is wonderful but there are so many "knobs" and "levers" it is pretty 
easy for us folks moving to ConTeXt from LaTeX to get lost. :-)


Since you had difficulty in finding this solution, please add some 
comments to http://wiki.contextgarden.net/Command/setupinterlinespace so 
that others searching using the same keywords can find it.


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

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


Re: [NTG-context] Specifying leading?

2012-05-14 Thread Bill Meahan

Thanks, Wolfgang! I knew there had to be an easy way to do it.

ConTeXt is wonderful but there are so many "knobs" and "levers" it is 
pretty easy for us folks moving to ConTeXt from LaTeX to get lost. :-)


Bill Meahan K8QN

"I want to live other lives. I've never quite believed that
one chance is all I get. Writing is my way of making
other chances."
   --  Anne Tyler


On 05/14/2012 17:17, Wolfgang Schuster wrote:

%\setupbodyfont[12pt] % not necessary because 12pt is the default font size

\setupinterlinespace[line=14pt] % default: line=2.8ex

\starttext
\input knuth
\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] Specifying leading?

2012-05-14 Thread Wolfgang Schuster

Am 14.05.2012 um 22:57 schrieb Bill Meahan:

> How does one specify leading in ConTeXt?
> 
> In traditional typography, it is common to specify the type size and leading 
> to indicate the inter-line spacing of a block of text. Setting type "solid" 
> means to use no spacing between lines - not usually a good idea ;-)
> 
> More often, good typography requires a minimum of two points of leading 
> between adjacent lines and might be specified as 12/14 or 12/15 meaning to 
> set twelve-point type on a fourteen or fifteen point "leading" resulting in 
> inter-line spacing of two and three points respectively.
> 
> Is there an easy way to specify this in ConTeXt or must I muck about with 
> baseline skip?
> 
> I have tried looking this up on the wiki and in the font documentation but it 
> either is not there or is worded in such a way I am not recognizing it.
> 
> I'm using MkIV

%\setupbodyfont[12pt] % not necessary because 12pt is the default font size

\setupinterlinespace[line=14pt] % default: line=2.8ex

\starttext
\input knuth
\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
___


[NTG-context] Specifying leading?

2012-05-14 Thread Bill Meahan

How does one specify leading in ConTeXt?

In traditional typography, it is common to specify the type size and 
leading to indicate the inter-line spacing of a block of text. Setting 
type "solid" means to use no spacing between lines - not usually a good 
idea ;-)


More often, good typography requires a minimum of two points of leading 
between adjacent lines and might be specified as 12/14 or 12/15 meaning 
to set twelve-point type on a fourteen or fifteen point "leading" 
resulting in inter-line spacing of two and three points respectively.


Is there an easy way to specify this in ConTeXt or must I muck about 
with baseline skip?


I have tried looking this up on the wiki and in the font documentation 
but it either is not there or is worded in such a way I am not 
recognizing it.


I'm using MkIV

--
Bill Meahan K8QN

"I want to live other lives. I've never quite believed that
one chance is all I get. Writing is my way of making
other chances."
   --  Anne Tyler

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

2012-05-14 Thread Peter Rolf
Hi,

while playing around with colors, I accidentally used two mutual color
definitions. Stupid thing to do, but shit happens. :-D

This example ends in an infinite loop.

%--
\definecolor[foo][red]
\definecolor[bar][foo]

\starttext

\definecolor[foo][bar]
\color[foo] foo \color[bar] bar

\stoptext
%--


Regards,  Peter
___
If your question is of interest to others as well, please add an 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] color as module parameter (mkiv)

2012-05-14 Thread Wolfgang Schuster

Am 14.05.2012 um 17:53 schrieb Peter Schorsch:

> Hi,
> 
> I am trying to pass a tex color as a paramter to a module. I used the
> example from the wiki as a base. But as soon I hand over a color
> directly it does not work.

You can expand the value

  
\normalexpanded{\setupbackgrounds[…][…,backgroundcolor=\currentmoduleparameter{color}]}

or you can use \moduleparameter

  \setupbackgrounds[…][…,backgroundcolor=\moduleparameter{bgcolor}{color}]

> Any help is welcome as I am looking forward to hand
> in my first module. Are there any rules how and where to hand in a
> module for context?

1. You have to place the module in the correct sub folder.

2. Add your module on the modules page on the wiki.

3. Ask Mojca to add it to the context suite.

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] color as module parameter (mkiv)

2012-05-14 Thread Peter Schorsch
Hi,

I am trying to pass a tex color as a paramter to a module. I used the
example from the wiki as a base. But as soon I hand over a color
directly it does not work.

Any help is welcome as I am looking forward to hand
in my first module. Are there any rules how and where to hand in a
module for context?

Thanks
P.

--8<---Modul: bgcolor.tex---

\startmodule[bgcolor]
\unprotect
\definecolor[grau][s=.35]
\setupmodule[color=grau]
\setupbackgrounds[page][background=color,backgroundcolor=\currentmoduleparameter{color}]
\protect
\stopmodule
\endinput

--8<--tex file itself-
\setupcolors[state=start]
\definecolor[bordeaux][r=.66]
\usemodule[bgcolor][color=bordeaux]
\starttext
Hello world!
\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] [mkvi] comment handling bug

2012-05-14 Thread Philipp Gesang
On 2012-05-14 15:22, Philipp Gesang wrote:
> On 2012-05-14 09:35, Hans Hagen wrote:
> > On 13-5-2012 13:12, Philipp Gesang wrote:
> > >Hi all,
> > >
> > >seems the mkvi-style macros have trouble with groups in comments:
> > >
> > >
> > >% macros=mkvi
> > >\def\dosomething#content{%%%<= fine with “#1”
> > >   % { %%% Open unbalanced brace breaks macros.
> > >}
> > >
> > >\starttext \dosomething {foo} \stoptext
> > >
> > >
> > >Fails here with:
> > >
> > >   
> > > c
> > >   l.2 \def\dosomething#c
> > > ontent{%%%<= fine with “#1”
> > >
> > >Removing the comment, closing the group or reverting to TEX-style
> > >argument numbering makes this behavior disappear.
> > 
> > Indeed there are some limitations to the parser. I'll note it down
> > as low priority issue.
> 
> Would it be possible to modify the comment pattern so that it
> accept initial spaces? At least it fixes my problem.

I take that back, sorry for the noise. The better solution
appears to be adding the “leadingcomment” pattern to the rule
that handles balanced braces:



--- /home/laokoon/base/luat-mac.lua 2012-05-14 14:52:40.674091445 +0200
+++ luat-mac.lua2012-05-14 15:55:50.683559201 +0200
@@ -110,7 +110,7 @@
 
 local commenttoken   = P("%")
 local crorlf = S("\n\r")
-local commentline= commenttoken * ((Carg(1) * 
C((1-crorlf)^0))/function(strip,s) return strip and "" or s end)
+--local commentline= commenttoken * ((Carg(1) * 
C((1-crorlf)^0))/function(strip,s) return strip and "" or s end)
 local commentline= commenttoken * ((1-crorlf)^0)
 local leadingcomment = (commentline * crorlf^1)^1
 local furthercomment = (crorlf^1 * commentline)^1
@@ -160,6 +160,7 @@
 + V("texcode")
 + V("braced")
 + furthercomment
++ leadingcomment
 + nobrace
   )^0
  -- * rightbrace^-1, -- the -1 catches errors



Now definitions with commented-out unbalanced stuff like

  \def\dosomething#content{%%% {{
% { }{{ %%
\bgroup\italic#content\egroup
  }

will work too.

Philipp




pgpD2je4rZr8c.pgp
Description: PGP signature
___
If your question is of interest to others as well, please add an 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] hvdm-exm module fails

2012-05-14 Thread Wolfgang Schuster

Am 30.04.2012 um 18:16 schrieb Martin:

> Hi,
> 
> I am trying to make use of the "hvdm-exm" module for a series of tests and 
> that fails.
> 
> Below is the basic code I am using. As I could not find a usage sample, I 
> might have it wrong. It fails with \startexam as "undefined" and an internal 
> message that it seems to have a language problem (WARNING ? unknown -- 
> current language en tried). Looking into the file hvdm-exm.tex I can find the 
> source of the error message, but it's beyond me to really understand what's 
> going on. My ConTeXt is updated as of today (30.4.2012).
> 
> I updated the core file "hvdm-exm.tex" to the 2010-11-17 version but that has 
> no obvious influence.
> 
> Also checked permissions (just to be sure, folders 755, files 644) and fixed 
> them with no impact. Afterall, the files are all loaded.
> http://archive.contextgarden.net/message/20101212.154453.528d5fd7.en.html
> 
> Help would be much appreciated.

The exam module uses a command which was removed from MkIV because there are 
better ways for module authors.

When you don’t need any special MkIV feature you can use MkII for your document.

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] [mkvi] comment handling bug

2012-05-14 Thread Philipp Gesang
On 2012-05-14 09:35, Hans Hagen wrote:
> On 13-5-2012 13:12, Philipp Gesang wrote:
> >Hi all,
> >
> >seems the mkvi-style macros have trouble with groups in comments:
> >
> >
> >% macros=mkvi
> >\def\dosomething#content{%%%<= fine with “#1”
> >   % { %%% Open unbalanced brace breaks macros.
> >}
> >
> >\starttext \dosomething {foo} \stoptext
> >
> >
> >Fails here with:
> >
> >   
> > c
> >   l.2 \def\dosomething#c
> > ontent{%%%<= fine with “#1”
> >
> >Removing the comment, closing the group or reverting to TEX-style
> >argument numbering makes this behavior disappear.
> 
> Indeed there are some limitations to the parser. I'll note it down
> as low priority issue.

Would it be possible to modify the comment pattern so that it
accept initial spaces? At least it fixes my problem.

Philipp

--- /home/laokoon/base/luat-mac.lua 2012-05-14 14:52:40.674091445 +0200
+++ luat-mac.lua2012-05-14 15:18:35.968999022 +0200
@@ -110,8 +110,10 @@
 
 local commenttoken   = P("%")
 local crorlf = S("\n\r")
-local commentline= commenttoken * ((Carg(1) * 
C((1-crorlf)^0))/function(strip,s) return strip and "" or s end)
-local commentline= commenttoken * ((1-crorlf)^0)
+--local commentline= commenttoken * ((Carg(1) * 
C((1-crorlf)^0))/function(strip,s) return strip and "" or s end)
+--local commentline= commenttoken * ((1-crorlf)^0)
+local commentstart   = space^0 * commenttoken
+local commentline= commentstart * ((1-crorlf)^0)
 local leadingcomment = (commentline * crorlf^1)^1
 local furthercomment = (crorlf^1 * commentline)^1


pgpRRztvZEQT4.pgp
Description: PGP signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Problem calling system

2012-05-14 Thread Hans Hagen

On 14-5-2012 12:23, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

\ctxlua{os.execute(lua -e "require 'lfs'")}


\ctxlua{os.execute([[lua -e "require 'lfs'"]])}



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

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


Re: [NTG-context] Problem calling system

2012-05-14 Thread Procházka Lukáš Ing . - Pontex s . r . o .

\ctxlua{os.execute(lua -e "require 'lfs'")}


... Gives:

"
...
fonts   > latin modern fonts are not preloaded
languages   > language en is active
! LuaTeX error :1: attempt to call global 'e' (a nil value)
stack traceback:
:1: in main chunk.

system  > tex > error on line 4 in file 
C:/Lukas/ConTeXt/TestDDv/t1.mkiv: LuaTeX error  ...

 1 %\write18{lua -e "require 'lfs'"}
 2 %
 3
 4 >>  \ctxlua{os.execute(lua -e "require 'lfs'")}
 5 %\ctxlua{os.execute([[lua -e "require 'lfs'"]])}
 6
 7 \starttext
 8   A
 9 \stoptext
10

l.4 \ctxlua{os.execute(lua -e "require 'lfs'")}
...
"

If I try:

\ctxlua{os.execute([[lua -e "require 'lfs'"]])}

I get error:

"
...
languages   > language en is active
lua: (command line):1: '=' expected near 'lfs'
{c:/ConTeXt/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
...
"

(Like if "'" were gobbled...)



btw, if you run texlua you get lfs for free.


OK, this is just a sample. I need to use another file, in fact.

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 244 062 238
Fax: +420 244 461 038

t1.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] Problem calling system

2012-05-14 Thread Hans Hagen

On 14-5-2012 10:56, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,

I'd need to call the OS, namely lua in it.

I have the following code:


\write18{lua -e "require 'lfs'"}
\write18{lua -e require'lfs'}

\starttext
A
\stoptext


When calling directly from the command line

lua -e "require 'lfs'"

- there is no error.

 From within the Context code, I'm getting (see CmdLine.log):

"

lua.exe: (command line):1: '=' expected near 'lfs'
lua.exe: (command line):1: '=' expected near ''...
"

What could be the problem?

My OS is WinXP 32b.



And how about

\ctxlua{os.execute(lua -e "require 'lfs'")}

btw, if you run texlua you get lfs for free.

Hans

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

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


[NTG-context] Split \startalign content on more pages

2012-05-14 Thread elgo...@libero.it
Yes it works.
The only problem is that now I have the formulas aligned at the center of the 
page.
Which command can I use to align the formulas on the left?

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

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


[NTG-context] Problem calling system

2012-05-14 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I'd need to call the OS, namely lua in it.

I have the following code:


\write18{lua -e "require 'lfs'"}
\write18{lua -e require'lfs'}

\starttext
  A
\stoptext


When calling directly from the command line

lua -e "require 'lfs'"

- there is no error.

From within the Context code, I'm getting (see CmdLine.log):

"
...
lua.exe: (command line):1: '=' expected near 'lfs'
lua.exe: (command line):1: '=' expected near ''...
"

What could be the problem?

My OS is WinXP 32b.

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 244 062 238
Fax: +420 244 461 038

t1.log
Description: Binary data


t1.mkiv
Description: Binary data


CmdLine.log
Description: Binary data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Split \startalign content on more pages

2012-05-14 Thread luigi scarso
2012/5/14 elgo...@libero.it :
> Sorry for having given you a non working example!
> Here you can find a working one. The comments at the end of each line are in
> italian.
> Changing the height of the frame you can move the \startalign content in the
> page.
> As you will see, the whole content flows from one page to the following,
> without splitting at the right line.
> Thank you very much for your help.
Comment the lines
\setupformulas[align=right]
and try .
Does it work ?

-- 
luigi
___
If your question is of interest to others as well, please add an 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] [mkvi] comment handling bug

2012-05-14 Thread Hans Hagen

On 13-5-2012 13:12, Philipp Gesang wrote:

Hi all,

seems the mkvi-style macros have trouble with groups in comments:


% macros=mkvi
\def\dosomething#content{%%%<= fine with “#1”
   % { %%% Open unbalanced brace breaks macros.
}

\starttext \dosomething {foo} \stoptext


Fails here with:

   
 c
   l.2 \def\dosomething#c
 ontent{%%%<= fine with “#1”

Removing the comment, closing the group or reverting to TEX-style
argument numbering makes this behavior disappear.


Indeed there are some limitations to the parser. I'll note it down as 
low priority issue.


Hans

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

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