Re: [NTG-context] Problem with external cross-references

2012-03-05 Thread Hans Hagen

On 4-3-2012 01:44, Jean-Philippe Rey wrote:

Hello Hans,

Le 2 mars 2012 à 20:59, Hans Hagen a écrit :


On 25-2-2012 17:47, Jean-Philippe Rey wrote:

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


That version is quite old; I wouldn't be surprised if in that version 
loading of cross document references was not yet implemented fully. The 
current version doesn't use the mkii way anyway (no export option, 
different loading etc).


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] Paragraph beginning with { doesn't flow around a float

2012-03-05 Thread Hans Hagen

On 4-3-2012 02:09, Jean-Philippe Rey wrote:

Hello everybody,

I found a problem with text flowing around a float. As far as I understand the 
problem, if a paragraph begins with a {, it doesn't flow around a float.. Here 
is a minimal example :


a tex artefact ...

use one of:

\noindent { ...

\strut { ...

\dontleavehmode { ...

in order to start the paragraph outside the group

(at some point I might figure out a robust hack around this)

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] Command in enumeration title

2012-03-05 Thread Stefan Müller
On Fri, 02 Mar 2012 21:03:34 +0100, Hans Hagen wrote:
 On 26-2-2012 14:34, Stefan Müller wrote:
  Hi Michael,
 
  thanks for your answer.  The macro \Word is a predefined macro that
 capitalizes the first letter of its argument.  E.g. \Word{title} should
 expand to Title, but it doesn't in my example.
 
 does style={\setcharactercasing[3]} work out ok?

Hi Hans,

thanks for your answer and sorry for the delay. I tried

\defineenumeration[myenum][title=yes, titlestyle={\setcharactercasing[3]}]
\starttext
\startmyenum{\Word{title}}
muh
\stopmyenum
\stoptext

with MkIV 201200221 14:02 to no avail (it seems that there is no key 
titlestyle, but I tried). I still get title without capitalization. If I 
use style={\setcharactercasing[3]} or headstyle={\setcharactercasing[3]} then I 
get Muh or Myenum, respectively, with capital M as expected but still 
title.

Best regards,
Stefan
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
___
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] is it possible to have first and last line numbers from page?

2012-03-05 Thread Hans Hagen

On 4-3-2012 11:20, Pablo Rodríguez wrote:

\starttext
\startlinenumbering
\dorecurse{10}{\input zapf\par\input knuth}
\stoplinenumbering
\stoptext


currently it's not possible but it's no big deal to add that feature at 
some point as it's a matter of keeping track of first/last numbers; for 
the page it's trivial but as we also support numbering in columns and 
other places some housekeeping is needed (read: a quick hack is possible 
but I will only do a proper solution)


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] is it possible to have first and last line numbers from page?

2012-03-05 Thread luigi scarso
2012/3/4 Pablo Rodríguez oi...@web.de

 On 03/04/2012 12:04 PM, Wolfgang Schuster wrote:
  Am 04.03.2012 um 11:20 schrieb Pablo Rodríguez:
 
  I wanted to be able to have in the headers the first and last line
  number from page. This feature is extremely useful when typesetting some
  kinds of poetry.
  [...]
  Is that possible to achieve with ConTeXt?
 
  Yes but it’s not usable because the numbers are always shown on the next
 page.

 Many thanks for your reply, Wolfgang.

 If you allow me one more question: is showing the numbers on the same
 page they refer to beyond the limits of TeX/LuaTeX?


Absolutely no. As Hans said, a quick/dirty trick is possible: just mark the
object
with \pagereference[unique id]. The data is stored into the *tuc file,
which can be read
from  the second pass.
Then always run with
$context --purgeall ; context yourfile.mkiv
Of course, it's possible  doesn't mean it's the right context way.

\startluacode
document.my_name_space = document.my_name_space or {}
document.my_name_space.pages = document.my_name_space.pages or {}
local f =  io.open(file.addsuffix(tex.jobname,tuc) )
print(' ',f)
if f==nil then
 --[=[ do nothin ]=]
else
 f:close()
 local tuc = dofile(file.addsuffix(tex.jobname,tuc))
 local data =  tuc.structures.references.collected[]
 local  w
 local pages = document.my_name_space.pages
 local realpage,ref
 for k, v in  pairs(data) do
   w=string.gmatch(k,'LIN:(\%d+):\%d+')
   ref = tonumber(w())
   realpage = tostring(v.references.realpage)
   pages[realpage]= pages[realpage] or {}
   table.insert(pages[realpage],ref)
 end
 for page,array in pairs(pages) do
   table.sort(array)
 end
end
\stopluacode


\definemarking[linenumber]
\define\LinenumberCommand
 
{\normalexpanded{\setmarking[linenumber]{\linenumber}}\pagereference[LIN:\linenumber:\currentpage]}

\setuplinenumbering[command=\LinenumberCommand]

\startsetups linenumber
%   \doiftext {
%   \getmarking[linenumber]
%   }
%   {
%   \getmarking[linenumber][first] –
\getmarking[linenumber][last]
%   }
 \startluacode
 local l=0;
 if document.my_name_space == nil then return end;
 if document.my_name_space.pages == nil then return end;
 local pages = document.my_name_space.pages;
 for _,_ in  pairs(pages) do l=l+1 end;
 if l== 0 then return end;
 --[=[ OK, we have some data to print ]=]
 local array = pages[tostring(tex.count.realpageno)]
 l=0;
 if array ==nil then return end;
 for _,_ in  pairs(array) do l=l+1 end;
 if l0 then context( nr. ..array[1].. --- ..array[l]) end;
 \stopluacode
\stopsetups

\setupheadertexts[\texsetup{linenumber}]

\starttext

\dorecurse{6}{\input tufte\par}

\startlinenumbering
\dorecurse{20}{\input knuth\par}
\stoplinenumbering

\resetmarking[linenumber]

\dorecurse{6}{\input tufte\par}

\stoptext

--
luigi
___
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] [OT] Github compromised

2012-03-05 Thread luigi scarso
https://lwn.net/Articles/485162/
-- 
luigi
___
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] A question

2012-03-05 Thread Hans Hagen

On 3-3-2012 21:22, Aydemir, Oz wrote:

Hans:

Do you think you could kindly provide an example how to include or embed an mp3 
or m4a or any audio file in ConTeXt?

Thank you in advance.


\definerenderingwindow
  [example]
  [width=0pt,height=0pt,frame=off]

\setupinteraction[state=start]

\useexternalrendering
  [mysound]
  [audio/mpeg]
  [50wordsforsnow.mp3]
  []

\definereference [StartSoundTrack] [StartRendering{mysound}]
\definereference [StopSoundTrack]  [StopRendering{mysound}]

\definelayer[resources][width=\paperwidth,height=\paperheight]

\setupbackgrounds[page][background=resources]

\starttext

\setlayer[resources]{\placerenderingwindow[example][mysound]} % once

\startTEXpage
\button{start}[StartSoundTrack]
\button{stop}[StopSoundTrack]
\stopTEXpage

\startTEXpage
\button{start}[StartSoundTrack]
\button{stop}[StopSoundTrack]
\stopTEXpage

\stoptext

Some day I'll finish that code and make an auto-rendering-window option.

There are other ways to include mp3 but that creates a dependency on flash.


-
  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] Bug in ConTeXt? Conflict in titles, sections and bibliography (was bibliography problems)

2012-03-05 Thread Hans Hagen

On 3-3-2012 09:44, Jaroslav Hajtmar wrote:

Hello ConTeXist.
I present an bug with which I have been seeing over the last few
versions of Context.
In collaboration with Thomas, who helped me find the perfect minimal
example, I managed to finally find out what is the core of my problem.
But it is perhaps deeper than at first glance. Bibliographic system is
today (last version of standalone) in conflict with results of \title
and \section commands.

I show in the example below, how strange it works ConTeXt, while using
inserting of the bibliography together with title and section commands.


It's not that strange. The criterium=cite is in fact a criterium=here in 
the list resolver. Lists can be called up for each section (or level) 
but as soon as you mess with structure you need to be a bitmore 
explicit. In this case, you can try criterium=local. Of course we could 
make criterium=cite fall back on that in the case of a unnumbered 
structure (which is what title implies) but I'm not so sure of other 
side effects. So, I'm hesitant to change something to solve this 
bordercase.


In general, when using some extra structure, like fontmatter, it gets 
easier to call up (local) lists.


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] Referencing a definition

2012-03-05 Thread Hans Hagen

On 4-3-2012 23:52, Kip Warner wrote:

Hey list,

I have a definition, like so...

\startdefinition[definition:Foo]{Foo}
Definition of foo here...
\stopdefinition

I'd like to reference it in the same way I would a section like
\in{section}[Node]. How can I do the same with a definition such that it
will typeset a clickable section number or some such to get to the
definition?


\definedescription[test]

\starttext

\starttest[ward] {one} \input ward \stoptest

bla bla \at{page}[ward] we define \about[ward]

\stoptext


-
  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] TOC: alternative=c not working?

2012-03-05 Thread Wolfgang Schuster

Am 05.03.2012 um 08:40 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

 Hello,
 
 the following sample doesn't give the dotted style (#.# Name  page) 
 of the TOC - dots are missing:
 
  t-TOC.mkiv
 \setupcombinedlist[content][alternative=c]
 
 \starttext
  \completecontent
  \page
 
  \section{Sec}
\subsection{SSec}
  \subsubsection{SSSec}
 
\input knuth
 \stoptext
 
 
 My fault or something is broken or a new approach?

Use \setuplist[section,…][alternative=c].

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] Footnotes gone

2012-03-05 Thread Kip Warner
Hey list,

For the first time in several months, today's nightly build actually
managed to digest my book without crashing or bailing. I'm using
2012.03.05.

There is one thing I noticed though and that is all of my footnotes are
now invisible. The number next to them is visible, but the text itself
is black on black (my page colour is black).

I am preparing my footnotes as such:
\definecolor[colour_page][r=0,g=0,b=0]
\definecolor[colour_text][r=0.754,g=0.516,b=0.324]
\definecolor[colour_footnote_background][colour_page]
\definecolor[colour_footnote_text][colour_text]

\setupfootnotes
  [color=colour_footnote_text,
   backgroundcolor=colour_footnote_background]

This was working in previous builds, but it could be someone changed the
method to alter the footnote text's colour.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Including command output

2012-03-05 Thread Kip Warner
On Sun, 2012-03-04 at 23:20 -0500, Aditya Mahajan wrote:
 If you want to use the automagic way, you can define \BazaarRevision to 
 redefined \BazaarRevision, for example:
 
 \def\BazaarRevision
{\ctxlua{context.setevalue(
  BazaarRevision,
   os.resultofbzr revno | tr -d '\\n')}%
 \BazaarRevision}

Hey Aditya. I tried the automagic method, but ConTeXt bails:

! TeX capacity exceeded, sorry [text input levels=127].
\BazaarRevision ...ltofbzr revno | tr -d '\\n')}
  \BazaarRevision 
l.4 }
 
\BazaarRevision ...ltofbzr revno | tr -d '\\n')}
  \BazaarRevision 
l.4 }
 
\BazaarRevision ...ltofbzr revno | tr -d '\\n')}
  \BazaarRevision 
l.4 }
 
...
l.58 
 
!  == Fatal error occurred, no output PDF file produced!
mtx-context | fatal error: return code: 1


Based on what I saw from htop, it looks like it running the command into
the ground over and over again which is the exact opposite of what we
are trying to do.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Referencing a definition

2012-03-05 Thread Kip Warner
On Mon, 2012-03-05 at 18:04 +0100, Hans Hagen wrote:
 \definedescription[test]
 
 \starttext
 
 \starttest[ward] {one} \input ward \stoptest
 
 bla bla \at{page}[ward] we define \about[ward]
 
 \stoptext

Hey Hans. I think that might be a good workaround until I'm confident
that that's the best way to typeset the kind of reference I need.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] \definedescription usage

2012-03-05 Thread Kip Warner
Hey list,

I'd like the contents of my \startdefinition \stopdefinition pairs to
have their title above them on a line of their own, but am having
problems with the usage:

\definedescription[definition]
  [location=top,
   hang=20,
   headcolor=colour_head,
   headstyle=boldslanted,
   command=\hskip-1cm,
   margin=1cm]

According to what I understand here,
http://wiki.contextgarden.net/Description#ConTeXt_3
, this should work?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Itemize Prefixes

2012-03-05 Thread Kip Warner
On Sun, 2012-03-04 at 23:26 -0500, Aditya Mahajan wrote:
 On Sun, 4 Mar 2012, Kip Warner wrote:
 
  Hey list,
 
  I'd like an itemized list using the following format...
 
  Article I ...
  Article II ...
  Article III ...
 
  ...and so on. I've tried defining the behaviour with...
 
  \defineenumeration[article]
 [location=top,
 text=Article,
 between=\blank,
 before=\blank,
 after=\blank]
  \setupenumerations[article][R]
 
  ...but the problem is that after a list of items provided with matching
  \startarticle \stoparticle pairs, the last count persists to the next
  list of items which should start at 'I' again. I am assuming I am not
  doing this correctly and would appreciate any suggestions.
 
 Use itemgroup rather than enumerations.

Thanks Aditya, but could you give me an example of how to do this? As
usual, I am not able to take much away from the ConTeXt wiki. Sorry.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Including command output

2012-03-05 Thread Aditya Mahajan

On Mon, 5 Mar 2012, Kip Warner wrote:


On Sun, 2012-03-04 at 23:20 -0500, Aditya Mahajan wrote:

If you want to use the automagic way, you can define \BazaarRevision to
redefined \BazaarRevision, for example:

\def\BazaarRevision
   {\ctxlua{context.setevalue(
 BazaarRevision,
  os.resultofbzr revno | tr -d '\\n')}%
\BazaarRevision}


Hey Aditya. I tried the automagic method, but ConTeXt bails:

! TeX capacity exceeded, sorry [text input levels=127].
\BazaarRevision ...ltofbzr revno | tr -d '\\n')}
 \BazaarRevision
l.4 }

\BazaarRevision ...ltofbzr revno | tr -d '\\n')}
 \BazaarRevision
l.4 }

\BazaarRevision ...ltofbzr revno | tr -d '\\n')}
 \BazaarRevision
l.4 }

...
l.58


The attached file works at my end.



Based on what I saw from htop, it looks like it running the command into
the ground over and over again which is the exact opposite of what we
are trying to do.


No. It is defining \BazaarVersion once and then reusing the result. Add 
\loggingall to your file to see what is happening.


Aditya

test.tex
Description: TeX 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] Itemize Prefixes

2012-03-05 Thread Aditya Mahajan

On Mon, 5 Mar 2012, Kip Warner wrote:


On Sun, 2012-03-04 at 23:26 -0500, Aditya Mahajan wrote:

On Sun, 4 Mar 2012, Kip Warner wrote:


Hey list,

I'd like an itemized list using the following format...

Article I ...
Article II ...
Article III ...

...and so on. I've tried defining the behaviour with...

\defineenumeration[article]
   [location=top,
   text=Article,
   between=\blank,
   before=\blank,
   after=\blank]
\setupenumerations[article][R]

...but the problem is that after a list of items provided with matching
\startarticle \stoparticle pairs, the last count persists to the next
list of items which should start at 'I' again. I am assuming I am not
doing this correctly and would appreciate any suggestions.


Use itemgroup rather than enumerations.


Thanks Aditya, but could you give me an example of how to do this? As
usual, I am not able to take much away from the ConTeXt wiki. Sorry.


\defineitemgroup[article]

\setupitemgroup
  [article]
  [
left={Article },
stopper=,
symbol=R,
before=\blank,
after=\blank,
distance=0.5em,
  ]

\setupitemgroup
  [article]
  [broad,fit]


\starttext

\startarticle
  \item First article
  \item Second article
\stoparticle

Again

\startarticle
  \item First article
  \item Second article
\stoparticle
\stoptext

Aditya
___
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] Including command output

2012-03-05 Thread Kip Warner
On Mon, 2012-03-05 at 22:05 -0500, Aditya Mahajan wrote:
 The attached file works at my end.

It works at my end as well, but just not as part of my book.

 No. It is defining \BazaarVersion once and then reusing the result. Add 
 \loggingall to your file to see what is happening.

It still bails. This is what I see with \loggingall placed in the
environment file.

...
{vertical mode: \tracingstats}
{\tracingpages}
{\tracingoutput}
{\tracinglostchars}
{\tracingmacros}
{\tracingparagraphs}
{\tracingrestores}
{\showboxbreadth}
{\showboxdepth}
{\tracinggroups}
{\tracingifs}
{\tracingscantokens}
{\tracingnesting}
{\tracingassigns}
{into \tracingassigns=2}
{\errorstopmode}

{\tracingonline}
{changing \tracingonline=1}
! TeX capacity exceeded, sorry [text input levels=127].
\BazaarRevision ...ltofbzr revno | tr -d '\\n')}
  \BazaarRevision 
l.4 }
 
\BazaarRevision ...ltofbzr revno | tr -d '\\n')}
  \BazaarRevision 
l.4 }
 
\BazaarRevision ...ltofbzr revno | tr -d '\\n')}
  \BazaarRevision 
l.4 }
 
...
l.60 
 
!  == Fatal error occurred, no output PDF file produced!
mtx-context | fatal error: return code: 

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Including command output

2012-03-05 Thread Aditya Mahajan

On Mon, 5 Mar 2012, Kip Warner wrote:


On Mon, 2012-03-05 at 22:05 -0500, Aditya Mahajan wrote:

The attached file works at my end.


It works at my end as well, but just not as part of my book.


Hard to debug without the actual test file.


No. It is defining \BazaarVersion once and then reusing the result. Add
\loggingall to your file to see what is happening.


It still bails. This is what I see with \loggingall placed in the
environment file.



Use

{\loggingall \BazaarRevision }

in your file and attach the output of the log file.

Aditya
___
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] Itemize Prefixes

2012-03-05 Thread Kip Warner
On Mon, 2012-03-05 at 22:10 -0500, Aditya Mahajan wrote:

Thanks Aditya. A couple questions for you.

 \defineitemgroup[article]
 
 \setupitemgroup
[article]
[
  left={Article },
  stopper=,
  symbol=R,
  before=\blank,
  after=\blank,
  distance=0.5em,
]
 
 \setupitemgroup
[article]
[broad,fit]

Why is another \setupitemgroup being used here when broad,fit could have
been merged with its previous one that both affected the article
itemgroup?

 
 \starttext
 
 \startarticle
\item First article
\item Second article
 \stoparticle
 
 Again

How do I add an extra line after the header? I tried adding another
\blank to the after parameter of \setupitemgroup, but it didn't seem to
use it.

 \startarticle
\item First article
\item Second article
 \stoparticle
 \stoptext
 
 Aditya

Lastly, how do I change the text colour of the item header? I tried the
following to no avail,

\setuphead
  [article]
  [color=colour_head]

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Including command output

2012-03-05 Thread Kip Warner
On Mon, 2012-03-05 at 22:15 -0500, Aditya Mahajan wrote:
 Use
 
 {\loggingall \BazaarRevision } 

I added the above to my environment, but this is all I see. I think this
is the same as last time:

+ /usr/share/texmf/tex/context/third/simplefonts/t-simplefonts.lua)
{vertical mode: \tracingstats}
{\tracingpages}
{\tracingoutput}
{\tracinglostchars}
{\tracingmacros}
{\tracingparagraphs}
{\tracingrestores}
{\showboxbreadth}
{\showboxdepth}
{\tracinggroups}
{\tracingifs}
{\tracingscantokens}
{\tracingnesting}
{\tracingassigns}
{into \tracingassigns=2}
{\errorstopmode}

{\tracingonline}
{changing \tracingonline=1}
! TeX capacity exceeded, sorry [text input levels=127].
\BazaarRevision ...ltofbzr revno | tr -d '\\n')}
  \BazaarRevision 
l.4 }
 
\BazaarRevision ...ltofbzr revno | tr -d '\\n')}
  \BazaarRevision 
l.4 }
 
\BazaarRevision ...ltofbzr revno | tr -d '\\n')}
  \BazaarRevision 
l.4 }
 
...
l.61 
 
!  == Fatal error occurred, no output PDF file produced!
mtx-context | fatal error: return code: 1

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Including command output

2012-03-05 Thread Aditya Mahajan


On Mon, 5 Mar 2012, Kip Warner wrote:


On Mon, 2012-03-05 at 22:15 -0500, Aditya Mahajan wrote:

Use

{\loggingall \BazaarRevision }


I added the above to my environment, but this is all I see.


Can you attach your complete log file?

Aditya
___
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] Itemize Prefixes

2012-03-05 Thread Kip Warner
On Mon, 2012-03-05 at 22:10 -0500, Aditya Mahajan wrote:
 \starttext
 
 \startarticle
\item First article
\item Second article
 \stoparticle
 
 Again

Another thing I just noticed is that using \startarticle[start=20]
before an item block doesn't always begin counting at that. On some
blocks it starts where it should at 'start', and other times it ignores
it and starts from 1 again.

 \startarticle
\item First article
\item Second article
 \stoparticle
 \stoptext
 
 Aditya

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com



signature.asc
Description: This is a digitally signed message part
___
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] Including command output

2012-03-05 Thread Kip Warner
On Mon, 2012-03-05 at 22:38 -0500, Aditya Mahajan wrote:
 Can you attach your complete log file?

Attached.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
resolversresolving  loading configuration file '/usr/share/texmf/web2c/contextcnf.lua'

(Source/Handbook.tex

ConTeXt  ver: 2012.03.05 19:49 MKIV  fmt: 2012.3.5  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   Handbook.top loaded

system   options  start used options

used options % runtime options files (command line driven)
used options \unprotect
used options % feedback and basic job control
used options % handy for special styles
used options \startluacode
used options document = document or { }
used options document.arguments={
used options  [purgeresult]=true,
used options  [result]=Avaneya Project Crew Handbook.pdf,
used options }
used options document.files={
used options  Source/Handbook.tex,
used options }
used options \stopluacode
used options % process info
used options \setupsystem[inputfile=Source/Handbook.tex]
used options \setupsystem[file=Avaneya Project Crew Handbook.pdf]
used options \setupsystem[\c!n=1,\c!m=1]
used options % modes
used options % options (not that important)
used options \startsetups *runtime:options
used options \stopsetups
used options % styles and modules
used options \startsetups *runtime:modules
used options \stopsetups
used options % done
used options \protect \endinput

system   options  stop used options

(Handbook.top)
fontslatin modern fonts are not preloaded
languageslanguage en is active
{/usr/share/texmf/fonts/map/pdftex/context/mkiv-base.map}
fontspreloading latin modern fonts (second stage)
fontstypescripts  unknown: library 'loc'
{/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map}
fontsdefining  forced type afm of stmary10 not found
fontsdefining  font with asked name 'stmary10' is not found using lookup 'file'
fontsvirtual math  loading font LMMath7-Regular subfont 9 with name stmary10.afm at 458752 is skipped, not found
fontsdefining  forced type afm of stmary10 not found
fontsdefining  font with asked name 'stmary10' is not found using lookup 'file'
fontsvirtual math  loading font LMMath9-Regular subfont 9 with name stmary10.afm at 589824 is skipped, not found
fontsdefining  forced type afm of stmary10 not found
fontsdefining  font with asked name 'stmary10' is not found using lookup 'file'
fontsvirtual math  loading font LMMath12-Regular subfont 9 with name stmary10.afm at 786432 is skipped, not found
fontsfallback modern rm 12pt is loaded
(Source/Environment.tex
resolversmodules  loaded: 'units'
(/usr/share/texmf/tex/context/base/m-units.mkiv+ /usr/share/texmf/tex/context/base/x-mathml.lua)
resolversmodules  loaded: 'simplefonts'
(/usr/share/texmf/tex/context/third/simplefonts/t-simplefonts.tex
loading  ConTeXt User Module / Simplefonts
+ /usr/share/texmf/tex/context/third/simplefonts/t-simplefonts.lua)
{vertical mode: \tracingstats}
{\tracingpages}
{\tracingoutput}
{\tracinglostchars}
{\tracingmacros}
{\tracingparagraphs}
{\tracingrestores}
{\showboxbreadth}
{\showboxdepth}
{\tracinggroups}
{\tracingifs}
{\tracingscantokens}
{\tracingnesting}
{\tracingassigns}
{into \tracingassigns=2}
{\errorstopmode}

{\tracingonline}
{changing \tracingonline=1}
{into \tracingonline=0}

\BazaarRevision -\ctxlua {context.setevalue( BazaarRevision, os.resultofbzr revno | tr -d '\\n')}\BazaarRevision 

\ctxlua -\directlua \zerocount 
{\directlua}

\setevalue #1-\expandafter \edef \csname #1\endcsname 
#1-BazaarRevision
{\expandafter}
{\csname}
{\edef}
{changing \BazaarRevision=macro:-\ctxlua {context.setevalue( B\ETC.}
{into \BazaarRevision=macro:-178}

\BazaarRevision -178
{the character 1}
\everypar-\page_otr_command_synchronize_side_floats \checkindentation \showparagraphnumber \restoreinterlinepenalty \flushnotes \synchronizenotes \OTRSETshowstatus \flushpostponedbookmark \registerparoptions \flushpostponednodedata \typo_delimited_repeat \insertparagraphintro \dotagsetparcounter 

\page_otr_command_synchronize_side_floats -\page_sides_synchronize_floats 

\page_sides_synchronize_floats -\ifinner \else \page_sides_check_floats \fi 
{horizontal mode: \ifinner: (level 1) entered on line 49}
{false}
{\else: \ifinner (level 1) entered on line 49}

\page_sides_check_floats -\page_sides_analyse_progress \ifdim \d_page_sides_progress \zeropoint \page_sides_check_floats_set \else \page_sides_check_floats_reset \fi \parskip \s_spac_whitespace_parskip 


Re: [NTG-context] Itemize Prefixes

2012-03-05 Thread Aditya Mahajan

On Mon, 5 Mar 2012, Kip Warner wrote:


On Mon, 2012-03-05 at 22:10 -0500, Aditya Mahajan wrote:

Thanks Aditya. A couple questions for you.


\defineitemgroup[article]

\setupitemgroup
   [article]
   [
 left={Article },
 stopper=,
 symbol=R,
 before=\blank,
 after=\blank,
 distance=0.5em,
   ]

\setupitemgroup
   [article]
   [broad,fit]


Why is another \setupitemgroup being used here when broad,fit could have
been merged with its previous one that both affected the article
itemgroup?


Thats how itemgroup are configured. You cannot mix assignments (key=value) 
with options.



\starttext

\startarticle
   \item First article
   \item Second article
\stoparticle

Again


How do I add an extra line after the header?


You can use

\setupitemgroup
[article]
[command=\blank]

(in this case you can remove the second configuration (the one with broad, 
fit) or explicitly set width=0).



I tried adding another
\blank to the after parameter of \setupitemgroup, but it didn't seem to
use it.


\startarticle
   \item First article
   \item Second article
\stoparticle
\stoptext

Aditya


Lastly, how do I change the text colour of the item header? I tried the
following to no avail,

\setuphead
 [article]
 [color=colour_head]


Why do you expect \setuphead to change the way itemgroups behave? Use


\setupitemgroup
   [article]
   [color=...]

Aditya
___
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] Including command output

2012-03-05 Thread Aditya Mahajan

On Mon, 5 Mar 2012, Kip Warner wrote:


On Mon, 2012-03-05 at 22:38 -0500, Aditya Mahajan wrote:

Can you attach your complete log file?


Attached.


The error is not due to the macro \BazaarRevision. The log file shows that 
the group (for {\loggingall \BazaarRevison}) is closed properly; the error 
is displayed after that. So, something else in your setup is causing the 
error.


Aditya
___
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] Including command output

2012-03-05 Thread Kip Warner
On Mon, 2012-03-05 at 22:50 -0500, Aditya Mahajan wrote:
 The error is not due to the macro \BazaarRevision. The log file shows that 
 the group (for {\loggingall \BazaarRevison}) is closed properly; the error 
 is displayed after that. So, something else in your setup is causing the 
 error.

It doesn't bail unless I replace the previous definition with yours.
Here is an example of its usage from my source:

\setupinteraction
  [state=start,
   color=colour_link,
   contrastcolor=colour_link,
   focus=standard,
   title=Some Book (Bzr r\BazaarRevision),
   author=Some Book (Bzr r\BazaarRevision)]

The rest of the book just has some \BazaarRevision scattered here and
there, but I can't see anything unusual about their usage or context.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Itemize Prefixes

2012-03-05 Thread Kip Warner
On Mon, 2012-03-05 at 22:44 -0500, Aditya Mahajan wrote:
 Thats how itemgroup are configured. You cannot mix assignments (key=value) 
 with options.

I don't follow. What is the difference between this,

\setupitemgroup
   [article]
   [
 left={Article },
 stopper=,
 symbol=R,
 before=\blank,
 after=\blank,
 distance=0.5em,
   ]
\setupitemgroup
   [article]
   [broad,fit]

, and this?

\setupitemgroup
   [article]
   [
 left={Article },
 stopper=,
 symbol=R,
 before=\blank,
 after=\blank,
 distance=0.5em,
 broad,
 fit
   ]

 You can use
 
 \setupitemgroup
  [article]
  [command=\blank]

That worked. Thanks.

 Why do you expect \setuphead to change the way itemgroups behave? 

Because I can't make any sense of the thousands of pages of ConTeXt
documentation scattered everywhere with little apparent rhyme or reason
to its usage and with everything other than whatever it is that I seem
to need present in them.

 Use
 
 
 \setupitemgroup
 [article]
 [color=...]

I tried that and it did nothing.

\definecolor[colour_text][r=0.754,g=0.516,b=0.324]
\setupitemgroup
[article]
[color=colour_text]

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Referring to items

2012-03-05 Thread Kip Warner
Hey list,

I am following the instructions here but they do not seem to be working:
http://wiki.contextgarden.net/Enumerations#Referring_to_items

I have an item block typeset with the following:

\startitemize[R,2*broad][start=11]
\setupitemize[left=(, right=)]
\item[first_item] another item
\item another item
\item[last_item] another item
\stopitemize

I attempt to reference the first item with the following:

\in{item}[first_item]

But all I see in the final PDF are two ?? characters where I expected
the reference.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Including command output

2012-03-05 Thread Aditya Mahajan

On Mon, 5 Mar 2012, Kip Warner wrote:


On Mon, 2012-03-05 at 22:50 -0500, Aditya Mahajan wrote:

The error is not due to the macro \BazaarRevision. The log file shows that
the group (for {\loggingall \BazaarRevison}) is closed properly; the error
is displayed after that. So, something else in your setup is causing the
error.


It doesn't bail unless I replace the previous definition with yours.
Here is an example of its usage from my source:

\setupinteraction
 [state=start,
  color=colour_link,
  contrastcolor=colour_link,
  focus=standard,
  title=Some Book (Bzr r\BazaarRevision),
  author=Some Book (Bzr r\BazaarRevision)]


Why don't you use the first version (\initializebazaarversion and 
\usebazaarversion)?


\def\initializeBazaar
   {\ctxlua{context(\\global\\edef\\BazaarRevision{\%s},
os.resultofbzr revno | tr -d '\\n')}}

\initializeBazaar

\setupinteraction
  [state=start,
   color=colour_link,
   contrastcolor=colour_link,
   focus=standard,
   title=Some Book (Bzr r\BazaarRevision),
   author=Some Book (Bzr r\BazaarRevision)]

\starttext

Hello \BazaarRevision Bye

\stoptext



The rest of the book just has some \BazaarRevision scattered here and
there, but I can't see anything unusual about their usage or context.


It helps if you try to create a minimal example.

Aditya
___
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] Itemize Prefixes

2012-03-05 Thread Aditya Mahajan

On Mon, 5 Mar 2012, Kip Warner wrote:


On Mon, 2012-03-05 at 22:44 -0500, Aditya Mahajan wrote:

Thats how itemgroup are configured. You cannot mix assignments (key=value)
with options.


I don't follow. What is the difference between this,

\setupitemgroup
  [article]
  [
left={Article },
stopper=,
symbol=R,
before=\blank,
after=\blank,
distance=0.5em,
  ]
\setupitemgroup
  [article]
  [broad,fit]

, and this?

\setupitemgroup
  [article]
  [
left={Article },
stopper=,
symbol=R,
before=\blank,
after=\blank,
distance=0.5em,
broad,
fit
  ]



ConTeXt checks if the argument of \setupitemgroup has an assignment 
(key=value), then it calls a version of \setparameters; otherwise it calls 
a version of \processcommalist. So, if you use assignments and options in 
the same command, the options get ignored.


All ConTeXt commands behave like this.


You can use

\setupitemgroup
 [article]
 [command=\blank]


That worked. Thanks.


Why do you expect \setuphead to change the way itemgroups behave?


Because I can't make any sense of the thousands of pages of ConTeXt
documentation scattered everywhere with little apparent rhyme or reason
to its usage and with everything other than whatever it is that I seem
to need present in them.


If you define a command using \define..., then you configure it using 
\setup. Other than a few exceptions, that's how it is.



Use


\setupitemgroup
[article]
[color=...]


I tried that and it did nothing.

\definecolor[colour_text][r=0.754,g=0.516,b=0.324]
\setupitemgroup
   [article]
   [color=colour_text]


Minimal example?

Aditya
___
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] Including command output

2012-03-05 Thread Kip Warner
On Tue, 2012-03-06 at 00:04 -0500, Aditya Mahajan wrote:
 Why don't you use the first version (\initializebazaarversion and 
 \usebazaarversion)?
 
 \def\initializeBazaar
 {\ctxlua{context(\\global\\edef\\BazaarRevision{\%s},
  os.resultofbzr revno | tr -d '\\n')}}
 
 \initializeBazaar

Very good question. I suppose trying to get the automagic method to work
doesn't matter since the above works fine. Thanks again Aditya.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Itemize Prefixes

2012-03-05 Thread Kip Warner
On Tue, 2012-03-06 at 00:22 -0500, Aditya Mahajan wrote:
 ConTeXt checks if the argument of \setupitemgroup has an assignment 
 (key=value), then it calls a version of \setparameters; otherwise it calls 
 a version of \processcommalist. So, if you use assignments and options in 
 the same command, the options get ignored.
 
 All ConTeXt commands behave like this.

That's probably buried deep in the documentation somewhere and in that
sense it's my fault. But at the same time, that's got to be the most
counterintuitive syntax of any language I've ever used.

  \definecolor[colour_text][r=0.754,g=0.516,b=0.324]
  \setupitemgroup
 [article]
 [color=colour_text]
 
 Minimal example?
 
 Aditya

It's ok, I found the problem. The code works, but I was setting the
wrong color value ;)

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Simple bibliography

2012-03-05 Thread Jaroslav Hajtmar

Hello ConTeXist.
Unfortunately, I give up. The standard way to use the bibliography fail 
(output still is not sorted in the order they came citing). I can not  
even after many hours of testing and experimenting get win. Therefore I 
decide that I am looking now other ways. Does anyone have experience 
with simplebibliography in contextgarden 
(http://wiki.contextgarden.net/Simple_Bibliography)?

Solve someone something like that? Has anybody a simple minimal example?
From information from wikipedia I do not make functional example 
(especially the first case). Second case is very simple and 
understandable, but  now I looking for a way to automate the sorting 
(that the order is not what I require).
Or exist something similar? Can you please advise me a way to get the 
better of a very simple bibliography without using standart bibliography 
system of ConTeXt?


Sorry to inundating these bibliographic questions, but I need to somehow 
resolve my problem in the near future and looking for every possibility, 
where to get something that would help me.


Thanx Jaroslav

Here is my minimal example from ConTeXtgarden (second option).
It shows (without automation) as the need.


\definereferenceformat[Cite][left={[},right={]}]

\defineitemgroup [bibliography] [levels=1]

\setupitemgroup  [bibliography]
 [symbol=n,
  left={[},
  right={]},
  width=1.5em,
  stopper=,
  itemalign=flushleft,
  inbetween={\blank[2pt]}
]

\appendtoks\let\bibitem\itemgroupitem\to\itemgroupcommands


\starttext

This is \Cite[4] and \Cite[2] \Cite[3]

\section{Bibliography}

\startbibliography
  \bibitem[4] (4) Hashimoto S., Sato F., Fabrication and mechanical 
properties of sintered leucite body, Journal of the Ceramics Society of 
Japan 113(7), 2005, 488-490
\bibitem[2] (2) IPS Classic, Scientific Documentation, Ivocar 
Vivadent, July 2003
  \bibitem[1] (1) Thermal expansion, chapter 2, The Materials 
Information Society
  \bibitem[3] (3) Taylor D., Henderson C.M.B., The thermal expansion of 
the leucite group of minerals, The American mineralogist, 
September-october 1968, 1476-1489

\stopbibliography


\stoptext

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

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


Re: [NTG-context] \definedescription usage

2012-03-05 Thread Wolfgang Schuster

Am 06.03.2012 um 03:05 schrieb Kip Warner:

 Hey list,
 
 I'd like the contents of my \startdefinition \stopdefinition pairs to
 have their title above them on a line of their own, but am having
 problems with the usage:
 
 \definedescription[definition]
  [location=top,

alternative=top,

   hang=20,
   headcolor=colour_head,
   headstyle=boldslanted,
   command=\hskip-1cm,
   margin=1cm]

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] TOC: alternative=c not working?

2012-03-05 Thread Procházka Lukáš Ing . - Pontex s . r . o .

... That is! Thank you.

Lukas


On Mon, 05 Mar 2012 21:30:57 +0100, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:



Am 05.03.2012 um 08:40 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:


Hello,

the following sample doesn't give the dotted style (#.# Name  page) of 
the TOC - dots are missing:

 t-TOC.mkiv
\setupcombinedlist[content][alternative=c]

\starttext
 \completecontent
 \page

 \section{Sec}
   \subsection{SSec}
 \subsubsection{SSSec}

   \input knuth
\stoptext


My fault or something is broken or a new approach?


Use \setuplist[section,…][alternative=c].

Wolfgang



--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

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