Re: [NTG-context] index issues

2020-11-06 Thread Duncan Hothersall
On Fri, 6 Nov 2020 at 14:31, Henning Hraban Ramm  wrote:

>
>
> > Am 06.11.2020 um 12:54 schrieb Duncan Hothersall :
> >
> > Without MWE try \showinjector and \setinjector.
> >
> > I would add to that that when experimenting with \showinjector you need
> to have at least one \setinjector as well otherwise it doesn't show the
> numbers.
> >
>
> It doesn’t work for me:
>
> lua error   > lua error on line 24 in file inhalt/99anhang.tex:
>
> registered function call [421]:
> ...-06/tex/texmf-context/tex/context/base/mkiv/typo-inj.lua:63: attempt to
> index a nil value (field '?')
> stack traceback:
> ...-06/tex/texmf-context/tex/context/base/mkiv/typo-inj.lua:63: in
> function <...-06/tex/texmf-context/tex/context/base/mkiv/typo-inj.lua:57>
> (...tail calls...)
>
> 23 \setinjector[Person][10][{\column}]
> 24 >>  \showinjector[Person]
>
>
> Regardless what I try as parameter of \showinjector (e.g. register, index,
> my own registers, one or a list) and where (in the environment or before
> \placeregister), I always get this error.
>
> Bug?
>
> LMTX version: 2020.09.20 23:02
>
> Hraban
>
>
I don't think \showinjector needs an argument. My MWE when I was looking at
this has just \showinjector after the register definition but before the
\setinjector[...] commands.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] index issues

2020-11-06 Thread Duncan Hothersall
On Fri, 6 Nov 2020 at 11:52, Jano Kula  wrote:

>
> On Fri, 6 Nov 2020 at 12:24, Henning Hraban Ramm  wrote:
>
>> Hello again,
>>
>> still struggling with indexes.
>>
>> I’ll prepare MWEs, but maybe you can answer some of these without?
>>
>
> Hello Hraban!
>
> Without MWE try \showinjector
>  and \setinjector
> .
>
> Jano
>
> I would add to that that when experimenting with \showinjector you need to
have at least one \setinjector as well otherwise it doesn't show the
numbers.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to really set the paper margin?

2020-11-04 Thread Duncan Hothersall
Hi Sylvain,

This page may be useful: https://wiki.contextgarden.net/Layout

Basically the core parameters are backspace and width, and topspace and
height. Everything else hangs off them.

Duncan

On Wed, 4 Nov 2020 at 15:48, Sylvain Hubert  wrote:

> Dear List,
>
> The following example results in a pdf that has a wide margin on both
> sides despite the \setuplayout :
>
> \showframe
> \setuppapersize[A4][A4]
> \setuplayout[margin=0cm, edge=0cm, margindistance=0cm,
> edgedistance=0cm]
> \starttext
> hello world
> \stoptext
>
> Does anyone know how to really set the paper margin?
>
> Thanks!
>
> Best,
> Sylvain
>
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Fine tuning an index

2020-10-09 Thread Duncan Hothersall
Just a note to add, that \showinjector doesn't seem to do anything unless
you also have a \setinjector command, which is a bit counterintuitive since
probably the first thing you want to do is see the ID of each line in your
list/register before you know what \setinjector command you need.

I've worked around it by adding

\setinjector[register][1][\relax]

after \showinjector.

On Fri, 9 Oct 2020 at 07:25, Duncan Hothersall  wrote:

> Brilliant, thanks, I didn't know about that one. Much appreciated.
>
> Duncan
>
> On Thu, 8 Oct 2020 at 21:36, jbf  wrote:
>
>> Duncan, have you looked at
>> https://wiki.contextgarden.net/Command/setinjector?
>> <https://wiki.contextgarden.net/Command/setinjector>
>>
>> You might also need \showinjector. But it should work for indexes
>> (register).
>>
>> Julian
>> On 9/10/20 2:58 am, Duncan Hothersall wrote:
>>
>> Fine tuning column and page breaking in an index. This is tricky, because
>> there are usually very few "good" places to break an index, and automatic
>> breaking seems to alter slightly depending on whether interactions are set
>> up or not, but is there a way to manually insert a column or page break
>> into the register before or after a certain entry, the way there is for a
>> table of contents?
>>
>>
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Fine tuning an index

2020-10-09 Thread Duncan Hothersall
Brilliant, thanks, I didn't know about that one. Much appreciated.

Duncan

On Thu, 8 Oct 2020 at 21:36, jbf  wrote:

> Duncan, have you looked at
> https://wiki.contextgarden.net/Command/setinjector?
> <https://wiki.contextgarden.net/Command/setinjector>
>
> You might also need \showinjector. But it should work for indexes
> (register).
>
> Julian
> On 9/10/20 2:58 am, Duncan Hothersall wrote:
>
> Fine tuning column and page breaking in an index. This is tricky, because
> there are usually very few "good" places to break an index, and automatic
> breaking seems to alter slightly depending on whether interactions are set
> up or not, but is there a way to manually insert a column or page break
> into the register before or after a certain entry, the way there is for a
> table of contents?
>
>
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Fine tuning an index

2020-10-08 Thread Duncan Hothersall
I'm doing my first mkiv index (it took me a long time to upgrade from
mkii!) and I really like the processor feature to format elements
differently. But there are a couple of things I would really like to
achieve that I'm struggling with:

   1. Elided numbers in an index range entry. For example if I have a
   \startregister - \stopregister pair resulting in an index entry like

   entry 354--356

   I would like to be able to make this read

   entry 354--6

   There are different conventions for number span elision but usually
   teens aren't elided so

   entry 314--316

   would become

   entry 314-16.

   It strikes me that if I could set up a processor specifically for page
   number ranges I could possibly write a macro to do elision; but I don't
   think that's currently possible? Maybe it's possible in lua to write code
   which both identifies range page numbers and carries out the elision. I'm
   not quite sure where to start.

   2. Fine tuning column and page breaking in an index. This is tricky,
   because there are usually very few "good" places to break an index, and
   automatic breaking seems to alter slightly depending on whether
   interactions are set up or not, but is there a way to manually insert a
   column or page break into the register before or after a certain entry, the
   way there is for a table of contents?

Sorry for no MWE, for obvious reasons. Any pointers to what might be able
to be done on these would be much appreciated.

Thanks.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Index range with page number suffix

2020-09-24 Thread Duncan Hothersall
(Using mkiv.)

I have an index in which some entries need suffixes on the page numbers,
for which I have used processors.

For index ranges, I need the page number suffix only to appear on the end
page number, not the start page number.

The below MWE produces an index entry: sausage  1i-2i

What I need is: sausage  1-2i

Is this possible?

MWE

\defineprocessor[important][right={\it{i}}]

\starttext
\samplefile{knuth}
\startregister[index][sausage][important->sausage]{sausage}
\dorecurse{6}{\samplefile{knuth}}
\stopregister[index][sausage]{sausage}
\samplefile{knuth}
\page
\placeindex
\stoptext


Thanks in advance,

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Overriding the number on a float

2020-08-25 Thread Duncan Hothersall
Thanks all for useful tips. I ended up doing something similar as a short
term fix for my float number override issue, basically setting up a new
float type to use for the deviant ones and then resetting the numbering of
the existing ones. It would be great if there was a facility to just drop
in an override on an individual float using the equivalent of
ownnumber={27.1b}, but I appreciate this may be much more complex under the
hood than it seems to a mere mortal. Certainly my brief perusal of the
sources left me baffled, as usual!

Thanks again.

Duncan

On Mon, 24 Aug 2020 at 22:51, Taco Hoekwater  wrote:

>
>
> > On 24 Aug 2020, at 19:59, Wolfgang Schuster <
> wolfgang.schuster.li...@gmail.com> wrote:
> >
> >>
> >>
> >> \setcounter[figure][5] % next figure is no.6
>
> For this subfigure stuff, perhaps this is useful?
>
> % setup definitions
> \definecounter[subfigure][way=bytext,prefix=no]
> \setupcounter[subfigure][state=start,numberconversion=a]
> \setcounter[subfigure][1]
>
> \def\setsubfigures
>   {\setcounter[subfigure][1]
>\incrementcounter[figure]
>
>  
> \setupcaption[figure][state=stop,numberstopper={\convertedcounter[subfigure]}]}
>
> \def\unsetsubfigures
>   {\setupcaption[figure][state=start,numberstopper=]}
>
> %usage
> \setsubfigures
>
> \startplacefigure[title=Test figure]
> \externalfigure[dummy]
> \stopplacefigure
>
> \incrementnumber[subfigure]
>
> \startplacefigure[title=Test another figure]
> \externalfigure[dummy]
> \stopplacefigure
>
> \unsetsubfigures
>
>
> I could not find a safe way to increment the subfigure number
> automatically, unfortunately.
>
> Best wishes,
> Taco
>
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>


-- 
Duncan Hothersall, Operations Director
CAPDM Limited - Online Program Enablers
0131 677 2400  www.capdm.com
Registered in Scotland: SC168970   VAT: 682 846 983
Registered address: 20 Forth Street Edinburgh EH1 3LH UK
<https://maps.google.com/?q=22+Forth+Street,+Edinburgh,+EH1+3LH,+UK=gmail=g>

Capture, author, publish, deliver and manage your learning materials.


*Sign up to the CAPDM newsletter here <http://eepurl.com/bqzBQn>*
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Overriding the number on a float

2020-08-23 Thread Duncan Hothersall
I think there was a question on this very recently but I don;t think it got
an answer and I can't find it to reply to, so apologies for the extra
noise. I have a large text with floats numbered sequentially by chapter and
then figure/table number, but at the last minute I've had a request for two
figures in a particular chapter to become 27.1a and 27.1b instead of 27.1
and 27.2. It's not a combination - they are separate figures on different
pages.

I've experimented with the options I can see, but it's not obvious if there
is a facility to override the numbering of two figures in a stream of
normally numbered figures like this. I was thinking of the equivalent of
the old \sym{symbol} command that used to work as a way to override a
single item in an otherwise sequential list.

I guess there's a brute force method of setting up a new type of figure
with the label "Figure 27.1" and having them numbered as lowercase alpha,
but if there's an easier way that would be great.

Thanks.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] pdf tagging for accesbility

2020-07-12 Thread Duncan Hothersall
I have no answer I'm afraid, but I would like to register a similar
interest in any potential answer to the question.

Duncan

On Sun, 12 Jul 2020, 14:20 David Eric Cox, 
wrote:

> Hello.
>
> Is there any way to pdf-tag table headers to assist screen readers and the
> like?  I can get tagging in general and thought that natural tables would
> work because of \bTABLEhead ... \eTABLEhead would do the job, but it
> doesn't.
>
> I'd appreciate any feedback.
>
> David
>
>
> Sent with ProtonMail  Secure Email.
>
>
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] chapter numbers

2020-06-08 Thread Duncan Hothersall
Use \setuplabeltext instead of \setupheadtext. I agree the documentation
suggests \setupheadtext should work the same way, but it doesn't seem to.
You might also want a space after the word Chapter.

Duncan

On Mon, 8 Jun 2020 at 05:38, jbf  wrote:

> I am attempting to get the word 'Chapter' to appear in the Chapter
> title, followed by its number, and I attempted to do it simply with:
>
> \setupheadtext[chapter=Chapter]
> \setuphead
>[chapter]
>[header=empty]
>
> What I get is simply the number, e.g. 1 My first chapter, 2 My second
> chapter etc. \setupheadtext is being ignored. What am I doing wrong?
>
> Julian
>
>
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> _______
>


-- 
Duncan Hothersall, Operations Director
CAPDM Limited - Online Program Enablers
0131 677 2400  www.capdm.com
Registered in Scotland: SC168970   VAT: 682 846 983
Registered address: 20 Forth Street Edinburgh EH1 3LH UK
<https://maps.google.com/?q=22+Forth+Street,+Edinburgh,+EH1+3LH,+UK=gmail=g>

Capture, author, publish, deliver and manage your learning materials.


*Sign up to the CAPDM newsletter here <http://eepurl.com/bqzBQn>*
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] MathML (mkiv) accent shifted to the left

2020-03-09 Thread Duncan Hothersall
Hi all.

I am reasonably sure that in mkii this overbar accent was placed correctly,
but in mkiv it is shifted to the left. Any ideas on how to fix it?

MWE:

\usemodule[mathml]
\starttext
This \xmlprocessdata{}{p}{} isn't
right.
\stoptext

Many thanks,

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Strange pagebreaks in LMTX

2019-09-05 Thread Duncan Hothersall
I have found in similar situations sometimes the easiest fix is to set the
backgroundcolor of footnotes to white (or your page colour if different).

Bests,

DH

On Thu, 5 Sep 2019 at 07:00, Otared Kavian  wrote:

> Hi Aditya,
>
> Thank you for your reply and for the link to your article: your
> explanations are cristal clear and the solution for me is to use what you
> explain.
>
> There is only one issue remaining, when using your code, that is:
>
> \definetextbackground
>   [leftbartext]
>   [
> location=paragraph,
> mp=mpos:region:leftbar,
> width=broad,
> frame=off,
> framecolor=darkred,
> rulethickness=.5pt,
> leftoffset=2ex,
> %rightoffset=2.25ex,
> %topoffset=2.25ex,
> %bottomoffset=2.25ex,
> background=color,
> backgroundcolor=white,
>   ]
>
> \startuseMPgraphic{mpos:region:leftbar}
>   draw_multi_pars;
>   draw_multi_side;
> \stopuseMPgraphic
>
> then when there is a footnote the leftbartext runs into the footnote,
> between the number and the footnote itself, and the result is not nice. I
> did not find a way to push the footnote and its number a little to the
> right, or the leftbartext to the left.
>
> Best regards: OK
>
> > On 5 Sep 2019, at 06:45, Aditya Mahajan  wrote:
> >
> > On Thu, 5 Sep 2019, Otared Kavian wrote:
> >
> >> Hi Wolfgang,
> >>
> >> Thanks for your answer. I tried Hans' suggestion to use \textbackground
> instead of background: indeed it solves the problem of incorrect page
> breaks, but it seems that \setuptextbackground « leftframe=on » is not
> honoured, that is one cannot say for instance:
> >>
> >>  \setuptextbackground[frame=off,leftframe=on]
> >>
> >> while using \background this would be possible.
> >
> > See
> >
> >
> https://adityam.github.io/context-blog/post/frame-with-solid-left-line-redux/
> >
> >
> 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://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
> ___
>


-- 
Duncan Hothersall, Operations Director
CAPDM Limited - Online Program Enablers
0131 477 8620  www.capdm.com
Registered in Scotland: SC168970   VAT: 682 846 983
Registered address: 20 Forth Street Edinburgh EH1 3LH UK
<https://maps.google.com/?q=22+Forth+Street,+Edinburgh,+EH1+3LH,+UK=gmail=g>

Capture, author, publish, deliver and manage your learning materials.

*Sign up to the CAPDM newsletter here <http://eepurl.com/bqzBQn>*
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Override MathML formula label

2019-07-29 Thread Duncan Hothersall
Brilliant, thanks Hans. Looks like I need to start delving properly into
the power of the XML setups.

Duncan

On Sun, 28 Jul 2019 at 21:04, Hans Hagen  wrote:

>
> \usemodule[mathml]
>
> \startxmlsetups mml:formula
>  \edef\mmlformulalabel{\xmlatt{#1}{label}}
>  \edef\mmlformulatitle{\xmlatt{#1}{title}}
>  \doifsomethingelse {\mmlformulalabel\mmlformulatitle} {
>
> \startplaceformula[reference=\mmlformulalabel,title=\mmlformulatitle]
>  \startformula
>  \xmlfirst{#1}{/mml:math}
>  \stopformula
>  \stopplaceformula
>  } {
>  \startformula
>  \xmlfirst{#1}{/mml:math}
>  \stopformula
>  }
> \stopxmlsetups
>
> Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Override MathML formula label

2019-07-27 Thread Duncan Hothersall
Hi all.

In processing MathML if I want a formula to be numbered I add a label="X"
attribute to the  tag as per:

\usemodule[mathml]
\starttext
\xmlprocessdata{}{
 
  p=c-t
 
}{}
\stoptext

This will label the formula as (1). I know I can adjust how the automatic
numbering is generated using \setupformulae, but how can I override the
label used for a specific formula, say to set it to (36A)?

Basically I have a setup where formulae are mostly numbered sequentially
but occasionally individual formulae need to have an out-of-sequence or
differently formatted number.

Thanks as ever for any help.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Unwanted white box above float

2019-07-22 Thread Duncan Hothersall
Brilliant! Thanks Taco.

On Mon, 22 Jul 2019 at 16:32, Taco Hoekwater  wrote:

> Hi,
>
> \setupfloat[thematicimage]
> [freeregion=no]
>
> But I do not know what that actually means.
> I just noticed that it makes the white background box not be white any
> more.
>
> Taco
>
>
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Unwanted white box above float

2019-07-22 Thread Duncan Hothersall
Hi all.

Have been experimenting with the many and varied options for placefloat to
try to resolve this problem with no success. As per minimal example below I
have nearly what I'm after - an image which floats to the right of a
background box with a 1em offset - but I can't get rid of the white box
which appears above it no matter what permutations I try.

(Secondary query: why do I have to set leftoffset=, rightoffset= etc.
individually for the text background? offset= seems to have no effect.)

Thanks for any help you can offer.


\definetextbackground[TintBoxedBackground]
[background=color,
backgroundcolor=cyan,
frame=off,
leftoffset=1em,
rightoffset=1em,
topoffset=1em,
bottomoffset=1em,
location=paragraph]

\definefloat[thematicimage][figure]
\setupfloat[thematicimage]
[default=right,none},
offset=1em,
margin=0em,
background=color,
backgroundcolor=cyan,
rightmargindistance=-1em]

\starttext

\starttextbackground[TintBoxedBackground]

{\bf Lorem ipsum dolor sit amet}\blank

\placethematicimage{}{\externalfigure[cow][width=0.30\makeupwidth]} Lorem
ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est
laborum.

\stoptextbackground

\stoptext


Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Side figure bug in mkiv?

2019-07-18 Thread Duncan Hothersall
On Thu, 18 Jul 2019 at 22:30, Henri Menke  wrote:

>
> Your formatting obscures the problem because compiling this example
> works fine.  I think you are starting a new paragraph before {\bf ...}.
> That is a well-known problem and there are posts about it on the mailing
> list every once in a while.  The sidefigure mechanism uses \parshape to
> make the paragraph flow around the figure.
>

Very many thanks Henri for your patient explanation, and my apologies for
inadvertently asking a FAQ. I had thought the effect hasn't happened with
the same content in mkii but it must have been a happenstance of different
formatting.

Thanks again for the clear solution.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Side figure bug in mkiv?

2019-07-18 Thread Duncan Hothersall
I think I have identified a bug in the side figure mechanism which is
demonstrated by the minimal example below. The {\bf …} construct causes the
para in which it appears to stop behaving properly with the side figure,
and the text overflows. The preceding and following paras which don't have
{\bf …} do behave properly.

I wondered if emphasis like \bf should be done differently (with a
start/stop mechanism?) in mkiv, but I found nothing to suggest it.

\starttext
Blah blah.
\placefigure[right,none]{}{\externalfigure[cow][width=0.30\makeupwidth]}
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah
blah blah blah blah.
{\bf Blah blah} blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah.
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah.
\stoptext

Thanks for any help.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Column spacing in MathML in mkiv

2019-07-18 Thread Duncan Hothersall
Hi all.

If I want to set the space between columns in a MathML , how do I
do it?

Minimal non-working example below (set the attribute columnspacing to
anything you like and it seems to be ignored). Is this a bug or is there a
feature I've missed?

\usemodule[mathml]
\starttext
\xmlprocessdata{}{

 
  
   ab
   =
   cd
  
  
   ef
   =
   gh
  
 
}{}
\stoptext

Many thanks.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] From mkii to mkiv: MathML mtable alignment

2019-07-08 Thread Duncan Hothersall
On Mon, 8 Jul 2019 at 16:22, Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com> wrote:

> Duncan Hothersall schrieb am 08.07.2019 um 16:45:
> > The command \setupMMLappearance[mtable][alternative=b] used to give
> > me, in mkii, MathML layouts in which the first column was ragged left,
> > the second column centred, and the third column ragged right. It now
> > seems to be ignored, and the output has all three columns centred.
> Use the columnalign attribute:
> http://www.pragma-ade.nl/general/manuals/mmlprime.pdf#page=33
>
> Wolfgang
>
> Brilliant, many thanks Wolfgang.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] From mkii to mkiv: MathML mtable alignment

2019-07-08 Thread Duncan Hothersall
The command \setupMMLappearance[mtable][alternative=b] used to give me, in
mkii, MathML layouts in which the first column was ragged left, the second
column centred, and the third column ragged right. It now seems to be
ignored, and the output has all three columns centred.

Minimal working example showing the problem:

\usemodule[mathml]

\setupMMLappearance[mtable][alternative=c]

\starttext

Some text.

\xmlprocessdata{}{

 
  
   
x
+
y
   
   
=
   
   
2.56
 million
   
  
  
   
x
   
   
=
   
   
2.56
   
  
 

  }{}

Some more text.

\stoptext

What is the successor to \setupMMLappearance please?

Thanks very much.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] mkiv MathML bug?

2019-06-27 Thread Duncan Hothersall
On Thu, 27 Jun 2019, 20:46 Hans Hagen,  wrote:

> On 6/27/2019 6:35 PM, Duncan Hothersall wrote:
> > I'm not sure this is something more general in the MathML module or if
> > it's specific to the vertical bar in this particular context, but here
> > is a minimal example showing that the "=0" at the end of the equation is
> > disappearing:
>
> there is indeed some issue, i'll look into it
>

Thanks Hans.

>
>
> you can also try
>
>  
>B
>C
>

I did try that, it didn't seem to work quite as expected either.

Thanks again.

Duncan

>
>
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] mkiv MathML bug?

2019-06-27 Thread Duncan Hothersall
I'm not sure this is something more general in the MathML module or if it's
specific to the vertical bar in this particular context, but here is a
minimal example showing that the "=0" at the end of the equation is
disappearing:

\usemodule[mathml]
\starttext
\xmlprocessdata{}{

  A
  
B
|
C
  
  =
  0

  }{}
\stoptext

And here is a workaround using  instead of  for the vertical bar
which makes the "=0" magically reappear again:

\usemodule[mathml]
\starttext
\xmlprocessdata{}{

  A
  
B
|
C
  
  =
  0

  }{}
\stoptext

Flagged up mainly in case it is a bigger problem than just vertical bars in
this specific context.

Thanks,

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] mkii to mkiv - section numbering with minimal example

2019-06-23 Thread Duncan Hothersall
On Sun, 23 Jun 2019 at 19:08,  wrote:

>
> Hi Duncan,
>
> I guess this may be what you want to do:
>
> \setuphead[part][placehead=yes]
> \setuphead[section][sectionsegments=section]
> \setuphead[subsection][sectionsegments=section:subsection]
> \starttext
> \part{Part}
> \chapter{Chapter}
> \section{Section}
> \subsection{Subsection}
> \stoptext
>
> I hope it helps,
>
> Pablo
> --
> http://www.ousia.tk
>
>
> Belated thanks Pablo, I get the digest so I had posted my discovery of
this precise solution before I saw you supplying that answer. Apologies! It
works well.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] mkii to mkiv - section numbering with minimal example

2019-06-23 Thread Duncan Hothersall
On Sun, 23 Jun 2019 at 11:00, Hans Hagen wrote:

>
> in the test suite there are all kind of examples (zip can be downloaded
> from the website)
>
>
Thanks Hans. After some searching in the test suite I found the answer,
which I'll put here in case someone else is searching for it, which is:

\setuphead[section][sectionsegments=section]
\setuphead[subsection][sectionsegments=section:subsection]

which sets up sections to just be numbered with the section number instead
of the part, chapter and section number, and sets up subsections to just be
numbered with the section and subsection number.

Now that I know how to do it I see mkiv is much cleaner on this code and
the change gets reflected in tables of contents etc. This was much harder
in mkii. Thanks again.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] mkii to mkiv - section numbering with minimal example

2019-06-23 Thread Duncan Hothersall
Further to my previous query about updating from mkii to mkiv, I have
solved some of the issues by trial and error but am beginning to identify
the ones I can't resolve. My first minimal example is below.

I want the sections and subsections not to prefix the part and chapter
numbering, giving me this output:

Part 1
Chapter 1.1
Section 1
Subsection 1.1

The line that used to achieve this result was

\setupsection[section-3][previousnumber=no]

and there was also

\setuphead[section][partnumber=no,chapternumber=no]

but neither of these seems to work in mkiv


Minimal example:

\setupsection[section-3][previousnumber=no]
\setuphead[section][partnumber=no,chapternumber=no]

\starttext
\part{Part}
Part
\chapter{Chapter}
Chapter
\section{Section}
Section
\subsection{Subsection}
Subsection
\stoptext

Many thanks for any pointers.

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] mkii to mkiv - what an ancient user needs to know

2019-06-12 Thread Duncan Hothersall
Thanks Hans, that's good to know. I was seeing issues which seemed to be
related to setupheader statements using command=, which are in heavy use in
our system because we use this to externalise styles. But it could easily
have been something font-related left in some of the commands.

I will work on a minimal example over the next few days and - if I don't
solve it myself in the process - I'll post it.

Thanks again,

Duncan

On Wed, 12 Jun 2019 at 08:07, Hans Hagen  wrote:

> On 6/12/2019 5:22 AM, Duncan Hothersall wrote:
> > Hi all.
> >
> > Long-time user but haven't posted in a long while...
> > **
> >
> > After many happy years of running a mkii set up I am finally facing the
> > fact that time has moved on and upgrading to mkiv.
> >
> > I understand the biggest change needed to my sources is in the fonts
> > handling, but I am getting a few other problems with things like
> > chapter/sectioning setups that I can't see mentioned in
> > https://www.contextgarden.net/MkIV_Differences
> >
> > I was wondering if there exists a comprehensive "what you have to change
> > in your sources to move from mkii to mkiv" document anywhere or, failing
> > that, if anyone can offer guidance on what has changed in the
> > chapter/sectioning setups code between the two.
> >
> > Apologies for not supplying an example of code - I'm not yet at the
> > point that that's possible.
> >
> > Any help much appreciated. And hello to anyone who remembers me from
> > fifteen plus years ago!
> Do you get errors? There should be no real fundamental differences
> betwene mkii and mmkiv wrt the interfac, but because font encodings are
> gone and input is utf8 by default that might need to be changed.
> Structure has more options. I think the biggest conceptual change in the
> setups has been the way footnotes are configured. Of course there are
> new commands too.
>
> So, a small example triggering the issue would help,
>
> Hans
>
> ps. Of course the biggest change is that luatex is used instead of
> pdftex/xetex.
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] mkii to mkiv - what an ancient user needs to know

2019-06-11 Thread Duncan Hothersall
Hi all.

Long-time user but haven't posted in a long while...

After many happy years of running a mkii set up I am finally facing the
fact that time has moved on and upgrading to mkiv.

I understand the biggest change needed to my sources is in the fonts
handling, but I am getting a few other problems with things like
chapter/sectioning setups that I can't see mentioned in
https://www.contextgarden.net/MkIV_Differences

I was wondering if there exists a comprehensive "what you have to change in
your sources to move from mkii to mkiv" document anywhere or, failing that,
if anyone can offer guidance on what has changed in the chapter/sectioning
setups code between the two.

Apologies for not supplying an example of code - I'm not yet at the point
that that's possible.

Any help much appreciated. And hello to anyone who remembers me from
fifteen plus years ago!

Duncan
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] MP spot color in gradient - help!

2011-05-17 Thread Duncan Hothersall

 Struggling against a deadline here so apologies for no full sample.

I have a gradient fill defined using


\startuseMPgraphic{mpos:par:mylearnobj}
path p;
for i = 1 upto nofmultipars :
p := multipars[1] topenlarged 8pt bottomenlarged 8pt leftenlarged 3cm ;
color ca ; ca := \MPcolor{greenthirty} ;
color cb ; cb := \MPcolor{white} ;
sh := define_linear_shade(origin, origin shifted (120mm,0), ca, cb) ;
fill p withshade sh ;
endfor;
\stopuseMPgraphic


This works if the colour greenthirty is defined as a CMYK colour

\definecolor[TAXBgreenthirty][c=.3,m=0,y=.057,k=.069]

but, inevitably, my printer wants it defined as a spot ink, and when I 
do this:


\definecolor[PantoneThreeOneFourFive][c=1,m=0,y=.19,k=.23]
\definespotcolor[TAXBgreenthirty][PantoneThreeOneFourFive][p=.3]

the gradient turns to black instead of green. (The spot colour 
definition works fine in the rest of the document, just not in the 
gradient fill.)


Could someone possibly let me know if it is even possible to define a 
gradient using a spot colour, or if I should instead revert to some 
alternative solution.


Thanks,

Duncan
___
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] MP spot color in gradient - help!

2011-05-17 Thread Duncan Hothersall
 Right, thanks very much for the quick response Hans. I can remap 
colours with the tools we have here, except in the case of a gradient 
fill. I think I will try using a repeated graphic as a background 
instead, while waiting for printer's thoughts.


Thanks,

Duncan

On 17/05/2011 12:16, Hans Hagen wrote:

On 17-5-2011 12:24, Duncan Hothersall wrote:


Could someone possibly let me know if it is even possible to define a
gradient using a spot colour, or if I should instead revert to some
alternative solution.


I don't think so. Normally, if you use a specific color (recognizable) 
the printer should be able to remap that to some spot color (at least 
that is what we have done in the past, cf publisher specs).


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
-



--
Duncan Hothersall  +44 131 477 8624
Operations Director CAPDM Limited www.capdm.com
Registered in Scotland: SC168970 / 22 Forth St, Edinburgh EH1 3LH, UK

___
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] Creating a PDF named destination

2011-04-26 Thread Duncan Hothersall
 Thanks Hans but this doesn't work for me - when I open in Acrobat Pro 
no named destinations appear.


Duncan

On 26/04/2011 09:40, Hans Hagen wrote:

On 25-4-2011 5:31, Duncan Hothersall wrote:

\starttext
\chapter[myid]{My chapter}
Blah blah.
\section[myotherid]{My section}
Blah blah.
\stoptext


add \setupinteraction[state=start] and then in the pdf file you will 
find destinations like


/Names [... (myid) 5 0 R (myotherid) 7 0 R]

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
___


Re: [NTG-context] Creating a PDF named destination

2011-04-26 Thread Duncan Hothersall

 On 26/04/2011 10:27, Hans Hagen wrote:

On 26-4-2011 11:00, Duncan Hothersall wrote:


Thanks Hans but this doesn't work for me - when I open in Acrobat Pro no
named destinations appear.


not sure what you expect ... you have no hyperlinks (annotations) .. 
where do you expect to see destinations in pro? 
You can view a list of all named destinations in a file in Pro (View; 
Navigation tabs; Destinations) and these are externally accessible via 
links of the form filename.pdf#nameddest=destination name. That's what 
I'm trying to achieve.


It looks like it might be achievable with a third-party module called 
Navigator documented here: 
http://www.tex.ac.uk/ctan/macros/generic/navigator/navigator-doc.pdf but 
I haven't tried that out yet.


Thanks,

Duncan
___
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] Creating a PDF named destination

2011-04-25 Thread Duncan Hothersall

 Hello all,

This seems to be a very obvious FAQ but I can't find an answer anywhere. 
How can one create a named destination in an output PDF file such that 
an HTML link to filename.pdf#nameddest=name will work?


I'm using Mk II in case that is relevant. I kinda assumed that a section 
title with an ID would automatically create a named destination with the 
same ID, but that doesn't appear to be the case.


So given a file generated from


\starttext
\chapter[myid]{My chapter}
Blah blah.
\section[myotherid]{My section}
Blah blah.
\stoptext


I'd like to be able to link from an HTML file to the named destinations 
myid and myotherid using the #nameddest URL construct above.


Hope it makes sense and thanks for any help.

Duncan
___
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] Dotted leader in index entries

2010-11-11 Thread Duncan Hothersall

[Now with a proper example!]

Hello all.

I'm using Mk II. I need to set up dotted leaders between an index entry 
and its page number as show in this runnable sample:


\def\Icmd#1{#1\dotfill}
\setupregister[index][n=2,textcommand=\Icmd,distance=1em,alternative=A]
\starttext
\index{Example+This index entry doesn't quite work}\index{This is 
okay}\index{Example+This is okay}\index{This index entry is not correct 
at all}\index{Example+This is another example in which the leaders don't 
work cos of wrapping}A little text.\par

\placeindex
\stoptext

When the entry text is just long enough to fill up the horizontal space 
it is pushing the number over onto the next line. What I really need is 
for all page numbers to be at the right hand side, with leading dots. So 
I'd like a solution to produce either this:


Long index entry text
  123

or this:

Long index entry
  text..123

At the moment I'm putting forced line breaks before the last word to 
achieve what I need, but I would really like to automate this!


Thanks for any help, hope the issue is clear.

Duncan

___
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] Dotted leader in index entries

2010-11-06 Thread Duncan Hothersall

 [Reposting because I think my last message got mangled.]

Hello all.

I'm using Mk II. When I use the following setup to get dotted leaders 
between an index entry and its page number:


\def\MyIndexTextCmd#1{#1\dotfill}
\setupregister[Index][n=2,textcommand=\MyIndexTextCmd,distance=1em,alternative=A]

it works okay producing output like this:

Index entry.123

except when the entry text is just long enough to fill up the horizontal 
space, pushing the number over onto the next line. What I get in that 
scenario is this:


Index entry text...
  123

This is no good. What I really need is for all page numbers to be at the 
right hand side, with leading dots. So I'd like a solution to produce 
either this:


Index entry text...
  123

or preferably this:

Index entry
  text..123

At the moment I'm putting forced line breaks before the last word to 
achieve what I need, but I would really like to automate this!


Thanks for any help, hope the issue is clear.

Duncan

___
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] Dotted leader in index entries

2010-11-04 Thread Duncan Hothersall


  
  
Hello all.

[Using Mk II.]

I need to produce an index which looks like this:

Mainentry
   Subentry.3
   Slightly longer
   subentry..5
   See also X

I have the following setup:

\def\MyIndexTextCmd#1{#1\dotfill}
\setupregister[Index][n=2,textcommand=\MyIndexTextCmd,distance=1em,alternative=A]

which gives me something like:

Mainentry
   Subentry.3
   Slightly longer subentry..

   5
   See also X

I can work around the problem of the "See also X" line by adding an
\hfilll to avoid the generation of dots. But I really need all
pagenumbers to be at the right hand side, and not allow them to
break over to the left like in the second example.

At the moment I'm putting forced line breaks before the last word to
achieve what I need, but I would really like to automate this!

Thanks for any help, hope the issue is clear.

Duncan
  

___
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] Forcing \about to give the full title

2010-09-16 Thread Duncan Hothersall



\setupreferencing[width=]

Thanks Wolfgang, much appreciated, did the trick.

Duncan

___
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] Forcing \about to give the full title

2010-09-15 Thread Duncan Hothersall

 Hi folks.

Just hit a strange feature using \about to give me the title of a 
referenced section. When the title is long, there seems to be an 
automatic cut-off, as if some form of \nomarking had been used on the 
last words of the title. So with a section somewhere in the text like


\section[sect0101]{Residence and domicile and the taxation of overseas 
income}


a later reference of the form

See \about[sect0101] for further details

gives me

See 'Residence and domicile and the taxation of overseas ... ' for 
further details



What I would like is for the full title to be output, however long. I 
have had a look through the sources but not managed to identify where 
any default cut-off is defined. Can someone help.


Oh, and my apologies, I haven't upgraded to MkIV yet, so this is a MkII 
question.


Thanks very much,

Duncan
___
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] MPgraphic with rounded corners

2009-01-16 Thread Duncan Hothersall
Thank you to both Aditya and Wolfgang; I think I need to get a better 
grounding in the basic principles of MetaFun before trying to dabble 
again...


Duncan

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

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


[NTG-context] MPgraphic with rounded corners

2009-01-15 Thread Duncan Hothersall

Hello all.

I have adapted a bit of MP code from Aditya from a mailing list message 
dated 2006-05-19 
(http://archive.contextgarden.net/message/20060519.214124.9174ac0e.en.html) 
to ensure that when a page break occurs in a textbackground there is a 
forced vertical space inside the box at the top of the new page.


This code works fine for me (although interestingly not in the garden):


\setupcolors[state=start]

\startuseMPgraphic{mpos:par:myexample}
path p;
for i = 1 upto nofmultipars :
p := multipars[1] topenlarged 8pt bottomenlarged 8pt;
fill p withcolor 0.9white ;
draw p withcolor black
withpen pencircle scaled \MPvar{linewidth};
endfor;
\stopuseMPgraphic

\definetextbackground[ExampleBackground]
   
[mp=mpos:par:myexample,location=paragraph,leftoffset=1em,rightoffset=1em,rulethickness=1pt]


\starttext
\input knuth \endgraf
\starttextbackground[ExampleBackground]
\dorecurse{13}{\input knuth \endgraf}
\stoptextbackground
\input knuth \endgraf
\stoptext


But now I need to make this box have rounded corners, and I am very 
confused when reading core-pgr.tex because that is a level of MP code I 
just don't understand.


Would somebody please be able to tell me what to change in the above to 
make the corners of the box rounded (with a radius of 2mm)?


Thank you very much!

Duncan

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

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


Re: [NTG-context] 'See also' entries in register

2008-08-27 Thread Duncan Hothersall
No response to this - can I ask, is this a case of a bug in a mkII 
feature that is replaced in mkIV so isn't worth fixing? Understandable 
if so, just wanted to check...

Duncan

I wrote:

 \starttext
 I wish I was going to the ConTeXt\index{ConTeXt} meeting this year to 
 enjoy all the fun\seeindex{ConTeXt}{also fun}.
 \placeindex
 \stoptext

 I get output like this:

 -- 
 I wish I was going to the ConTeXt meeting this year to enjoy all the fun.

 c
 ConTeXt
see also fun 1
 -- 

 But I want this:

 --I wish I was going to the ConTeXt meeting this year to enjoy all the 
 fun.

 c
 ConTeXt 1
see also fun
 -- 


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

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


[NTG-context] 'See also' entries in register

2008-08-18 Thread Duncan Hothersall
I know everyone is preparing for fun in Bohinj (and I am gutted that I 
am missing it this year) but it would be really great if someone had the 
chance to work out how to fix this problem:

\starttext
I wish I was going to the ConTeXt\index{ConTeXt} meeting this year to 
enjoy all the fun\seeindex{ConTeXt}{also fun}.
\placeindex
\stoptext

I get output like this:

--
I wish I was going to the ConTeXt meeting this year to enjoy all the fun.

c
ConTeXt
see also fun 1
--

But I want this:

--I wish I was going to the ConTeXt meeting this year to enjoy all the fun.

c
ConTeXt 1
see also fun
--

Why is the page number of the first index entry attaching itself to the 
see subentry instead of the top level entry?

Is it my syntax, or is it a bug?

Thank you...

Duncan

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

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


[NTG-context] setupMMLappearance

2008-07-19 Thread Duncan Hothersall
Hello.

I am used to using
\setupMMLappearance[mtable][alternative=a|b|c]
to change the way the mathml module treats mtable alignments. I've just 
discovered it no longer seems to have any effect.

What I need to set up is an alignment where the first column of an 
mtable is right-aligned (ragged left), the second is centred, and the 
third is left-aligned (ragged right). But I keep getting the first 
column left-aligned, which makes multi-line equations look awful.

Is there a new mechanism for setting these alignments? It looked like it 
from reading newmml, but there don't seem to be any examples of usage. 
Can someone help?

Secondary question: how can I increase the gap between rows in an mtable 
- at the moment they are very squashed.

Sample code follows - produces ugly output on the garden:

\usemodule[newmml]
\setupMMLappearance[mtable][alternative=b]
\starttext
\startXMLdata
formulamathmtablemtrmtdmfracmrowmtextAverage 
inventory/mtext/mrowmrowmtextCost of 
sales/mtext/mrow/mfracmotimes;/momspace 
width=0.35em/mtext365/mtext/mtdmtdmo=/mo/mtdmtdmtextaverage
 
number of days to turn inventory into 
sales/mtext/mtd/mtrmtrmtdmfracmrowmtextpound;305/mtext/mrowmrowmtextpound;1,830/mtext/mrow/mfracmotimes;/momspace
 
width=0.35em/mtext365/mtext/mtdmtdmo=/mo/mtdmtdmtext60.83 
days/mtext/mtd/mtr/mtable/math/formula
\stopXMLdata
\stoptext


I'm using mk II.

Thanks very much,

Duncan

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

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


Re: [NTG-context] Sections, cross-references and separators

2008-04-01 Thread Duncan Hothersall
Taco wrote:
 In this case it is easier to make the actual chapter number include
 the 'A'. That way, you won't have to worry about separator at all
 (which is good, because its use is confusing).

 Try this:

 @@ -1,4 +1,4 @@
 -\setupheads[separator=] %-- this can't be right
   \setupreferencing[state=start,chapternumber=yes,global=yes]
 -\setupsection[section-1][conversion=Characters]
 -\setupsection[section-2][previousnumber=yes]
 +\def\Mychapter#1{\convertnumber{Characters}{\getvalue{@@sesection-1}}#1}
 +\defineconversion[MyChapter][\Mychapter]
 +\setupsection[section-2][conversion=MyChapter]
   
Ah, thanks so much Taco, never thought of that approach - works like a 
charm. (I also thought that macros with @ in their names could only be 
used in protected mode, so that's two things I have learned for the 
price of one.)

Do you think this is general interest enough to warrant wikifying?

Thanks very much.

Duncan

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

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


[NTG-context] Sections, cross-references and separators

2008-03-31 Thread Duncan Hothersall
Dear all,

I am confused. Here is a minimal version of my problem:

---
\setupheads[separator=] %-- this can't be right
\setupreferencing[state=start,chapternumber=yes,global=yes]
\setupsection[section-1][conversion=Characters]
\setupsection[section-2][previousnumber=yes]
\setuphead[part][placehead=yes,resetnumber=yes,page=no]
\setuphead[chapter][page=no]
\setuphead[section][number=no]
\setuppagenumbering[partnumber=no]
\starttext
\placelist[part,chapter,section][alternative=b,partnumber=no]
\part[ptest]{Ptest}
\chapter[ctest]{Ctest}
\section[stest]{Stest}
See \in{Chapter}[ctest] (should say A1) and \in{Figure}[ftest] (should 
say A1.1).
\placefigure[here][ftest]{Ftest (should be called A1.1)}{}
\stoptext
---

What I am aiming for is a style where:
Parts are labelled A, B, C [done],
Chapters are labelled A1, A2, A3 [done, but...],
Cross-references to Chapters call them A1, A2, A3 [not done: I'm 
getting A.1]
Figures are labelled A1.1, A1.2 [not done; I'm getting A.11 (eek!)]
Cross-references to Figures call them A1.1, A1.2 [not done: I'm 
getting A.11]

It seems to me that the line
\setupheads[separator=]
can't possibly be right and is almost certainly causing the missing dot 
in the Figure number, but it was the only way I could find to remove the 
dot between the A and the 1 in the chapter label. I have toiled a little 
with the core-ref code and cannot fathom how any of the variety of uses 
of the word separator make sense, or indeed if they really have 
anything to do with it... :-)

I'm testing on the garden, using pdfTeX. I'd be *really* grateful for 
some help with this one.

Thanks,

Duncan

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

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


[NTG-context] Font sizes using Chinese module

2007-11-07 Thread Duncan Hothersall
Hello all. I hope this is quite a simple question.

I'm using the Chinese module, with the font definitions in font-chi.tex, 
to typeset UTF-8 content. I can happily use the default sizes a, b, c, d 
and x, xx, xxx - so \bfd produces large bold, and \tfx produces small 
normal weight text.

But I really need to be able to do the equivalent of \definedfont[Bold 
at 48pt]. Unfortunately this doesn't work - it produces normal text size 
and weight.

Unfortunately it isn't easy to post an example, because you need UTF-8 
content, and you need the fonts set up for Chinese (which I believe 
ConTeXt Live doesn't currently have). So I'm hoping that someone 
familiar with the workings of font-chi.tex can tell me how to get 
specific point sizes of specific fonts. Is there a unicode font 
equivalent of \definedfont? Or a way of adding an e and f size 
definition to the default set?

Any help would be really appreciated, thanks.

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

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


Re: [NTG-context] Font sizes using Chinese module

2007-11-07 Thread Duncan Hothersall
Hans said:
 \definefontsize[e]

 \setupfontenvironment
[default]
[e=4]
   
Ah, thanks. Using \setupbodyfontenvironment as the second command did 
the trick.

I guess there is no easy way of directly calling a specific font at a 
specific size? No worry, this sort of solution will allow me to do what 
I need for now. Thanks Hans.

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

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


Re: [NTG-context] Font sizes using Chinese module

2007-11-07 Thread Duncan Hothersall
Hans (07/11/2007 16:09) said:
 Btw: Is there any reason for not using XeTeX (or LuaTeX in the future)
 for Chinese? (To be honest: I have absolutely no idea whether it works
 and how good it works if at all, but I would expect less problems
 there.)
 

 i bet that duncan uses it in some workflow that has to be stable i.e. no 
 moving targets like xetex or luatex (yet)

 Hans
Exactly right. :-) We have some big plans for LuaTeX across Latin, 
Arabic and Chinese alphabets, but for now we have to stick to the old 
tried and tested...

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

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


Re: [NTG-context] Recommendations for Speed?

2007-09-17 Thread Duncan Hothersall
Taco said:
 Duane Johnson wrote:
   
 1. Is there a way to keep TeX in-memory (i.e. as a server or daemon  
 process) so that it doesn't have to load and reload fonts and the  
 environment?  Our system makes repeated requests for typeset  
 documents and we are wondering if there's a way to remove the  
 overhead of re-running pdftex.
 

 No, there is not (at least not using any of the 'stock' tex
 distributions). The one thing you could do is preload the fonts
 and modules you need into the format file, but setting this up
 is not completely trivial either.
   
Indeed not trivial. But something I played with once upon a time for 
much the same purpose. You should take a look at Jonathan Fine's TeX 
daemon project texd (http://sourceforge.net/projects/texd) if you 
haven't already - it runs as a pipe (unix) and only loads formats once; 
it would take a little bit work to get it going reliably with ConTeXt, 
especially to do so in a way that is easily updated when a new ConTeXt 
is released, and I'm not sure if Jonathan is still actively working on 
the project. But it demonstrates an effective approach, which works with 
Plain (and LaTeX I think).

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

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


Re: [NTG-context] currentheadnumber / doif.. problem

2007-09-12 Thread Duncan Hothersall
Hi Peter
 Date: Mon, 10 Sep 2007 01:21:26 +0200
 From: Peter Schorsch [EMAIL PROTECTED]
 Subject: [NTG-context] currentheadnumber / doif.. problem
 To: ntg-context@ntg.nl

 Hi,

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

 ...
I don't have much time to investigate properly but there should be a 
\complexheadnumber defined in core-sec which gives you what you need. 
This should be tied to \headnumber though, so if that doesn't work it 
may be to do with where or how you are using the command. Do you have a 
complete minimal example document?

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

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


[NTG-context] Different parameters for a continuing itemization

2007-07-17 Thread Duncan Hothersall
I use \startitemize[continue] quite a lot to create itemised lists which 
continue on from the last number of the previous list. I've only just 
noticed that the 'continue' keyword seems to mean that parameters in the 
second [...=...] list of a \startitemize are ignored.

Example (tested on live @ contextgarden):

\setupcolors[state=start]
\starttext
Hello world!
\startitemize[n][color=blue,stopper={jkl}]
\item Hello world!
\item Hello world!
\stopitemize
Hello world!
\startitemize[n,inmargin,continue][color=red,stopper={mnb}]
\item Hello world!
\item Hello world!
\stopitemize
\stoptext

Note that the inmargin keyword in the second \startitemize does seem to 
work, but the parameters in the second set of [...=...] are ignored.

I would really like to be able to continue numbering but be able to 
override formatting in the continuing list. I *thought* I had been able 
to do this before, but maybe not. If continue needs to keep this 
behaviour, is there any chance of a new continuenumberingonly keyword, 
or similar? :-)

(The real world example involves moving from numbering in columns to 
numbering in the margin, but I need to adjust the width parameter for 
the continuing list, and it won't let me.)

Thanks for any and all help.

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

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


[NTG-context] How to make a figure not appear in the list of figures?

2007-07-10 Thread Duncan Hothersall
Hi folks,

This is probably a simple problem but I can't find an answer.

I have a book with a list of figures and have been asked not to include 
in the list a figure which does not have a caption, even though it has a 
number. So the numbering needs to be sequential, but one of the figures 
needs not to appear in the list of figures.

If I define a new float type Nolistfigure with, e.g.
\definefloat[Nolistfigure][figure]
then it uses its own number, so I get effectively in the text:

Figure 4.11
Blah blah
Nolistfigure 4.1
Blah blah
Figure 4.12

when what I actually want is:

Figure 4.11
Blah blah
Nolistfigure 4.12
Blah blah
Figure 4.13


And then in the List of Figures, I want

Figure 4.11
Figure 4.13

Can anyone get me a quick pointer? As ever, this request has come on the 
release day for this job, so anyone able to help today would be 
fabulous... :-) Thanks.

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

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


Re: [NTG-context] How to make a figure not appear in the list of figures?

2007-07-10 Thread Duncan Hothersall
 Hi Duncan,

 place the figure with the normal \placefigure command, process to whole
 document, delete the unwanted figurelist entry in the tuo-file and 
 process
 the document another time, you can add the --once option in the last run.

 Wolfgang
Aah, nice workaround, thanks. That has got me sorted for today, though 
it would be great to understand, at a more leisurely pace, if there is a 
way to do this from within the .tex file. I was experimenting with 
wrapping the placefigure in something that stopped the list from being 
written, but didn't get anywhere.

Anyway, thanks a lot, this has saved my bacon for today. :-)

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

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


Re: [NTG-context] Term C++ in index

2007-07-05 Thread Duncan Hothersall
A long long time ago, Hans said:
 At 01:55 PM 10/31/2002 +0100, Matthias Heidbrink wrote:/
 Hi,
 
 possibly a trivial question, but can't find it anywhere:
 
 How do I get the term C++ into an index? Unfortunately ConTeXT
 interprets the + as a separator for indexed terms and I did not find a
 way to escape it
 that did not confuse the index mechanism./

 \index[Cplusplus]{C++}
 \index[Cplusplus]{Cpp}

 So, the  as started signals texutil that that is the separator 
 instead of
 + while the plusplus makes sure that the sorting is ok

 Hans
The second part of this advice I assume is now just out of date, since 
it will simply produce a second index entry called Cpp. However, the 
first part *almost* works - it outputs an entry C with a subentry + 
(without the  you can't get a + out at all).

What is the up-to-date workaround for this issue to let me get a single 
entry in the index that just says C++?

Minimal test file is as follows:

\starttext
We are talking about \index[Cplusplus]{C++}C++, the programming language.
\placeindex
\stoptext

Thanks!

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

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


Re: [NTG-context] Write once layout everwhere (?)

2007-06-11 Thread Duncan Hothersall
Hi Pepe,

If you want your content to remain maintainable and manageable for a 
long period (e.g. decades), if you can afford it, and if you have a 
sufficiently large amount of content, then I strongly recommend 
investing the time and effort in an XML-based solution.

My experience is in large scale educational/commercial applications, in 
which managing content in XML and using tools like ConTeXt to create 
beautiful print output, and alternate tools to create web output from 
the same source, is a very good solution. I can certainly let you know 
the technology we use, but some of it is commercial and expensive, and 
other bits are just complicated! I did a talk at the user group meeting 
which was kinda about this: http://context.aanhet.net/epen2007/share/duncan/

The first question to ask yourself is how much effort is your content 
worth. The rest of the answers flow from that, in my experience. :-)

Duncan
 Hello,

 I have used ConTeXt in the past and I have been very pleased with it
 and the results obtained, much more than LaTeX.

 Now I am looking into a solution that would allow me to layout the
 content ConTeXt and in other formats that ConTeXt does not (Forgive my
 ignorance, if I am wrong) output, like HTML, Plain Text, or RTF (Those
 are the formats that I can think of that are interesting to me
 currently).

 Reading the Wiki one of those solutions would be XML, but I know very
 little about the subject, so this email is to ask about experiences in
 similar endeavors, other solutions for the same problem and how
 practical this is.

 I suppose that I would use this for general writing and for academic
 as well (Maths and engineering).

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

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


[NTG-context] Colour (color) in mathml

2007-01-31 Thread Duncan Hothersall
Hello.

I'm trying to implement part of a change-tracking system using colour to
highlight changed areas in a document. I use MathML for maths, and I
need to be able to apply colour to individual elements in an equation. I
thought I could do just simply
mi color=greenx/mi
but evidently not. It does look as though colour is dealt with in
x-newmml.tex, but not this way. Is there a way of colouring specific
elements of a MathML equation?

Thanks very much.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Full-time ConTeXt job offer

2007-01-26 Thread Duncan Hothersall
Apologies to those for whom this message is geographically irrelevant:

My company is looking to employ someone with ConTeXt experience, and
preferably a good understanding of XML. The position is based in
Edinburgh, Scotland, UK and is permanent full-time. If anyone is
interested, or knows anyone who might be interested, the details are
available on our website here:

http://www.capdm.com/capdmweb/app?page=Contact_jobsservice=page

The job is Publishing system engineer. We would be interested in
hearing from you even if you don't precisely fit the criteria, but are
interested in filling any gaps with training.

Thanks very much,

Duncan

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Splitting a float that isn't a table

2006-11-03 Thread Duncan Hothersall
I define a floating block called Exhibit

\definefloat[Exhibit][table]

which just contains paragraphs of text. I'd like to be able to split it
using the \splitfloat mechanism but that only seems to work if the
content of the float is a table, not paragraphs.


\definefloat[Exhibit][table]
\starttext
\input tufte\par
\splitfloat[lines=auto]{\placeExhibit{Knuth}}
{\dorecurse{4}{\input knuth \par}}
\input tufte\page[yes]
\stoptext


This outputs there is nothing to split in the resultant PDF.

Is there any way to achieve the equivalent of


\definefloat[Exhibit][table]
\starttext
\input tufte\par
\splitfloat[lines=auto]{\placeExhibit{Knuth}}
{\bTABLE[frame=off]\dorecurse{4}{\bTR\bTD\input knuth \eTD\eTR}
\eTABLE}
\input tufte\page[yes]
\stoptext


without having to make every paragraph a table cell?

Thanks in advance.

Duncan

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TABLE in item

2006-10-29 Thread Duncan Hothersall
 \let\beforeTABLEsplitbox\relax
 \let\afterTABLEsplitbox \relax
 \let\beforeTABLEbox \relax
 \let\afterTABLEbox  \relax
 
 you can play with these macros since they are the formal hooks

Hans,

I played with

\let\beforeTABLEsplitbox\dontleavehmode
\def\afterTABLEsplitbox{\relax\dontleavehmode}
\let\beforeTABLEbox\dontleavehmode
\let\afterTABLEbox\relax

which gives the right indents but stops the tables splitting.

I think I will just have to live with non-splitting tables for now,
unless you can suggest a better redefinition?

Thanks very much for the help anyway.

Duncan

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] TABLE in item

2006-10-27 Thread Duncan Hothersall
Very simple question which has suddenly stumped me:

\starttext
\startitemize[n,broad]
\item Hello world!
\bTABLE\bTR\bTD Little\eTD \bTD table\eTD\eTR\eTABLE
First item continues.
\item Second item.
\stopitemize
\stoptext

How to get the TABLE inside the first item to align with the item
content, rather than flush left?

Thanks,

Duncan

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TABLE in item

2006-10-27 Thread Duncan Hothersall
I said:

 \starttext
 \startitemize[n,broad]
 \item Hello world!
 \bTABLE\bTR\bTD Little\eTD \bTD table\eTD\eTR\eTABLE
 First item continues.
 \item Second item.
 \stopitemize
 \stoptext

What I *meant* (sorry!) was

\starttext
\startitemize[n,broad]
\item Hello world!
\bTABLE[split=yes]\bTR\bTD Little\eTD \bTD table\eTD\eTR\eTABLE
First item continues.
\item Second item.
\stopitemize
\stoptext

I know that in the first example I can put \dontleavehmode before the
table and things work okay.

In the second example (with split=yes) this doesn't work. Is there a way
of making things line up when split=yes? (I'm typesetting an accounting
book...).

Thanks again,

Duncan

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Giving a float its own number

2006-10-19 Thread Duncan Hothersall
I have a book with parts and chapters; figures in the chapters are
numbered 1.1, 2.1 etc. but sometimes a part has a figure in it as well,
before the chapters start. The desired numbering for such figures is to
follow the Part numbers, and be in capitalised roman numerals (in other
words, Figure II would be the figure in the intro of Part 2).

So I define a new clone of figure called Partfigure, and give it the
necessary setups to make the numbering come out in cap roman; and I
thought the easiest way of managing the number itself would be just to
increment it each time \part is called. (Not every part has a figure.)

But I can't seem to get the number to come out when I place the figure.

Minimal example below (I have culled the actual \parts and just put in
two increments, but the effect is the same).


\definefloat[Partfigure][figure]\definenumber[TrackingPartfigurenumber]
\setuplabeltext[en][Partfigure=Figure ]
\setupnumber[Partfigure][number=TrackingPartfigurenumber,conversion=Romannumerals,way=bytext]
\setupcaption[Partfigure][style=\bf,numberstyle=\bf,headstyle=\it,align=middle,location=bottom]

\starttext
\incrementnumber[TrackingPartfigurenumber]
\incrementnumber[TrackingPartfigurenumber]
TrackingPartfigurenumber now equals
\rawnumber[TrackingPartfigurenumber], which will display as
\convertednumber[TrackingPartfigurenumber]. But it doesn't get used:
\placefloat[Partfigure][here][-:PMRWFII]{A cow}{\externalfigure[koe]}
Why not?
\stoptext


I tried also \increment[Partfigure] but this produces exactly the same
output.

I also tried using ownnumber=true in the Partfigure setup and then
feeding it the value {2} in the \placefloat call but that wouldn't compile.

Where did I go wrong? I'm sure there is an easy way to do this.

This one is a bit desperate, again, a very fussy author is waiting on
it, so...

Thanks all.

Duncan

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Giving a float its own number

2006-10-19 Thread Duncan Hothersall
I said:

 Where did I go wrong? I'm sure there is an easy way to do this.

And yes there is! The easy way is to use the new beta, which works.

Sorry for the noise.

Duncan

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Float references in a register

2006-10-11 Thread Duncan Hothersall
Is it possible to have float references (i.e. Table 1.1) alongside page
numbers in a register?

I've never come across it before, but I've just been asked to produce an
index which has entries like:

coverage measurement tools  176-177, Table 6.5

I have looked through core-reg without much illumination. I wonder if I
can use \writetoregister but experiments thus far haven't been successful.

Is this sort of thing supported/supportable?

Thanks,

Duncan

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] inhibition of new page after a header

2006-10-06 Thread Duncan Hothersall
 How can it be that context sets a new page immediately after a
 (subsubsection-)header?
 
 Is it necessary to inhibit it after every header explicitely?

Default settings of headers inhibit a break immediately afterwards but
it is very easy to stop this working by either changing the set-up of
the header, or putting something immediately after it which overrides
the \nobreak.

Can you post an example?

Duncan


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Register layout

2006-10-03 Thread Duncan Hothersall
Quick question - how do I alter the width of the hanging indent of a
register entry which is too long to fit on one line?

I want to differentiate sub-entries, which each have an indent of 1em
more than the previous level, from the indentation of longer entries,
which by default is also set to 1em. In other words, for two entries:

a short entry
  a sub-entry
quite a long-winded single entry


I would like the layout (please view with fixed width font):

a short entry
  a sub-entry

quite a long-winded
  single entry

I tried putting \hangafter=1\hangindent=3em into the deeptextcommand of
\setupregister but no change. Are there any hooks for this sort of thing?

Thanks,

Duncan

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Very strange bug related to textbackground

2006-09-26 Thread Duncan Hothersall
 Duncan Hothersall wrote:
 I have been fighting with this one for ages, and have now narrowed down
 the culprit, but I do not understand why it happens.

 Latest (non-beta) ConTeXt, also tested in the live garden (same result):
   
 and the beta?

Just downloaded and tried beta 'ver 2006.09.25 23:38 MK II' - same
result I'm afraid.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Very strange bug related to textbackground

2006-09-26 Thread Duncan Hothersall
 Just downloaded and tried beta 'ver 2006.09.25 23:38 MK II' - same
 result I'm afraid.

 then i need a better test file + explanation
 
 (or maybe i have some local patch)
 
 Hans

You are not seeing the effect?

I have put some files up on the web, generated with the latest beta.

The (bad) output and source with the \definetextbackground line in:

http://www.capdm.com/public/context/test-bad.pdf
http://www.capdm.com/public/context/test-bad.tex

The (good) output and source with the \definetextbackground line
commented out:

http://www.capdm.com/public/context/test-good.pdf
http://www.capdm.com/public/context/test-good.tex

I don't know if that will help?

Thanks,

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Very strange bug related to textbackground

2006-09-25 Thread Duncan Hothersall
I have been fighting with this one for ages, and have now narrowed down
the culprit, but I do not understand why it happens.

Latest (non-beta) ConTeXt, also tested in the live garden (same result):


\setupcaption[figure][align=right,location=bottom]
\setupcaption[table][align=right,location=top]
%\definetextbackground[irrelevant][frame=on] %uncomment for weirdness

\starttext
\placetable[here]{\vtop{\hsize=105mm \dorecurse{12}{sample content }}}
{\bTABLE[option=stretch]
\bTR \bTD High\eTD\bTD Middling\eTD\bTD Low\eTD\eTR
\eTABLE}

\dorecurse{10}{sample content }

\placefigure[here]{\vtop{\hsize=105mm \dorecurse{12}{sample content
}}}{\framed[width=\textwidth,height=50mm,align={middle,lohi}]{sample}}
\stoptext


As it stands, this produces the expected output (a table and a figure
each with long captions, with the captions set 'hanging'). However, if I
define a totally unrelated textbackground (uncomment the third line),
both captions veer off upwards, apparently a distance related to the
number of lines in the title (play with the dorecurse numbers to see the
effects).

It doesn't seem to matter what the background is called, whether or not
it is ever used, or what parameters it is given.

I have no idea why something seemingly unrelated is having this effect;
some reuse of a variable or unreset value somewhere?

I would be really grateful if someone could [tell me how to] fix this.

Bests,

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] index page range bug

2006-09-07 Thread Duncan Hothersall
Jason wrote:

 When using startregister/stopregister commands, if the range is only one 
 one page, then while both a [f] and a [t] are written to the tui file, 
 only one \registerfrom command is put in the tuo file.  If there is only 
 one range, it seems like the software deals with it nicely.  However, if 
 there are two ranges (like in the example below), then the index 
 incorrectly assumes that the first \registerfrom command in the tuo file 
 corresponds to the \registerto command.

Aha! Great work tracking this down Jason, I have been bitten by this bug
many times in the past but not been able to isolate it. It would be
really great if this could be fixed in the ruby script.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Rule under length of last line

2006-07-31 Thread Duncan Hothersall
I've had a last-minute impossible request for a typesetting style, and
having already told the person it can't be done in the time available,
wondered whether it can actually be done at all.

The request is for a subsection heading to have a continuous horizontal
rule under both its number and title, at a distance of about 6pt from
the baseline (i.e. not underlining), extending just the length of the
heading. I can do that by setting both number and title in a TABLE,
setting the offsets and specifying the bottom frame to be on - no problem.

However, the tricky part is that where a longer title runs beyond one
line, the line should only appear under the last line, and only to the
length of the last line of text.

In other words, for viewers with fixed width fonts:

1.1.1 Short title
-

1.1.2 Longer title which wraps onto a
  second line like this
---

We generate the ConTeXt code from XML, so ideally a solution wouldn't
require the last line to be set separately, but would just work whether
the heading was single or multiple line. What I'm really looking for is
a subsection setup that will automatically do this whatever length of title.

I have to say I think it's quite ugly, but can anyone give me a pointer
as to how it could be done? Is there a box left at the end of a par
which shows the width of the last line?

As I say, I've already said no, so this is just out of interest, no
urgency.

Thanks,

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Rule under length of last line

2006-07-31 Thread Duncan Hothersall
Wow, very cool. Will adapt and wikify. Thanks - it's even better to say
no and then do it anyway. :)

Thanks again.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] arab (omega)

2006-06-26 Thread Duncan Hothersall
Idris wrote:

 Dear gang,
 
 I have redone this. Now there are two filter sequences, one for main text
 and one for using the arabic-font digits in math mode.
 
 http://wiki.contextgarden.net/Aleph_Guide#Installing
 
 has been updated, get the new uni2cuni.zip. I'll update m-gamma soon so
 this will be part of the distro if Hans accepts-)

I'm very grateful for all the effort on this. I had some trouble
installing the new ConTeXt beta to test it at the weekend and spent most
of Sunday trying to understand why... But at least I am now in a
position to be a tester of the new filter sequences together with the
new beta. My revised test files are again at

http://www.capdm.com/public/context/figtest.tex
and
http://www.capdm.com/public/context/figtest.pdf

these were regenrated this morning with the latest versions of everything.

Please note that I had to remove the \isolateseparators in order to see
my alternative - separator; with \isolateseparators specified the dot
stayed resolutely in place. But the great news is that this also makes
the figure reference work, which is fantastic. Note that there is now no
need for \reversesectionnumberstrue.

Idris, I pasted your maths stuff into the preamble and the test content
as well; is this what you expected to see from your test? I wasn't sure,
but it looks good to me.

Thanks again. Happy to test further for anyone/anything.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] arab (omega)

2006-06-26 Thread Duncan Hothersall
Hans, in Friday's beta, core-sec.tex line 767 has

\edef\levelstring{=\flistsectionseparator\@@filternumberpart[#1]\sectionseparator}%

which fails not knowing what \flistsectionseparator is. Reverting to

\edef\levelstring{=\sectionseparator\@@filternumberpart[#1]\sectionseparator}%

works but may not be the intended effect.

Duncan

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Question about Captions

2006-06-24 Thread Duncan Hothersall
 I'd like to know whether it is possible to control the captions of
 tables and figures separately. What I wanna do is to place the
 caption above the table but below the figure.

\setupcaption[figure][location=bottom]
\setupcaption[table][location=top]

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Aleph queries

2006-06-23 Thread Duncan Hothersall
 A trick (?) is to change the separator such that the number
 parsing in the otp see separate numbers as well:

 \setupcaptions[separator={{.}}]

 \setupheads [separator={{.}}]
 \setupcaptions[separator={{.}}]
 
  this still gives problems with refering to a graphic but for that we need 
 more hackery 

Agreed, but this is a great step forward and explains the behaviour. It
it true that in Arabic the digits making up a number should read from
ltr while separated numbers forming a section or float reference should
read rtl overall.

So we are nearly there, just the cross-references to be dealt with,
thank you all very much for this.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Aleph queries

2006-06-23 Thread Duncan Hothersall
 \setupheads [separator={{.}}]
 \setupcaptions[separator={{.}}]

 this still gives problems with refering to a graphic but for that we
 need more hackery

Also, probably because it uses the same cross-referencing mechanism,
this leaves the section numbers in tables of contents the other way
around. So to match the setupheads, we need also:

\setuplist[section,subsection,...][separator={{.}}]


Unfortunately

\setupreferencing[separator={{.}}]

seems to just put an extra . before the figure number, but not reverse
it, resulting in:

'1.2- erugiF'


Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Aleph queries

2006-06-22 Thread Duncan Hothersall
Idris wrote:

 I doubt it, but something along these lines should do it:
 
 ==
 % tex=aleph output=dvipdfmx
 \pagedir TRT
 \bodydir TRT
 \pardir  TRT
 \textdir TRT
 \hoffset=0pt % bug
 
 \starttext
 
 \chapter{Cow}
 
 \section{Dutch Cow}
 
 \placefigure
 [middle]
 [fig:cow]
 {This is an example of a cow.}
 {\externalfigure[cow][width=1.5in]}
 
 \section{Another Dutch Cow}
 
 \placefigure
 [middle]
 [fig:cow]
 {This is an example of a cow.}
 {\externalfigure[cow][width=1.5in]}
 
 \stoptext
 
 ==
 
 Hmm, seems to work here; maybe Duncan did not use \bodydir TRT?

I agree the above works, but when I use Arabic fonts and content it
doesn't seem to.

I have new tex and pdf files at:

http://www.capdm.com/public/context/figtest.tex
and
http://www.capdm.com/public/context/figtest.pdf

 Hans: How do we configure the .=- separator?

This I have worked out!

\setupcaption[figure][separator=-]

Doh. Thanks,

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Aleph queries

2006-06-21 Thread Duncan Hothersall
Idris Samawi Hamid (15/06/2006 17:28) said:

 You could edit the cuni2oar otp (and recompile it) so that it
 ignores the ligatures you don't like, or you could put a kashidah
 between the two letters whose ligature you want to break. Better is to
 define an empty kashidah so that you can manually break the ligature
 without stretching the word. I'll look into this in the next few days
 (busy right now) if you remind me-)

Thanks very much for this, but unfortunately as an Arabic typesetting
novice I can't quite follow it (the comments on the ligatures came from
a proofreader). Am following this up via another route to try to better
understand what to do, but if you really did want a reminder about this
- here it is :-)

 
...
 Add \reversesectionnumberstrue to your Arabic definition:

Ah, great, perfect.

Now I have a follow-up to that one: I also would like figure and table
numbering to have the chapternumber in the right order and use - as a
separator. In other words, in English I use

\in{Figure}[figref0102]

to generate

Figure 1.2

and in Arabic I'd like to use

\in{رسم بياني }[figref0102]

to generate

رسم بياني 1-2

Any advice for that? (I had a search for other \reverse type commands
but no luck :-(

Many thanks again.

Duncan

PS. Apologies if the UTF-8 content there doesn't show up correctly.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Aleph queries

2006-06-21 Thread Duncan Hothersall
 Am following this up via another route to try to better
 understand what to do, but if you really did want a reminder about this
 - here it is :-)
 
 Well, I don't know which ligatures the proofreader liked/did not like so...

Sorry, I realise that was a bit stupid of me... Thanks for your
patience. :-)

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Aleph queries

2006-06-15 Thread Duncan Hothersall
Hello all (especially Idris :-) )

Using the fantastic resources from Idris' messages on this list, and the
Aleph page on the Wiki, I have managed to start producing Arabic PDF
output directly from UTF-8 sources using Aleph and dvipdfmx. This is
great, thanks so much.

I have just one or two queries and things I wasn't able to make work. I
hope someone can help.

My test file is here:
http://www.capdm.com/public/context/omarab-queries1.tex
And the output it generates is here:
http://www.capdm.com/public/context/omarab-queries1.pdf


First question - how do I get italic text? The first three paragraphs in
the test are identical content, but the second has {\it ...} around it
and the third has {\bf ...} around it. The third para comes out
perfectly in bold, but the second para looks the same as the first. How
can I get italics?

Second question - that same first para contains 5 ligatures. They don't
seem to match the rest of the font. Is this a set-up issue, or is it the
way the font is designed? If it is a set-up issue, is there a way to fix it?

Third and final question - I inserted a section and two subsections to
demonstrate that the numbering of subsections is left-to-right. How can
I make it right-to-left? (Explanation: the PDF shows section 1, and
then subsections 1-1 and 1-2; reading the numbers from
right-to-left, I need it to show as section 1 and then subsections
1-1 and 2-1. In the subsection the 1 should come first when
reading rtl.)


Thanks very much for any help.

Bests,

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] register ranges

2006-02-23 Thread Duncan Hothersall
 \startregister[index]{Menippean}
 \stopregister[index]
 
 and it works. However, when I try to replace [index] with my own key  
 (because I have overlapping ranges)
 
 \startregister[satire]{Menippean}
 \stopregister[satire]
 
 I get errors: ...

Hi Thomas.

The first [...] in the \startregister command is the name of the
register itself, then there is a second one for the sort key/range
identifier. So you want:

\startregister[index][Menippean]{Menippean}
\stopregister[index][Menippean]

and then you can have

\startregister[index][Menippean1]{Menippean}
\stopregister[index][Menippean1]

as well.

Hope that helps.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Degrading TABLE column

2005-12-19 Thread Duncan Hothersall
I'm trying to solve a problem with a TABLE in a large-ish (600 page)
book. The table occurs in an appendix, and the contents of one column
are spilling out into the next column on the right.

The weird thing is that when I process just that bit of the book, the
effect is much smaller, and when I process the whole book (with the
table near the end), the contents move all the way to the other side of
the next column, moving almost a full column's width to the right.

I will try to work up an example, but in the meantime, does this ring a
bell with anyone in terms of something (an offset value, and alignment
parameter?) which degrades over the course of a large run, such that
the effect is minimal in a small document, but visible at the end of a
large one?

Thanks,

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Index entries messing up page breaks

2005-12-14 Thread Duncan Hothersall
Hans wrote:

 can you try (test extensively):
 
 \def\dodoregister[#1]#2#3%
   {\dogotopar{\dontleavehmode\doprocesspageregister[#1]{#2}{#3}}}

Well, it has some problems, introducing vertical space in certain
circumstances. Will try to work up a minimal, but two observations:

1. The extra vertical space tends to happen immediately before headings,
which is probably immediately after a \par, suggesting that if we're
already in vertical mode there is something creating a horizontal mode
object here.

2. If I use \dontleavehmode\index{blah} in material that immediately
follows a heading, and just \index{blah} everywhere else, everything
appears to work well with no white-space issues and no headings at the
bottom of the page.

(I can only do 2. easily because I'm generating my code from XML, not
writing directly in ConTeXt, so it's easy to put in a rule that makes
the index tag behave differently in different contexts. It's probably
not a solution for anyone else.)

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: Chinese

2005-12-13 Thread Duncan Hothersall
Hans wrote:

 chinese is not yet defined in utf so if you want that, we need to do it
...
 assuming this, how about making a set of tfm,enc,map files that match 
 the unicode positions (volunteers ...)

I'm very willing to help, especially if there is some drudge work
involved in constructing the files. I don't know enough (yet) about the
logic of it all to help with setting up the system, but if someone can
supply skeleton files and/or a method for constructing the necessary
files, I'm happy to do any leg-work.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Index entries messing up page breaks

2005-12-13 Thread Duncan Hothersall
The manual suggests that you can put index calls between a \section
heading and its first paragraph without worry, but for me it breaks the
page-breaking mechanism, allowing the section title to end up at the
bottom of a page like this:

\starttext
\section{Tufte}
\dorecurse{4}{\input tufte \par}
\section{Knuth}
\index{Knuth}
\input knuth \par
\stoptext

Is there any workaround/fix?

Thanks very much,

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Index entries messing up page breaks

2005-12-13 Thread Duncan Hothersall
I said:
 Is there any workaround/fix?

I find that the addition of \dontleavehmode fixes it. Is this safe to
use in general?

\starttext
\section{Tufte}
\dorecurse{4}{\input tufte \par}
\section{Knuth}
\dontleavehmode\index{knuth}
\input knuth \par
\stoptext

Thanks,

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-09 Thread Duncan Hothersall
Tobias Burnus asks:

 What would be needed to get UTF-8 input running with Chinese?

If there is a recipe, I would like to help cook it. Getting UTF-8 input
running with Chinese would be a godsend to me too.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Linux binaries

2005-11-28 Thread Duncan Hothersall
Hans wrote:
 yes, you can use the old binaries, no problem;
 
 hm, a copy of previous binaries ... i can make a zip of an old tree

That would be great, thanks!

Thanks Taco for the suggestions, I was exploring both of those in
parallel to hoping that someone had kept a copy of the old ones..

Thanks both.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Index

2005-11-14 Thread Duncan Hothersall
Hans, many thanks for the recent fixes on index sorting in the new ruby
scripts. Can I offer another test file in which some errors still show
up, in the hope that these too can be ironed out?

The following shows two problems, culled from a much bigger project. It
should be clear from the output what the problems are, but basically

1. there are three separate spans (\startregister...\stopregister pairs)
with the same term content (these three separate spans coalesce) which
get coalesced into one strange a-b-c-d span, despite having been given
different sort keys (I added numbers to the end of the sort keys to
differentiate them).

2. there are three refs and a span all with the same term content
(these mixed refs and spans are in the wrong order), and they get
sorted into the wrong order in the output (the span comes before the
refs, despite coming after in page order).

So in my output, my index page at the back has the following content:

these mixed refs and spans are in the
wrong order 1/12–1/13, 1/2, 1/10,
1/14
these three separate spans coalesce
1/1–1/2–1/5–1/7

whereas what I'd hope to see is:

these mixed refs and spans are in the
wrong order 1/2, 1/10, 1/12–1/13,
1/14
these three separate spans coalesce
1/1–1/2, 1/3–1/5, 1/6–1/7

Really hope you can hammer out these two bugs, it would really help me!

Thanks,

Duncan


\defineregister[Index][Indices]
\setupregister[Index][2,balance=no,distance=1em,partnumber=no,chapternumber=yes,pagestyle=,separator=/,indicator=no]

\starttext
\startbodymatter
\setuppagenumbering[state=start,alternative={singlesided,doublesided},
location=bottom,way=bychapter,partnumber=no,
chapternumber=yes,numberseparator={/}]

\chapter{Economic Concepts, Issues and Tools}
\input knuth\par {\bf ttssc span 1 starts}
\startregister[Index][these three separate spans coalesce1]{these three
separate spans coalesce}%
\dorecurse{4}{\input knuth\par} {\bf ttssc span 1 stops}
\stopregister[Index][these three separate spans coalesce1]%
\input knuth {\bf tmrasaitwo ref 1}
\Index[these mixed refs and spans are in the wrong order1]{these mixed
refs and spans are in the wrong order}%
\dorecurse{4}{\input knuth\par} {\bf ttssc span 2 starts}
\startregister[Index][these three separate spans coalesce2]{these three
separate spans coalesce}%
\dorecurse{8}{\input knuth\par} {\bf ttssc span 2 stops}
\stopregister[Index][these three separate spans coalesce2]%
\dorecurse{4}{\input knuth\par} {\bf ttssc span 3 starts}
\startregister[Index][these three separate spans coalesce3]{these three
separate spans coalesce}%
\dorecurse{5}{\input knuth\par} {\bf ttssc span 3 stops}
\stopregister[Index][these three separate spans coalesce3]%
\dorecurse{8}{\input knuth\par}
\input knuth {\bf tmrasaitwo ref 2}
\Index[these mixed refs and spans are in the wrong order2]{these mixed
refs and spans are in the wrong order}%
\dorecurse{8}{\input knuth\par} {\bf tmrasaitwo span 1 starts}
\startregister[Index][these mixed refs and spans are in the wrong
order3]{these mixed refs and spans are in the wrong order}%
\dorecurse{4}{\input knuth\par} {\bf tmrasaitwo span 1 stops}
\stopregister[Index][these mixed refs and spans are in the wrong order3]%
\dorecurse{4}{\input knuth\par}
\input knuth {\bf tmrasaitwo ref 3}
\Index[these mixed refs and spans are in the wrong order4]{these mixed
refs and spans are in the wrong order}%
\dorecurse{3}{\input knuth\par}
\stopbodymatter
\startbackmatter
\chapter{Index}
\setuppagenumbering[numberseparator=/]\placeIndex\page[yes]
\stopbackmatter
\stoptext


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: Mini-survey: What do you do with ConTeXt?

2005-11-04 Thread Duncan Hothersall
What do you do with ConTeXT?

I have a repository of learning materials which are marked up in
(DocBook-based) XML. They are in a few different languages (majority
English, with Spanish, Dutch and recently Chinese) and belong to several
different universities/training organisations on whose behalf we
maintain them. I convert the XML into ConTeX code in a batch process
using a text processing language, and then use ConTeXt to typeset the
result into books and booklets of different styles. We also produce web
versions of a lot of the materials, and I use ConTeXt (plus ImageMagick)
to create equation GIFs for maths that can't be rendered in pure HTML.

We probably have about 30 million words and 10,000 figures under
management, all held in the same XML structure, and need to run several
releases a day. As a result, all of the processes involved in
publishing, including the ConTeXt parts, are part of a batch workflow on
a server, and I rarely see the ConTeXt code itself (cos it usually just
works).

Thanks Hans!

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in utf-8

2005-10-17 Thread Duncan Hothersall

Lutz Haseloff said:


i prepared a small perl script to convert chinese utf-8 encoded
tex-files to gbk coded tex-files. 


Thanks so much, I look forward to trying it out next week when I get 
back to work, and will let you know how I get on. Thanks for taking the 
time.


Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in utf-8

2005-10-14 Thread Duncan Hothersall
(beware, the font-chi modules talk about unicode while actually it's
about dedicated mapings resembling a unicode approach; this
\defineucharmapping stuff)
 
 Yes indeed, that had me going... :-) Oh well.
 
 Thanks for the insight, I'll feedback further.

I have to say I'm unable to make any sense of it at the moment. I think
I understand the logic of what is needed but understanding the current
implementation is way beyond my current capacity.

Does anyone else have a need to process Simplified Chinese encoded in
UTF-8? If not, perhaps I should just explore getting my sources changed
into GBK.

If there was someone else with the same need we could perhaps share the
burden...

Thanks again,

Duncan

(PS I'm away for the next week, please don't think I'm ignoring you if I
don't reply over that period.)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: MathML: Please ignore mo#x02061;/mo

2005-10-13 Thread Duncan Hothersall
 Salvete,
 
  I just started to think about using ConTeXt on XML input files, so I've
 got a question which should be easy to answer:  My MathML source
 generates presentation code which includes mo#x02061;/mo between a
 function symbol and its arguments.  I get a black rectangle for that;
 I'd like ConTeXt to ignore this character, where do I define it as
 “nothing”?

This is the hex unicode reference for the entity af; which is already
defined in xtag-mml.tex as nothing ({}) via its expansion into
ApplyFunction;.

So the problem seems to be in arriving at af; from #x02061;. I'm not
sure how to do that, but in the meantime you can define #x02061;
explicitly using:

\defineXMLentity [x02061] {}

I think there is a mapping mechanism though, since a lot of Unicode is
supported natively; perhaps the vector to which af; belongs hasn't been
completed yet.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in utf-8

2005-10-12 Thread Duncan Hothersall
Hans wrote:

 that's tricky. the utf handler assumes named glyphs and noone named
 the 5000 chinese ones so far
...
 some variant on:
...

 \startunicodevector chinese_unicode_page_number_1 
 getglyph\endcsname{ChineseFont1}{#1}\gobbleoneargument 
 \stopunicodevector
 
 so, then you only need to define the right fonts i.e.
 
 \definefont[ChineseFont1][whateverchinesefont_1]
 
 which has the right glyphs in the right slots
 
 so ... it's actually simple, once you have the fonts split up
 
 probably the getgyph needs to be replaced by a more clever one that
 handles special chinese thingies,

Wow. At the moment I have no idea how most of the Chinese module or
font-handling works, nor how I would implement something using the
tricks you describe. I guess I would need some hand-holding if I were to
embark on this, I guess also I would need to understand the mechanism
used to re-use a TTF font many times with different encodings to create
multiple 256 char tfms.

 another option is to write another mapper analogue to the ones
 already there for chinese, i.e. is there some mapping from utf to
 big5 or so and  hook that into the utf handler.

This sounds like something I can at least understand a bit better. I
will start here, and see what success I have. Perhaps it will help
eventually with an attempt to do it the right way above.

 (beware, the font-chi modules talk about unicode while actually it's
 about dedicated mapings resembling a unicode approach; this
 \defineucharmapping stuff)

Yes indeed, that had me going... :-) Oh well.

Thanks for the insight, I'll feedback further.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Chinese in utf-8

2005-10-10 Thread Duncan Hothersall
Hi all.

I have ConTeXt set up to output Chinese using usemodule[chinese], all
fonts, encodings and maps are installed and the sample file works well.

Now I have a whole load of Chinese text in utf-8 encoding. Can ConTeXt
process this, or do I have to convert it to another encoding? I tried
\enableregime[utf] and \useencoding[uc] but it just produced black blobs
instead of Chinese characters.

I hope ConTeXt can do it? :-)

Thanks,

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] PDF v1.6 inclusion

2005-10-06 Thread Duncan Hothersall
Hi.

I'm trying to include some PDF files generated by Acrobat 7, which means
they are PDF v1.6. ConTeXt (recent distribution, on linux) complains
that PDF version 1.6: Xpdf only supports 1.5. I thought that maybe I
could switch to using Ghostscript instead of Xpdf-tools to process the
files, in the hope that ghostscript would support 1.6, but I'm stymied
trying to pass the correct parameter via texexec. Am I on the right
track, and if so, what should I type?

Many thanks,

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Elided page numbers in registers

2005-10-06 Thread Duncan Hothersall
On 31 Aug I wrote:

 I have page ranges in my index, such as 1/1-1/3, or 2/24-2/26.
 
 I would like these ranges to be elided - in other words, the first one
 would read 1/1-3 (remove repeated chapter number), and the second would
 read 2/24-6 (remove repeated chapter number and also the repeated 2 in
 page number).
 
 Question: is there an already existing system to do this? I guess no :-)
 
 Followup: I would be willing to help to code this if it doesn't exist (I
 have some experience with such systems) if someone can point me at the
 right bit of code to look at (things seem to be changing around
 texutils, newtexexec etc. so I don't want to start at the wrong place).

Sorry to be a pain, but can anyone help with this? I'm converting a
legacy system, in which everything (cross referencing, tables of
contents, indices) was hand-coded in plain tex and Perl, across to
ConTeXt. The advantage of having hand-coded the indexing stuff was that
I could easily add features like eliding, or funny sort orders. I now
need to reproduce the same output. I suspect I could apply the same
techniques to the ConTeXt code, but I don't want to embark on a fool's
errand if (a) it's already done somewhere, or (b) the code I hack is
about to be replaced.

Thanks,

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] PDF v1.6 inclusion

2005-10-06 Thread Duncan Hothersall

just ignore the message; a new version of pdftex will support the
latest pdf, and in most cases new features are just more entri4e sin
dictionaries; i can imagine that it affects pdftops but not pdf
inclusion because that's mostly copying and object reference
tracking.

Do you get faulty files?


I thought that it was causing texexec to only do one run and/or MP not 
to run; but that must have been a glitch, because having not changed 
anything it is completing its runs now. So, sorry for the noise, and 
thanks Hans for the explanation.


Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


  1   2   >