Re: [NTG-context] counter reseting at every heading

2012-10-01 Thread Peter Schorsch
Thanks Wolfgang,

the solution with \startchapter and insidesection works fine. 

I wasn't aware of that \startchapter-stucture at all. Regarding to 

The \startchapter command is recommended over \bookmark as the
latter might become obsolete from
http://wiki.contextgarden.net/PDF_Bookmarks_and_Headers

is that also the new recommended way of defining chapters instead of
\chapter{..}?

P.

___
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] wikiadmin

2012-10-01 Thread Peter Schorsch
Hi,

whom to contact for user issue with the contextgarden-wiki?

Thanks
P.
___
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] counter reseting at every heading

2012-09-30 Thread Peter Schorsch
Hi, 

few months ago (18th may) I asked about how to setup a counter that
resets after each heading (chapter, section, subsection, subsubsection
and so on.

I got three possibilities then but none of them was implemented (and
still is not):

1)
\definecounter[ParagraphNumber][prefix=no,way={bychapter,bysection,bysubsection,bysubsubsection}]

2)
\definecounter[ParagraphNumber][prefix=no,way=byheader]

3)
\setuphead[chapter,section,subsection,subsubsection][after={\resetcounter[ParagraphNumber]}]
as soon the spaces are defined over spaceafter instead of after.

Is there a forth option out? Or can anyone tell me
what the defaults spaces are so that I can copy them manually? 

Thanks
P.
___
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] counter reseting at every heading

2012-05-18 Thread Peter Schorsch
Hi,

I realized yesterday that my counter for the module does not reset
itself as before. What I need is a counter that resets after each
heading (chapter, section, subsection, subsubsection and so on).

This is what I know about counter reseting at the moment:

\definecounter[ParagraphNumber][prefix=no,way=bysection]
- way=bychapter: reseting counter at every chapter (default)
- way=bysection: reseting counter at every section (not at chapters)
- way={bychapter,bysection,bysubsection,bysubsubsection}: does not work

\setuphead[chapter,section,subsection,subsubsection][after={\resetcounter[ParagraphNumber]}]
does work but it messes with the distance between heading and normal
text.

What is the correct/best way to make the counter reseting every
heading without messing around?

Thanks
P.
___
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] multi language (with module)

2012-05-16 Thread Peter Schorsch
Hi,

to finish my first module I like to make it also available for
non-german users (remove the hardcoded german text). But I could not
figure out how in a way that works. So I wrote down a minimal example
in pseudo-tex to point out my goal. Can you give me an idea/solution
how to implement it in a correct way?

Thanks,
P.

--8--t-welcome.tex
\startmodule[welcome]
\unprotect

\setupmodule[atPageText=]

%these two lines are properly totally wrong but should show the idea
\define[atPageText[en]={Welcome}]
\define[atPageText[de]={Willkommen}]

\def\welcome{\moduleparameter{welcome}{atPageText}}

\protect
\stopmodule
\endinput

--8---welcome.tex---
%this line is properly totally wrong but should show the idea
\usemodule[welcome][atPageText[eo]={Bonvenon},atPageText[de]={Guten
Tag}]]

\starttext

\language[en]
Should be Welcome: \welcome

\language[de]
Should be Guten Tag: \welcome

\language[eo]
Should be Bonvenon: \welcome

\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] multi language (with module)

2012-05-16 Thread Peter Schorsch
Thanks Wolfgang, your post helped me a lot! I am wondering if
only a subset of languages is able to be defined as I got following
result:

Should be Welcome: Welcome
Should be Guten Tag: Guten Tag
Should be Bonvenon: Guten Tag

The Esperanto text is not displayed. It does not matter wether I put
the eo definition into the module or normal tex file. 

This source I used:

--8t-welcome.tex---
\startmodule[welcome]
\unprotect

\definelabelclass[welcome]

\setupwelcometext[en][welcome=Welcome]
\setupwelcometext[de][welcome=Willkommen]

\def\welcome{\welcometext{welcome}}

\protect
\stopmodule
\endinput

--8welcome.tex-
\usemodule[welcome]

\setupwelcometext[eo][welcome=Bonvenon]
\setupwelcometext[de][welcome=Guten Tag]

\starttext

\mainlanguage[en]Should be Welcome: \welcome

\mainlanguage[de]Should be Guten Tag: \welcome 

\mainlanguage[eo]Should be Bonvenon: \welcome

\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
___


[NTG-context] atpage || number comparing

2012-05-15 Thread Peter Schorsch
Hi,

it tried to do a \atpage command that results
a) some page = nothing
b) different page = pagenumber with some text (e.g. auf Seite XY)

\def\atPage[#1]%
{\doifnot{\at[#1]}{\currentpage}%
{\at[#1]}%
}

My problem with this is, that the \doifnot always results as not equal;
it is like the types mismatch as if I exchange \at[#1] with a pure
number the comparing works. If so, how can the types be corrected?

Additionally - if possible - I would like to add case that the referred
page is on the other page but in duplex mode adjacent to the actual
page. Is that possible to do this? I unluckily dont know how to make
working simple calculation in tex code.

To be complete I found in the file strc-ref.mkiv some notes about a
planed \atpage command:

%D A still very rudimentary|/|experimental forward|/|backward
%D reference mechanism is provided by the macro \type{\atpage}:
%D
%D \starttyping
%D ... \somewhere{backward text}{forward text}[someref] ...
%D ... \atpage[someref] ...
%D \stoptyping
%D 
%D In future versions there will be more sophisticated

% 0 = no page reference
% 1 = same page
% 2 = preceding page
% 3 = following page
% 4 = backward, same page (todo)
% 5 = forward, same page  (todo)

But that level of the ambient tex is still out of my scope.

Thanks
P.
___
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] bug? margens with duplex

2012-05-11 Thread Peter Schorsch
Hi Hans,

 I uploaded a beta that might do a better job but as well could
 introduce other problems, so testing is needed.

Thanks a lot! Started testing it and all margins look fine now :-) -
also in larger docs. Will continue testing... 

P.
___
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] Did usage of \expanded changed?

2012-05-11 Thread Peter Schorsch
Hi,

I reactivated some code that was working a year ago. But now it seems
that \expanded has no effect in my case (see below). I also tried it
with \normalexpanded and \expandedafter but both had also no effect. My
problem seems to be this line of the full example below:


\doifsomething\Paragraphmark{\expanded{\textreference[\Paragraphmark]{\fullheadnumber/\rawnumber[ParagraphNumber]}}}%

The error shows itself in the line:

Should be 1/1: \in[test] 

As \in[test] gives me 1/3 instead of 1/1. (1 was the number assigned to
the first paragraph - 3 is the acutal number).

Can someone tell me what I need to change?

Thanks in advanced
P.

-8---full example---

\unprotect

\definenumber[ParagraphNumber][way=bysection,prefixsegments=100]
 
\unexpanded\def\startParagraph
{\dosingleempty\dostartParagraph}
 
\def\dostartParagraph[#1]%
   {\getrawparameters[Paragraph][heading=,mark=,#1]%
\incrementnumber[ParagraphNumber]%
\ininner{\tfx\getnumber[ParagraphNumber]}%
\doifsomething\Paragraphheading{\inouter{\Paragraphheading}}%

\doifsomething\Paragraphmark{\expanded{\textreference[\Paragraphmark]{\fullheadnumber/\rawnumber[ParagraphNumber]}}}%
\ignorespaces}

\unexpanded\def\stopParagraph
{\blank[medium]}
\protect

\starttext

\chapter{Alter novom}

\startParagraph[heading={lorem ipsum},mark=test]
\input tufte
\stopParagraph

\startParagraph
\input tufte
\stopParagraph

\startParagraph
Should be 1/1: \in[test] 
\stopParagraph

\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] Did usage of \expanded changed?

2012-05-11 Thread Peter Schorsch
 See this thread: 
 http://archive.contextgarden.net/message/20120402.144627.e46a9f9f.en.html
 
 and try to construct a minimal example next time.

I converted my number to counter and shrinked my example - but the
problem still occurs:

Instead of the counter value when I set the reference I get always the
latest value:

Should be 1: 3
Should be 2: 3
Should be 3: 3

instead of 

Should be 1: 1
Should be 2: 2
Should be 3: 3

---8--shrinked example--

\unprotect

\definecounter[ParagraphCounter][way=bysection,prefix=no]

\def\markParagraph[#1]%
{\getrawparameters[Paragraph][mark=,#1]%
\incrementcounter[ParagraphCounter]%

\expanded{\textreference[\Paragraphmark]{\convertedcounter[ParagraphCounter]}}}

\protect

\starttext

\markParagraph[mark=aaa]
\input tufte

\markParagraph[mark=bbb]
\input tufte

\markParagraph[mark=ccc]
Should be 1: \in[aaa] 

Should be 2: \in[bbb]

Should be 3: \in[ccc]

\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
___


[NTG-context] bug? margens with duplex

2012-05-10 Thread Peter Schorsch
Hi,

I am using \ininner and \inouter to set text into the margins. As soon
I also use duplex the margins are messed up at every second page.
Unluckily the [stack=continue] option does not help.

I put an example incl. pictures of the results on my user talk page on
the wiki:
http://wiki.contextgarden.net/User_talk:Tralalas
That way my problem might be easier to understand.

Any help is welcome as this problem became a major issue for me.

Thanks
P.

(this is a follow up of the discussion: empty lines messing with
margins (in duplex mode) from end of last year)

mtx-context | current version: 2012.04.26 22:27

___
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] General suggestion: Unit tests for ConText

2011-07-18 Thread Peter Schorsch
Hi,

during my work with context I wrote a bunch of fewliners mainly to test
how to do things. When there change from mkii to mkiv occured many of
my mini-tests failed and later with the growing of mkiv restartet to
work - some just without adaption.. some with some adjustment to a new
syntax.

I realize that they have the same functionality like unit-tests -
just instead of comparing classes and variables - a pdf-output is
visually compared.

So I like to suggest to introduce unit tests for context. It would

a) increase the quality of context as it makes the
testing easier for the developer

b) it also would be a great source of minihowtos for learning
context.

Before I write my technical ideas about this I would like to know what
are you thinking about this idea?

___
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] Heading with linebreaks in pdf bookmarks: linebreak sign stays

2011-07-17 Thread Peter Schorsch
Hi,

as soon I have a linebreak inside a heading via \\ I get this
\\ also in the text of that heading in the pdf-bookmarks:

\setupinteraction[state=start]
\placebookmarks[chapter,section,subsection][chapter,section]

\starttext
\completecontent[criterium=all]
\chapter{A very,\\very long long title}
\chapter{A very, very long long title}
\stoptext

What did I forgot to get rid of the linebreak sign in the pdf
bookmarks?
___
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] right and left alignment in header w/ linebreak sign

2011-07-17 Thread Peter Schorsch
Hi,

I am trying to have the header text aligned at the outer border of
margin. 

At the moment I have 


\setupheadertexts[margin][][\rightaligned{\CurrentChapter}][\leftaligned{\CurrentChapter}][]

and in the text

\chapter{A very, very long long heading}

and it works like I expect it. But as soon I have a linebreak in the
heading (via \\) I get following error message:

structuresectioning  chapter @ level 2 : 0.1 - A
very,\\very long long title ! Extra }, or forgotten \endgroup.

system   tex  error on line 1 in file
context-test-struktur3.tex: Extra }, or forgotten  ...

As soon I remove the alignment in the header also the chapter with the
linebreak sign works - but of course I get then a wrong alignment.

How can I make that the header works with the correct alignment and
linebreaks in the heading? (header should be still without linebreaks)

Thanks in advance!


Complete example:
-8

% define margins
\definelayout[WithMarginnotes][location={duplex},grid=no,topspace=3cm,height=24cm,backspace=3cm,cutspace=0cm,leftmargin=1cm,leftmargindistance=0.4cm,width=12.1cm,rightmargindistance=0.4cm,rightmargin=3.5cm]
\setuplayout[WithMarginnotes]
\setuppagenumbering[alternative=doublesided,location=]
\showframe

% define header
\define\CurrentChapter%
{\doiftextelse {\getmarking[chapternumber]}%
{\getmarking[chapternumber].~\getmarking[chapter]}%
{\getmarking[chapter]}%
}
\setupheadertexts[margin][][\rightaligned{\CurrentChapter}][\leftaligned{\CurrentChapter}][]%

%
\starttext
\completecontent[criterium=all]
\chapter{A very,\\very long long heading}
\chapter{A very, very long long heading}
\chapter{End}
\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] inner/outer margin: wrong width at double sided

2011-07-17 Thread Peter Schorsch
Hi,
  
sorry that I repeat my question but I have really no idea how to solve
this. 

When I use \ininner and \inouter directly, always the correct
width is used.

\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M
M }\input tufte


But as soon I put it into a function the wrong margin width is often
used.

\unexpanded\def\startParagraph
{\dosingleempty\dostartParagraph}
 
\def\dostartParagraph[#1]%
   {\getrawparameters[Paragraph][heading=,mark=,#1]%
\incrementnumber[ParagraphNumber]%
\ininner{\tfx\getnumber[ParagraphNumber]}%
\doifsomething\Paragraphheading{\inouter{\Paragraphheading}}%

\doifsomething\Paragraphmark{\expanded{\textreference[\Paragraphmark]{\fullheadnumber/\rawnumber[ParagraphNumber]}}}%
\ignorespaces}

\unexpanded\def\stopParagraph
{\blank[medium]}

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph


In the attached pdf file in the thread-starting post you can see the
broken results on page 6.


-8

% define start- stopParagraph
\definenumber[ParagraphNumber][way=bysection,prefixsegments=100]
\unexpanded\def\startParagraph
{\dosingleempty\dostartParagraph}
\def\dostartParagraph[#1]%
   {\getrawparameters[Paragraph][heading=,mark=,#1]%
\incrementnumber[ParagraphNumber]%
\ininner{\tfx\getnumber[ParagraphNumber]}%
\doifsomething\Paragraphheading{\inouter{\Paragraphheading}}%

\doifsomething\Paragraphmark{\expanded{\textreference[\Paragraphmark]{\fullheadnumber/\rawnumber[ParagraphNumber]}}}%
\ignorespaces}
\unexpanded\def\stopParagraph
{\blank[medium]}

% Setup margins and double sided
\definelayout[WithMarginnotes][location={duplex},grid=no,topspace=3cm,height=24cm,backspace=3cm,cutspace=0cm,leftmargin=1cm,leftmargindistance=0.4cm,width=12.1cm,rightmargindistance=0.4cm,rightmargin=3.5cm]
\setuplayout[WithMarginnotes]
\setuppagenumbering[alternative=doublesided,location=]
\showframe

%
\starttext
% direct use: works
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M
M }\input tufte 
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M
M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M
M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M
M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M
M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M
M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M
M }\input tufte

% used via fucntion: does not work correctly
\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\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
___


[NTG-context] math-align / subformulas not working

2011-07-17 Thread Peter Schorsch
Hi,

I just tried an example from math-ali.mkiv:

\starttext
\placeformula \startformula \startalign
\NC a   \NC \eq b   \NR[+]
\NC c   \NC \neq d  \NR
\NC \NC \neq f  \NR[+]
\NC \NC \geq g  \NR[+][a]
\NC \NC \leq h  \NR[+][b]
\NC \NC \eq i   \NR
\stopalign \stopformula
\stoptext

But the subformula ...[+][a] and ...[+][b] are not shown as expected...
they are shown as normal formula numbers - but they should be
subformula numbers.

Is there a new way to create subformulas?

P.
___
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] inner/outer margin: confused width

2011-07-14 Thread Peter Schorsch
Hi,

the width of my inner and outer margin are different and the pagelayout
is double sided.

When I use \ininner and \inouter directly, always the correct width is
used. But as soon I put it into a function the wrong margin width is
often used.

I attached two files:
- simple example tex file
- the pdf output of that example file

In the example pdf you can see starting from page five the mixed up
result.

Is there something I do wrong with the double sided mode? Or is this an
issue how the function is written?

Thanks in advance!

P.%Test of margins and margins width

%Define paragraph command

\definenumber[ParagraphNumber][way=bysection,prefixsegments=100]
 
\unexpanded\def\startParagraph
{\dosingleempty\dostartParagraph}
 
\def\dostartParagraph[#1]%
   {\getrawparameters[Paragraph][heading=,mark=,#1]%
\incrementnumber[ParagraphNumber]%
\ininner{\tfx\getnumber[ParagraphNumber]}%
\doifsomething\Paragraphheading{\inouter{\Paragraphheading}}%
\doifsomething\Paragraphmark{\expanded{\textreference[\Paragraphmark]{\fullheadnumber/\rawnumber[ParagraphNumber]}}}%
\ignorespaces}

\unexpanded\def\stopParagraph
{\blank[medium]}

% Setup margins and double sided

\definelayout[WithMarginnotes][location={duplex},grid=no,topspace=3cm,height=24cm,backspace=3cm,cutspace=0cm,leftmargin=1cm,leftmargindistance=0.4cm,width=12.1cm,rightmargindistance=0.4cm,rightmargin=3.5cm]
\setuplayout[WithMarginnotes]
\setuppagenumbering[alternative=doublesided,location=]
\showframe

% Test content

\starttext

\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte
\ininner{X X X X X X X X X X X X}\inouter{M M M M M M M M M M M M }\input tufte

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\startParagraph[heading={M M M M M M M M M M M M }]
\input tufte
\stopParagraph

\stoptext


pararef-test5.pdf
Description: Adobe PDF document
___
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] fullstructureheadnumber does not work

2011-07-12 Thread Peter Schorsch
Hi,

did something happend to the \fullstructureheadnumber in the last six
months? I still can find it in the source (strc-sec.mkiv) but is always
halts with Undefined control sequence.

Is there a new command for this?

Thanks
P.
___
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] for each script a different font

2010-12-06 Thread Peter Schorsch
Hi all,

is it possible to mix severel fonts (for each script one font)? Regarding to 
some fragments of the wiki I tried:

\setupdirections[bidi=global]

\definefontfeature[cyrl][script=cyrl]
\definefontfeature[brai][script=brai]
\definefontfeature[arab][script=arab]

\starttypescript [serif] [vollkorn]
  \definefontsynonym [Serif][name:vollkornregular]
  \definefontsynonym [Serif][name:doulossil][feature=cyrl]
  \definefontsynonym [Serif][name:scheherazade][feature=arab]
  \defomefpmtsynonym [Serif][name:sechspunktbraille][feature=brai]
\stoptypescript


\definetypeface[fliesstext][rm][serif][vollkorn]
\setupbodyfont[fliesstext,rm,11pt]

\starttext

Regular Еупгдфк цшкв уы more test text a ُءشةحمث and continue latin script 
⠇⠤⠧⠬⠀⠟⠢⠭.

\stoptext

But the last \definefontsynonym overrides the entire unicode space and not 
only the part regarding to the related script.

Is the mechanism I tried in ConTeXt possible?

___
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] bug report/mkiv: verbatim text bug with tab parameter

2010-12-03 Thread Peter Schorsch
Hi,

today I recognized that the tab parameter is not working in setuptyping 
anymore (actual beta). As soon the tab paramter is set and a tabulator is 
used in the text, ConTeXt breaks with following error message:

! LuaTeX error ...text/tex/texmf-context/tex/context/base/util- 
str.lua:56: attempt to call global 'rep' (a nil value)
stack traceback:
...text/tex/texmf-context/tex/context/base/util-
str.lua:56: in function 'tabtospace'
...text/tex/texmf-context/tex/context/base/buff-
ini.lua:174: in function 'flush'
...text/tex/texmf-context/tex/context/base/buff-
ini.lua:216: in function 'typebuffer'
main ctx instance:1: in main chunk.
\dodotypeblockverbatim ...ter \c!escape \!!es , }}
  \dostoptagged\endofverbat...
l.7 \stopcode

To reconsturct the error use following example:

\definetyping[code][tab=3]
\starttext
\startcode
IrgendeinQuelltext /
IrgendeinQuelltext /
/IrgendeinQuelltext
\stopcode
\stoptext

If this is just a mistake by myself please excuse.

___
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-bug in mkiv?

2010-11-19 Thread Peter Schorsch
Hi,

since mkiv (last updated 19.11.) \placeformua causes a bug regarding the 
placing of inner- and outermargins. 

If you remove the \placeformula in the following example the placing of 
inner- and outermargins is right. But as soon there is a \placeformula from 
that point on inner- and outermargins are switched every call.

Is there a way around this problem or is someone able to correct this? I 
would apreciate any help in this.


\starttext

\inmargin{inmargin}\inothermargin{othermargin}\input tufte
\inmargin{inmargin}\inothermargin{othermargin}\input tufte

\placeformula
\startformula
  c^2 = a^2 + b^2
\stopformula

\inmargin{inmargin}\inothermargin{othermargin}\input tufte
\inmargin{inmargin}\inothermargin{othermargin}\input tufte
\inmargin{inmargin}\inothermargin{othermargin}\input tufte
\inmargin{inmargin}\inothermargin{othermargin}\input tufte
\inmargin{inmargin}\inothermargin{othermargin}\input tufte

\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] formula: listing and subnumbering

2010-09-14 Thread Peter Schorsch
Hans Hagen wrote:
 - can you post your examples (so that they can be added to the test suite)
 - can you also test this with the current beta

done.. you can find the test file for formulas with mkiv attached to this 
email. 

I ran it with the latest beta. A couple of things are working.. but e.g. 
most ways for subformulas not.

The listing is half working.. only the formulas names are missing and the 
order with the only example with working subformulas is strange. 

If I made any mkiv mistake please excuse... I tried to figure out / guessed 
the right mkiv ways. 

I hope this test files helps you to identify the problem areas.

-8---

\starttext
\title{List of formulas}

Strange: Missing name of first formula and strange order of .. 2.a, 2, 
2.b...

\placelist[formula][criterium=all,alternative=c]

\subject{math - formula}

This works fine.

\placenamedformula[one]{Der einfache Test}
\startformula
c^2 = a^2 + b^2.
\stopformula

\subject{math - subformula}

This works fine.

\startsubformulas[eq:1]
\placeformula[eq:first]
\startformula
PM \xrightarrow R_{PM} \xrightarrow PM
\stopformula

\placeformula[eq:second]
\startformula
R_{PM} = \{ K, F, Z, U, I, J\}
\stopformula
\stopsubformulas

\subject{math - align - formula}

Works.

\placeformula
\startformula
\startalign[n=3, align={right,middle,left}]
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a]
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b]
\stopalign
\stopformula

Also works.

\placeformula
\startformula
\startalign[n=3, align={right,middle,left}]
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[+]
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[+]
\stopalign
\stopformula

\subject{math - align - subformula}

Does not work: no subformula numbers

\placesubformula
\startformula
\startalign[n=3, align={right,middle,left}]
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][.1]
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][.2]
\stopalign
\stopformula

Does not work: no subformula numbers

\placesubformula
\startformula
\startalign[n=3, align={right,middle,left}]
\NC PM \xrightarrow \NC R_{PM} \NC \xrightarrow PM \NR[gleichung1a][+]
\NC R_{PM} \NC = \NC \{ A, B, C, D, E\} \NR[gleichung1b][+]
\stopalign
\stopformula

\subject{math - eqalignno - formula}

Taken from wiki and removed the subformulanumber

\placeformula
\startformula
\eqalignno{
  c^2 = a^2 + b^2  \formulanumber \cr
  c = \left(a^2 + b^2\right)^{\vfrac{1}{2}} \formulanumber\cr
  a^2 + b^2 = c^2  \formulanumber \cr
  d^2 = e^2\formulanumber \cr}
\stopformula

\subject{math - eqalignno - subformula}

Directly taken form wiki - does not work: subformulanumber is unknown.

%\placeformula
%\startformula
%\eqalignno{
%  c^2 = a^2 + b^2  \formulanumber{a} \cr
%  c = \left(a^2 + b^2\right)^{\vfrac{1}{2}} \subformulanumber{b}\cr
%  a^2 + b^2 = c^2  \subformulanumber{c} \cr
%  d^2 = e^2\formulanumber\cr}
%\stopformula

\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
___


[NTG-context] formula: placeformula messes with margins

2010-09-14 Thread Peter Schorsch
Hi,

I also ran into a problem with placeformula and margins. The attached 
example runs fine with the margins. But as soon the placeformula is 
uncommented the left and right margins are messed up. And if not all 
paragraphs have at both side a marginnote is get worse. Is there a way to 
solve this?

Thanks

8---

\starttext

\inmargin{inmargin}\inothermargin{othermargin}\input tufte
\inmargin{inmargin}\inothermargin{othermargin}\input tufte

%\placeformula
\startformula
  c^2 = a^2 + b^2
\stopformula

\inmargin{inmargin}\inothermargin{othermargin}\input tufte
\inmargin{inmargin}\inothermargin{othermargin}\input tufte
\inmargin{inmargin}\inothermargin{othermargin}\input tufte
\inmargin{inmargin}\inothermargin{othermargin}\input tufte
\inmargin{inmargin}\inothermargin{othermargin}\input tufte

\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] formula: listing and subnumbering

2010-09-10 Thread Peter Schorsch
 Hans Hagen wrote:
 i'll have a look at it

Did you found anything?

I tried to figure out which command in the examples of the wiki work/dont 
work (I used mkiv stable). So far:

\formulanumber - works in mkii and mkiv
\subformulanumber - works only in mkii
\placenamedsubformula - works only in mkii
\placesubformula  \NR[+] - mkii  mkiv, but (1.name) as number
\placeformula  \NR[+] - works in mkii and mkiv, but (1.name) as number

I have a real problem to transform my formula from mkii to mkiv. In mkii I 
had following:

\placesubformulawithnumber[gleichung1]
\startformula
\startalign[n=3, align={right,middle,left}]
\NC PM \xrightarrow{aaa} \NC R_{PM} \NC \xrightarrow{bbb} PM 
\NR[gleichung1a][.1]
\NC R_{PM} \NC = \NC \{ K, F \} \NR[gleichung1b][.2]
\stopalign
\stopformula

Can anyone help me to transform this to mkiv, please?

Thanks
P.


___
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] Fonts

2010-09-10 Thread Peter Schorsch
You can list all local availble fonts with: 

mtxrun --script fonts --list --all

More details under: http://wiki.contextgarden.net/Fonts_in_LuaTeX



Cecil Westerhof wrote:

 Is there a list of the standard fonts to use? I found:
   serif
   regular
   roman
   sans
   support
   sansserif
   mono
   type
   teletype
   handwritten
   cmr
   mm
   rm
 
 But none of them I find very pleasing. (And handwritten looks
 different as the name suggest.) How can I find out which fonts I can
 use?
 


___
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] Fonts

2010-09-10 Thread Peter Schorsch
I have to agree to Andreas... i just updated to the actual beta (for the 
math examples). Now mtxrun answers with following statement:

...text/tex/texmf-context/tex/context/base/font-otp.lua:512: attempt to call 
field 'register' (a nil value)


___
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] ConTeXt Minimals and TEXMFCACHE

2010-08-27 Thread Peter Schorsch
I summarized this small discussion in the wiki as I also made a systemwide 
installation (http://wiki.contextgarden.net/ConTeXt_Minimals#Cache)



Nicola wrote:

 In article
 aanlktim8p_nsu=qf8r9ojvbd=bpzitwd_baov+exh...@mail.gmail.com,
  Mojca Miklavec mojca.miklavec.li...@gmail.com wrote:
  
 The variable TEXMFCACHE is set in
 tex/texmf/web2c/texmfcnf.lua
 and that one should do the job. Under usual circumstances at least.
 
 If that one is not being respected, something might be wrong. Do you
 have any other texmfcnf.lua file somewhere else?
 
 No, I export TEXMFCACHE in my .profile, because I want the cache to be
 inside my home folder. After running setuptex, ConTeXt minimals uses
 that rather than the path specified in texmfcnf.lua. Since now I know
 that luatex-cache can be shared, for me this is perfectly fine. I just
 had to adjust the TeXShop engines (I am on Mac OS X) by explicitly
 setting TEXMFCACHE for XeTeX and MKII, besides MKIV.
 
 So, if I get it right, the value in texmfcnf.lua is used unless
 TEXMFCACHE is set.
 
 Nicola
 
 
___
 If your question is of interest to others as well, please add an entry to
 the Wiki!
 
 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 
___


___
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] formla: listing and subnumbering

2010-08-27 Thread Peter Schorsch
Hi,

in my work I have a lot of formulas inkl. subformulas. Doing the examples at 
the wiki two questions came up:
 a) how to generate a table of formulas?
 b) what is the right/better way for subnumbering?

a) I tried the example for generating a table of formulas from the wiki
(http://wiki.contextgarden.net/Math/Display#List_of_Formulas) but instead of 
a list I get in the pdf a »no list method«. What do I missed here?

b) I found two descriped ways how to create formula (sub-)numbering:
 1) using \formulanumber and \subformulanumber (third example from 
http://wiki.contextgarden.net/Math/Display#The_Manual_Method). But context 
always reports here: ! Undefined control sequence.
argument ...^{\vfrac {1}{2}} \subformulanumber 
  {b}\cr a^2 + b^2 = c^2 
\...
  2) using the \NR[..] like it is described on 
http://wiki.contextgarden.net/Multiline_equations#Working_with_equation_numbering
 
and http://dl.contextgarden.net/myway/mathalign.pdf. This way compiles 
through. 

But which way is the future context way? In which way can I combine 
subnumbering and including to list some (not all) subformulas?

Thanks for your help

___
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] Porting from MkII to MkIV

2010-08-26 Thread Peter Schorsch
I used the context from the ubuntu repository. So I switched to context-
minimals current-version and viola it works here too

Thanks



Wolfgang Schuster wrote:

   Am 25.08.10 00:23, schrieb Peter Schorsch:
 Thanks Wolfgang! Your source code looks a lot different than mine...
 there are some commands I have not seen before... so I have to learn :-)
 
 Works here without problems.
 
 MTXrun | current version: 2010.08.25 11:13
 
 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
 
___


___
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] current head title and current number

2010-08-23 Thread Peter Schorsch
Thanks Wolfgang, that helped :-)

Only one additional question occured with that solution:

I am trying to use unnumbered chapters/sections and recognized that 
\fullstructureheadnumber gives the number of the chapter/section before 
instead of giving back and empty string:

\chapter{abc}  \fullstructureheadnumber - 1
\chapter{abc}  \fullstructureheadnumber - 2
\title{abc}  \fullstructureheadnumber - 2 (instead of an empty string)
\chapter{abc}  \fullstructureheadnumber - 3

(\placeheadnumber only returns (chapter and title) an empty string)

Is there a way to solve this?


___
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] current head title and current number

2010-08-23 Thread Peter Schorsch
I figured out that \fullstructureheadnumber returns inside a backmatter nil. 
So it works for my own needs.

I do not know if the reported return behavior inside a bodymatter or 
appendices is correct. But I leave this discussion to the context devs. 

Anyways @devs: Thanks for your work! Context became real cool stuff!



___
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] current head title and current number

2010-08-22 Thread Peter Schorsch
Hi,

I need to get the current *section/chapter title and number. I figured out 
that \fullstructureheadnumber gives the current number. But I can not figure 
out what gives the current head title.

In strc-sec.mkiv I found this comment:

   \def\currentheadtext{obsolete, use marks}

Is this a hint to use getmarking? I tried 

   \getmarking[current]
   \getmarking[currentsection]
   \getmarking[currenthead]

without success. Does anyone know how to access the current title?



___
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] Typeface - simple example

2010-08-21 Thread Peter Schorsch
Hi,

finally I figured it out :-)

I entered the working example into the wiki:

http://wiki.contextgarden.net/Simple_Typescript_Example

and linked it into the catogory »Fonts« and at the page »Fonts in LuaTeX« 
under »2.2.3 Very simple example of typescript«. 

You know the best where to link it inside your wiki so feel free to change 
it if you think. Maybe the title also should be changed into »Simple 
Typescript / Typeface Example«. 

Hope it will helps other.

Ciao


___
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] Ubuntu and Context MKIV

2010-08-20 Thread Peter Schorsch
Hi,

I am also using Context on ubuntu - and it works fine here. There is one 
small change I like to do:

 luatools --generate

is creating ~/luatex-cache. As this cache is not hidden it appears on the 
desktop. Is it possible to change that directory into a hidden directory 
e.g. ~/.luatex-cache?

Thanks

___
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] Typeface - simple example

2010-08-19 Thread Peter Schorsch
Hi,

I reactivated my interest in Context. A lot changed since 
then... so I am became a beginner again. E.g. I don't know / understand how 
to use that Typescript-Framework. I tried to build a simple example, but I 
do not get it to work. 

I crosschecked successfully with simplefonts that the fonts itself are
working (via \simplefont[..]).

In this example I wanted to put the Nimbus Sans fonts on the rm-Definitions 
(just to see that it is working).

I like what I was reading in the wiki, examples, posts and manuels about the 
Typescript-framework - but can anyone help me to understand it really / help 
me to get this simple example to work?

Thanks


-- simple example environment ---

Nimbus fonts are stored under /usr/share/fonts

OSFONTDIR is correct, fonts via mtxrun imported

mtxrun --script fonts --list --all pattern=nimbuss*
shows all the nimbus fonts I used in the example

-- simple example --

\enableregime[utf]
\setupencoding[default=uc]

\setupcapitals[sc=yes]

\definefontsynonym [Nimbus-Sans-Regular][nimbussanlregu]
\definefontsynonym [Nimbus-Sans-Bold]   [nimbussanlbold]
\definefontsynonym [Nimbus-Sans-Italic] [nimbussanlreguital]
\definefontsynonym [Nimbus-Sans-Slanted][nimbussanlreguital]
\definefontsynonym [Nimbus-Sans-BoldItalic] [nimbussanlboldital]
\definefontsynonym [Nimbus-Sans-BoldSlanted][nimbussanlboldital]
\definefontsynonym [Nimbus-Sans-Caps]   [nimbussanlregu]

\starttypescript [Nimbus]
\definetypeface [Nimbus-whatIsThisFor]  [rm][whatIsThis]
[Nimbus-Sans-Regular]
\definetypeface [Nimbus-whatIsThisFor]  [rm][whatIsThis]
[Nimbus-Sans-Bold]  %here: how to access / define rm,bf?
\definetypeface [Nimbus-whatIsThisFor]  [tt][whatIsThis]
[Nimbus-Sans-Italic]
\definetypeface [Nimbus-whatIsThisFor]  [ss][whatIsThis]
[Nimbus-Sans-Bold]
\stoptypescript


\usetypescript[Nimbus]
\setupbodyfont[Nimbus-whatIsThisFor,rm,12pt]

\starttext

Regular

{\it Italic}

{\bf Bold}

{\bi Bold-Italic}

\showbodyfont

\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
___


[NTG-context] Pagenumbering in header-margin with outer-align

2008-03-28 Thread Peter Schorsch
Hi,

I am trying to put the pagenumber in the margin of the header. But I also want 
it outer-aligned - not inner-aligned, which seems to be the standart 
alignment of margin. But the inner-align of the body-margin should still be 
inner-aligned. So I tried following:

\setuppagenumbering[conversion=Romannumerals,alternative=doublesided,
location={header,margin},style={\setupalign[outer]}]

but Context dont like this.. it stops converting. Does anyone know a working 
solution for this problem?

Thanks, P.
___
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] inline-graphics and unwanted line-break

2007-11-29 Thread Peter Schorsch
Hi, 

I have a small metapost graphic I like to use inline. But the arragement 
behaves a little bit unpractically. As soon there is no character in front 
of the graphic context will break the line after the graphic - but as soon 
there is a character in front of the graphic, context does not adding a 
linebreak after the graphic.

Does anyone know how to prevent the line-break after the graphic if the 
graphic is the first inline?

Thanks, P.

example-file:

\startuseMPgraphic{zo}
color schwarz ; schwarz := (.0,.0,.0) ;
draw 
(0pt,0pt)--(0pt,8pt)--(5pt,12pt)--(10pt,8pt)--(10pt,0pt)--(0pt,0pt)--cycle 
withcolor schwarz ;
\stopuseMPgraphic

\starttext

\hbox{\useMPgraphic{zo}} test text - why a line-break? How to prevent this?

a \hbox{\useMPgraphic{zo}} test text - this is fine: no line-break!

\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] combination with an additional line centered in a placefigure?

2007-11-22 Thread Peter Schorsch
 \placefigure
   [force][fig:xy]
   {captiontext}
   {\placelegend
  {\startcombination[2*1]
 {\externalfigure[xxx]}{}
 {\externalfigure[yyy]}{}
   \stopcombination}
  {Quelle: XY}}

Thanks, both solutions work. Is there something simelar for placelegend in 
splitfloat?

\splitfloat
 {\placetable[][]{tablecaptiontext}}
 {very very long HTML-Table}

I need to add a legend - also as a HTML-Table, so I tried:

\splitfloat
{\placetable[][]{tablecaptiontext}}
{\placelegend 
{very very long HTML-Table}
{legend HTML-Table}}

But this is not working  - strangly an Missing-} error comes up but all 
brakets are closed. Is there any other way to put a legend at the end of a 
multi-page HTML-Table?

Ciao, P.

___
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] combination with an additional line centered in a placefigure?

2007-11-15 Thread Peter Schorsch
Hi,

as soon I enter the cbox-line the combination is not longer centered. I tried 
to embed the combination in a cbox, but that had no effect. Has anyone a hint 
how to center the combination successfullly? 

\starttext
\placefigure
[force][fig:xy]
{captiontext}
{\startcombination[2*1]
{\externalfigure[xxx][]}{}
{\externalfigure[yyy][]}{}
\stopcombination
\cbox{\tfx Quelle: XY}
}
\stoptext

Thanks, P.
___
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] currentheadnumber / doif.. problem

2007-10-18 Thread Peter Schorsch
ok,

I found the solution. In the documentation (cont-eni.pdf) at page 172 
following is written:

For example:
\currentheadnumber   : 8.3
\headnumber[chapter] : 8
\headnumber[section] : 8.3

but that is partly wrong. There should be standing (change example from 8.3 to 
8.3.2):

For example:
\finalsectionnumber : 8.3.2
\currentheadnumber   : 2
\headnumber[chapter] : 8
\headnumber[section] : 8.3

Or are \finalsectionnumber and \currentheadnumber interchanged in the code and 
the documentation is as it should be? But that is a question I cannot answer.

Ciao, P.
___
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] currentheadnumber / doif.. problem

2007-10-15 Thread Peter Schorsch
Aditya wrote:
 Can you create a minimum example to play with?

I attached the module t-pararef.tex and the example pararef-test.tex. The ref1 
is still wrong. 

When I replace \currentheadnumber in \paragraphMark with the before defined 
\presentheadnumber  context is saying that a «Missing control sequence 
inserted» - but I don't see any mistake there (but there must be)...

But finally I only want that the ref1 in the example is also working (see at 
the end of example file).

A second questions: why is the paragraph of ref3 in the example indented?

Thanks, P.
\usemodule[pararef]

\starttext

\chapter{first heading}

\section{hamha}

\startparagraph\paragraphMark[ref1]\paragraphHeading{tztzttzt}
blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla 
\stopparagraph

\startparagraph
blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla 
\stopparagraph

\section[ref2]{dumdidim}

\startparagraph
blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla 
\stopparagraph

\chapter{first heading}

\startparagraph
blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla 
\stopparagraph

\startparagraph\paragraphHeading{heuho}
blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla 
\stopparagraph

\startparagraph\paragraphMark[ref3]
blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla 
\stopparagraph


ref1 should be: para. 1.1/2 and is: \crossref{para.}[ref1]

ref2 should be: sec. 1.2 and is: \crossref{sec.}[ref2]

ref3 should be: para. 2/3 and is: \crossref{para.}[ref3]

\stoptext
\startmodule[pararef]

\unprotect

% variable and functions
%
% paragraphNumber		running number starts at every heading with 1
%
% paragraphMark[]		Marks the paragraph to make references to it 
% tmpparagraphMark{}[]		replaces temporary paragraphMark until 
%presentheadnumber is working
% getParagraphNumber		Writes paragraphNumber (for itmize-enviorement
% startParagraph		Starts and stops a paragraph
% 	stopParagraph
% paragraphHeading{}		Defines the margin-heading of that paragraph
% crossref{}[]			common command for internal references

\definenumber[paragraphNumber]

\setuphead[chapter,section,subsection,subsubsection][after={\resetnumber[paragraphNumber]}]


\def\presentheadnumber
	{\doifelse{\headnumber[section]}{0}%
		{\headnumber[chapter]}%
		{\headnumber[section]}%
	}

\def\paragraphMark[#1]
	{\expanded{\textreference[#1]{\presentheadnumber/\getnumber[paragraphNumber]}}}

\define\getParagraphNumber
	{\incrementnumber[paragraphNumber]%
	\inothermargin{\color[grey]%
	{\tfx\getnumber[paragraphNumber]~}}
	}

\definestartstop[paragraph]
  [before=
	{\blank[medium]\incrementnumber[paragraphNumber]%
	\inothermargin{\color[grey]%
	{\tfx\getnumber[paragraphNumber]~}}},
   after={\blank[medium]}]

\def\paragraphHeading#1%
	{\inmargin{#1}%
	}

\def\crossref#1[#2]%
	{\color[grey]{#1 \in[#2]}%
	}

\protect
\stopmodule
\endinput___
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] How to realize rubytext in Context?

2007-10-13 Thread Peter Schorsch
Hi,

for an multilanguage document I need to write some rubytext. But I have no 
idea how to realize this in context. Math-mode is not a solution as the 
line-breaks with longer rubytext - but maybe it is the only way. Hints are 
very welcome.

Here is a good and short explanation what rubytext is:

  http://www.w3.org/International/questions/qa-ruby

Ciao, P.
___
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] currentheadnumber / doif.. problem

2007-09-25 Thread Peter Schorsch
hm.. it still executes always the else-part of the doifelse-function 


 (Untested)

  \def\presentheadnumber%
 {\doifelse{\headnumber[section]}{0}%

  ^^

 {\headnumber[chapter]}%
 {\headnumber[section]}%
 }
___
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] currentheadnumber / doif.. problem

2007-09-11 Thread Peter Schorsch
Hi,

I tried to get the full present heading-number. If I am using currentnumber
the result is only the last part of the heading-number. So I tried do
implement a function like this:

\def\presentheadnumber%
{\doifelse{\headnumber[section]}{}%
{\headnumber[chapter]}%
{\headnumber[section]}%
}

but always the else-part is executed. I also tried to use doifemptyelse,
doifnumber etc.. but as soon i am using headnumber[...] only the else-part
will be executed. Can anyone help me with this problem? Or am I going a
complete wrong way?

Thanks
___
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] currentheadnumber / doif.. problem

2007-09-10 Thread Peter Schorsch
Hi,

I tried to get the full present heading-number. If I am using currentnumber
I am getting back only the last part of the heading-number. So I tried do
implement a function like this:

\def\presentheadnumber%
{\doifelse{\headnumber[section]}{}%
{\headnumber[chapter]}%
{\headnumber[section]}%
}

but always the else-part is executed. I also tried to use doifemptyelse,
doifnumber etc.. but as soon i am using headnumber[...] only the else-part
will be executed. Can anyone help me with this problem? Or am I going a
complete wrong way?

Thanks

___
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] help needed

2007-09-07 Thread Peter Schorsch
 Started reading the doc on your site, created a myfile.tex as yours, but
 % context myFile
 zsh: command not found: context

use instead:

texexec --pdf myFile.tex (use pdftex but Unicode is not working)

or

texexec --xtx myFile.tex (use Xetex with Unicode but is not working in
Context-distribution since 2007, download the latest 2006 version from
archiv)

or

texexec --lua myFile.tex (use LuaTex and Unicode but still official beta -
have no experience with it)


For XeTeX maybe look at:
http://archive.contextgarden.net/message/20070130.145856.ffeabcfc.en.html

Ciao

___
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] hairline in a matrix

2007-09-04 Thread Peter Schorsch
Hi,

I could not figure out how to add a hairline between two rows of a matrix. 

Following example is compiling but only results in a bigger vertical space.
Infos/Hints are welcome...


\startformula \startmatrix
   \NC {a_1 } \NC {a_2 } \NC {a_3 }  \NC  \ldots      \NC {a_X }  \NR
   \NC {b_1 } \NC 0      \NC 0       \NC 0            \NC 0       \NR
   \NC 0      \NC {b_2 } \NC 0       \NC 0            \NC 0       \NR
   \NC 0      \NC 0      \NC  \ddots \NC 0            \NC 0       \NR
   \NC[n=5] {\text{\hairline}} \NR
   \NC 0      \NC 0      \NC 0       \NC {b_{X - 1} } \NC 0       \NR
\stopmatrix \stopformula

___
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] module-parameters Was: Context replacement for bibitem

2007-08-31 Thread Peter Schorsch
Thanks Wolfgang,

you were totally right. I made a typewriting error - I discovered it with
help of your examples. 

I also updated the module in the wiki - and I will make it multilingual as
soon I will find a good doc about multilingual-commands.

I tried to add colors over module-parameter - but it didn't work out. I
changed in t-bibitem.tex:

\setupmodule[itemspace=12,color=red]
...
\def\bibref[#1]#2{\doifemptyelse{#2}
   {\color[\currentmoduleparameter{color}]{[\in[#1]]}}
   {\color[red]{[\in[#1], #2]}}}

and in the biblist-test-files only following line has to be added:
 
\setupcolors[state=start]

The direct command \color[red]{...} is working, but the
\color[\currentmoduleparamter{color}]{...} not - wether I add an \expanded
or not. texexec gives following comments:

color   : empty is not defined

I have the feeling that the module-parameter and the expand-commands are
still a mysterious to me. Can you / anyone explain me, what I am doing
wrong?

Ciao

___
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] module-parameters Was: Context replacement for bibitem

2007-08-31 Thread Peter Schorsch
Hi Aditya,

 Aren't you doing exactly what the bib module does? The only difference
 is that the bib module uses registers, so that you can also sort the
 publication list. And you can format different types of references
 differently. But the basic idea is the same.

The main issue for me was, that (right now) it seems to be impossible to get
with the bib-module a per-chapter bibliography at the end of the document .

Ciao

___
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] value-copy - e.g. in \textreference

2007-08-31 Thread Peter Schorsch
Wolfgang Schuster wrote:

 
 \def\MyMark[#1]%
   {\expanded{\textreference[#1]{Para. \currentheadnumber /
   {\getnumber[number]}}}
 

Thanks, it works with the expanded...

___
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] Context replacement for bibitem

2007-08-30 Thread Peter Schorsch
Hi Wolfgang,

 Replace this line with
 
 \expanded{\setupitemgroup[bibliography][1][n,
\currentmoduleparameter{itemspace}*broad]}

Unluckily that is not working :-( I also tried:

\setupitemgroup[bibliography][1][n
\expanded{\currentmoduleparameter{itemspace}}*broad]

and

\setupitemgroup[bibliography][1][n
\expandafter\currentmoduleparameter{itemspace}*broad]

In all three tries I didn't got any error-break but the pdf showed directly
that the lines were not accepted. 

I posted the right-this-state module into the wiki:
http://wiki.contextgarden.net/Simple_Bibliography

The mulilingual-interface I will try later.. but right now I am stocked with
this and the other listed points :-(

I would be more than happy for any further hint :-)

___
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] value-copy - e.g. in \textreference

2007-08-30 Thread Peter Schorsch
Hi,

during my first tries of context-programming I bounced a couple of times
against a problem I am calling myself my value-copy-border.

E.g. number is a register/variable that helps numbering some paragraphs.
Some of these paragraphs also should be cross-linked. But the pointer gets
always the value, number has at the point of the pointer - and not at the
point of the marked paragraph.

How can I get just the value of a variable? - like currentsection in the
example:


\definenumber[number]

\setuphead[chapter,section,subsection,subsubsection
[after={\resetnumber[number]}]

\def\MyMark[#1]
{\textreference[#1]{Para. \currentheadnumber / \getnumber[number]}}

\definestartstop[MyPara]
  [before=
{\blank[medium]\incrementnumber[number]%
\inothermargin{\getnumber[number]~}},
   after={\blank[medium]}]

\starttext

\section
\startMyPara
blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla
blabla blabla blabla blabla 
\stopMyPara

\subsection
\startMyPara
blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla
blabla blabla blabla blabla 
\stopMyPara

\startMyPara\MyMark[testmark]
blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla blabla
blabla blabla blabla blabla 
\stopMyPara

\section
The Link should be [Abs. 1.1/2] but is \in[testmark] 
%unluckily it is [Abs. 1.1/0]

\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
___


[NTG-context] how to get a commalist out of {}-brackets

2007-08-30 Thread Peter Schorsch
Hi,

I need to forward an embedded commalist to an subfunction. The problem: how
can I get rid of the {}-brackets to access the embedded commalist?

The functions looks like:

\def\function#1[#2]
{\getparameters[label][a=,b=,embedded=,#2]
 subfunction[\labelembedded]
...}

\def\subfunction#1[#2]
{\getparamters[label][a,c,#1]
 \labela% will answer with emptyness
 #2 % returns {a=,c=} ... but I need for the getparamteres a=,c=
...}

to call the function:

\function[a=etwas,b=ddd,embedded={a=nochWas,c=hope}]

___
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] Context replacement for bibitem

2007-08-29 Thread Peter Schorsch
Hi,

first thanks for your help. I got it working at the basic-level. I put it
into a module for the case that other beginner looking for the
bibitem-replacement. But two questions are left before I think, that the
module could be uploaded to the wiki:

- how to make the 12*broad flexible? \currentmoduleparamter{itemspace}*broad
is not working :-(
- how to make that the \item are right-aligned? itemalign=right is also not
working


Here is the module-code followed by an appliance-example:
---the module:

\startmodule[biblist]

\unprotect

%\setupmodule[itemspace=12]

\defineitemgroup[bibliography]
\setupitemgroup[bibliography][levels=1,left={[},right={]},stopper=]
\setupitemgroup[bibliography][1][n,12*broad]
%\setupitemgroup[bibliography][1][n
\currentmoduleparameter{itemspace}*broad]

\def\bibitem[#1]#2{\doifemptyelse{#2}
{\item[#1]}
{\sym{\cap{#2}}\textreference[#1]{\cap{#2

\def\bibref[#1]#2{\doifemptyelse{#2}
{[\in[#1]]}
{[\in[#1], #2]}}

\protect
\stopmodule
\endinput

---how to use:

\usemodule[biblist]

\starttext

\section{hamha}
asdfklsj fk~\bibref[keykeykey]{}

\section{dumdidim}
asdfsaff alfs hfdsj~\bibref[aha]{Abs. 4.1/1}

\subject{Bibliography}

\subsubject{hamha}
\startbibliography
\bibitem[keykeykey]{Der Schlüssel}  erstes
\stopbibliography

\subsubject{dumdidim}
\startbibliography[continue]
\bibitem[aha]{} zweites
\stopbibliography

\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
___


[NTG-context] Context replacement for bibitem

2007-08-28 Thread Peter Schorsch
Hi,

I have done a little with Context but I am still a beginner. As I can read
in the archive of this list, there is no possibility to divide the
bibliography into sections by the generated bibliography. If this
assumption is true, I would like to enter the bibitems into the
normal .tex-file. I was also reading the doc of the context-bib-module but
I couldn't find any context-replacement for \bibitem. 

Headings inside the bibliography are very important for my text and the
advantages of bibitem would simplify my data-entering, so I would be happy
for any hint/help how to realize this in Context.

I don't want to go back to Latex but to declare my problem better: In Latex
a simplified example looks like: 

\begin{document}

\section{hamha}
asdfklsj fk\cite{key-1}

\section{dumdidim}
asdfsaff alfs hfdsj\cite{key-2}

\begin{thebibliography}{1}
\subsection*{hamha}
\bibitem{key-1}erstes
\subsection*{dumdidim}
\bibitem{key-2}zweites
\end{thebibliography}

\end{document}

___
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
___