Re: [NTG-context] simple document layout setup

2010-03-25 Thread Wolfgang Schuster

Am 25.03.10 00:51, schrieb Vyatcheslav Yatskovsky:

Hello,

Is there a simple command to setup narrower document margins, without 
resorting to \setuplayout with numerical values? I think of MS Word 
2007 settings.

http://www.ntg.nl/pipermail/ntg-context/2008/037090.html

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] weird error: no return code

2010-03-25 Thread Philipp A.
 hi, the following document

\usemodule[tikz]
\starttext
\stoptext

yields the following error:

*
* ConTeXt output:
* cd /home/flyingsheep/Dokumente/LaTeX/ConTeXt/oma
* context --nonstopmode 'a4.tex'
*
This is LuaTeX, Version beta-0.50.0-2010010505
 \write18 enabled.
(/home/flyingsheep/Dokumente/LaTeX/ConTeXt/oma/a4.tex

ConTeXt  ver: 2010.03.20 22:59 MKIV  fmt: 2010.3.25  int: english/english

system  : cont-new loaded
(/usr/local/share/texmf/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
(/usr/local/share/texmf/tex/context/base/cont-new.mkiv))
system  : cont-fil loaded
(/usr/local/share/texmf/tex/context/base/cont-fil.tex
loading : ConTeXt File Synonyms
)
system  : cont-sys.rme loaded
(/etc/texmf/tex/context/user/cont-sys.rme
(/usr/local/share/texmf/tex/context/base/type-def.mkiv)
(/usr/local/share/texmf/tex/context/base/type-lua.tex)
(/usr/local/share/texmf/tex/context/base/type-siz.tex
(/usr/local/share/texmf/tex/context/base/type-siz.mkiv))
(/usr/local/share/texmf/tex/context/base/type-otf.tex
(/usr/local/share/texmf/tex/context/base/type-otf.mkiv)))
system  : a4.top loaded
(a4.top
)
fonts   : preloading latin modern fonts
bodyfont: 12pt rm is loaded
language: language en is active
(/usr/share/texmf/tex/context/pgf/frontendlayer/t-tikz.tex
(/usr/share/texmf/tex/context/pgf/basiclayer/t-pgf.tex
(/usr/share/texmf/tex/context/pgf/basiclayer/t-pgfcor.tex
(/usr/share/texmf/tex/context/pgf/systemlayer/t-pgfsys.tex
(/usr/share/texmf/tex/context/pgf/utilities/t-pgfrcs.tex
(/usr/share/texmf/tex/context/pgf/utilities/t-pgfmod.tex)
(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.tex)
(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-context.def)
(/usr/share/texmf/tex/generic/pgf/utilities/pgfrcs.code.tex))
(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys.code.tex
(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex)
(/usr/share/texmf/tex/generic/pgf/systemlayer/pgf.cfg)
(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def))
(a4.pgf)) (/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex)
(/usr/share/texmf/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex))
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcore.code.tex
(/usr/share/texmf/tex/generic/pgf/math/pgfmath.code.tex
(/usr/share/texmf/tex/generic/pgf/math/pgfmathcalc.code.tex
(/usr/share/texmf/tex/generic/pgf/math/pgfmathutil.code.tex)
(/usr/share/texmf/tex/generic/pgf/math/pgfmathparser.code.tex)
(/usr/share/texmf/tex/generic/pgf/math/pgfmathoperations.code.tex
(/usr/share/texmf/tex/generic/pgf/math/pgfmathtrig.code.tex)
(/usr/share/texmf/tex/generic/pgf/math/pgfmathrnd.code.tex))
(/usr/share/texmf/tex/generic/pgf/math/pgfmathbase.code.tex)))
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorequick.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex)
(/usr/share/texmf/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex)))
(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleshapes.code.tex)
(/usr/share/texmf/tex/generic/pgf/modules/pgfmoduleplot.code.tex))
(/usr/share/texmf/tex/context/pgf/utilities/t-pgffor.tex
(/usr/share/texmf/tex/context/pgf/utilities/t-pgfrcs.tex)
(/usr/share/texmf/tex/generic/pgf/utilities/pgffor.code.tex))
(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
(/usr/share/texmf/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex)
(/usr/share/texmf/tex/generic/pgf/modules/pgfmodulematrix.code.tex)
(/usr/share/texmf/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.texMTXrun
| run 1: luatex
--fmt=/home/flyingsheep/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028/formats/cont-en
--lua=/home/flyingsheep/luatex-cache/context/6300afb4995fe38c77e9b86ed1ef1028/formats/cont-en.lui
--backend=pdf ./a4.tex
MTXrun | fatal error: no return code, message: luatex: execution interrupted

I am using TexLive 2009 full and therefore mkIV

Can somebody help me?

[NTG-context] Microtype in ConTeXt

2010-03-25 Thread Yan Zhou
Dear all,

I am thinking about moving from LaTeX to ConTeXt. But there is one thing make 
this particularly difficult. That is the microtype LaTeX package. More 
specifically I have the following questions (assuming I will use MKIV and 
luatex)

1. I understand that ConTeXt can do margin kerning and font expansion, but is 
there a way to setup a configuration file for each font set. Like the 
mt-foo.cfg file for font family foo when using microtype in latex.

2. Is there a way to do letterspace in ConTeXt. I understand there is a command 
called \stretched. But what I want is the feature like the tracking option in 
microtype package, which can automatically letterspace all small caps. Moreover 
is there a way to define new sets of fonts for letterspace. For example I 
defined a new font shape called \capshape, which use  case tags of OpenType, 
and I want to use letterspace this shape with certain amount  all the time 
because I am not satisfied with the space provided by the cpsp tag of OpenType.

I am sorry for using and LaTeX terminology. I haven't start learning ConTeXt at 
all at this stage. I want to first know if it provide all the features I need 
before I spend my time on learning a new language.
___
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] weird error: no return code

2010-03-25 Thread Taco Hoekwater

Philipp A. wrote:

MTXrun | fatal error: no return code, message: luatex: execution interrupted

I am using TexLive 2009 full and therefore mkIV

Can somebody help me?


This is a hard crash. You appear to be running the latest context
and luatex 0.50 (not the ones on texlive) so you could try updating
luatex again.

The easiest would be to fetch a new binary from the context minimals,
but it looks like the minimals are not quite up to speed with the luatex
releases yet, so you may have to build 0.52.0 from source:

http://foundry.supelec.fr/gf/project/luatex/frs/

Best wishes,
Taco


___
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] margin text

2010-03-25 Thread Robert Blackstone
Hi all,

This is a reaction to a post in another thread, setupinmargin failing,
but it does not seem to directly concern the problem raised there (by
Hans van der Meer). So I raise it as a new problem.

I tried the code supplied by Luigi Scarso in ntg-context Digest, Vol
69, Issue 127, Message 1:

\showframe
\setuppapersize[A4][A3]
\setuplayout[location=middle]
\setupinmargin[left][align=left,foregroundcolor=red]
\setupinmargin[right][align=right,foregroundcolor=blue]
\starttext
ABC\inright{\framed[width=10mm,height=5mm,foregroundcolor=red]{R1 }}
%% override blue, but not for frame
\inleft{\tfx A small note in this margin. But we need to setup
something before \ldots }
\stoptext

A few things in the result surprise, and worry, me:
1,  the actual text page does not coincide with (what I assume is) the
reserved space on the A3-folio  (that is, it partially falls outside
the area with the green border).  Thus in particular the left margin
with its margin text falls partly outside this area (which is also
clear when one uses \setuppapersize[A4][A4] in the preamble. ) The
margin itself is, of course, wide enough to contain the margin note.
Why is this and how can it be avoided?
In fact this usually happens to me: the margins partly fall outside
the page. Very annoying.
2,  \setupinmargin[left][align=left,.. ] actually right-aligns the
left margin note and vice versa. To left-align it I had to give
\setupinmargin[right].
Seems odd to me.
Is this normal?

Since I frequently have to use margin texts I hope somebody can help me out.

Best regards,
Robert Blackstone
___
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] margin text

2010-03-25 Thread luigi scarso
On Thu, Mar 25, 2010 at 11:33 AM, Robert Blackstone
blackstone.rob...@gmail.com wrote:
 Hi all,

 This is a reaction to a post in another thread, setupinmargin failing,
 but it does not seem to directly concern the problem raised there (by
 Hans van der Meer). So I raise it as a new problem.

 I tried the code supplied by Luigi Scarso in ntg-context Digest, Vol
 69, Issue 127, Message 1:

 \showframe
 \setuppapersize[A4][A3]
 \setuplayout[location=middle]
 \setupinmargin[left][align=left,foregroundcolor=red]
 \setupinmargin[right][align=right,foregroundcolor=blue]
 \starttext
 ABC\inright{\framed[width=10mm,height=5mm,foregroundcolor=red]{R1 }}
 %% override blue, but not for frame
 \inleft{\tfx A small note in this margin. But we need to setup
 something before \ldots }
 \stoptext

 A few things in the result surprise, and worry, me:
 1,  the actual text page does not coincide with (what I assume is) the
 reserved space on the A3-folio  (that is, it partially falls outside
 the area with the green border).  Thus in particular the left margin
 with its margin text falls partly outside this area (which is also
 clear when one uses \setuppapersize[A4][A4] in the preamble. ) The
 margin itself is, of course, wide enough to contain the margin note.
 Why is this and how can it be avoided?
 In fact this usually happens to me: the margins partly fall outside
 the page. Very annoying.
 2,  \setupinmargin[left][align=left,.. ] actually right-aligns the
 left margin note and vice versa. To left-align it I had to give
 \setupinmargin[right].
 Seems odd to me.
 Is this normal?
yes .
I have  these line
\setuppapersize[A4][A3]
\setuplayout[location=middle]
right to show that default layout --- and it's the default layout from
10years at least ---
perhaps is  not adeguate to your needs; you need to setup* something.

align (and ragged align) have always confused me, and  I suspect that
here aligns are corrects.



-- 
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] margin text

2010-03-25 Thread Taco Hoekwater

Robert Blackstone wrote:

2,  \setupinmargin[left][align=left,.. ] actually right-aligns the
left margin note and vice versa. To left-align it I had to give
\setupinmargin[right].
Seems odd to me.
Is this normal?


Yes, it is even a FAQ item. See here for why:

  http://wiki.contextgarden.net/Right_and_left

In short: use flushleft or flushright. This gives the opposite behavior
of left and right, and avoids ambiguity.

Best wishes,
Taco
___
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] margin text

2010-03-25 Thread Robert Blackstone
On Thu, Mar 25, 2010 at 12:00 PM,
luigi.sca...@gmail.com wrote:

( Is this normal?)
 yes .
 I have  these line
 \setuppapersize[A4][A3]
 \setuplayout[location=middle]
 right to show that default layout --- and it's the default layout from
 10years at least ---
 perhaps is  not adeguate to your needs; you need to setup* something.

 align (and ragged align) have always confused me, and  I suspect that
 here aligns are corrects.



 --
 luigi

and  t...@elvenkind.com wrote:
( Is this normal?)

 Yes, it is even a FAQ item. See here for why:

   http://wiki.contextgarden.net/Right_and_left

 In short: use flushleft or flushright. This gives the opposite behavior
 of left and right, and avoids ambiguity.

 Best wishes,
 Taco

Thank you, Luigi and Taco, for your almost instantaneous replies.

The answer to the left-right question, the recommended use of
flushright and flushleft,  is clear now.
But the eccentricity of what apparently is the default layout is still
a problem for me.
What should I do to get the page in the middle of the paper so to
speak, instead of shifted to the left, which happens with
\setuplayout[location=middle]?? I tried specifying leftedgewidth but
that does not change anything.

Thanks in advance for any help.
Best regards,

Robert Blackstone
___
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] letter module not working

2010-03-25 Thread Wolfgang Werners-Lucchini
Hallo Wolfgang,

  I have problems compiling this with
  ConTeXt  ver: 2010.03.20 22:59 MKIV
  [...]
 
 I can't reproduce this. Can you take a look at the end of the log
 for 
 this information:
 
 correspondence  : t-correspondence.tex: 2010.02.28
 correspondence  : t-letter.tex: 2009.10.10
 correspondence  : default.nli: 2010.02.28
 correspondence  : dinb.nls: 2009.10.07
 correspondence  : default.nls: 2010.02.28
 correspondence  : label.nle: 2009.07.03
 correspondence  : addrentry.nle: 2008.12.26
 correspondence  : dina.nls: 2007.02.11

I forgot how to tell context to produce a verbose log,
but the hint was right. 

I normaly install the letter module in a local tex tree, but have 
made an update before with

call first-setup --extras=t-letter

and this has installed the letter module in the standard tree where 
it was not found.

Sorry for this!

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] margin text

2010-03-25 Thread luigi scarso
On Thu, Mar 25, 2010 at 1:00 PM, Robert Blackstone
blackstone.rob...@gmail.com wrote:
 What should I do to get the page in the middle of the paper so to
 speak, instead of shifted to the left, which happens with
 \setuplayout[location=middle]?? I tried specifying leftedgewidth but
 that does not change anything.
hm, strange, try

\setuppapersize[A4][A3]
\setuplayout[location=middle,
 backspace=23mm,
 margin=15mm,margindistance=3mm,
 width=fit,
 ]
\setupinmargin[left][align=left,foregroundcolor=red]
\setupinmargin[right][align=right,foregroundcolor=blue]
\showlayout
\starttext
ABC\inright{\framed[width=10mm,height=5mm,foregroundcolor=red]{R1 }}
%% override blue, but not for frame
\inleft{\tfx A small note in this margin. But we need to setup
something before \ldots }
\stoptext

-- 
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] Microtype in ConTeXt

2010-03-25 Thread Hans Hagen

On 25-3-2010 2:55, Yan Zhou wrote:

Dear all,

I am thinking about moving from LaTeX to ConTeXt. But there is one thing make 
this particularly difficult. That is the microtype LaTeX package. More 
specifically I have the following questions (assuming I will use MKIV and 
luatex)

1. I understand that ConTeXt can do margin kerning and font expansion, but is 
there a way to setup a configuration file for each font set. Like the 
mt-foo.cfg file for font family foo when using microtype in latex.


you can define additional sets indeed an dpass the defined set as value 
to the protrusion and expansion features



2. Is there a way to do letterspace in ConTeXt. I understand there is a command 
called \stretched. But what I want is the feature like the tracking option in 
microtype package, which can automatically letterspace all small caps. Moreover 
is there a way to define new sets of fonts for letterspace. For example I 
defined a new font shape called \capshape, which use  case tags of OpenType, 
and I want to use letterspace this shape with certain amount  all the time 
because I am not satisfied with the space provided by the cpsp tag of OpenType.


i have no clue what microtype does (nor time to look into it) but you 
can just define a command that switches the font and enables 
intercharacter spacing, something


\definecharacterkerning[mykerning]

\setupcharacterkerning[mykerning][\c!factor=.125]

\def\MySc
  {\groupedcommand
 {\sc\setcharacterkerning[mykerning]}
 {}}

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] PDF annotations problems - was: status of node.write

2010-03-25 Thread Michail Vidiassov

Dear Hans,

On Wed, 24 Mar 2010, Hans Hagen wrote:


when given examples of something that does not work i can repair it


in lpdf-ini.lua one can find the following utility function for setting a 
boolean config parameter:


local function pdfboolean(b,default)
if ((type(b) == boolean) and b) or default then
return p_true
else
return p_false
end
end

How is it supposed to work if the config parameter has value false and 
default value is true? It seems in this case the value of b is ignored.


   Sincerely, Michail
___
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] Microtype in ConTeXt

2010-03-25 Thread Wolfgang Schuster

Am 25.03.10 15:09, schrieb Hans Hagen:
1. I understand that ConTeXt can do margin kerning and font 
expansion, but is there a way to setup a configuration file for each 
font set. Like the mt-foo.cfg file for font family foo when using 
microtype in latex.
 you can define additional sets indeed an dpass the defined set as 
value to the protrusion and expansion features
The MKIV interface (Lua only) is not very user friendly but since 
Steffen Wolfrum is the only one who use his own verctors this hadn't 
been a problem in the past.
2. Is there a way to do letterspace in ConTeXt. I understand there is 
a command called \stretched. But what I want is the feature like the 
tracking option in microtype package, which can automatically 
letterspace all small caps. Moreover is there a way to define new 
sets of fonts for letterspace. For example I defined a new font shape 
called \capshape, which use  case tags of OpenType, and I want to use 
letterspace this shape with certain amount  all the time because I am 
not satisfied with the space provided by the cpsp tag of OpenType.
i have no clue what microtype does (nor time to look into it) but you 
can just define a command that switches the font and enables 
intercharacter spacing, something


\definecharacterkerning[mykerning]

\setupcharacterkerning[mykerning][\c!factor=.125]

\def\MySc
  {\groupedcommand
 {\sc\setcharacterkerning[mykerning]}
 {}}

Who about something like (pseudocode)

\definecharacterkerning[letterspace]

\def\letterspace
  {\bgroup
   \dosingleempty\doletterspace}

\def\doletterspace[#1]#2% use \groupedcommand?
  {\iffirstargument
 
\setupcharacterkerning[letterspace][factor=\ctxlua{tex.sprint(#1/1000)}]}%

   \fi
   \setcharacterkerning[letterspace]#2%
   \egroup}

\starttext

text \letterspace{text} text \letterspace[200]{text} text

\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] Microtype in ConTeXt

2010-03-25 Thread Hans Hagen

On 25-3-2010 15:28, Wolfgang Schuster wrote:

Am 25.03.10 15:09, schrieb Hans Hagen:

1. I understand that ConTeXt can do margin kerning and font
expansion, but is there a way to setup a configuration file for each
font set. Like the mt-foo.cfg file for font family foo when using
microtype in latex.

you can define additional sets indeed an dpass the defined set as
value to the protrusion and expansion features

The MKIV interface (Lua only) is not very user friendly but since
Steffen Wolfrum is the only one who use his own verctors this hadn't
been a problem in the past.

2. Is there a way to do letterspace in ConTeXt. I understand there is
a command called \stretched. But what I want is the feature like the
tracking option in microtype package, which can automatically
letterspace all small caps. Moreover is there a way to define new
sets of fonts for letterspace. For example I defined a new font shape
called \capshape, which use case tags of OpenType, and I want to use
letterspace this shape with certain amount all the time because I am
not satisfied with the space provided by the cpsp tag of OpenType.

i have no clue what microtype does (nor time to look into it) but you
can just define a command that switches the font and enables
intercharacter spacing, something

\definecharacterkerning[mykerning]

\setupcharacterkerning[mykerning][\c!factor=.125]

\def\MySc
{\groupedcommand
{\sc\setcharacterkerning[mykerning]}
{}}

Who about something like (pseudocode)

\definecharacterkerning[letterspace]

\def\letterspace
{\bgroup
\dosingleempty\doletterspace}

\def\doletterspace[#1]#2% use \groupedcommand?
{\iffirstargument
\setupcharacterkerning[letterspace][factor=\ctxlua{tex.sprint(#1/1000)}]}%
\fi
\setcharacterkerning[letterspace]#2%
\egroup}

\starttext

text \letterspace{text} text \letterspace[200]{text} text


looks ok, apart from the name ... we don't space letters but characters 
(or glyphs) so maybe \kerncharacters or so


Hans

--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] Microtype in ConTeXt

2010-03-25 Thread Wolfgang Schuster

Am 25.03.10 16:21, schrieb Hans Hagen:
looks ok, apart from the name ... we don't space letters but 
characters (or glyphs) so maybe \kerncharacters or so

Is it also possible to use this with fontfeatures?

\definefontfeature[kerning][kern=.125]

\starttext
{\definedfont[SerifCaps*kerning]kerned characters}
\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] status of node.write

2010-03-25 Thread Hans Hagen

On 24-3-2010 17:46, Michail Vidiassov wrote:

Dear Hans,


when given examples of something that does not work i can repair it


take a look at http://www.ntg.nl/pipermail/ntg-context/2010/047898.html
- it is about problem with movies, but movies and u3d are both done via
annotations, thus there are similarities.


i uploaded a new version, movies seem to work, u3d not tested

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] Microtype in ConTeXt

2010-03-25 Thread Hans Hagen

On 25-3-2010 16:34, Wolfgang Schuster wrote:

Am 25.03.10 16:21, schrieb Hans Hagen:

looks ok, apart from the name ... we don't space letters but
characters (or glyphs) so maybe \kerncharacters or so

Is it also possible to use this with fontfeatures?

\definefontfeature[kerning][kern=.125]

\starttext
{\definedfont[SerifCaps*kerning]kerned characters}
\stoptext


hm, not now but it's no big deal to implement it

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] Microtype in ConTeXt

2010-03-25 Thread Wolfgang Schuster

Am 25.03.10 16:21, schrieb Hans Hagen:

Who about something like (pseudocode)

\definecharacterkerning[letterspace]

\def\letterspace
{\bgroup
\dosingleempty\doletterspace}

\def\doletterspace[#1]#2% use \groupedcommand?
{\iffirstargument
\setupcharacterkerning[letterspace][factor=\ctxlua{tex.sprint(#1/1000)}]}% 


\fi
\setcharacterkerning[letterspace]#2%
\egroup}

\starttext

text \letterspace{text} text \letterspace[200]{text} text
looks ok, apart from the name ... we don't space letters but 
characters (or glyphs) so maybe \kerncharacters or so
to be more concrete i think about this (why is the last value taken for 
the complete paragraph?)


\definecharacterkerning[kerncharacters]

\unexpanded\def\kerncharacters
  {\dosingleempty\dokerncharacters}

\def\dokerncharacters[#1]%
  {\groupedcommand
 {\iffirstargument

\setupcharacterkerning[kerncharacters][factor=\ctxlua{tex.write(#1/1000)}]%

  \fi
  \setcharacterkerning[kerncharacters]}
   {}}

\setuphead[section][style=\sca,textstyle={\kerncharacters[250]}]

\starttext

\section{Section}

text \kerncharacters{text} text \kerncharacters[200]{text} text 
\kerncharacters[2000]{text} text


text {\kerncharacters text} text {\kerncharacters[200] text} text 
{\kerncharacters[2000] text} text


text \kerncharacters[200]{text} text \kerncharacters[1000]{text} text

text \kerncharacters[1000]{text} text \kerncharacters[200]{text} text

\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] CMap in MkII

2010-03-25 Thread Vedran Miletić
Can anyone confirm that CMap is still automatically included in MkII?
Because copying of Croatian letters (čćđ) isn't quite working here.
I'm more than willing to provide a minimal example if necessary.

-- 
Vedran Miletić
___
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] 3D annotations - was: status of node.write

2010-03-25 Thread Michail Vidiassov

Dear Hans,

On Wed, 24 Mar 2010, Hans Hagen wrote:


there is u3d support presen tbut nobody tested it


thank you for your latest effort to put u3d support in a working state,
but as of now even the most basic test from back-u3d.mkiv does not work 
and is not supposed to:


grph-u3d.lua needs adding to the preamble

local pdfannotation   = nodes.pdfannotation
local todimen = string.todimen

and replacing

node.write(annotation... with node.write(pdfannotation(annotation...

to at least make code run without throwing error messages.

lpdf-u3d.lua has more severe problem:

--  weird, has to be a /Form and not an /Image so we need a wrap = true 
key
--  local figure = img.immediatewrite { filename = preview, width = 
width, height = height }
local figure = img.immediatewrite { stream = .5 .75 .75 rg 0 0 20 10 re 
f, bbox = {0,0,20,10 } }

shows that option to include a bitmap preview image into 3d 
annotation is just commented out.


On the other hand, an approach like in LaTeX package attachfile2 may be 
convenient - a PDF with just 3D annotation and minimal support elements 
(with or without preview) is attached to the main document, that has a 
clickable image that activates that attached PDF document in a separate 
window.
In this case the preparation of the attaced PDF can be 
completely delegated to external utility.

Does attachfile2 analog work in ConTeXt now?
Where to look for usage examples?

Sincerely, Michail


___
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] Compiling under Windows (Visual Studio 2008)

2010-03-25 Thread Graham Douglas

Hi

I hope this message is not too off topic but I thought I would
ask here first. I would very much like to (try...) to compile LuaTeX
using Microsoft Visual Studio 2008. But I'm not sure if this is likely 
to be enormously complex and maybe too difficult (for me, anyway).


Does the list know it is possible to build LuaTeX
under Microsoft Visual Studio 2008 --- if so, is this
possible from Taco's source distribution without having
to make substantial changes to anything.

One small thing I can confirm is that Lunatic Python can be quite easily
compiled to a Windows DLL to enable Python calls from Lua and hence
LuaTeX on Windows. LuaTeX's support for exteral modules now makes
it quite easy to do this.

I can confirm this seems to work, although I've
not really pushed it hard. The following very simple example does
work. Inspiration for doing this is due to the intersting article
by Luigi Scarso in the latest TUGBOAT.

Here's a simple example (far away from the complexities of Luigi's
work, but it shows the basic principle). This code is just quick hack
to get it up and running.

\directlua 0{
lib=package.loadlib('python.dll','luaopen_python')

lib()

pmw = python.globals()
p=python.import('Image')
im = p.open(c:\\logo.gif)
r,s,t=im.format, im.size, im.mode
tex.print(r,tostring(s),tostring(t))
sys = python.import(sys);
tex.print(tostring(sys.version_info))
}
\stoptext

Many thanks in advance to anyone who has time to share their
expertise and insight on a Windows build. Why build it? Just as a way to 
learn more about how it works, that's it really.


Warm wishes to all

Graham




___
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] 3D annotations - was: status of node.write

2010-03-25 Thread Hans Hagen

On 25-3-2010 20:12, Michail Vidiassov wrote:


to at least make code run without throwing error messages.


new beta

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] Microtype in ConTeXt

2010-03-25 Thread Hans Hagen

On 25-3-2010 19:14, Wolfgang Schuster wrote:


\setupcharacterkerning[kerncharacters][factor=\ctxlua{tex.write(#1/1000)}]%


i'll add it but simply with

   \setupcharacterkerning[kerncharacters][factor=#1]%

there is no reason to use a different model than we have now (also, 
these 1000 based values are old fashioned tex approaches that don't make 
much sense nowadays)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] Bibtex change short key

2010-03-25 Thread Hubertus
Dear Taco,
  I use the excellent BibTex module with this setup:
  \setupbibtex[database=biblio,sort=author]
  \setuppublications[alternative=apa,refcommand=short,sorttype=bbl,criterium=cited]
  So if I have something like this
  @ARTICLE{Akimoto2005,
  author = {R. Akimoto and B. S. Li and K. Akita and T. Hasama},
  ...
  }
  in my *.bib file, the \cite[Akimoto2005] results in [ALAH05]. Is there a way
  to
  get only the first author with three letters and the year ([Aki05]) in the
  citation?
 
 Patch the generated .bbl file by hand. after its initial creation, it
 will not be modified by context itself anymore.
May be I should have tried it first, before editting about 200 entries as you
suggested. As far as I can judge from the timestamp, at my system the bbl file 
is generatet every time I run texexec. Have I missed something?

Thanks
Hubertus
___
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] marginal note problems

2010-03-25 Thread Michael Saunders
Thank you for the help with headers---it worked.  My marginal note
problems continue:

If I have a two-column text with margins on either side, is there a
way for \inmargin{} or something like it to place text in the margin
next to the column where it occurs?  I haven't been able to avoid it
overprinting the text in the opposite column.

I tried using margin blocks but I couldn't get anywhere with them.  Even:

\startmarginblock
test
\stopmarginblock

produces no output.  And there is a new wrinkle:
\setupinmargin[align=outer] ruins my footnotes.  It causes the
footnote marks that occur before the notes themselves to appear one
margin-length left of where they should be, even if the overprint
text.
___
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] 3D annotations

2010-03-25 Thread Michail Vidiassov

Dear Hans,

On Thu, 25 Mar 2010, Michail Vidiassov wrote:


On Wed, 24 Mar 2010, Hans Hagen wrote:


there is u3d support presen tbut nobody tested it


thank you for your latest effort to put u3d support in a working state, but


now that Adobe has fallen in love with a new 3D format, PRC, the following 
is to be changed:


lpdf-u3d.lua

 if not stream then
 local attr = pdfdictionary {
 Type= pdfconstant(3D),
-Subtype = pdfconstant(U3D),
 }
+if string.upper(string.sub(foundname,-4))==.PRC then
+attr.Subtype = pdfconstant(PRC)
+else
+attr.Subtype = pdfconstant(U3D)
+end
 local streamviews = checkedkey(streamparam, views, table)
 if streamviews then
 local list = pdfarray()

May be a more robust way is to read first 3 bytes of the model file, since
U3D or PRC signature is always there - that can be done instead of 
relying on file name extension or only in case it it not u3d or prc.


Also PRC annotations have to trigger setting PDF version to 1.7.3
(developer extensions dictionary mechanism).
It can be done per your advice directly

\doPDFaddtocatalog {
  /Extensions
/ADBE
/BaseVersion /1.7
  /ExtensionLevel 3


}

But what about an interface like \pdfmicroversion and
automatic pushing up of PDF version once PRC annontation happens?

Also I try to remind you about pdfboolean problem in lpdf-ini.lua
(old code is not OK if b is false and default is true)

 local function pdfboolean(b,default)
-if ((type(b) == boolean) and b) or default then
-return p_true
+if type(b) ~= boolean then
+if default then
+return p_true
+else
+return p_false
+end
 else
-return p_false
+if b then
+return p_true
+else
+return p_false
+end
 end
 end

   Sincerely, Michail

PS. And a great palliative way to deal with 3D annotations is via
attaching a 3D PDF file made with LaTeX (by Asymptote, for example).

But while your method of answering my messages in lua works OK for
new code (updating minimals and making a diff with old code is not
harder than checking e-mail inbox - Your morning patch, sir! ;),
I can not deduce from existing sea of ConTeXt code the status of file 
attachments support.
___
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
___