Re: [NTG-context] Problem with \writebetweenlist

2012-02-25 Thread Jaroslav Hajtmar

Thanks Wolfgang
for the willingness! I'm sorry, but after re-generation format context 
always has an error (see below). I guess I'll wait for the subsequent 
official correction. Fortunately in TeX Live version of MKIV works as it 
should.

Thanks again.
Jaroslav Hajtmar

I do not know if will help this extract:

C:\$~1da\ConTeXt\Diplomova_prace-Hanca>ctx dphk

C:\$~1da\ConTeXt\Diplomova_prace-Hanca>context --autopdf dphk

mtx-context | run 1: luatex --fmt="C:/context/tex/texmf-cache/luatex-cache/c
ontext/2448223e6631addb83df348d74153606/formats/cont-en" 
--lua="C:/context/tex/t

exmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en
.lui" --backend="pdf" "./dphk" \stoptext
This is LuaTeX, Version beta-0.70.1-2012021116 (rev 4277)
\write18 enabled.
(dphk.tex
jobcontrol > version mismatch with jobfile: 1.14 <> 1.18

ConTeXt ver: 2012.02.21 14:02 MKIV fmt: 2012.2.24 int: english/english

system > cont-new.mkiv loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system > beware: some patches loaded from cont-new.mkiv
)
system > dphk.top loaded
(dphk.top)
fonts > latin modern fonts are not preloaded
languages > language en is active
{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts > preloading latin modern fonts (second stage)
fonts > typescripts > unknown: library 'loc'
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts
/map/dvips/lm/lm-rm.map}
fonts > virtual math > unable to resolve name mapsfromchar
fonts > fallback modern rm 12pt is loaded
(dp_env.tex
colors > rgb color space is not supported
colors > cmyk color space is not supported
resolvers > modules > not found: 't-bib'
resolvers > modules > not found: 't-bibltx'
resolvers > modules > loaded: 'chemic'
(C:/context/tex/texmf-context/tex/context/base/m-chemic.mkiv
ppchtex > not loaded as support for chemistry in now built in
)
resolvers > modules > loaded: 'units'
(C:/context/tex/texmf-context/tex/context/base/m-units.mkiv<+ 
C:/context/tex/tex

mf-context/tex/context/base/x-mathml.lua>) (_dpobrazky.tex
publications > loading database from dphk.bbl
(dphk.bbl)) (_dptabulky.tex) (_dpprilohy.tex) 
(C:/context/tex/texmf-context/tex/

context/base/type-imp-texgyre.mkiv){C:/context/tex/texmf-context/fonts/map/pdfte
x/context/mkiv-tx.map}
fonts > virtual math > the mapping is incomplete for 'txmath' at 7pt
)
publications > wrote a new auxiliary file \jobname.aux
This is BibTeX, Version 0.99d (Web2C 2011)
The top-level auxiliary file: dphk.aux
The style file: cont-no.bst
Database file #1: dphk.bib
publications > loading formatting style from bibl-ams
(C:/context/tex/texmf-context/tex/context/bib/bibl-ams.tex)
structures > begin of sectionblock frontpart
(_dptitulnistrana.tex
backend > xmp > using file 'C:/context/tex/texmf-context/tex/context/bas
e/lpdf-pdx.xml'
pages > flushing realpage 1, userpage 1, subpage 1
) (_dpprohlaseni.tex
structure > sectioning > Ikapn @ level 2 : 0.0 ->
)
pages > flushing realpage 2, userpage 1
(_dpzadani.tex 
pages > flushing realpage 3, userpage 2

pages > flushing realpage 4, userpage 2
) (_dppodekovani.tex)
pages > flushing realpage 5, userpage 2
(_dpsouhrn.tex
structure > sectioning > Ikapn @ level 2 : 0.0 -> Souhrn
pages > flushing realpage 6, userpage 3
structure > sectioning > Ikapn @ level 2 : 0.0 -> Summary
)
pages > flushing realpage 7, userpage 4
structure > sectioning > Ikapn @ level 2 : 0.0 -> Obsah
pages > flushing realpage 8, userpage 5
structure > sectioning > Ikapn @ level 2 : 0.0 -> Seznam obrázků
pages > flushing realpage 9, userpage 6
structure > sectioning > Ikapn @ level 2 : 0.0 -> Seznam tabulek
pages > flushing realpage 10, userpage 7
structure > sectioning > Ikapn @ level 2 : 0.0 -> Seznam p┼Ö├şloh
pages > flushing realpage 11, userpage 8
structures > end of sectionblock frontpart
structures > begin of sectionblock bodypart
(_dpteoretickacast.tex
structure > sectioning > Ikap @ level 2 : 0.1 -> Úvod
references > unknown reference [_dpteoretickacast][1:8]
pages > flushing realpage 12, userpage 9
structure > sectioning > Ikap @ level 2 : 0.2 -> Liter├írn├ş re┼íer┼íe
check > missing or ungrouped '=' after 'IIkap' in line 61 (71>:)
check > missing or ungrouped '=' after 'IIkap' in line 61 (71>:)
! Extra \endgroup.

system > tex > error on line 61 in file dphk.tex: Extra ...

51 \setuppapersize[dpportrait][A4]
52 \setuppagenumbering[state=start,location=footer]
53
54 %\setuppagenumbering[alternative=doublesided]
55 %\adaptlayout[31][height=+1cm]
56
57 % \component _dpobrazky % definice v┼íech vlo┼żen├Żch obr├ízk┼»
58 % \component _dptabulky % definice v┼íech vlo┼żen├Żch tabulek
59 % \component _dpprilohy % definice v┼íech vlo┼żen├Żch p┼Ö├şloh
60
61 >> \startfrontmatter %nastaven├ş vlastnost├ş viz 
\setupsectionblock[frontpar

t]
62 %\setupheadertexts[][]
63 %\setupfootertexts[][]
64 \component _dptitulnistrana
65 \page
66
67 \component _dpprohlaseni
68 \page
69
70
71 \component _dpzadani


\strc_lists_inject_y

Re: [NTG-context] Problem with \writebetweenlist

2012-02-25 Thread Wolfgang Schuster

Am 25.02.2012 um 18:55 schrieb Jaroslav Hajtmar:

> Thanx Wolfgang for your help.
> I made changes according to your instructions, but it does not work still.
> I can not even translate the  example of what I sent last time to the mailing 
> list.
> It is needed in addition to changes in the shove-lst.mkvi do something (eg 
> any context database files refresh, etc. .. what I know)?

When you type “context --expert --touch” context will regenerate the format 
file when you process your document.

Wolfgang

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

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


Re: [NTG-context] Overprinting

2012-02-25 Thread Jan Heinen
I have tried every combination of Luigis solution and get 
"Black text do not overprint" (german: schwarzer Text wird 
nicht überdruckt) for every page of the example for the 
following code in the Preflight of Acrobat:
Here is an online version of the Preflight: 
http://www.gronenberg.de/werkzeuge/pdf-online-check/upload.html


Here my code:



%%% overprint.tex
\nopdfcompression
\setupcolors[state=start,rgb=no,cmyk=yes,overprint=yes]
%% to be sure
\definecolor[CYAN][c=1.0,m=0,y=0,k=0]
\definecolor[MAGENTA][c=0,m=1,y=0,k=0]
\definecolor[YELLOW][c=0,m=0,y=1,k=0]
\starttext

\framed[background=color,backgroundcolor=CYAN,
frame=off,offset=.25cm,strut=no]{%BEGIN
\startcolorintent[overprint]

\framed[background=color,backgroundcolor=MAGENTA,
foregroundcolor=YELLOW,
align={lohi,middle},
frame=off,width=2.5cm,height=2cm]
{overprint \\ 
\startcolorintent[knockout]{knockout}\stopcolorintent}%


\stopcolorintent

\framed[background=color,backgroundcolor=MAGENTA,
foregroundcolor=YELLOW,align={lohi,middle},
frame=off,width=2.5cm,height=2cm]{knockout\\
\startcolorintent[overprint]{overprint}\stopcolorintent}%
}%END


\page

\framed[background=color,backgroundcolor=MAGENTA,
foregroundcolor=YELLOW,
align={lohi,middle},
frame=off,width=2.5cm,height=2cm]
{overprint \\ 
\startcolorintent[knockout]{knockout}\stopcolorintent}%


\page

\framed[background=color,backgroundcolor=MAGENTA,
foregroundcolor=YELLOW,
align={lohi,middle},
frame=off,width=2.5cm,height=2cm]
{overprint}%

\page

\framed[background=color,backgroundcolor=MAGENTA,
foregroundcolor=YELLOW,
align={lohi,middle},
frame=off,width=2.5cm,height=2cm]
{\startcolorintent[knockout]{knockout}\stopcolorintent}%

\page

\framed[background=color,backgroundcolor=MAGENTA,
foregroundcolor=YELLOW,align={lohi,middle},
frame=off,width=2.5cm,height=2cm]{knockout\\
\startcolorintent[overprint]{overprint}\stopcolorintent}%

\page

\framed[background=color,backgroundcolor=MAGENTA,
foregroundcolor=YELLOW,align={lohi,middle},
frame=off,width=2.5cm,height=2cm]{knockout}%

\page

\framed[background=color,backgroundcolor=MAGENTA,
foregroundcolor=YELLOW,align={lohi,middle},
frame=off,width=2.5cm,height=2cm]{\startcolorintent[overprint]{overprint}\stopcolorintent}%

\page

\framed[background=color,backgroundcolor=CYAN,
frame=off,offset=.25cm,strut=no]{%BEGIN
\startcolorintent[overprint]

\framed[background=color,backgroundcolor=MAGENTA,
foregroundcolor=YELLOW,
align={lohi,middle},
frame=off,width=2.5cm,height=2cm]
{overprint \\ 
\startcolorintent[knockout]{knockout}\stopcolorintent}%


\stopcolorintent
}

\page

\framed[background=color,backgroundcolor=CYAN,
frame=off,offset=.25cm,strut=no]{%BEGIN
\startcolorintent[overprint]

\framed[background=color,backgroundcolor=MAGENTA,
foregroundcolor=YELLOW,
align={lohi,middle},
frame=off,width=2.5cm,height=2cm]
{overprint}%

\stopcolorintent
}

\framed[background=color,backgroundcolor=CYAN,
frame=off,offset=.25cm,strut=no]{%BEGIN
\startcolorintent[overprint]

\framed[background=color,backgroundcolor=MAGENTA,
foregroundcolor=YELLOW,
align={lohi,middle},
frame=off,width=2.5cm,height=2cm]
{\startcolorintent[knockout]{knockout}\stopcolorintent}%

\stopcolorintent
}


\stoptext





Regards
Jannis

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

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

Re: [NTG-context] Problem with \writebetweenlist

2012-02-25 Thread Jaroslav Hajtmar

Thanx Wolfgang for your help.
I made changes according to your instructions, but it does not work still.
I can not even translate the  example of what I sent last time to the 
mailing list.
It is needed in addition to changes in the shove-lst.mkvi do something 
(eg any context database files refresh, etc. .. what I know)?

Or what I doing wrong?

Thanx Jaroslav Hajtmar




Dne 25.2.2012 17:52, Wolfgang Schuster napsal(a):

Am 25.02.2012 um 12:02 schrieb Jaroslav Hajtmar:

   

Thanx Wolfgang
for reply, but it does not work still.
 

I was in a hurry and had no time to test it but the following is tested and 
works.

\def\strc_lists_write_between[#tag][#settings]#command% we can overload location
   {\begingroup
\edef\currentlist{#tag}%
\doifelse{\namedlistparameter{#tag}\c!state}\v!start
  {\strc_lists_inject_yes[#settings,\c!type=\s!command][command={#command}]}
  {\endgroup}}

\def\strc_lists_write_to_yes[#settings]#first#second%
   
{\strc_lists_inject_yes[\c!location=\v!here,#settings,\c!type=\s!simple][first={#first},second={#second}]}

@Hans The “\s!” prefix for first, second and command can’t be used because 
otherwise the keys end up as “\\s!first ” in Lua table index.

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] Problem with \writebetweenlist

2012-02-25 Thread Wolfgang Schuster

Am 25.02.2012 um 12:02 schrieb Jaroslav Hajtmar:

> Thanx Wolfgang
> for reply, but it does not work still.

I was in a hurry and had no time to test it but the following is tested and 
works.

\def\strc_lists_write_between[#tag][#settings]#command% we can overload location
  {\begingroup
   \edef\currentlist{#tag}%
   \doifelse{\namedlistparameter{#tag}\c!state}\v!start
 {\strc_lists_inject_yes[#settings,\c!type=\s!command][command={#command}]}
 {\endgroup}}

\def\strc_lists_write_to_yes[#settings]#first#second%
  
{\strc_lists_inject_yes[\c!location=\v!here,#settings,\c!type=\s!simple][first={#first},second={#second}]}

@Hans The “\s!” prefix for first, second and command can’t be used because 
otherwise the keys end up as “\\s!first ” in Lua table index.

Wolfgang

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

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


[NTG-context] Problem with external cross-references

2012-02-25 Thread Jean-Philippe Rey
Hello everybody,

I'm trying to use external cross-references between two files but I can't make 
it work with MkIV. I am using ConTeXt current

ConTeXt  ver: 2011.05.18 18:04 MKIV  fmt: 2011.7.31  int: english/english


With MkII, the following minimal example works perfectly well :

% file test_crossref1
\starttext
\chapter[lorem]{Lorem}
Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[lorem].
\stoptext

% file test_crossref2
\usereferences[test_crossref1]
\starttext
Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[lorem].
\stoptext


However with MkIV, I get an unknown reference (??) in test_crossref2 and the 
following lines in test_crossref2.log

[...]
system  > references from other files are handled automatically
[...]
references  > unknown reference [][lorem]
[...]

With 

% file test_crossref2
\starttext
Lorem ipsum dolor sit amet, consectetur adipiscing elit 
\in{Chapter}[test_crossref1::lorem].
\stoptext

I still get an unknown reference (??) and the following diagnosis in the log 
file
[...]
references  > references from document 'test_crossref1' are not exported
references  > unknown reference [][test_crossref1::lorem]
[...]

However when I add the export option in the test_crossref1 file

% file test_crossref1
\setupreferencing[export=yes]
\starttext
\chapter[lorem]{Lorem}
Lorem ipsum dolor sit amet, consectetur adipiscing elit \in{Chapter}[lorem].
\stoptext

I get an error at compile time. Below is the full log file. Does anyone know 
what I am doing wrong ?

Thank you for your help.



(test_crossref1.tex

ConTeXt  ver: 2011.05.18 18:04 MKIV  fmt: 2011.7.31  int: english/english

system  > cont-new.mkiv loaded
(/Users/jprey/ConTeXt-2011.05.18/tex/texmf-context/tex/context/base/cont-new.mkiv
system  > beware: some patches loaded from cont-new.mkiv
)
system  > test_crossref1.top loaded
system  > options > begin of optionfile
system  > options >
system  > options > % runtime options files (command line driven)
system  > options > \unprotect
system  > options > % feedback and basic job control
system  > options > % handy for special styles
system  > options > \startluacode
system  > options > document = document or { }
system  > options > document.arguments={
system  > options >  ["arrange"]=true,
system  > options >  ["synctex"]=true,
system  > options > }
system  > options > document.files={
system  > options >  "test_crossref1.tex",
system  > options > }
system  > options > \stopluacode
system  > options > % process info
system  > options > \setupsystem[inputfile=test_crossref1.tex]
system  > options > \setupsystem[\c!n=1,\c!m=1]
system  > options > % modes
system  > options > % options (not that important)
system  > options > \startsetups *runtime:options
system  > options > \setuparranging[\v!disable]
system  > options > \stopsetups
system  > options > % styles and modules
system  > options > \startsetups *runtime:modules
system  > options > \stopsetups
system  > options > % done
system  > options > \protect \endinput
system  > options >
system  > options > end of optionfile
(test_crossref1.top)
fonts   > latin modern fonts are not preloaded
languages   > language en is active
{/Users/jprey/ConTeXt-2011.05.18/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts   > preloading latin modern fonts (second stage)
(/Users/jprey/ConTeXt-2011.05.18/tex/texmf-context/tex/context/base/type-siz.mkiv)
 
(/Users/jprey/ConTeXt-2011.05.18/tex/texmf-context/tex/context/base/type-otf.mkiv){/Users/jprey/ConTeXt-2011.05.18/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/Users/jprey/ConTeXt-2011.05.18/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts   > virtual math > unable to resolve name mapsfromchar
fonts   > fallback modern rm 12pt is loaded
system  > begin file test_crossref1.tex at line 2
structure   > sectioning > chapter @ level 2 : 0.1 -> Lorem
references  > unknown reference [][lorem]
backend > xmp > using file 
'/Users/jprey/ConTeXt-2011.05.18/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
system  > end file test_crossref1.tex at line 7
! LuaTeX error ...0731/tex/texmf-context/tex/context/base/strc-ref.lua:560: 
attempt to index global 'jobpages' (a nil value)
stack traceback:
...0731/tex/texmf-context/tex/context/base/strc-ref.lua:560: in 
function 'referencer'
...0731/tex/texmf-context/tex/context/base/strc-ref.lua:609: in 
function 'export'
:1: in main chunk.

system  > tex > error on line 7 in file test_crossref1.tex: LuaTeX 
error  ...

1 \setupreferencing[export=yes]
2 \starttext
3 \chapter

Re: [NTG-context] Question about spacing of some math symbols

2012-02-25 Thread Khaled Hosny
On Fri, Feb 24, 2012 at 10:19:20AM +0100, Hans Hagen wrote:
> some symbols have multiple usage and we can support that.

BTW, what can always use \mathbin{}, \mathrel{} etc. to override the
default spacing if needed, so we should just choose a sensible default.

Regards,
 Khaled
___
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] marking?

2012-02-25 Thread Thomas A. Schmitz

On 02/25/2012 03:37 PM, Philipp Gesang wrote:

For more info about the local structure you might want to have a
look at table.print(structures.sections.current())

Regards
Philipp


Many thanks, Philipp, your example and this hint are very useful - I 
will play around with this! We'll see if this is canonical...


All best

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
___


Re: [NTG-context] marking?

2012-02-25 Thread Philipp Gesang
On 2012-02-25 14:55, Thomas A. Schmitz wrote:
> On 02/24/2012 05:09 PM, Wolfgang Schuster wrote:
> >Marks aren’t the right tool for this because they are meant for text which
> >goes into the header and footer after the page is finished. There is another
> >mechanism which does what you want.
> >
> >\setupheadertexts[chapter]
> >
> >\define[2]\ChapterCommand
> >   {\vbox\bgroup\starttabulate
> >\NC Title   \EQ \structurevariable{title}   \NC\NR
> >\NC Marking \EQ \structurevariable{marking} \NC\NR
> >\stoptabulate\egroup}
> >
> >\setuphead[chapter][command=\ChapterCommand]
> >
> >\starttext
> >
> >\startchapter[title={Hello World},marking={A}]
> >
> >\starttabulate
> >\NC Title   \EQ \namedstructurevariable{chapter}{title}   \NC\NR
> >\NC Marking \EQ \namedstructurevariable{chapter}{marking} \NC\NR
> >\stoptabulate
> >
> >\stopchapter
> >
> >\stoptext
> >
> >Wolfgang
> 
> Hi Wolfgang,
> 
> may I ask two additional questions?
> 
> 1. From what I see on dev-context, there's a problem right now, so
> it may be better to wait a bit with these commands. Correct?
> 
> 2. What would be the equivalent in lua? I'm looking for something like this:
> 
> function chaptertest(s)
>   if chapter.structurevariable == "A" then
> context(s) context(" is in chapter A!")
>   else
> context(s) context(" is in a different chapter!")
>   end
> end

If you only need the current section at the position where the
test occurs, then you can try the following (beware this might
not be canonical).

· chaptertest.lua ··
local context = context
local check_structure = function (s)
  context(s)
  local current = structures.sections.current()
  if current.userdata and current.userdata.location == "A" then
context" is in chapter A"
  else
context" is elsewhere."
  end
end

commands.checkstructure = function (s) check_structure(s) end


· chaptertest.tex ··
\ctxloadluafile{chaptertest}
\unprotect
\def\lookup#1{\ctxcommand{checkstructure\!!bs#1\!!es}}
\protect

\starttext

\startchapter[title=foo] [location=A]
\lookup{My dear something}\par
\input knuth
\stopchapter

\startchapter[title=bar] [location=B]
\lookup{My dear something}\par
\input knuth
\stopchapter

\stoptext


For more info about the local structure you might want to have a
look at table.print(structures.sections.current())

Regards
Philipp




> 
> Is this possible? What would be the correct call for my pseudo-code
> chapter.structurevariable (could be either to the chaptermark or to
> the chapter title, I just need something to test against).
> 
> Thanks a lot
> 
> 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
> ___

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


pgpKoAkR0zFAj.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] marking?

2012-02-25 Thread Thomas A. Schmitz

On 02/24/2012 05:09 PM, Wolfgang Schuster wrote:

Marks aren’t the right tool for this because they are meant for text which
goes into the header and footer after the page is finished. There is another
mechanism which does what you want.

\setupheadertexts[chapter]

\define[2]\ChapterCommand
   {\vbox\bgroup\starttabulate
\NC Title   \EQ \structurevariable{title}   \NC\NR
\NC Marking \EQ \structurevariable{marking} \NC\NR
\stoptabulate\egroup}

\setuphead[chapter][command=\ChapterCommand]

\starttext

\startchapter[title={Hello World},marking={A}]

\starttabulate
\NC Title   \EQ \namedstructurevariable{chapter}{title}   \NC\NR
\NC Marking \EQ \namedstructurevariable{chapter}{marking} \NC\NR
\stoptabulate

\stopchapter

\stoptext

Wolfgang


Hi Wolfgang,

may I ask two additional questions?

1. From what I see on dev-context, there's a problem right now, so it 
may be better to wait a bit with these commands. Correct?


2. What would be the equivalent in lua? I'm looking for something like this:

function chaptertest(s)
  if chapter.structurevariable == "A" then
context(s) context(" is in chapter A!")
  else
context(s) context(" is in a different chapter!")
  end
end

Is this possible? What would be the correct call for my pseudo-code 
chapter.structurevariable (could be either to the chaptermark or to the 
chapter title, I just need something to test against).


Thanks a lot

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] Strange mixing of lists (figures, tables etc.) and lists of bibliography

2012-02-25 Thread Jaroslav Hajtmar

Hello ConTeXist.
Here is my next problem. You see it in minimal example.
When I put link to bibliography to caption of figure, then list of 
bibliography consist caption of figure ...

What I am doing wrong?
In MKII and former versions of MKIV it worked OK.

Thanx Jaroslav Hajtmar


Here is my example:

\setupbibtex[database={samplebib}]
\setuppublications[alternative=ams]
\defineselector [caption] [max=2,n=2] % alternate {short}{long} caption


% Content of file "samplebib.bib"
%
% @STRING{hh = {Hans Hagen}}
%
% @ARTICLE{hh2010a,
%   author = hh,
%   title = {The Font Name Mess},
%   journal = {MAPS},
%   year = {2010},
%   volume = {40},
%   pages = {2-8},
%   keywords = {context},
% }
%
% @BOOK{Eijkhout1991,
%   title = {\TeX\ by Topic. A \TeX nician's Reference},
%   publisher = {Addison-Wesley},
%   year = {1991},
%   author = {Victor Eijkhout},
%   address = {London},
%   keywords = {general},
% }

\startbuffer[fig1]
 \useexternalfigure[fig1][fig1.jpg][type=jpg,metod=jpg,width=5cm]
\placefigure[force][fig1]
   {\select{caption}
   {Caption of list of capfions}
   {Caption of figure with link to bibliography 
\cite[hh2010a].}

   }
  {\externalfigure[fig1]}
\stopbuffer


\starttext

Citation one is \cite[hh2010a] and another citation is \cite[Eijkhout1991].

\getbuffer[fig1]

% When you uncomment next line, then bibliography crashed
%\section{List of citations}

Example of mixing bibliography and captions of pictures:

\placepublications[criterium=cite]

\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] Question about spacing of some math symbols

2012-02-25 Thread Otared Kavian
Hi Khaled,

As far as I know, the signs 
less than: <
greater than: >
similar or less than: ⪝
similar or greater than: ⪞
less than or equal: ⪬
greater or equal: ⪭
(and there are othersigns of the same category)
should be treated in the same way, as with = or \equiv, since they are 
mathematical relations. On the other hand
interior product: ⨼
right hand interior product: ⨽
should be treated as +, \times, or \wedge, since they are binary operations.

Best regards: OK
%%% sample-xits.tex
\setupbodyfont[xits]

\starttext

These signs should have exactly the same spacing around them:
$$a = b$$
$$a \equiv b$$
$$a < b$$
$$a ⪝ b$$
$$a ⪞ b$$
$$a ⪬ b$$
$$a ⪭ b$$
These signs should have exactly the same spacing around them:
$$a ⨼ b$$
$$a ⨽ b$$
$$a \wedge b$$
$$a \times b$$
$$a + b$$
\stoptext
%%% end sample-xits.tex


sample-xits.pdf
Description: Adobe PDF document

On 23 févr. 2012, at 21:12, Khaled Hosny wrote:

> Hi all,
> 
> While testing some XITS symbols, I was wondering about the spacing of
> the following symbols:
> 
> \setupbodyfont[xits]
> 
> \starttext
> $$a < b$$ # reference
> $$a ⨼ b$$
> $$a ⨽ b$$
> $$a ⪝ b$$
> $$a ⪞ b$$
> $$a ⪬ b$$
> $$a ⪭ b$$
> \stoptext
> 
> Not sure about the first two, but I think the rest should be mathrel
> (additionally, does anyone knows a definite Unicode reference for such
> proprieties?)
> 
> Regards,
> Khaled
> ___
> 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] Problem with \writebetweenlist

2012-02-25 Thread Jaroslav Hajtmar

Just one a notice.
Using the standalone version can not be resolved even Hans's example in 
wikipedia at

http://wiki.contextgarden.net/Reference/en/writebetweenlist

Jaroslav Hajtmar



Dne 25.2.2012 12:02, Jaroslav Hajtmar napsal(a):

Thanx Wolfgang
for reply, but it does not work still.
I am sending example whitch works in ConTeXt MKIV in TeXlive 2011, but 
does not work in standalone MKIV (minimals).
Command \writebetweenlist probably works differently than the previous 
version.


Here is minimal example:

\setupinteraction[state=start]

\definehead[Ikap][section]
\definehead[IIkap][subsection]

\definecombinedlist[dpcontent][Ikap, IIkap][criterium=all]

\def\SECTION[#1] #2\par{{\csname#1kap\endcsname{#2}}\par}

\def\RSECTION[#1][#2] #3\par{\reference[#2]{#3}%
\writebetweenlist[Ikap][location=here]{\blank}%
\writebetweenlist[#1kap][location=here]{\hskip2em {\bf 
\ref[t][#2]} \hfill \at[#2]}%

\writebetweenlist[#1kap][location=here]{\blank[small]}%
\title{#3}\par%
}


\starttext

\placedpcontent[alternative=b]

\RSECTION[I][refsextionXXX] Section XXX

\SECTION[I] Section One

\SECTION[II] Subsection

\SECTION[II] Subsection

\SECTION[I] Section One

\SECTION[II] Subsection

\SECTION[II] Subsection

\RSECTION[II][refsextionYYY] Section YYY

\SECTION[I] Subsection

\SECTION[II] Subsection

\SECTION[I] Section Two

\SECTION[II] Subsection

\SECTION[II] Subsection

\SECTION[I] Section Three

\stoptext



Dne 25.2.2012 8:24, Wolfgang Schuster napsal(a):

Am 24.02.2012 um 23:19 schrieb Jaroslav Hajtmar:


Thanks Hans
for the reply. Can you please advise where to stop this group?
That is where to put  \endgroup?
I can not find this place…
You don’t \endgroup because it’s are lady in \strc_lists_inject_yes 
but the \begingroup

has to be at at another place (see below):

\def\strc_lists_write_between[#tag][#settings]#command% we can 
overload location

   {\doif{\namedlistparameter{#tag}\c!state}\v!start
 
%{\strc_lists_inject_yes[#tag][#settings,\c!type=\s!command][\s!command={#command}]}} 

  
{\begingroup\strc_lists_inject_yes[#tag][#settings,\c!type=\s!command][\s!command={#command}]}} 



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] Problem with \writebetweenlist

2012-02-25 Thread Jaroslav Hajtmar

Thanx Wolfgang
for reply, but it does not work still.
I am sending example whitch works in ConTeXt MKIV in TeXlive 2011, but 
does not work in standalone MKIV (minimals).
Command \writebetweenlist probably works differently than the previous 
version.


Here is minimal example:

\setupinteraction[state=start]

\definehead[Ikap][section]
\definehead[IIkap][subsection]

\definecombinedlist[dpcontent][Ikap, IIkap][criterium=all]

\def\SECTION[#1] #2\par{{\csname#1kap\endcsname{#2}}\par}

\def\RSECTION[#1][#2] #3\par{\reference[#2]{#3}%
\writebetweenlist[Ikap][location=here]{\blank}%
\writebetweenlist[#1kap][location=here]{\hskip2em {\bf 
\ref[t][#2]} \hfill \at[#2]}%

\writebetweenlist[#1kap][location=here]{\blank[small]}%
\title{#3}\par%
}


\starttext

\placedpcontent[alternative=b]

\RSECTION[I][refsextionXXX] Section XXX

\SECTION[I] Section One

\SECTION[II] Subsection

\SECTION[II] Subsection

\SECTION[I] Section One

\SECTION[II] Subsection

\SECTION[II] Subsection

\RSECTION[II][refsextionYYY] Section YYY

\SECTION[I] Subsection

\SECTION[II] Subsection

\SECTION[I] Section Two

\SECTION[II] Subsection

\SECTION[II] Subsection

\SECTION[I] Section Three

\stoptext



Dne 25.2.2012 8:24, Wolfgang Schuster napsal(a):

Am 24.02.2012 um 23:19 schrieb Jaroslav Hajtmar:

   

Thanks Hans
for the reply. Can you please advise where to stop this group?
That is where to put  \endgroup?
I can not find this place…
 

You don’t \endgroup because it’s are lady in \strc_lists_inject_yes but the 
\begingroup
has to be at at another place (see below):

\def\strc_lists_write_between[#tag][#settings]#command% we can overload location
   {\doif{\namedlistparameter{#tag}\c!state}\v!start
 
%{\strc_lists_inject_yes[#tag][#settings,\c!type=\s!command][\s!command={#command}]}}
  
{\begingroup\strc_lists_inject_yes[#tag][#settings,\c!type=\s!command][\s!command={#command}]}}

Wolfgang
   


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

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


[NTG-context] Problem with math!

2012-02-25 Thread Verhaag, G.C.H.M.

Hi ConTeXt users,

Currently I'm experiencing problems with inline math mode in combination 
with the addff{oldstyle} command!


The attached test file doens't compile with the latest version 2012.2.18 
(MkIV), which seems to be caused by the introduction of the $\bullet$!


With older versions this worked okay!

Regards,
Gerard Verhaag
\language[nl]

\usetypescript[schola]
\setupbodyfont[schola,10pt]

\definefontfeature [oldstyle] [latn] [onum=yes]

% adding this feature set
\addff{oldstyle}

\starttext
 Math symbols like $\bullet$ NOT working any more from version 2012.2.18!
\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] Question about spacing of some math symbols

2012-02-25 Thread Khaled Hosny
On Fri, Feb 24, 2012 at 10:19:20AM +0100, Hans Hagen wrote:
> On 23-2-2012 21:16, Aditya Mahajan wrote:
> >On Thu, 23 Feb 2012, Khaled Hosny wrote:
> >
> >>Hi all,
> >>
> >>While testing some XITS symbols, I was wondering about the spacing of
> >>the following symbols:
> >>
> >>\setupbodyfont[xits]
> >>
> >>\starttext
> >>$$a < b$$ # reference
> >>$$a ⨼ b$$
> >>$$a ⨽ b$$
> >>$$a ⪝ b$$
> >>$$a ⪞ b$$
> >>$$a ⪬ b$$
> >>$$a ⪭ b$$
> >>\stoptext
> >>
> >>Not sure about the first two, but I think the rest should be mathrel
> >
> >I agree.
> >
> >>(additionally, does anyone knows a definite Unicode reference for such
> >>proprieties?)
> >
> >I usually use the ams symbol list (as implemented by the unicode-math
> >package) as reference.
> 
> When (years ago) I wrote the math ml parsers I used those
> xits/ams/whatever lists but they had inconsistencies (no surprise as
> there are so many smbols) .. so whatever change we do, I'd rather
> not copy blindly but consider carefully; some symbols have multiple
> usage and we can support that. Now, as long as we use names that's
> no big deal, but when characters are used directly there can be
> conflicting interests with respect to defaults. For that I'd like to
> introduce the option to set a 'domain' or whatever it's called which
> will adapt the spacing category automatically
> 
> btw ... did you ever look at:
> 
> http://www.openmath.org/cdnames.html

I'll leave that to Aditya; the math expert :)

Regards,
 Khaled
___
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] Collision of sectioning and bibliography?

2012-02-25 Thread Jaroslav Hajtmar

Hello ConTeXist.
After two years I recreate a larger project (that was created using the 
MKII) and convert it into MKIV.
And I ran into some major problems. I try to describe it and ask you 
about help.


Collisions of sectioning and bibliography:
When put into the document sections (using \section{} or \title{} 
commands), bibliography stops working and the error will appear in the 
bibliography links (Error2) and a list of the bibliography does not list.

What I am doing wrong?

Thanx Jaroslav Hajtmar

Here is my minimal example:


\setupbibtex[database={samplebib}]
\setuppublications[alternative=ams]


% Content of file "samplebib.bib" is:
%
% @STRING{hh = {Hans Hagen}}
%
% @ARTICLE{hh2010a,
%   author = hh,
%   title = {The Font Name Mess},
%   journal = {MAPS},
%   year = {2010},
%   volume = {40},
%   pages = {2-8},
%   keywords = {context},
% }
%
% @BOOK{Eijkhout1991,
%   title = {\TeX\ by Topic. A \TeX nician's Reference},
%   publisher = {Addison-Wesley},
%   year = {1991},
%   author = {Victor Eijkhout},
%   address = {London},
%   keywords = {general},
% }


\starttext

Citation one is \cite[hh2010a] and another citation is \cite[Eijkhout1991].

% When you uncomment next line, then bibliography crashed
%\section{List of citations}


\placepublications[criterium=cite]

\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] solution for missing bookmark (minimal example)

2012-02-25 Thread Steffen Wolfrum
Hi,

is there a chance that this problem can be solved within the next days (the 
publishers won't wait too long for the working PDF).

Sorry for being persistent,
Steffen


Am 23.02.2012 um 09:53 schrieb Steffen Wolfrum:

> Hi Hans
> 
> I managed to narrow down my example to just one bibliography, no index, no 
> register, nothing fancy.
> If I run this example with a pre-Feb.2012 version (say 2012.01.16), then the 
> bookmarks FIVE, SIX and SEVEN do not work.
> 
> If you run this minimal example with all your tracing magic, can't you find 
> where the bug hides (that was part of MkIV at least since May 2011 and 
> vanished no more than with your experimental February 2012 versions)?
> 
> Steffen
> ---
> 
> 
> \setuppublications[state=start,refcommand=author]
> 
> \setupcite   [author]   [pubsep={},lastpubsep={},inbetween={},
> left={},right={},andtext={|::|}, otherstext={ \tf et al.}]
> 
> \newbibfield[shorttitle]
> \newbibfield[shortauthor]
> 
> \unexpanded\def\mycite
> {\dodoubleempty\domycite}
> 
> \def\domycite[#1][#2]#3%
> {\bgroup
>  \nocite[#3]%
>   \getcitedata[shortauthor][#3] to \myshortauthor%
>   \getcitedata[shorttitle][#3] to \myshorttitle%
>   \getcitedata[title][#3] to \mytitle%
>   \getcitedata[journal][#3] to \myjournal%
>  \doifsomethingelse{#2}
>   {{\em #1} in: \doifsomethingelse{\myshortauthor}{\myshortauthor}{\cite[#3]},
>   
> \doifsomethingelse{\myshorttitle}{\myshorttitle}{\mytitle}\doifsomethingelse{#1}{,
>  #2}{}}
>   {{\em\doifsomethingelse{\myshortauthor}{\myshortauthor}{\cite[#3]}}, 
> \doifsomethingelse{\myjournal}{{\doifsomethingelse{\myshorttitle}{\myshorttitle}{\doifsomethingelse{\myjournal}{\myjournal\doifsomethingelse{\myvolume}{\
>  \myvolume\ [\mypubyear]}{\ 
> \mypubyear}}{\mytitle{\doifsomethingelse{\myshorttitle}{\myshorttitle}{\mytitle}}\doifsomethingelse{#1}{,
>  #1}{}}%
>  \egroup}
> 
> \setuppublicationlist[samplesize={DDBD08},totalnumber=2]
> 
> \startpublication[k=Duetz2008,t=book,
> a={{Dütz}},y=2009,
> n=53,s=Düt09]
> \title{Arbeitsrecht}
> \stoppublication
> 
> % 
> 
> \starttext
> 
> \setupinteraction
>   [state=start,style=,color=black]
> 
> \placebookmarks
> [chapter,section,subsection,subsubsection]
> [chapter,section,subsection,subsubsection][force=yes] 
> 
> 
> \chapter{ONE}
> 
> \section{TWO}
> 
> \input tufte \footnote{\input ward}
> 
> \subsection{THREE}
> 
> \subsubsection{FOUR}
> 
> Text.\footnote{%
> Siehe
> \cite{Duetz2008}; 
> \mycite[Rn. 556 ff.]{Duetz2008}; 
> \mycite[Rn. 556 ff.]{Duetz2008}; 
> }
> 
> 
> \dorecurse{5}{\input tufte \footnote{\input ward}}
> 
> \subsubsection{FIVE}
> 
> {\input tufte \footnote{\input ward}}
> 
> \subsection{SIX}
> 
> \subsubsection{SEVEN}
> 
> {\input tufte \footnote{\input ward}}
> 
> \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
> ___

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