Re: [NTG-context] Passing variables on invocation- and reading them in ConTEXt

2012-09-11 Thread Sietse Brouwer
On Mon, Sep 10, 2012 at 10:50 PM, Ian Lawrence physics.roo...@gmail.com wrote:
 I'll try to add something to the wikithe link below is fine if you know 
 it's there, and that this is what you want. But the search function 
 (arguments and variants thereof did not find it for me).

Probably in part because the word 'argument' is also used for
arguments passed to ConTeXt commands, and not just for arguments
passed to the context script on compilation. I've created a were you
looking for...? page at [[Command-line arguments]] --- that seems to
me the most obvious search term, so that page is now the first result
for that search. If there are any other synonyms you used when
searching that, you think, should point at [[Command-line arguments]]:
redirects are obvious improvements.


On Mon, Sep 10, 2012 at 10:50 PM, Ian Lawrence physics.roo...@gmail.com wrote:
 Thanks to all. After about 30 mins exploring, it all came together.

 I'll try to add something to the wikithe link below is fine if you know 
 it's there, and that this is what you want. But the search function 
 (arguments and variants thereof did not find it for me).

 The best match for what I was sure would be there, is \env{}. I still have no 
 idea how it's (semantically) related to --arguments...unless its all Dutch...

 Kind regards

 Ian

 On 10 Sep 2012, at 14:02, Sietse Brouwer sbbrou...@gmail.com wrote:

 Documented at http://wiki.contextgarden.net/Command/getdocumentargument,
 in the category Command/Internals.
 --Sietse

 On Mon, Sep 10, 2012 at 2:00 PM, Marco Patzer home...@lavabit.com wrote:
 2012-09-10: Peter Münster pmli...@free.fr

 Then you have to be sure, that --number and --time will never be special
 parameters for context.

 Indeed.

 Alternatives:

 --MarcoPatzerNumber=8 --MarcoPatzerTime=full-time

 Or:

 % context --arguments=number=8,time=full-time test.tex

 This seems the better alternative, since that's what the option was
 made for.


 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
 ___
 ___
 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
 ___
___
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] Paragraphs: blank line instead of new line

2012-09-11 Thread Xenia
Dear context folks,

I am expected to write a number of texts containing paragraphs separated
by a blank line. Is there a parameter/command to set the line break
between paragraphs to a blank line between the paragraphs?

Thanks in advance,

Xenia
___
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] Paragraphs: blank line instead of new line

2012-09-11 Thread Xenia
On 11.09.2012 13:22, Xenia wrote:
 Dear context folks,
 
 I am expected to write a number of texts containing paragraphs separated
 by a blank line. Is there a parameter/command to set the line break
 between paragraphs to a blank line between the paragraphs?

I forgot to say, that I try to avoid setting up a paragraph environment
where I have to put \startpar or like that all the time. I'm looking for
a single setup-command.

Xenia
___
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] Paragraphs: blank line instead of new line

2012-09-11 Thread Hans Hagen

On 11-9-2012 13:22, Xenia wrote:

Dear context folks,

I am expected to write a number of texts containing paragraphs separated
by a blank line. Is there a parameter/command to set the line break
between paragraphs to a blank line between the paragraphs?


\setupwhitespace[big]

-
  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] bibliography: multiple categories

2012-09-11 Thread Andreas Mang
Dear all,

is there a way to split the bibliography (at the end of the document with 
bibtex support) in several categories, which have different headings (similar 
to what latexs' multibib or splitbib does)?

Cheers,
Andreas

This is what I would like to have as an output:

==
Original Papers
My Name and Friends, Some Title, Some Journal, Some Year
My Name and Friends, Some Title, Some Conference, Some Year

References (other authors)
Author A. and Friends, Some Title, Some Journal, Some Year
Author B. and Friends, Some Title, Some Conference, Some Year
Author C. and Friends, Some Title, Some Conference, Some Year
==





___
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] Paragraphs: blank line instead of new line

2012-09-11 Thread Xenia
On 11.09.2012 13:35, Hans Hagen wrote:
 On 11-9-2012 13:22, Xenia wrote:
 Dear context folks,

 I am expected to write a number of texts containing paragraphs separated
 by a blank line. Is there a parameter/command to set the line break
 between paragraphs to a blank line between the paragraphs?
 
 \setupwhitespace[big]

Thanks a lot, that is exactly what I was looking for.

Xenia
___
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] Period at the end of a alignment block.

2012-09-11 Thread Andre Caldas
 I have a macro to typeset function definitions:

  \define[5]\functionarray
 [...]

 How should I implement my functionarray?


 Use mathmatrix.
 [...]

Works very well, thank you.


André Caldas.
___
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] incomplete \iffalse in cont-yes.mkiv?

2012-09-11 Thread Alan Bowen
Hans—

Belated thanks. I will reinstall the latest standalone and then see if I
can reproduce the problem.

Alan


*Author: *Hans Hagen
*Date: *2012-09-08 09:04 -400
*To: *mailing list for ConTeXt users
*Subject: *Re: [NTG-context] incomplete \iffalse in cont-yes.mkiv?
On 8-9-2012 03:42, Alan Bowen wrote:*
 With the latest beta, I *sometimes* get the error message:
 system  tex  error on line 4 in file
 /Applications/ConTeXt/tex/texmf-context/tex/context/base/cont-yes.mkiv:
 ! Incomplete \iffalse; all text was ignored after line 95.*

For that we really need an example as it could be a problem in your source.

Hans
___
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] References to annotations broken, mkiv

2012-09-11 Thread Dominik Leopold Forkert
Hello,

the recent update of the Annotation module (2012.09.05), mkiv broke
the references to annotations for me:

\usemodule[annotation]
\defineannotation[definition][text=Definition,number=yes]

\starttext
\definition[reference=def1]{blabla}
In \in{Definition}[def1]  ...
\stoptext

In the example above the rather strange output is:
Definition 2blabla

In Definition 1 ...


In addition, I do not know how to correctly get the annotation counter
displayed in a 'bychapter'-style. I tried:

\usemodule[annotation]
\definenumber[DefinitionCounter][prefix=yes,way=bysection]
\defineannotation[definition][text=Definition,number=yes,counter=DefinitionCounter]

\starttext
\chapter{A chapter}
\section{A section}
Counter: \getnumber[DefinitionCounter]
\definition[reference=def1]{blabla}

Counter: \getnumber[DefinitionCounter]

In \in{Definition}[def1] blabla ...
\stoptext

Again the behavior of the counter is really weird. Now I get
Definition 1.1.2 blabla, but \in[def1] just shows 1 instead of
1.1.2.

I sincerely hope for clarification!


Best regards,

Dominik
___
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] bibliography: multiple categories

2012-09-11 Thread Thomas A. Schmitz

On 09/11/2012 02:20 PM, Andreas Mang wrote:

is there a way to split the bibliography (at the end of the document with 
bibtex support) in several categories, which have different headings (similar 
to what latexs' multibib or splitbib does)?

Cheers,
Andreas

This is what I would like to have as an output:

==
Original Papers
My Name and Friends, Some Title, Some Journal, Some Year
My Name and Friends, Some Title, Some Conference, Some Year

References (other authors)
Author A. and Friends, Some Title, Some Journal, Some Year
Author B. and Friends, Some Title, Some Conference, Some Year
Author C. and Friends, Some Title, Some Conference, Some Year
==


No, that's not possible today, but it is a long standing feature 
request, and one on which Hans kind of promised to do work on a rainy 
afternoon. It's raining this afternoon here in Mannheim, so Hans?


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
___


[NTG-context] xml cross-references in lua?

2012-09-11 Thread Thomas A. Schmitz

Hi all,

I have a question about xml processing and I think that what I want/need 
can best be achieved by using lua code, but so far, I'm not really sure 
how to proceed, so any help from one of the resident lua gurus would be 
welcome.


So: the question. xml allows to provide elements with unique identifiers 
so that one can add cross-references within the document structure. Here 
is a sample xml file that shows what I mean:


document
  bibitem xml:id=hagen2011
authorHans Hagen/author
titleThe Meaning of Life Is 42/title
journalThe Rhetoric of Mathematics/journal
date2011/date
  /bibitem
  bibitem xml:id=hagen2012
authorHans Hagen/author
titleThe New Meaning is Now 43/title
journalHigh Energy Metaphysics/journal
date2012/date
  /bibitem
  text
pThis has been successfully proven in papers by bib
ref=#hagen2011/ and bib ref=#hagen2012/./p
  /text
/document

[Note: the TEI guidelines add the hash character in the attribute value 
to such references, but after much googling, I'm still not sure if this 
is standard or necessary or bizarre.]


So: at the point of the reference (which may be empty, like here, or 
contain text), I want to refer back to the bibitems. The typesetting 
engine should then be instructed to pick up the information, so that 
this is, e.g., typeset as This has been successfully proven in papers 
by Hans Hagen (2011) and Hans Hagen (2012).


My idea: since the xml:id attributes must be unique across the document, 
it would be easiest to collect them into a lua table, with the xml:id as 
key, so their content could be accessed and typeset later. But 
unfortunately, I have no clue how to go about this... Could somebody 
provide a pointer?


Thanks for your interest, if you've read this far!

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] xml cross-references in lua?

2012-09-11 Thread Hans Hagen

On 11-9-2012 19:22, Thomas A. Schmitz wrote:

Hi all,

I have a question about xml processing and I think that what I want/need
can best be achieved by using lua code, but so far, I'm not really sure
how to proceed, so any help from one of the resident lua gurus would be
welcome.

So: the question. xml allows to provide elements with unique identifiers
so that one can add cross-references within the document structure. Here
is a sample xml file that shows what I mean:

document
   bibitem xml:id=hagen2011
 authorHans Hagen/author
 titleThe Meaning of Life Is 42/title
 journalThe Rhetoric of Mathematics/journal
 date2011/date
   /bibitem
   bibitem xml:id=hagen2012
 authorHans Hagen/author
 titleThe New Meaning is Now 43/title
 journalHigh Energy Metaphysics/journal
 date2012/date
   /bibitem
   text
 pThis has been successfully proven in papers by bib
 ref=#hagen2011/ and bib ref=#hagen2012/./p
   /text
/document

[Note: the TEI guidelines add the hash character in the attribute value
to such references, but after much googling, I'm still not sure if this
is standard or necessary or bizarre.]

So: at the point of the reference (which may be empty, like here, or
contain text), I want to refer back to the bibitems. The typesetting
engine should then be instructed to pick up the information, so that
this is, e.g., typeset as This has been successfully proven in papers
by Hans Hagen (2011) and Hans Hagen (2012).

My idea: since the xml:id attributes must be unique across the document,
it would be easiest to collect them into a lua table, with the xml:id as
key, so their content could be accessed and typeset later. But
unfortunately, I have no clue how to go about this... Could somebody
provide a pointer?

Thanks for your interest, if you've read this far!


If the number of bib items is not that large hashing does not save much. 
(In x-xfdf.mkiv you can see another example).


\starttext

\startbuffer[demo]
document
  bibitem xml:id=hagen2011
authorHans Hagen/author
titleThe Meaning of Life Is 42/title
journalThe Rhetoric of Mathematics/journal
date2011/date
  /bibitem
  bibitem xml:id=hagen2012
authorHans Hagen/author
titleThe New Meaning is Now 43/title
journalHigh Energy Metaphysics/journal
date2012/date
  /bibitem
  text
pThis has been successfully proven in papers by bib
ref=#hagen2011/ and bib ref=#hagen2012/./p
  /text
/document
\stopbuffer

\startxmlsetups xml:define
\xmlsetsetup{#1}{*}{xml:*}
\stopxmlsetups

\startxmlsetups xml:document
\xmlall{#1}{/text}
\stopxmlsetups
\startxmlsetups xml:text
\xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:p
\xmlflush{#1}
\par
\stopxmlsetups

\startxmlsetups xml:bib
   \BibAuthor{#1}{\xmlatt{#1}{ref}}
\stopxmlsetups

\startxmlsetups xml:author
[[\xmlflush{#1}]]
\stopxmlsetups

\def\BibAuthor#1#2{[1:\xmlfirst{whatever}{/document/bibitem[@xml:id==string.sub('#2',2)]/author}]}

\xmlregistersetup{xml:define}

\xmlprocessbuffer{whatever}{demo}{}

\startluacode
userdata = userdata or { }
userdata.bibitems = { }
\stopluacode

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

\startxmlsetups xml:bibitem
\ctxlua{userdata.bibitems[\letterhash\xmlatt{#1}{xml:id}] = #1}
\stopxmlsetups

\def\BibAuthor#1#2{[2:\xmlfirst{\cldcontext{userdata.bibitems['#2']}}{/author}]}

\xmlprocessbuffer{whatever}{demo}{}

\stoptext

(I ran into a recently introduced side effect of an optimization so I'll 
generate you a new beta. Older versions should work anyway as no special 
trickery is used.)


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] Wrong values for \inputfilename etc.

2012-09-11 Thread Wolfgang Schuster

Am 06.09.2012 um 23:40 schrieb Hans Hagen pra...@wxs.nl:

 On 6-9-2012 06:42, Wolfgang Schuster wrote:
 Hi Hans,
 
 when I run the following example (saved as filename.tex) I got in the past 
 this output
 
 ... new beta

Still not perfect because \jobfilename and \inputfilename show the whole path, 
in my case \Users\wolf\…\filename.tex

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

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


Re: [NTG-context] References to annotations broken, mkiv

2012-09-11 Thread Wolfgang Schuster

Am 11.09.2012 um 17:17 schrieb Dominik Leopold Forkert 
dominik.fork...@gmail.com:

 Hello,
 
 the recent update of the Annotation module (2012.09.05), mkiv broke
 the references to annotations for me:
 
 \usemodule[annotation]
 \defineannotation[definition][text=Definition,number=yes]
 
 \starttext
 \definition[reference=def1]{blabla}
 In \in{Definition}[def1]  ...
 \stoptext
 
 In the example above the rather strange output is:
 Definition 2blabla
 
 In Definition 1 ...
 
 
 In addition, I do not know how to correctly get the annotation counter
 displayed in a 'bychapter'-style. I tried:
 
 \usemodule[annotation]
 \definenumber[DefinitionCounter][prefix=yes,way=bysection]
 \defineannotation[definition][text=Definition,number=yes,counter=DefinitionCounter]
 
 \starttext
 \chapter{A chapter}
 \section{A section}
 Counter: \getnumber[DefinitionCounter]
 \definition[reference=def1]{blabla}
 
 Counter: \getnumber[DefinitionCounter]
 
 In \in{Definition}[def1] blabla ...
 \stoptext
 
 Again the behavior of the counter is really weird. Now I get
 Definition 1.1.2 blabla, but \in[def1] just shows 1 instead of
 1.1.2.
 
 I sincerely hope for clarification!

I uploaded a new version where I fixed the counter bug for the annotation 
command
and also the output of the reference-output.

There is also no need to create a new counter because each annotation has it’s 
own
counter with the same name as the environment/command but to change the way
how it is displayed you have to use \setupannotation.

\usemodule[annotation]

\defineannotation[definition][text=Definition,number=yes]

\setupannotation[definition][prefix=yes,way=bychapter,prefixsegments=chapter]

\starttext

\chapter{A chapter}
\section{A section}

\definition[reference=definition:1]{blabla}

Counter: 
\rawcountervalue[definition]/\convertedcounter[definition][prefix=yes,prefixsegments=chapter]

In \in{Definition}[definition:1] blabla ...

\stoptext

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

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


[NTG-context] Lucida fonts

2012-09-11 Thread Troy Henderson
I have recently installed TeXLive 2012, and my Lucida (Type 1) fonts from
TUG are installed in the texmf-local tree and function properly when using
TeXLive 2011, but it seems that ConTeXt cannot find the fonts for 2012.
The instuctions on the wiki do not seem to add a solution for me.

I would appreciate any help in the process for installing these fonts for
TL2012.

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