Re: [NTG-context] How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source?

2009-07-02 Thread Taco Hoekwater

Mojca Miklavec wrote:



Line Number

I don't know of any way, but TeX sometimes complains on errors and
outputs the line number along. 


There is \inputlineno in TeX, so  \the\inputlineno or the lua
equivalent \ctxlua{tex.inputlineno} will work.

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


[NTG-context] Problem with \atopwithdelims & Co.

2009-07-02 Thread Lutz Haseloff
Hi Hans, Hi Taco, Hi all,

a couple of days ago I complained about not adapted delimiters around
constructions with \atopwithdelims.
With LuaTeX, Version beta-0.41.0-2009070222 (Web2C 2009), this
problem persists. After reading the last luatexref-t.pdf I tried following:

\starttext
\Ustartmath\Ustack {a \atopwithdelims() b}\Ustopmath
\startformula
\Ustack {a \overwithdelims[] b}
\stopformula
\stoptext

Greetings Lutz
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] \setuppagenumbering[]

2009-07-02 Thread Ciro Soto
Page numbering in roman style is not working for me. What could the problem be?
I get the numbers in the footer, but it prints in Arabic numbers (1,2,3 ...).
This is the command I use:

\setuppagenumbering[conversion=romannumerals]



thank you
Ciro



-- Links of your interest:
http://www-personal.engin.umd.umich.edu/~cirosoto/
http://www.TheGuitarMakerExploration.com
http://www.myspace.com/sotoaguirre
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to Determine the Current File Name and Line Number AND PAGE NUMBER in the ConTeXt Source?

2009-07-02 Thread Mojca Miklavec
Hello,

Did you take a look at the thread
 "How to Determine the Current File Name and Line Number in the
ConTeXt Source?"
from yesterday?

On Wed, Jul 1, 2009 at 20:18, ivo welch wrote:

> Current File Name
There's \jobname, but if you read from other files this won't help you.

> Line Number
I don't know of any way, but TeX sometimes complains on errors and
outputs the line number along. I could imagine an ugly hack: to
trigger an artificial error, read the line number, ignore that number
and continue ... but I don't know if that's doable. Another ugly hack
would be "talking to synctex". SyncTeX definitely knows the current
line number and file name, but I don't know if there's a way to fetch
those variables back to TeX. In any case it's probably something
that's equally difficult in ConTeXt than in plain TeX.

On the other hand, in LuaTeX there might exist elegant solutions.

> AND PAGE NUMBER in the ConTeXt Source?

What do you mean by "page number in ConTeXt source"?

> is there also a way to determine the current output page number on which
> typesetting is currently being made?

See Hans' response.

> (I know this is a difficult problem in
> LaTeX, and I presume the same is the case for ConTeXt, because it uses the
> same underlying TeX engine.)

... but LuaTeX simplifies matters a lot. In LuaTeX that should be doable.

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

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


Re: [NTG-context] mkiv structure

2009-07-02 Thread Hans Hagen

Alan BRASLAU wrote:

On Monday 15 June 2009 10:02:35 Hans Hagen wrote:

I was wondering ... the last time quite some nice small test samples
were posted for testing the structure code



% Example taken from cont-enp.pdf
% However, adding \part{} is problematic...
% (maybe someone can correct this?)
%
\setuppagenumbering[alternative=doublesided,way=bytext,partnumber=no]
\setuphead[part][placehead=yes,resetnumber=no]
\doifmode{mkiv}{
\setuphead[part][sectionsegments=1:1]
\setupstructureheads[sectionsegments=2:5]
}
\setuplabeltext[chapter=Chapter ] \setuplist[chapter][label=yes]
\setuplist[part,chapter,section,subsection,subsubsection]
  [partnumber=no,interaction=all,alternative=c]
  % number – title – dots – pagenumber


keys like partnumber (number) are obsolete ... and replace by 
prefxset etc (see strc-def.mkiv for example definitions)



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


Re: [NTG-context] references (mainlanguage)

2009-07-02 Thread Hans Hagen

Alan BRASLAU wrote:

First question:
Should the reference labels follow \mainlanguage?
(in the example below [fr], by chance, \in{figure} might seem OK,
but not \in{chapter}!)

Second question:
How can one \Cap{\in{figure}}?

Third question:
Why is the chapter label text blank by default?

Thanks.
Alan

Minimal example:

\mainlanguage[fr]

\setupinteraction[state=start]
\setuplabeltext[chapter=Chaptre ] % why is this not by default?
\starttext

\chapter[ch:first]{Premier}
\placefigure[here][fig:1-1] {}{}
\chapter[ch:second]{Second}

\in{figure}[fig:1-1] du \in{chapter}[ch:first]\ldots

\stoptext


actually, in mkiv we have info available that permit ssoem auto label 
approach ... remind me in a couple of weeks



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


Re: [NTG-context] references (mainlanguage)

2009-07-02 Thread Willi Egger

Hi,

On Jul 2, 2009, at 9:17 PM, Alan BRASLAU wrote:


First question:
Should the reference labels follow \mainlanguage?
(in the example below [fr], by chance, \in{figure} might seem OK,
but not \in{chapter}!)


The text included in the braces must be in french \in{chaptre}[ref]



Second question:
How can one \Cap{\in{figure}}?


Hm, do not know, my test do not reveal the expected result


Third question:
Why is the chapter label text blank by default?


If I understand you correctly you want  Chaptre 1 The title of the  
chapter.
In this case I would say, that this uncommon to use at least in Dutch  
and German. In case you need it you have to set the labeltext.


Thanks.
Alan

Minimal example:

\mainlanguage[fr]

\setupinteraction[state=start]
\setuplabeltext[chapter=Chaptre ] % why is this not by default?
\starttext

\chapter[ch:first]{Premier}
\placefigure[here][fig:1-1] {}{}
\chapter[ch:second]{Second}

\in{figure}[fig:1-1] du \in{chapter}[ch:first]\ldots

\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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] references (mainlanguage)

2009-07-02 Thread Alan BRASLAU
First question:
Should the reference labels follow \mainlanguage?
(in the example below [fr], by chance, \in{figure} might seem OK,
but not \in{chapter}!)

Second question:
How can one \Cap{\in{figure}}?

Third question:
Why is the chapter label text blank by default?

Thanks.
Alan

Minimal example:

\mainlanguage[fr]

\setupinteraction[state=start]
\setuplabeltext[chapter=Chaptre ] % why is this not by default?
\starttext

\chapter[ch:first]{Premier}
\placefigure[here][fig:1-1] {}{}
\chapter[ch:second]{Second}

\in{figure}[fig:1-1] du \in{chapter}[ch:first]\ldots

\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] mkiv structure

2009-07-02 Thread Alan BRASLAU
On Monday 15 June 2009 10:02:35 Hans Hagen wrote:
>
> I was wondering ... the last time quite some nice small test samples
> were posted for testing the structure code
>

% Example taken from cont-enp.pdf
% However, adding \part{} is problematic...
% (maybe someone can correct this?)
%
\setuppagenumbering[alternative=doublesided,way=bytext,partnumber=no]
\setuphead[part][placehead=yes,resetnumber=no]
\doifmode{mkiv}{
\setuphead[part][sectionsegments=1:1]
\setupstructureheads[sectionsegments=2:5]
}
\setuplabeltext[chapter=Chapter ] \setuplist[chapter][label=yes]
\setuplist[part,chapter,section,subsection,subsubsection]
  [partnumber=no,interaction=all,alternative=c]
  % number – title – dots – pagenumber

\starttext

\startfrontmatter
\completecontent
\chapter{Introduction}  % in content, no number
\stopfrontmatter
\startbodymatter
\part{Beginning}
\chapter{First} % number 1, in content
\section{Alfa}  % number 1.1, in content
\section{Beta}  % number 1.2, in content
\chapter{Second}% number 2, in content
\subject{Blabla}% no number, not in content
\part{End}
\chapter{Third} % number 3, in content
\stopbodymatter
\startappendices
\chapter{Index} % letter A, in content
\chapter{Abbreviations} % letter B, in content
\stopappendices
\startbackmatter
\chapter{Acknowlegdement}   % no number, in content
\title{Colofon} % no number, not in content
\stopbackmatter

\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] letter/correspondence module

2009-07-02 Thread Wolfgang Schuster


Am 01.07.2009 um 22:33 schrieb Henning Hraban Ramm:


Am 2009-06-29 um 18:38 schrieb Wolfgang Schuster:

I don't think "line" is documented in your manual.

You're right but it's so boring to write documentation.


;-)
You don't need to write it step by step like in your manual, but a  
reference of options would be really helpful!


The step by step method is only used to know how to write a simple  
letter,
I won't use this to explain the option etc., what I want there are  
examples

for predefined and user created element alternatives.

I wrote: You need need to define all possible labels yourself, as  
long it's comprehensible how to add your own.


I will add a section for this but if a label is useful I want to add  
it to the core.



I'm only writing letters in one language at a time, so will others.
It was only a suggestion to take the key as label as a fallback -  
mostly it will be easy enough, and you don't need to define a proper  
label.


I have to check if this can be done (in a good way) and if I like this  
fallback method.



So, here we are:
I'd like to change the reference table of alternative "e" a little  
bit to fit my logo:


voffset=130mm, % absolute coordinates
hoffset=40mm,
width=20mm, % width of label

It doesn't work in \setupletterstyle[reference][].
Where must I put it?
Or should I define my own alternative, like yours in default.nli ?


The alternatives a–e are not so easy to move to the place you prefer  
because
the start of the bodytext depends on the position (I try to keep  
always two lines
between them) but you can copy the layout of one element to another  
one with


  \copyletterlement[][][]

which looks for you

  \copyletterelement[reference][hraban][e]

You can now place the reference line with

  \setupletterstyle
[reference]
[hoffset=...,
 voffset=...]

and the width of the elements in the reference line with

  \setupletter
[phone,street,...]
[width=20mm]

BTW: I'm using your simplefonts module for the first time in the  
same project - works great, thank you!
(I had to refresh my font database several times, until LuaTeX could  
find all faces of my font family, but that's not your module's fault.)


mtxrun --script fonts --list --pattern=... helps to find the right name.

BTW: You can another example for the use of the simplefonts module
in the source of the correspondence manual (correspondence- 
environment.tex).


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