[NTG-context] Header spoils X(HT)ML export

2011-12-06 Thread Andreas Harder
Hi Hans,

please consider the following example.

\setupbackend[export=yes,xhtml=yes,css=yes]
\setupheadertexts[{\startelement[header] test \stopelement}]

\starttext

\startbuffer
  \startparagraph
\input tufte
  \stopparagraph
  \startparagraph
\input ward
  \stopparagraph
\stopbuffer

\startsection[title=first head]
  \getbuffer
\stopsection

\startsection[title=second head]
  \getbuffer
\stopsection

%% try to comment this section
\startsection[title=third head]
  \getbuffer
\stopsection

\stoptext

The section-title order is now 3, 1, 2 (in the XHTML output). This problem 
appears only if there is a page break. After commenting the last section the 
XHTML output looks like expected. 


Best wishes
Andreas


PS. I’ve encountered another export problem. Perhaps it is because of an not 
intending using of \settaggedmetadata … Here is an example.

\setupbackend[export=yes,xhtml=yes,css=yes]

\startsetups document:start
  \settaggedmetadata[title=\documentvariable{title}]
\stopsetups

\startdocument
  [title=This document title is wrapped in section-tags]

\startsection[title=test]
  \startparagraph
\input tufte
  \stopparagraph
\stopsection

\stopdocument

___
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] Missing break/ while exporting to xml before highlight

2011-11-07 Thread Hans Hagen

On 7-11-2011 08:53, Marco wrote:

Hans Hagenpra...@wxs.nl  writes:


On 6-11-2011 21:38, Marco Pessotto wrote:


Hi!

The highlight seems to act strangely. In addition to the previous
report, I get an unwantedbreak/:

%%% start example
\setupbackend[export=yes]
\definehighlight[emph][style=italic]

\starttext

\section{test}

\emph{Hello} world!

\stoptext
%%% stop example


It has to do with the way grouping interferes with the start of a paragraph

\dontleavehmode \emph ...

I'll make highlights horizontal by default


It works, thanks a bunch. The previous missingbreak/  seems to be
fixed wrapping the paragraph with \startparagraph \stopparagraph. I
assume this is the right thing to do for a proper export, isn't it?


Indeed. On and off I'm trying to make the automatic recognition more 
clever but too much guessing is bad too.



Btw, is there a way to run context just for the xml output (as I'm doing
conditional runs, and I discard the pdf which comes with the xml as a
side effect). context --help doesn't seem to have an option for
that. Well, not so important, just asking.


Currently not. It would also complicate matters as we need to flush some 
information in the pdf backend that is needed in following passes.


Hans

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

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


Re: [NTG-context] highlight problems on xml export (Was: Missing break/ while exporting to xml before highlight)

2011-11-07 Thread Marco Pessotto

I think I'm hitting another bug with highlights:

See this following example:

%%% start example

\setupbackend[export=yes]
\definehighlight[emph][style=italic]

\starttext

\startparagraph

Published on \dontleavehmode\emph{Dissonanze} vol. I

\stopparagraph

\startparagraph

Published on vol. I Published on vol. I Published on vol. I Published on 
\dontleavehmode\emph{Dissonanze} vol. I

\stopparagraph

\stoptext

%%% stop example

Output:



?xml version='1.0' encoding='UTF-8' standalone='yes' ?

!-- input filename   : prova --
!-- processing date  : Mon Nov  7 09:32:00 2011 --
!-- context version  : 2011.11.04 14:15  --
!-- exporter version : 0.30  --


document language=en file=prova date=Mon Nov  7 09:32:00 2011 
context=2011.11.04 14:15 version=0.30 
xmlns:m=http://www.w3.org/1998/Math/MathML;
  paragraphPublished on highlight detail=emphDissonanze/highlight vol. 
I/paragraph
  paragraphPublished on vol. I Published on vol. I Published on vol. I 
Published on highlight detail=emphDissonanze/highlightvol. I/paragraph
/document

As you can see, in the first case the space after Dissonanze is
preserved, while in the second paragraph the space is eaten and there's
no way to add it. The only thing that changes is the lenght of the paragraph.

(Oh, and thanks for the previous reply).

Best wishes

-- 
Marco

___
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] highlight problems on xml export [hacky workaround included]

2011-11-07 Thread Marco Pessotto

Well, after some trial and errors, I think I get what is going on with
the highlight. When on the generated pdf the /highlight is at the edge
of the paper, the space is eaten. Hacky workaround follows:


%% start example
\setupbackend[export=yes]
\definehighlight[emph][style=italic]

\startmode[huge]
\definepapersize[huge][width=4000mm]
\setuppapersize[huge][huge]
\setupbodyfont[8pt]
\stopmode

\starttext

\startparagraph

Published on \dontleavehmode\emph{Dissonanze} vol. I

\stopparagraph

\startparagraph

Published on vol. I Published on vol. I Published on vol. I Published on 
\dontleavehmode\emph{Dissonanze} vol. I

\stopparagraph

\startparagraph

Published on vol. I Published on vol. I Published on vol. I Published on 
blablabla \dontleavehmode\emph{Dissonanze} vol. I

\stopparagraph

\stoptext
%%% stop example

Compiled with context prova.tex, the space is eaten on the second
paragraph. See produced pdf.

?xml version='1.0' encoding='UTF-8' standalone='yes' ?

!-- input filename   : prova --
!-- processing date  : Mon Nov  7 17:43:10 2011 --
!-- context version  : 2011.11.04 14:15  --
!-- exporter version : 0.30  --


document language=en file=prova date=Mon Nov  7 17:43:10 2011 
context=2011.11.04 14:15 version=0.30 
xmlns:m=http://www.w3.org/1998/Math/MathML;
  paragraphPublished on highlight detail=emphDissonanze/highlight vol. 
I/paragraph
  paragraphPublished on vol. I Published on vol. I Published on vol. I 
Published on highlight detail=emphDissonanze/highlightvol. I/paragraph
  paragraphPublished on vol. I Published on vol. I Published on vol. I 
Published on blablabla
highlight detail=emphDissonanze/highlight vol. I/paragraph
/document

With `context --mode=huge prova.tex` everything is fine (As the paper is
4 meters long on 8pt!)

?xml version='1.0' encoding='UTF-8' standalone='yes' ?

!-- input filename   : prova --
!-- processing date  : Mon Nov  7 17:44:02 2011 --
!-- context version  : 2011.11.04 14:15  --
!-- exporter version : 0.30  --


document language=en file=prova date=Mon Nov  7 17:44:02 2011 
context=2011.11.04 14:15 version=0.30 
xmlns:m=http://www.w3.org/1998/Math/MathML;
  paragraphPublished on highlight detail=emphDissonanze/highlight vol. 
I/paragraph
  paragraphPublished on vol. I Published on vol. I Published on vol. I 
Published on highlight detail=emphDissonanze/highlight vol. I/paragraph
  paragraphPublished on vol. I Published on vol. I Published on vol. I 
Published on blablabla highlight detail=emphDissonanze/highlight vol. 
I/paragraph
/document

So, my impression is that for exporting the modal compilation is not an
option. Is there a way to set the paper width to infinity? (Even if,
speaking about impression, I believe the 4 meters are enough for
the average usage).

Best wishes

-- 
Marco

___
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] Missing break/ while exporting to xml before highlight

2011-11-06 Thread Marco
Hans Hagen pra...@wxs.nl writes:

 On 6-11-2011 21:38, Marco Pessotto wrote:

 Hi!

 The highlight seems to act strangely. In addition to the previous
 report, I get an unwantedbreak/:

 %%% start example
 \setupbackend[export=yes]
 \definehighlight[emph][style=italic]

 \starttext

 \section{test}

 \emph{Hello} world!

 \stoptext
 %%% stop example

 It has to do with the way grouping interferes with the start of a paragraph

 \dontleavehmode \emph ...

 I'll make highlights horizontal by default

It works, thanks a bunch. The previous missing break/ seems to be
fixed wrapping the paragraph with \startparagraph \stopparagraph. I
assume this is the right thing to do for a proper export, isn't it?

Btw, is there a way to run context just for the xml output (as I'm doing
conditional runs, and I discard the pdf which comes with the xml as a
side effect). context --help doesn't seem to have an option for
that. Well, not so important, just asking.

Thanks again

Best wishes

-- 
Marco
___
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] Automatically add \stopXX when a new \startXX of same type occurs

2011-10-07 Thread Charles

Hi,

I am using the \startsection (\startparagraph ...) to structure my 
document and export it to XML. But for all the environments, for each 
\startsection I have to put a \stopsection even if I start a new section 
right after.


Is it be possible to automatically stop the previous section when a new 
one is started in the XML output?


Thanks

Charles
___
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] Automatically add \stopXX when a new \startXX of same type occurs

2011-10-07 Thread Hans Hagen

On 7-10-2011 18:24, Charles wrote:

Hi,

I am using the \startsection (\startparagraph ...) to structure my
document and export it to XML. But for all the environments, for each
\startsection I have to put a \stopsection even if I start a new section
right after.

Is it be possible to automatically stop the previous section when a new
one is started in the XML output?


\chapter does something like that behind the screens but using 
\startchapter without \stop's is a real bad idea in the perspective of 
structure (and unless you have thousands of sections and hardly any text 
not saving much typing either)


Hans


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

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


Re: [NTG-context] Automatically add \stopXX when a new \startXX of same type occurs

2011-10-07 Thread Mojca Miklavec
On Fri, Oct 7, 2011 at 18:24, Charles wrote:
 Hi,

 I am using the \startsection (\startparagraph ...) to structure my document
 and export it to XML. But for all the environments, for each \startsection I
 have to put a \stopsection even if I start a new section right after.

Configure your text editor.

In TextMate for example there are two ways to easily accomplish that:
1.) type env-[tab]-type paragraph (and both start and stop
clauses are completed)
2.) after you are done with typing, press alt-apple-. which closes the
last open \startwhatever

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


Re: [NTG-context] Automatically add \stopXX when a new \startXX of same type occurs

2011-10-07 Thread Steffen Wolfrum

Am 07.10.2011 um 20:24 schrieb Mojca Miklavec:

 On Fri, Oct 7, 2011 at 18:24, Charles wrote:
 Hi,
 
 I am using the \startsection (\startparagraph ...) to structure my document
 and export it to XML. But for all the environments, for each \startsection I
 have to put a \stopsection even if I start a new section right after.
 
 Configure your text editor.
 
 In TextMate for example there are two ways to easily accomplish that:
 1.) type env-[tab]-type paragraph (and both start and stop
 clauses are completed)
 2.) after you are done with typing, press alt-apple-. which closes the
 last open \startwhatever


In TexShop we have something similar: Close Current Environment. Works for 
MkIV, too.
(by request adapted for ConTeXt users ;o)

Steffen
___
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] markdown

2011-07-21 Thread Wolfgang Schuster

Am 20.07.2011 um 14:24 schrieb Hans Hagen:

 On 19-7-2011 7:25, Wolfgang Schuster wrote:
 
 Can you then also add a few features:
 
 - Headings use \startstructurelevel
 - Paragraphs are enclosed in startparagraph/stopparagraph
 - emphasis and bold styles use \definehiglight command
 
 to make it possible to change the layout of markdown documents
 where ConTeXt is only used to produce a PDF.
 
 I uploaded a beta with a markdown module. Not being a user myself I leave it 
 to others to provide documentation and examples.
 
 \starttext
\startmarkdown
% some examples needed
\stopmarkdown
 \stoptext


m-markdown.mkiv

\definedelimitedtext
  [markdownblockquote]
- [markdownquotation]
+ [quotation] % blockquote

How about a parameter to change the output of the rule:

%\unexpanded\def\markdownrule
%  {\hairline\par}

\unexpanded\def\markdownrule
  {\markdownparameter\c!rule}

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] markdown

2011-07-20 Thread Hans Hagen

On 19-7-2011 7:25, Wolfgang Schuster wrote:


Can you then also add a few features:

- Headings use \startstructurelevel
- Paragraphs are enclosed in startparagraph/stopparagraph
- emphasis and bold styles use \definehiglight command

to make it possible to change the layout of markdown documents
where ConTeXt is only used to produce a PDF.


I uploaded a beta with a markdown module. Not being a user myself I 
leave it to others to provide documentation and examples.


\starttext
\startmarkdown
% some examples needed
\stopmarkdown
\stoptext

The code is derived from luamark (but a few 100% faster so I might have 
messed up). And of course, being the markdown evangelist, John will 
answer all questions.


Hans

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

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


Re: [NTG-context] markdown

2011-07-19 Thread Wolfgang Schuster

Am 19.07.2011 um 19:14 schrieb Hans Hagen:

 On 19-7-2011 7:08, Khaled Hosny wrote:
 On Tue, Jul 19, 2011 at 04:05:13PM +0200, Hans Hagen wrote:
 Hi Khaled,
 
 I took a look at the lunamark code, and ran it on some (copied)
 sample. As it was much slower than I'd expected from lpeg I messed
 around a little and could bring down the runtime on the sample from
 2 sec to 0.1 sec. Anyhow, there is room for improvement so I wonder
 If I should take the code, wrap it up a bit, and make a module so
 that we can directly process markdown in context. (Of course we then
 need to keep an eye on how the original develops, if mkdown develops
 at all.)
 
 That would be great! That was my intent when I started hacking lunamrk
 to include a ConTeXt writer, by due to lack of time I never managed to
 do the ConTeXt module part.
 
 Ok, I'll give it a try and you can do the checking.

Can you then also add a few features:

- Headings use \startstructurelevel
- Paragraphs are enclosed in startparagraph/stopparagraph
- emphasis and bold styles use \definehiglight command

to make it possible to change the layout of markdown documents
where ConTeXt is only used to produce a PDF.

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] 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] 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] dejavu math fallback?

2011-06-15 Thread Reviczky, Adam
Hi

Using math with dejavu as the bodyfont produces:
! Math error: parameter \Umathquad\displaystyle is not set.

minimal example:
---
\setupbodyfont[dejavu]
\starttext
$e = mc^2$
\stoptext
---

Installing the xits-math (https://github.com/khaledhosny/xits-math/) solves the 
problem.
Shouldn't there be a fallback to lmmath or similar?

Log using context without xits-math attached.

Adam
context export-example.tex

mtx-context | run 1: luatex --fmt=/home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en --lua=/home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.lui --backend=pdf ./export-example.tex
This is LuaTeX, Version beta-0.71.0-2011061600 (rev 4301) 
 \write18 enabled.
(export-example.tex

ConTeXt  ver: 2011.06.16 00:34 MKIV  fmt: 2011.6.16  int: english/english

system   cont-new.mkiv loaded
(/usr/share/texmf/tex/context/base/cont-new.mkiv
system   beware: some patches loaded from cont-new.mkiv
)
system   export-example.top loaded
(export-example.top)
fontslatin modern fonts are not preloaded
languageslanguage en is active
backend  export  enabling export to xml
(/usr/share/texmf/tex/context/base/type-siz.mkiv) (/usr/share/texmf/tex/context/base/type-otf.mkiv){/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}{/usr/share/texmf/fonts/map/pdftex/context/mkiv-base.map}
fontsdefining  forced type otf of xits-math not found
fontsdefining  font with asked name 'xits-math' is not found using lookup 'file'
fontsdefining  unknown font xits-math, loading aborted
fontsdefining  unable to define xits-math.otf as \*dejavu7ptmmmr33*
fontsdefining  forced type otf of xits-math not found
fontsdefining  font with asked name 'xits-math' is not found using lookup 'file'
fontsdefining  unknown font xits-math, loading aborted
fontsdefining  unable to define xits-math.otf as \*dejavu9ptmmmr22*
fontsdefining  forced type otf of xits-math not found
fontsdefining  font with asked name 'xits-math' is not found using lookup 'file'
fontsdefining  unknown font xits-math, loading aborted
fontsdefining  unable to define xits-math.otf as \*dejavu12ptmmmr11*
system   begin file export-example.tex at line 16
structuresectioning  chapter @ level 2 : 0.1 - Example
verbatimsfile export.tex does not exist
(/usr/share/texmf/tex/context/sample/zapf.tex)
floatblocks  1 placed
(/usr/share/texmf/tex/context/sample/zapf.tex) (/usr/share/texmf/tex/context/sample/tufte.tex)
Overfull \hbox (1.0876pt too wide) in paragraph at lines 1--34
\*dejavu12ptrmtf* every­day ca­pac­ity to se­lect, edit, sin­gle out, struc­ture, high­light, group,

Overfull \hbox (2.30989pt too wide) in paragraph at lines 1--34
\*dejavu12ptrmtf* hole, pick over, sort, in­te­grate, blend, in­spect, fil­ter, lump, skip, smooth,

Overfull \hbox (0.86143pt too wide) in paragraph at lines 1--34
\*dejavu12ptrmtf* item­ize, re­view, dip into, flip through, browse, glance into, leaf through,
backend  xmp  using file '/usr/share/texmf/tex/context/base/lpdf-pdx.xml'
 /usr/share/texmf/tex/context/sample/hacker.jpg
pagesflushing realpage 1, userpage 1, subpage 1
floatblocks  2 placed
(/usr/share/texmf/tex/context/sample/tufte.tex)
Overfull \hbox (1.0876pt too wide) in paragraph at lines 1--40
\*dejavu12ptrmtf* every­day ca­pac­ity to se­lect, edit, sin­gle out, struc­ture, high­light, group,

Overfull \hbox (2.30989pt too wide) in paragraph at lines 1--40
\*dejavu12ptrmtf* hole, pick over, sort, in­te­grate, blend, in­spect, fil­ter, lump, skip, smooth,

Overfull \hbox (0.86143pt too wide) in paragraph at lines 1--40
\*dejavu12ptrmtf* item­ize, re­view, dip into, flip through, browse, glance into, leaf through,
(/usr/share/texmf/tex/context/sample/zapf.tex) /usr/share/texmf/tex/context/sample/cow.pdf
pagesflushing realpage 2, userpage 2
(/usr/share/texmf/tex/context/sample/ward.tex) (/usr/share/texmf/tex/context/sample/tufte.tex)
Overfull \hbox (2.0251pt too wide) in paragraph at lines 56--56
 \*dejavu12ptrmtf* av­er­age, ap­prox­i­mate, clus­ter, ag­gre­gate, out­line, sum­

Overfull \hbox (9.8708pt too wide) in paragraph at lines 56--56
 \*dejavu12ptrmtf* glance into, leaf through, skim, re­fine, enu­mer­ate, glean,
(/usr/share/texmf/tex/context/sample/knuth.tex
pagesflushing realpage 3, userpage 3
)
! Math error: parameter \Umathquad\displaystyle is not set.

system   tex  error on line 62 in file export-example.tex: Math error: parameter \Umathquad\displaystyle is not set ...

52 \startparagraph \input zapf (Zapf) \stopparagraph
53 
54 \startdescription {Ward} \input ward \stopdescription
55 
56 \startdescription

[NTG-context] Forming paragraphs

2011-01-23 Thread Procházka Lukáš

Hello,

I would need to form paragraphs to such a shape:

Abc defhi jklm nop qrst uvw
  xyz. ABCDE FGHIJKL MNOPQR
  STUW XYZ.

Abc defhi jklm nop qrst uvw
  xyz. ABCDE FGHIJKL MNOPQR
  STUW XYZ.

Abc defhi jklm nop qrst uvw
  xyz. ABCDE FGHIJKL MNOPQR
  STUW XYZ.

-- \textwidth --|

I.e. paragraphs whose first lines are always \textwidth in width and whose next 
lines are always somehow indented.

I achieved the desired shape by the following combination of \setupnarrower and 
\setupindenting:

---
\starttext
  \setupnarrower[left=2em]
  \startnarrower[1*left,0*right]
\setupindenting[yes,-2em]
\input knuth
  \stopnarrower
\stoptext
---

But I would like to ask whether this way is clean enough and/or there is a better 
way, especially via a kind of \setupsomething command, e.g. something like:

\setupparagraph[MySpecialParagraph][first=0pt,next=2em]
...
\startparagraph[MySpecialParagraph]
  Abc defhi jklm nop qrst uvw xyz. ABCDE FGHIJKL MNOPQR STUW XYZ.
\stopparagraph

% or:

\startMySpecialParagraph
  Abc defhi jklm nop qrst uvw xyz. ABCDE FGHIJKL MNOPQR STUW XYZ.
\stopMySpecialParagraph

Kind regards,

Lukas

t-Para.mkiv
Description: Binary data


t-Para.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
___


Re: [NTG-context] Forming paragraphs

2011-01-23 Thread Stefan Müller

Hi,

did you already take a look at this?
http://wiki.contextgarden.net/Shaped_paragraphs

HTH,
Stefan.

On 23.01.2011 13:38, Procházka Lukáš wrote:

Hello,

I would need to form paragraphs to such a shape:

Abc defhi jklm nop qrst uvw
xyz. ABCDE FGHIJKL MNOPQR
STUW XYZ.

Abc defhi jklm nop qrst uvw
xyz. ABCDE FGHIJKL MNOPQR
STUW XYZ.

Abc defhi jklm nop qrst uvw
xyz. ABCDE FGHIJKL MNOPQR
STUW XYZ.

-- \textwidth --|

I.e. paragraphs whose first lines are always \textwidth in width and
whose next lines are always somehow indented.

I achieved the desired shape by the following combination of
\setupnarrower and \setupindenting:

---
\starttext
\setupnarrower[left=2em]
\startnarrower[1*left,0*right]
\setupindenting[yes,-2em]
\input knuth
\stopnarrower
\stoptext
---

But I would like to ask whether this way is clean enough and/or there
is a better way, especially via a kind of \setupsomething command,
e.g. something like:

\setupparagraph[MySpecialParagraph][first=0pt,next=2em]
...
\startparagraph[MySpecialParagraph]
Abc defhi jklm nop qrst uvw xyz. ABCDE FGHIJKL MNOPQR STUW XYZ.
\stopparagraph

% or:

\startMySpecialParagraph
Abc defhi jklm nop qrst uvw xyz. ABCDE FGHIJKL MNOPQR STUW XYZ.
\stopMySpecialParagraph

Kind regards,

Lukas



___
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] Forming paragraphs

2011-01-23 Thread Procházka Lukáš

Hello,

thanks for the link, this seems to do the job.

Lukas


On Sun, 23 Jan 2011 14:35:24 +0100, Stefan Müller warrence@gmx.de wrote:


Hi,

did you already take a look at this?
http://wiki.contextgarden.net/Shaped_paragraphs

HTH,
Stefan.

On 23.01.2011 13:38, Procházka Lukáš wrote:

Hello,

I would need to form paragraphs to such a shape:

Abc defhi jklm nop qrst uvw
xyz. ABCDE FGHIJKL MNOPQR
STUW XYZ.

Abc defhi jklm nop qrst uvw
xyz. ABCDE FGHIJKL MNOPQR
STUW XYZ.

Abc defhi jklm nop qrst uvw
xyz. ABCDE FGHIJKL MNOPQR
STUW XYZ.

-- \textwidth --|

I.e. paragraphs whose first lines are always \textwidth in width and
whose next lines are always somehow indented.

I achieved the desired shape by the following combination of
\setupnarrower and \setupindenting:

---
\starttext
\setupnarrower[left=2em]
\startnarrower[1*left,0*right]
\setupindenting[yes,-2em]
\input knuth
\stopnarrower
\stoptext
---

But I would like to ask whether this way is clean enough and/or there
is a better way, especially via a kind of \setupsomething command,
e.g. something like:

\setupparagraph[MySpecialParagraph][first=0pt,next=2em]
...
\startparagraph[MySpecialParagraph]
Abc defhi jklm nop qrst uvw xyz. ABCDE FGHIJKL MNOPQR STUW XYZ.
\stopparagraph

% or:

\startMySpecialParagraph
Abc defhi jklm nop qrst uvw xyz. ABCDE FGHIJKL MNOPQR STUW XYZ.
\stopMySpecialParagraph

Kind regards,

Lukas



___
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] Fwd: Re: xml-processing: missing or ungrouped '='

2011-01-09 Thread Achim Jander

Hi Thomas,
sorry, I dont want to bother you. But in fact that is not what I'm 
looking for. Maybe its my fault that I mixed a - as I thougt - related 
problem in my second mail.
What I try to do is reduce redundancy. I cannot see where my 
explanations differ. In fact, I started with something like your 
example. But from a redundancy point of view

thats a mess so I tried to improve it. I came to something like

\startxmlsetups xml:chapter
  \startchapter[
 title={\xmlatt{#1}{title}},
 number=\xmldoifelse{#1}{./attribute('num')}{yes}{no},
 ownnumber=\xmldoifelse{#1}{./attribute('num')}{\xmlatt{#1}{num}}{}
  ]
\xmlflush{#1}
  \stopchapter
\stopxmlsetups

which works fine and at least in my eyes has a clearer structure, but 
still some redundancy. Now is the point where I think the 
misunderstandings started, because now I tried two different approaches to
decrease redundancy: First step i tried to simplyfy *this* setup and 
came to something like


\startxmlsetups xml:chapter
  \startchapter[
 title={\xmlatt{#1}{title}},
 
\xmldoifelse{#1}{./attribute('num')}{ownnumber=\xmlatt{#1}{num}}{number=no},

  ]
\xmlflush{#1}
  \stopchapter
\stopxmlsetups

which would nicely eliminate every redundance but doesn't work and 
complains about the mystery missing or ungrouped '='
The other attempt was - though i have not only to deal with chapters but 
up to about 15 hierarchies, all structured in a similar way,

so I tried to delegate the processing like

\startxmlsetups xml:fillTitleAtts
 title={\xmlatt{#1}{title}},
 number=\xmldoifelse{#1}{./attribute('num')}{yes}{no},
 ownnumber=\xmldoifelse{#1}{./attribute('num')}{\xmlatt{#1}{num}}{}
\stopxmlsetups

\startxmlsetups xml:chapter
  \startchapter[
 \xmlcommand{#1}{.}{xml:fillTitleAtts}
  ]
\xmlflush{#1}
  \stopchapter
\stopxmlsetups

which would be nicely reusable but that attempt failed whith the same 
error message - thus I thought they are related.
I have to mention, that I try not to process one file but to write 
setups for a bunch of similar but slightly different books (we're doing 
about 1000 books per year),
so my setups have to be clearly structured and easyly adaptable to 
different needs.


I dunno if that can clear up things, if not, I think its not worth much 
more discussion.


Thanks,
Achim


Am 08.01.2011 18:00, schrieb Thomas A. Schmitz:

On Jan 8, 2011, at 3:23 PM, Achim Jander wrote:


Hi Thomas,
yes, of course you are right, but thats not making the problems. Its switched in while 
making a minimal example.
My problem or maxbe misunderstanding ist what I try to achieve with

Sorry, but I still don't have the faintest idea what it is you want to do. Your 
minimal example doesn't show it, and your explanations differ from one message 
to the next.

In one of your mails, you said this:


If the title comes with an number-element  I want to set ownnumber=..., but if 
they have no numbers, I want to set number=no

If this is what you're looking for, here's what I would suggest:

\startbuffer[test]
a
  chapter title=some text
bmore text/b
bmore text/b
  /chapter
  chapter num=333 title=more text
bmore text/b
bmore text/b
  /chapter
/a
\stopbuffer

\startxmlsetups xml:testsetups
   \xmlsetsetup{\xmldocument}{a|b|chapter}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
   \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:b
   \startparagraph
   \xmlflush{#1}
   \stopparagraph
\stopxmlsetups

\startxmlsetups xml:chapter
  \doifelse {\xmlatt{#1}{num}} {}
  {\setuphead[chapter][number=no]
   \startchapter[title={\xmlatt{#1}{title}}]
 \xmlflush{#1}
   \stopchapter}
  {\setuphead[chapter][number=yes]
   \setupheadnumber[chapter][\xmlatt{#1}{num}]
   \startchapter[title={\xmlatt{#1}{title}}]
 \xmlflush{#1}
   \stopchapter}
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

It's trivial to change the test from an attribute to anum  element, but 
maybe that's not what you're looking for...

Thomas
___
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] Fwd: Re: xml-processing: missing or ungrouped '='

2011-01-08 Thread Achim Jander

Hi Hans,
sorry, i'll try to make it more clear:

\startbuffer[test]
a
titlesome text/title
bmore text /b
bmore text /b
titlenum333/numsome text/title
bmore text /b
bmore text /b
/a
\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{\xmldocument}{a|b|title}{xml:*}
\xmlsetsetup{\xmldocument}{num}{-}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:b
\startparagraph
\xmlflush{#1}
\stopparagraph
\stopxmlsetups

\startxmlsetups xml:ueberForceFlush
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:getOwnNumber
\xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{}
\stopxmlsetups

\startxmlsetups xml:title
\startchapter[
%\xmldoifelse{#1}{/num}{ownnumber=\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{number=no}
title={Testcase}
]
\xmlflush{#1}
\stopchapter
\stopxmlsetups

\setupheader[chapter][ownnumber=yes]

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

The relevant part is the line I've commented out because of the error.
In the setup xml:title I start the chapter. If the title comes with an 
number-element  I want to set ownnumber=..., but if they have no 
numbers, I want to set number=no
But this approach seems not to work. In my real application the problem 
is, that I have a more complex setting of defining the title=, 
ownnumber= etc attributes, but equal in different
(up to 15) hierarchies. So I tried to call inside the one setup another 
setup which should do the work, but also without success (this was my 
original example).

The plan was to call that setup from each hierarchy to avoid redundancy
It was like

\startxmlsetups xml:title
\startchapter[
%--- here call another template to set title= ownnumber= etc.
]
\xmlflush{#1}
\stopchapter
\stopxmlsetups

Here again the complete example:

\startbuffer[test]
a
titlesome text/title
bmore text /b
bmore text /b
titlenum333/numsome text/title
bmore text /b
bmore text /b
/a
\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{\xmldocument}{a|b|title}{xml:*}
\xmlsetsetup{\xmldocument}{num}{-}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:b
\startparagraph
\xmlflush{#1}
\stopparagraph
\stopxmlsetups

\startxmlsetups xml:ueberForceFlush
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:splitHeader %works not
number=\xmldoifelse{#1}{/num}{yes}{no},
ownnumber=\xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{}, 


title={\xmlflush{#1}},
\stopxmlsetups


\startxmlsetups xml:title
\startchapter[

%trying to call another template to set
%title=
%ownnumber=
%and other stuff...
\xmlcommand{#1}{.}{xml:splitHeader}


%number=\xmldoifelse{#1}{/num}{yes}{no}, %works
%ownnumber=\xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{},%works 


%title={\xmlflush{#1}},%works
]
\xmlflush{#1}
\stopchapter
\stopxmlsetups

\setupheader[chapter][ownnumber=yes]

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext


Thanks you and have a nice Weekend
Achim


Am 08.01.2011 12:15, schrieb Hans Hagen:

On 8-1-2011 11:20, Achim Jander wrote:


Am 07.01.2011 22:52, schrieb Hans Hagen:

On 7-1-2011 7:04, Achim Jander wrote:


\startxmlsetups xml:title
\startchapter[
\xmlcommand{#1}{.}{xml:splitHeader}


title=...

Thanks.
So it seems not to be possible, to have the whatever= part inside an
xmlcommand?
I even tried things like

\xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{ownnumber=123}}{number=no}

to set either ownnumber or number but with the same error


the \xmlcommand is completely unrelated to (say) \startchapter

\xmlcommand{node number}{lpath expression}{setup id}

so i have no clue what you want to do with it, unless ownnumber=123 is 
the name of a setup


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-



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

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


Re: [NTG-context] Fwd: Re: xml-processing: missing or ungrouped '='

2011-01-08 Thread Thomas A. Schmitz

On Jan 8, 2011, at 3:23 PM, Achim Jander wrote:

 Hi Thomas,
 yes, of course you are right, but thats not making the problems. Its switched 
 in while making a minimal example.
 My problem or maxbe misunderstanding ist what I try to achieve with

Sorry, but I still don't have the faintest idea what it is you want to do. Your 
minimal example doesn't show it, and your explanations differ from one message 
to the next. 

In one of your mails, you said this:

 If the title comes with an number-element  I want to set ownnumber=..., but 
 if they have no numbers, I want to set number=no

If this is what you're looking for, here's what I would suggest:

\startbuffer[test]
a
 chapter title=some text
   bmore text /b
   bmore text /b
 /chapter
 chapter num=333 title=more text
   bmore text /b
   bmore text /b
 /chapter
/a
\stopbuffer

\startxmlsetups xml:testsetups
  \xmlsetsetup{\xmldocument}{a|b|chapter}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:b
  \startparagraph
  \xmlflush{#1}
  \stopparagraph
\stopxmlsetups

\startxmlsetups xml:chapter
 \doifelse {\xmlatt{#1}{num}} {}
 {\setuphead[chapter][number=no]
  \startchapter[title={\xmlatt{#1}{title}}]
\xmlflush{#1}
  \stopchapter}
 {\setuphead[chapter][number=yes]
  \setupheadnumber[chapter][\xmlatt{#1}{num}]
  \startchapter[title={\xmlatt{#1}{title}}] 
\xmlflush{#1}
  \stopchapter}
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext

It's trivial to change the test from an attribute to a num element, but 
maybe that's not what you're looking for...

Thomas
___
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] xml-processing: missing or ungrouped '='

2011-01-07 Thread Achim Jander

Hi all
a problem with processing XML data (maybe a lack of knowledge). If in 
the example below I set the chapter-attributes directly in 
\startxmlsetups xml:title (commented out)
everything is like I expected. Because I have headings to be treated 
equally in multiple hierarchies I tried to delegate the processing to 
splitHeader.
But then the processing always complains about a missing or ungrouped 
'=' in line ... (activated in the examle given).


\startbuffer[test]
a
titlesome text/title
bmore text /b
bmore text /b
titlenum333/numsome text/title
bmore text /b
bmore text /b
/a
\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{\xmldocument}{a|b|title}{xml:*}
\xmlsetsetup{\xmldocument}{num}{-}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
\xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:b
\startparagraph
\xmlflush{#1}
\stopparagraph
\stopxmlsetups

\startxmlsetups xml:ueberForceFlush
  \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:splitHeader %works not
number=\xmldoifelse{#1}{/num}{yes}{no},
ownnumber=\xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{},
title={\xmlflush{#1}},
\stopxmlsetups


\startxmlsetups xml:title
\startchapter[
\xmlcommand{#1}{.}{xml:splitHeader}
%number=\xmldoifelse{#1}{/num}{yes}{no}, %works
%ownnumber=\xmldoifelse{#1}{/num}{\xmlcommand{#1}{/num}{xml:ueberForceFlush}}{},%works
%title={\xmlflush{#1}},%works
]
\xmlflush{#1}
\stopchapter
\stopxmlsetups

\setupheader[chapter][ownnumber=yes]

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext



Thanks,
Achim
___
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] export and pagebreak

2011-01-02 Thread Hans Hagen

On 31-12-2010 7:22, Achim Jander wrote:

Hi all,
first I wish a very happy new year to everybody! I think, this will be
my last post for this year, but as i have tasted blood, the next year I
will post a lot of further questions I think :-)
Now I have Christmas holidays and can play the whole day with ConTeXt. I
tested a little the export function. There is one thing I have on my
wishlist:
is it possible to get a pagebreak/ into the exported XML? The
background is that I have often the requirement to include
pagebreak-info in online-productions (for citation reasons) and that
could be a very good starting point. In fact, in the moment at the
position where a pagebreak occurs, the space (if it occurs at a space)
is eaten up. Minimal example:
\setupbackend [export=yes]

\starttext

\startchapter [title=Tufte Example]

\startparagraph
\dorecurse{10}{\input tufte}
\stopparagraph

\stopchapter

\stoptext

At the break of pg 2 to pg 3 you will find lump,skip (without the space)
in the exported file. Having the pagebreaks would be a great thing for me.


I'll send you a small patch to play with.

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

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


[NTG-context] export and pagebreak

2010-12-31 Thread Achim Jander

Hi all,
first I wish a very happy new year to everybody! I think, this will be 
my last post for this year, but as i have tasted blood, the next year I 
will post a lot of further questions I think :-)
Now I have Christmas holidays and can play the whole day with ConTeXt. I 
tested a little the export function. There is one thing I have on my 
wishlist:
is it possible to get a pagebreak/ into the exported XML? The 
background is that I have often the requirement to include 
pagebreak-info in online-productions (for citation reasons) and that 
could be a very good starting point. In fact, in the moment at the 
position where a pagebreak occurs, the space (if it occurs at a space) 
is eaten up. Minimal example:

\setupbackend [export=yes]

\starttext

\startchapter [title=Tufte Example]

\startparagraph
\dorecurse{10}{\input tufte}
\stopparagraph

\stopchapter

\stoptext

At the break of pg 2 to pg 3 you will find lump,skip (without the space) 
in the exported file. Having the pagebreaks would be a great thing for me.


Greetings
Achim
___
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] Lettrines in MkIV

2010-09-23 Thread Philipp Gesang
On 2010-09-21 21:47:35, Hans Hagen wrote:
 On 21-9-2010 8:39, Philipp Gesang wrote:
 
 * Can be circumvented via “\dontleavehmode”.

 Alan ran into this at the ctx conference and it is under investigation.

Hi,

in case this helps with debugging: you can’t work around the
issue by means of “\dontleavehmode” if you set up the paragraph 
auto-indentation to “yes,medium”:

8···
\setupindenting[yes,medium] % comment this out and it works again
\usemodule[lettrine]
\starttext

\chapter{Some Section}
\startparagraph
\dontleavehmode\lettrine{D}{on Knuth asserts:}
\input knuth
\stopparagraph

\stoptext
8···

This results, again, in the glue node error.

Philipp


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


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

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


Re: [NTG-context] Lettrines in MkIV

2010-09-23 Thread Hans Hagen

On 23-9-2010 2:32, Philipp Gesang wrote:

On 2010-09-2121:47:35, Hans Hagen wrote:

On 21-9-2010 8:39, Philipp Gesang wrote:


* Can be circumvented via “\dontleavehmode”.



Alan ran into this at the ctx conference and it is under investigation.


Hi,

in case this helps with debugging: you can’t work around the
issue by means of “\dontleavehmode” if you set up the paragraph
auto-indentation to “yes,medium”:

8···
\setupindenting[yes,medium] % comment this out and it works again
\usemodule[lettrine]
\starttext

\chapter{Some Section}
\startparagraph
\dontleavehmode\lettrine{D}{on Knuth asserts:}
\input knuth
\stopparagraph

\stoptext
8···

This results, again, in the glue node error.


we know and we will take a look at it next week (as it takes some time 
to nail down node allocation bugs)


Hans

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

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


Re: [NTG-context] export

2010-09-22 Thread Alan BRASLAU
Minimal example (given at the workshop):

\setupbackend [export=yes]

\starttext

\startchapter [title=First chapter]

\startparagraph
\input ward
\stopparagraph

\stopchapter

\stoptext


On Wednesday 22 September 2010 14:18:18 Otared Kavian wrote:
 On 22 sept. 2010, at 14:06, Yury G. Kudryashov wrote:
  […]
  
  Try \setupbackends.
 
 Thanks Yuri for your attention, but this suggestion doesn't work: I get
 
   error on line 3 in file test-export.tex: Undefined control sequence ...
   
\setupbackends[export=yes]
 
 Best regards: OK
 ___
  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
 ___
 

-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS URA 2464
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.bras...@cea.fr

http://www-dna2009.cea.fr/

 .''`.
: :'  :
`. `'`
  `-
___
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] export

2010-09-22 Thread Andreas Harder

Am 22.09.2010 um 14:25 schrieb Alan BRASLAU:

 \setupbackend [export=yes]
 
 \starttext
 
 \startchapter [title=First chapter]
 
 \startparagraph
   \input ward
 \stopparagraph
 
 \stopchapter
 
 \stoptext

Results in Undefined control sequence. \setupbackend (newest beta; OS X) …

Greeting
Andreas
___
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] export

2010-09-22 Thread Alan BRASLAU
On Wednesday 22 September 2010 14:29:08 Andreas Harder wrote:
 Am 22.09.2010 um 14:25 schrieb Alan BRASLAU:
  \setupbackend [export=yes]
  
  \starttext
  
  \startchapter [title=First chapter]
  
  \startparagraph
  
  \input ward
  
  \stopparagraph
  
  \stopchapter
  
  \stoptext
 
 Results in Undefined control sequence. \setupbackend (newest beta; OS X)
 …
 
 Greeting
   Andreas

Works here - latest beta - linux x86_64
(see attached)

Alan


xml.export
Description: XML document
\setupbackend [export=yes]

\starttext

\startchapter [title=First chapter]

\startparagraph
	\input ward
\stopparagraph

\stopchapter

\startchapter [title=Second chapter]

\startparagraph
	\input tufte
\stopparagraph

\stopchapter

\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] setup for (start)paragraph?

2010-08-11 Thread Steffen Wolfrum
Hi,

there seems to be a confusion in contextgarden (at least *I* am confused):

Isn't there also a setup for \startparagraph ... \stopparagraph???

\defineparagraphs is something different, no?


See
http://wiki.contextgarden.net/Reference/en/startparagraph

Reference/en/startparagraph
\startparagraph

[edit]Syntax

\startparagraph ... \stopparagraph
[edit]Description

[edit]Example

% Source: ConText Manual ms-cb-en.pdf

% Define a paragraph environment with 3 columns. 
% Insert a blank line just before and just after the paragraph. 
\defineparagraphs[mypar][n=3,before={\blank},after={\blank}]
 


Steffen
___
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] setup for (start)paragraph?

2010-08-11 Thread Wolfgang Schuster

 Am 11.08.10 21:20, schrieb Steffen Wolfrum:

Hi,

there seems to be a confusion in contextgarden (at least *I* am confused):

Isn't there also a setup for \startparagraph ... \stopparagraph???


This should be \startPARAGRAPH ... \stopPARAGRAPH where PARAGRAPH stands
for the name of the environment you create with \defineparagraphs.

In MkIV there is also a real paragraph environment (\startparagraph ... 
\stopparagraph)

which is usefull for tagged pdf.

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] setup for (start)paragraph?

2010-08-11 Thread Steffen Wolfrum

Am 11.08.2010 um 21:28 schrieb Wolfgang Schuster:

 Am 11.08.10 21:20, schrieb Steffen Wolfrum:
 Hi,
 
 there seems to be a confusion in contextgarden (at least *I* am confused):
 
 Isn't there also a setup for \startparagraph ... \stopparagraph???
 
 This should be \startPARAGRAPH ... \stopPARAGRAPH where PARAGRAPH stands
 for the name of the environment you create with \defineparagraphs.
 
 In MkIV there is also a real paragraph environment (\startparagraph ... 
 \stopparagraph)
 which is usefull for tagged pdf.


Exactly. And is there also a dedicated setup for  \startparagraph ... 
\stopparagraph?

Steffen
___
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] setup for (start)paragraph?

2010-08-11 Thread Wolfgang Schuster

 Am 11.08.10 21:32, schrieb Steffen Wolfrum:

there seems to be a confusion in contextgarden (at least *I* am confused):

Isn't there also a setup for \startparagraph ... \stopparagraph???

This should be \startPARAGRAPH ... \stopPARAGRAPH where PARAGRAPH stands
for the name of the environment you create with \defineparagraphs.

In MkIV there is also a real paragraph environment (\startparagraph ... 
\stopparagraph)
which is usefull for tagged pdf.

Exactly. And is there also a dedicated setup for  \startparagraph ... 
\stopparagraph?


No because the environment adds only tags before and after the 
environment, nothing else.


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] setup for (start)paragraph?

2010-08-11 Thread Hans Hagen

On 11-8-2010 9:38, Wolfgang Schuster wrote:


Am 11.08.10 21:32, schrieb Steffen Wolfrum:

there seems to be a confusion in contextgarden (at least *I* am
confused):

Isn't there also a setup for \startparagraph ... \stopparagraph???

This should be \startPARAGRAPH ... \stopPARAGRAPH where PARAGRAPH stands
for the name of the environment you create with \defineparagraphs.

In MkIV there is also a real paragraph environment (\startparagraph
... \stopparagraph)
which is usefull for tagged pdf.

Exactly. And is there also a dedicated setup for \startparagraph ...
\stopparagraph?


No because the environment adds only tags before and after the
environment, nothing else.


indeed. but there will be something someday; maybe we should reserve the 
setup command


Hans


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

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


Re: [NTG-context] setup for (start)paragraph?

2010-08-11 Thread Wolfgang Schuster

 Am 11.08.10 21:44, schrieb Hans Hagen:

Exactly. And is there also a dedicated setup for \startparagraph ...
\stopparagraph?


No because the environment adds only tags before and after the
environment, nothing else.



indeed. but there will be something someday; maybe we should reserve 
the setup command


Good idea but now there are two environment for normal paragraphs:

- \startparagraph/stopparagraph
- \bpar/\epar

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] setup for (start)paragraph?

2010-08-11 Thread Hans Hagen

On 11-8-2010 9:49, Wolfgang Schuster wrote:


Am 11.08.10 21:44, schrieb Hans Hagen:

Exactly. And is there also a dedicated setup for \startparagraph ...
\stopparagraph?


No because the environment adds only tags before and after the
environment, nothing else.



indeed. but there will be something someday; maybe we should reserve
the setup command


Good idea but now there are two environment for normal paragraphs:

- \startparagraph/stopparagraph
- \bpar/\epar


Indeed, as i didn't want to use that one (yet) for tagging.

At some point luatex will open op the par related info so about that 
time i'll pick up this thread. For instance mkiv will carry info with a 
paragraph (which then can replace some of the pos related code)


Hans

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

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


Re: [NTG-context] new current

2010-07-30 Thread Wolfgang Schuster

 Am 30.07.10 11:53, schrieb Henning Hraban Ramm:

Am 2010-07-30 um 10:45 schrieb Hans Hagen:


the main additions are tagged pdf


Very nice! How can we use that? Must we provide a complete content 
stream manually, or can ConTeXt generate it?


You can enable it with \setupstructure[state=start], many command (like 
itemize,

headers, tabulate, natural tables) have it build-in, for others you can use

\startelement[tag]
...
\stopelement

To tag paragraphs you need

\startparagraph ... \stopparagraph

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] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
]
# \setuptextbackground
\setuptextposition[name][settings]
\setuptextrules[options]
\setuptexttexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber]
\setuptextvariable[name][options]
\setupthinrules[options]
\setuptolerance[options]
\setuptop[text|margin|edge][options]
\setuptoptexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber]
\setuptype[options]
\setuptyping[file|typing|name][options]
\setupunderbar[options]
\setupurl[options]
\setupversions[options]
\setupwhitespace[none|small|medium|big|line|fixed|fix|dimension]
# \setvalue
# \setvariables
# \setxvalue
# \setxvariables
# \showaccents
\showbodyfont[settings]
\showbodyfontenvironment[settings]
# \showcharacters
\showcolor[name]
\showcolorgroup[name][horizontal|vertical|name|value|number]
\showexternalfigures[alternative=a|b|c]
\showfields[names]
# \showfont
\showframe[text|margin|edge]
\showgrid
# \showgridboxes
# \showgridsnapping
\showlayout
# \showlayoutcomponents
\showmakeup
\showpalet[name][horizontal|vertical|name|value]
\showprint[typesetting papersize][printing papersize][settings]
\showsetups
\showstruts
# \showstruts
\showsymbolset[name]
# \snaptogrid
\someline[reference]
\somewhere{text}{text}[reference]
\sort[text]{text}
\space
\splitfloat[settings]{text}{text}
# \splitstring
# \SR
# \start \stop
# \start \stop
\startalignment[width|left|right|middle|inner|outer|wide|broad|height|bottom|line|reset|hanging|nothanging|hyphenated|nothyphenated]
 \stopalignment
# \startarabicpar \stoparabicpar
# \startarabictext \stoparabictext
# \startappendices \stopappendices
\startbackground \stopbackground
# \startbackmatter \stopbackmatter
# \startbaselinecorrection \stopbaselinecorrection
# \startblockquote \stopblockquote
# \startbodymatter \stopbodymatter
\startbuffer[name] \stopbuffer
\startcolor[name] \stopcolor
\startcolumns[settings] \stopcolumns
\startcombination[matrix] \stopcombination
\startcomment[name][settings] \stopcomment
\startcomponent file \stopcomponent
\startdescription{text} \stopdescription
\startdocument[name] \stopdocument
\startenumeration \stopenumeration
\startenvironment file \stopenvironment
\startfact\fact text \\ text \\ text \\\fact text \stopfact
\startfigure[name][file][factor=number][frame=on|off] \stopfigure
\startfloattext[left|right|high|middle|low|offset|tall][reference]{text}{text} 
\stopfloattext
# \startFLOWcell \stopFLOWcell
# \startFLOWchart \stopFLOWchart
\startformula \stopformula
# \startframedcontent \stopframedcontent
\startframedtext[left|right|middle|none][settings] \stopframedtext
# \startfrontmatter \stopfrontmatter
# \starthanging \stophanging
\starthiding \stophiding
\startinteractionmenu[name] \stopinteractionmenu
\startitemgroup[name][options][settings] \stopitemigroup
# \startitemize \stopitemize
# \startitemize \stopitemize
# \startJScode \stopJScode
# \startJSpreamble \stopJSpreamble
# \startJSscripts \stopJSscripts
\startlegend[two]\leg text \\ text \\ text \\\leg \stoplegend
\startline[reference] \stopline
\startlinecorrection \stoplinecorrection
\startlinenumbering[continue] \stoplinenumbering
\startlines \stoplines
\startlocal \stoplocal
\startlocalenvironment \stoplocalenvironment
\startlocalfootnotes \stoplocalfootnotes
# \startlocalsetups \stoplocalsetups
\startmakeup[name][settings] \stopmakeup
\startmarginblock \stopmarginblock
\startmarginrule[number] \stopmarginrule
# \startmode \stopmode
# \startMPpage \stopMPpage
\startnamemakeup \stopnamemakeup
\startnarrower[left|middle|right] \stopnarrower
# \startnointerference \stopnointerference
# \startnotmode \stopnotmode
\startopposite \stopopposite
\startoverlay{text}{text} \stopoverlay
\startoverview[names] \stopoverview
\startpacked[blank] \stoppacked
\startparagraph \stopparagraph
\startpositioning \stoppositioning
\startpostponing \stoppostponing
\startproduct file \stopproduct
\startprofile[names] \stopprofile
\startproject file \stopproject
\startquotation[left|middle|right] \stopquotation
\startregister[text]{text+text+text} \stopregister
# \startsetups \stopsetups
# \startstandardmakeup \stopstandardmakeup
\startsymbolset[name] \stopsymbolset
\startsynchronization \stopsynchronization
\starttable[text|name] \stoptable
\starttables[text|name] \stoptables
\starttabulate[text][settings] \stoptabulate
# \startTEXpage \stopTEXpage
# \starttext \stoptext
# \starttextbackground \stoptextbackground
# \starttextdata \stoptextdata
\starttextrule[top|bottom]{text} \stoptextrule
\starttyping \stoptyping
\startunpacked \stopunpacked
\startversion[numbers] \stopversion
# \startXMLdata \stopXMLdata
# \startXMLignore \stopXMLignore
# \startXMLmapping \stopXMLmapping
\stretched{text}
# \strut
# \strutdepth
# \strutheight
# \struttedbox
\sub[references]
\subject[references]{text}
\subsection[references]{text}
\subsubject[references]{text}
\subsubsection[references]{text}
\subsubsubject[references]{text}
\switchtobodyfont[font settings]
\switchtorawfont[name]
\sym{text}
\symbol[name][name

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
___


Re: [NTG-context] footnote in paragraph

2004-06-16 Thread Hans Hagen Outside
Peter Münster wrote:
Hello,
how could I place a footnote in a startParagraph environment?
\defineparagraphs[Par][n=3]
\starttext
\startPar
bla\Par bla\footnote{a footnote, that gets hidden...}\Par bla
\stopPar
\stoptext
 

\startPar
bla\Par bla\postponefootnotes\footnote{a footnote, that gets hidden...}\Par bla
\stopPar
\flushfootnotes
or 

\starttabulate[]
\NC bla \NC bla \footnote{test} \NC bla \NC \NR
\stoptabulate

-
 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
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] footnote in paragraph

2004-06-14 Thread Peter Mnster
Hello,
how could I place a footnote in a startParagraph environment?

\defineparagraphs[Par][n=3]
\starttext
\startPar
bla\Par bla\footnote{a footnote, that gets hidden...}\Par bla
\stopPar
\stoptext

Greetings, Peter

-- 
http://pmrb.free.fr/contact/
_
FilmSearch engine: http://f-s.sf.net/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


<    1   2   3