[NTG-context] Re: documentation: parameters of \setuplist

2024-04-22 Thread Duncan Hothersall
Hi Hraban,

I can help with one - aligntitle means an unnumbered section will align in
the table of contents under the number rather than the title. So for
example if you have a TOC combining \section and \subject entries, they
would look like this:

1 ... A section
A subject

rather than

1 ... A section
.. A subject

Duncan

On Mon, 22 Apr 2024 at 17:09, Henning Hraban Ramm  wrote:

> I tried to complete https://wiki.contextgarden.net/Command/setuplist,
> but I don’t understand all parameters.
>
> Can anyone explain these please:
>
> * state (start stop): what does this en-/disable? collecting entries?
> * label (yes no none Name): language dependent labels? as a prefix or what?
> * location (none, here): disable placement? when makes this sense?
> * aligntitle (yes no): align which part to what?
> * symbol (one two three none default): where is this used?
>
>
> Expect more questions…
>
> Hraban
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: enhancing MetaPost presentation progress graphics

2023-07-19 Thread Duncan Hothersall
I am in awe at this. Thanks for sharing.

On Wed, 19 Jul 2023 at 18:11, Henning Hraban Ramm  wrote:

> Am 19.07.23 um 14:07 schrieb Taco Hoekwater:
> > First, find the actual point along the curve of the wave you want, then
> you can ask for the direction of the wave at that time, and its point:
>
> Thank you!
>
> > pair itime, iangle, boatpos;
> >
> > itime = (wave[3] intersectiontimes ((xpos,0)--(xpos,infinity)));
> > iangle = direction (xpart itime) of wave[3];
> > boatpos = (point (xpart itime) of wave[3]) shifted (-5,0); % shift to
> center horizontally
>
> There was still an error that I introduced:
> The boat on the first page is already way in, while on the last page it
> falls over the edge of the world.
>
> I fixed several other things and drew a nicer boat. Feel free to use it.
>
> Hraban
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

Re: [NTG-context] numbering questions

2022-12-31 Thread Duncan Hothersall via ntg-context
I can't test right now but would something like

\setuphead[Day][sectionsegments=Day:Month:Year]

help?

Duncan


On Sat, 31 Dec 2022 at 17:24, Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:

> A happy new year to everyone!
>
> I’m playing with some examples of section numbering.
>
> * Is there a setup to influence the order of number segments? I.e. can I
> have “section.chapter.part“ instead of “part.chapter.section”?
>
> * How can I format the segments, e.g. to get two or three digits each
> (leading zeros)?
>
> * I can force a section number with “ownnumber”, but the next one is
> back in the previous scheme. Itemize has “start”. How can I start
> section chapter numbering at 3 (or -1 or whatever; I know I can start at
> 0 with “zero”) and let ConTeXt continue from there?
>
>
> My example tries to (ab)use the section numbering for a date (e.g. for a
> diary):
>
> -
> \definestructureconversionset[default][n,n,month,n][n]
> \definestructureseparatorset [default][-,-,-,-]
>
> \definehead[Year][chapter]
> \definehead[Month][section]
> \definehead[Day][subsection]
>
> \define[2]\TitleCmd{#1} % number only
>
> \setuphead[Year,Month,Day][number=yes,page=no,command=\TitleCmd]
> \setuphead[Year][page=yes]
> %\setuphead[Month][]
> \setuphead[Day][style={\ss\bf}]
>
> \def\Dummycontent{
>  \dorecurse{12}{
>  \startMonth
>  New Month.
>
>  \dorecurse{5}{
>  \startDay
>  Another day.
>
>  \stopDay
>  }
>
>  \stopMonth
> }}
>
> \starttext
>
> \startYear[ownnumber=2023,title=This]
> A new year begins.
>
> \Dummycontent
>
> \stopYear
>
> \startYear
> Next year.
>
> \Dummycontent
>
> \stopYear
>
> \stoptext
> -
>
> Hraban
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Xml filtering in Lua

2022-11-16 Thread Duncan Hothersall via ntg-context
Hi Thomas.

I'm not sure about the code, sorry, but I do know that an XML document
can't have two IDs of the same value. Typically you would use a linkend
attribute on the element which is referencing an id (in this case the
topics, I think).

Probably doesn't help with your problem, but it's likely a prerequisite for
it to work.

Bests,

Duncan

On Wed, 16 Nov 2022 at 16:11, Thomas A. Schmitz via ntg-context <
ntg-context@ntg.nl> wrote:

> Hi all,
>
> I thought this was easy, but I overestimated my competence… I want to
> filter xml elements via their attributes and retrieve and typeset parts
> belonging together. Here is a small test file that explains what I’m trying:
>
> \startbuffer[test]
> 
>
>   
> This is the first test
> 22/11/16
>   
>   
> This is the second test
> 22/11/17
>   
>
>
>   
> 
>   This will be the content of the first chapter.
> 
>   
>   
>  
>   This will be the content of the second chapter.
>  
>   
>
> 
> \stopbuffer
>
> \startxmlsetups xml:testsetups
> \xmlsetsetup{#1}{*}{-}
> \xmlsetsetup{#1}{document|chapters|chapter|content|emph}{xml:*}
> \stopxmlsetups
>
> \xmlregistersetup{xml:testsetups}
>
> \startxmlsetups xml:document
> \xmlflush{#1}
> \stopxmlsetups
>
> \startxmlsetups xml:chapters
> \xmlflush{#1}
> \stopxmlsetups
>
> \startxmlsetups xml:chapter
> \xmlfunction {#1} {chapter}
>  \xmlflush {#1}
> \stopxmlsetups
>
> \startxmlsetups xml:chapter:content
> \xmltext {#1} {content}
> \stopxmlsetups
>
> \startxmlsetups xml:emph
>{\em \xmlflush {#1}}
> \stopxmlsetups
>
> \startluacode
> function xml.functions.chapter (t)
>  local ch_id = t.at.id
> local metadata = xml.filter (root,
> '../../topics/topic[@id=="%s"]', ch_id)
> print (inspect(metadata))
> lxml.command(t, ".", "xml:chapter:content")
> context.par ()
> context (ch_id)
> context.par ()
> end
> \stopluacode
>
> \starttext
> \xmlprocessbuffer{main}{test}{}
> \stoptext
>
> The line with xml.filter does not work as I expected. How can I walk the
> tree, find the “topic” element with the same “id” attribute as the chapter
> I’m currently in, and then typeset the different children of the topic
> element?
>
> Thanks a lot and all best
>
> Thomas
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] overprinting black

2022-11-09 Thread Duncan Hothersall via ntg-context
Have you tried overprint=yes? I have that in old files which used to work
under mkii. I must admit I haven't had the need to use overprinting since
then, but I do recall that come colour handling wasn't ported across to
mkiv or later.

Duncan

On Wed, 9 Nov 2022 at 16:12, Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:

> I’m not sure if this ever worked, but at least in latest LMTX it doesn’t:
>
> """
> \setupcolors[state=start,cmyk=yes,rgb=no,intent=overprint]
>
> \starttext
>
> \framed[
>background=color,
>backgroundcolor=yellow,
> ]{\ss\bfd
>Black should always overprint.
> }
>
> \stoptext
> """
>
> The black text and frame border don’t overprint the yellow background
> but knockout. The only way to check this (that I know of) is Acrobat
> Pro’s separation simulation; the screenshot shows a snippet of the
> yellow separation.
>
> Actually, setting “overprint” for all colors doesn’t make sense, it
> should be a setting for single color (but default for black):
>
> % desired interface:
> \definecolor[overBlack][k=1,intent=overprint]
>
> Hraban
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] MathML when processing XML

2022-05-30 Thread Duncan Hothersall via ntg-context
Answering my own question - the rules in x-mathml.mkxl/.lmt assume *only*
an mml: namespace on MathML elements. Having built my current project on
the basis of the examples in the XML in mkiv manual, I had two layers of
namespaces in addition to that. Redoing the mappings for the MathML
elements resulted in glorious formulas coming out.

Duncan

On Sun, 29 May 2022 at 22:23, Duncan Hothersall  wrote:

> This feels like a really stupid question but I can't find an answer to it
> anywhere.
>
> When processing an XML file directly with ConTeXt, i.e.
> using \startxmlsetups rules, how can I make use of the MathML module for
> the MathML content in my XML source? Should I include a specific piece of
> code with a \registerctxluafile command as well as / instead of
> \usemodule[mathml]? Do I need to use something other than \xmlflush to pass
> the XML to the module?
>
> Sorry, it's probably obvious but I can't work it out!
>
> Thanks.
>
> Duncan
>


-- 
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 when processing XML

2022-05-29 Thread Duncan Hothersall via ntg-context
This feels like a really stupid question but I can't find an answer to it
anywhere.

When processing an XML file directly with ConTeXt, i.e.
using \startxmlsetups rules, how can I make use of the MathML module for
the MathML content in my XML source? Should I include a specific piece of
code with a \registerctxluafile command as well as / instead of
\usemodule[mathml]? Do I need to use something other than \xmlflush to pass
the XML to the module?

Sorry, it's probably obvious but I can't work it out!

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] XML Namespaces and XML Setups

2022-05-24 Thread Duncan Hothersall via ntg-context
Yes, it does! Thanks Bruce. Is this documented somewhere already and I
missed it?

Cheers.

Duncan

On Mon, 23 May 2022 at 21:14, Bruce Horrocks  wrote:

> Does this help?
>
> \startxmlsetups xml:demo:base
>   \xmlsetsetup{#1}{tag}{xml:demo:tag}
>   \xmlsetsetup{#1}{o:tag}{xml:demo:otag} %% <---
> \stopxmlsetups
> \xmlregisterdocumentsetup{demo}{xml:demo:base}
> \startxmlsetups xml:demo:tag
>   \xmlflush{#1}
> \stopxmlsetups
> \startxmlsetups xml:demo:otag   %% <---
>   {\bf \xmlflush{#1}}
> \stopxmlsetups
> \starttext
> \startbuffer[test]
> 
>xmlns:o="NameSpaceO">
>   text text
> 
> \stopbuffer
> \xmlprocessbuffer{demo}{test}{}
> \stoptext
>
> > On 23 May 2022, at 09:07, Duncan Hothersall via ntg-context <
> ntg-context@ntg.nl> wrote:
> >
> > I found this unanswered question on the list from November 2020 and find
> today that I have the same question. How can one handle elements with the
> same name but in different namespaces? How should the different
> \startxmlsetups commands be written?
> >
> > Thanks.
> >
> > Duncan
> >
> > On Mon, 16 Nov 2020 at 13:37, Christoph Reller <
> christoph.rel...@gmail.com> wrote:
> > Dear List,
> >
> > Consider the following MWE:
> >
> > \startxmlsetups xml:demo:base
> >   \xmlsetsetup{#1}{tag}{xml:demo:tag}
> > \stopxmlsetups
> > \xmlregisterdocumentsetup{demo}{xml:demo:base}
> > \startxmlsetups xml:demo:tag
> >   %\doif{\xmlnamespace{#1}}{o}{NameSpaceO:}
> >   \xmlflush{#1}
> > \stopxmlsetups
> > \starttext
> > \startbuffer[test]
> > 
> >  >   xmlns:o="NameSpaceO">
> >   text text
> > 
> > \stopbuffer
> > \xmlprocessbuffer{demo}{test}{}
> > \stoptext
> >
> > My questions:
> > - Is there a good way to have a separate XML setup for each XML
> namespace?
> > - Alternatively, one has to do the distinction within the same XML
> setup. In this case, how do we get the complete namespace? (In this
> example: "NameSpaceA" and "NameSpaceO")
> >
> > Thanks in advance for your help!
> >
> > Cheers, Christoph
> >
> ___
> > 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
> >
> ___
>
> —
> Bruce Horrocks
> Hampshire, 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] XML Namespaces and XML Setups

2022-05-23 Thread Duncan Hothersall via ntg-context
I found this unanswered question on the list from November 2020 and find
today that I have the same question. How can one handle elements with the
same name but in different namespaces? How should the different
\startxmlsetups commands be written?

Thanks.

Duncan

On Mon, 16 Nov 2020 at 13:37, Christoph Reller 
wrote:

> Dear List,
>
> Consider the following MWE:
>
> \startxmlsetups xml:demo:base
>   \xmlsetsetup{#1}{tag}{xml:demo:tag}
> \stopxmlsetups
> \xmlregisterdocumentsetup{demo}{xml:demo:base}
> \startxmlsetups xml:demo:tag
>   %\doif{\xmlnamespace{#1}}{o}{NameSpaceO:}
>   \xmlflush{#1}
> \stopxmlsetups
> \starttext
> \startbuffer[test]
> 
>xmlns:o="NameSpaceO">
>   text text
> 
> \stopbuffer
> \xmlprocessbuffer{demo}{test}{}
> \stoptext
>
> My questions:
> - Is there a good way to have a separate XML setup for each XML namespace?
> - Alternatively, one has to do the distinction within the same XML setup.
> In this case, how do we get the complete namespace? (In this example:
> "NameSpaceA" and "NameSpaceO")
>
> Thanks in advance for your help!
>
> Cheers, Christoph
>
> ___
> 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] XML: calculations on attribute values before output

2022-05-05 Thread Duncan Hothersall via ntg-context
Thanks so much Taco, that opens the door to a lot for me. It's a tricky
learning curve.

Just in case anyone else is copying code in future for CALS, there's a tiny
tweak to the rows calculation, it should be (t.at.morerows or 0) + 1.

I see a route to solving lots of other problems here too. Thanks again.

Duncan

On Thu, 5 May 2022 at 08:21, Taco Hoekwater  wrote:

>
>
> > On 4 May 2022, at 22:10, Duncan Hothersall via ntg-context <
> ntg-context@ntg.nl> wrote:
> >
> > Hi.
> >
> > I'm processing an XML table and need to set a row span. Because we use a
> variant of the CALS table model, spans are defined by an attribute saying
> how many *additional* rows should be spanned, as opposed to how many *in
> total*. So to translate this into TABLE \bTD[nr=X] syntax I need to add 1.
> >
> > I'm guessing this is very easily doable (in lua?) but I've tried various
> permutations and can't work it out. If anyone could give me a pointer that
> would be great.
> >
> > (In reality I'm going to need to handle lots of other conversions of
> attribute values into \bTD[...] commands, so if there's a generalised way
> of doing that sort of thing, or even better if someone has already tackled
> CALS tables in this way, that would also be great!)
>
> Not CALS, but I do a lot of HTML table processing. I find it all much
> easier on the lua side, because there the
> attributes are just in a table entry of the argument node t ( t.at ):
>
> set up a lua function in the setups:
>
> \startxmlsetups xml:demo:base
>  \xmlsetsetup{#1}{*}{xml:demo:*}
>  \xmlsetfunction {\xmldocument}{entry}{userdata.xmlfunctions.entry}
> \stopxmlsetups
>
> and then add this lua code:
>
> \startluacode
> userdata.xmlfunctions = {}
> function userdata.xmlfunctions.entry (t)
>   local rows = (t.at.morerows or 1) + 1
>   context.bTD({nr=rows})
>   lxml.flush(t)
>   context.eTD()
> end
> \stopluacode
>
> All of the tex-side commands also exist in lua, in the lxml and/or xml
> table, e.g.:
>
> direct output flushing:
>   lxml.flush(t)
>   lxml.all(t, ‘entry’)
>
> filter for processing:
>   for b in xml.collected(lxml.getid(t),'../row/entry') do … end
>
>
> (those are the ones I use a lot, there are many more)
>
> Best wishes,
> Taco



-- 
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] XML: calculations on attribute values before output

2022-05-04 Thread Duncan Hothersall via ntg-context
Hi.

I'm processing an XML table and need to set a row span. Because we use a
variant of the CALS table model, spans are defined by an attribute saying
how many *additional* rows should be spanned, as opposed to how many *in
total*. So to translate this into TABLE \bTD[nr=X] syntax I need to add 1.

I'm guessing this is very easily doable (in lua?) but I've tried various
permutations and can't work it out. If anyone could give me a pointer that
would be great.

(In reality I'm going to need to handle lots of other conversions of
attribute values into \bTD[...] commands, so if there's a generalised way
of doing that sort of thing, or even better if someone has already tackled
CALS tables in this way, that would also be great!)

MWE below, but obviously it just passes the morerows="1" value straight
through into \bTD[nr=1] so it doesn't give me a row span at all.

Thanks in advance.

Duncan

--

\startbuffer[demo]

 
  
   
1
2
   
   
3
   
  
 

\stopbuffer

\startxmlsetups xml:demo:base
 \xmlsetsetup{#1}{*}{xml:demo:*}
\stopxmlsetups

\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:informaltable
 \bTABLE
  \xmlflush{#1}
 \eTABLE
\stopxmlsetups

\startxmlsetups xml:demo:tgroup
 \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:demo:tbody
 \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:demo:row
 \bTR
  \xmlflush{#1}
 \eTR
\stopxmlsetups

\startxmlsetups xml:demo:entry
 \bTD[nr=\xmlattdef{#1}{morerows}{1}]
  \xmlflush{#1}
 \eTD
\stopxmlsetups

\setupbodyfont[modern]
\starttext
\xmlprocessbuffer{demo}{demo}{}
\stoptext

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] XML processing instructions

2022-05-03 Thread Duncan Hothersall via ntg-context
Just following up on my own question in case anybody else is interested, I
realised that the logic of my preprocessor code wasn't the problem, it was
just my ignorance of lua and character escaping. Both ? and * are special
characters in string.gsub expressions, so they need to be escaped with the
lua escape character which is % (which sends my editor haywire because it
thinks I am putting in a TeX comment, but never mind!).

So my now working code to translate historic processing instructions into
directives without a separate pass is:

\startluacode
function lxml.preprocessor(data)
 data = string.gsub(data, '<%?capdm %*force_line_stop%?>',
'')
 return data
end
\stopluacode

\startsetups xml:directive:injector:newline
 \crlf
\stopsetups

Duncan

On Mon, 2 May 2022 at 09:24, Duncan Hothersall  wrote:

> Many thanks Denis. Very useful tip on the injectors and generalised
> command usage. That will definitely come in useful.
>
> My problem is that I already have a lot of XML data with the existing
> processing instructions in it. I know I could use an external preprocess in
> something like Python to change them into injectors before they are fed
> into ConTeXt, but I was hoping there was a way to handle them directly as
> part of the ConTeXt / lua process.
>
> Thanks again though.
>
> Duncan
>
>
>
>
> On Mon, 2 May 2022, 08:48 ,  wrote:
>
>> That was too quick, sorry.
>>
>>
>>
>> Hi Duncan,
>>
>>
>>
>> I have used context’s own injectors for this :
>>
>>
>>
>> 
>>
>>
>>
>> \startsetups xml:directive:injector:addlinetopage
>>
>>   \adaptlayout[lines=+1]
>>
>> \stopsetups
>>
>>
>>
>> Or, for your line break example :
>>
>>
>>
>> 
>>
>>
>>
>> \startsetups xml:directive:injector:newline
>>
>>   \crlf
>>
>> \stopsetups
>>
>>
>>
>> Also, I have learned that you can just use arbitrary context code in xml:
>>
>>
>>
>> \def\xmltexdirective#1#2{\doif{#1}{command}{#2}}
>>
>>
>>
>> \xmlinstalldirective{tex}{xmltexdirective}
>>
>>
>>
>>  
>>
>>  
>>
>>  
>>
>>
>>
>> Best,
>>
>> Denis
>>
>>
>>
>> *Von:* Maier, Denis Christian (UB)
>> *Gesendet:* Montag, 2. Mai 2022 09:45
>> *An:* 'mailing list for ConTeXt users' 
>> *Cc:* Duncan Hothersall 
>> *Betreff:* AW: [NTG-context] XML processing instructions
>>
>>
>>
>>
>>
>> *Von:* ntg-context  *Im Auftrag von *Duncan
>> Hothersall via ntg-context
>> *Gesendet:* Montag, 2. Mai 2022 09:20
>> *An:* mailing list for ConTeXt users 
>> *Cc:* Duncan Hothersall 
>> *Betreff:* [NTG-context] XML processing instructions
>>
>>
>>
>> I have a big set of existing XML books (held in a derivative of DocBook)
>> which I'm looking to start processing directly with ConTeXt. (Up to now I
>> have a system which converts the XML into ConTeXt code which is then
>> processed, but this is inefficient and lots of the code is now unsupported.)
>>
>>
>>
>> I've had some success producing output, but my first real sticking point
>> has come with processing instructions. The existing XML contains lots of
>> processing instructions of the form
>>
>> , some of which can be conditional and introduce new
>> data etc. But I'd be happy at this stage if I could just process the most
>> basic one of them, which is used to introduce a line stop in a running
>> paragraph of text.
>>
>>
>>
>> My best guess at how to do this was to use the lxml.preprocessor function
>> to convert the processing instruction into an element, and then process the
>> element as normal. But (a) my attempt didn't work, and (b) there may
>> well be a better way.
>>
>>
>>
>> Minimal working example below, except that obviously the processing
>> instruction bit doesn't work!
>>
>>
>>
>> Thanks for any help or insights.
>>
>>
>>
>> Duncan
>>
>>
>>
>>
>>
>> MWE:
>>
>> --
>>
>>
>>
>> \startbuffer[demo]
>> 
>>   A paragraph witha processing
>> instruction.
>> 
>> \stopbuffer
>>
>> \startxmlsetups xml:demo:base
>>  \xmlsetsetup{#1}{*}{xml:demo:*}
>> \stopxmlsetups
>> \xmlregisterdocumentsetup{demo}{xml:demo:base}
>>
>> \startxmlsetups xml:demo:book
>>  \xmlflush{#1}
>

Re: [NTG-context] XML processing instructions

2022-05-02 Thread Duncan Hothersall via ntg-context
Many thanks Denis. Very useful tip on the injectors and generalised command
usage. That will definitely come in useful.

My problem is that I already have a lot of XML data with the existing
processing instructions in it. I know I could use an external preprocess in
something like Python to change them into injectors before they are fed
into ConTeXt, but I was hoping there was a way to handle them directly as
part of the ConTeXt / lua process.

Thanks again though.

Duncan




On Mon, 2 May 2022, 08:48 ,  wrote:

> That was too quick, sorry.
>
>
>
> Hi Duncan,
>
>
>
> I have used context’s own injectors for this :
>
>
>
> 
>
>
>
> \startsetups xml:directive:injector:addlinetopage
>
>   \adaptlayout[lines=+1]
>
> \stopsetups
>
>
>
> Or, for your line break example :
>
>
>
> 
>
>
>
> \startsetups xml:directive:injector:newline
>
>   \crlf
>
> \stopsetups
>
>
>
> Also, I have learned that you can just use arbitrary context code in xml:
>
>
>
> \def\xmltexdirective#1#2{\doif{#1}{command}{#2}}
>
>
>
> \xmlinstalldirective{tex}{xmltexdirective}
>
>
>
>  
>
>  
>
>      
>
>
>
> Best,
>
> Denis
>
>
>
> *Von:* Maier, Denis Christian (UB)
> *Gesendet:* Montag, 2. Mai 2022 09:45
> *An:* 'mailing list for ConTeXt users' 
> *Cc:* Duncan Hothersall 
> *Betreff:* AW: [NTG-context] XML processing instructions
>
>
>
>
>
> *Von:* ntg-context  *Im Auftrag von *Duncan
> Hothersall via ntg-context
> *Gesendet:* Montag, 2. Mai 2022 09:20
> *An:* mailing list for ConTeXt users 
> *Cc:* Duncan Hothersall 
> *Betreff:* [NTG-context] XML processing instructions
>
>
>
> I have a big set of existing XML books (held in a derivative of DocBook)
> which I'm looking to start processing directly with ConTeXt. (Up to now I
> have a system which converts the XML into ConTeXt code which is then
> processed, but this is inefficient and lots of the code is now unsupported.)
>
>
>
> I've had some success producing output, but my first real sticking point
> has come with processing instructions. The existing XML contains lots of
> processing instructions of the form
>
> , some of which can be conditional and introduce new
> data etc. But I'd be happy at this stage if I could just process the most
> basic one of them, which is used to introduce a line stop in a running
> paragraph of text.
>
>
>
> My best guess at how to do this was to use the lxml.preprocessor function
> to convert the processing instruction into an element, and then process the
> element as normal. But (a) my attempt didn't work, and (b) there may well
> be a better way.
>
>
>
> Minimal working example below, except that obviously the processing
> instruction bit doesn't work!
>
>
>
> Thanks for any help or insights.
>
>
>
> Duncan
>
>
>
>
>
> MWE:
>
> --
>
>
>
> \startbuffer[demo]
> 
>   A paragraph witha processing
> instruction.
> 
> \stopbuffer
>
> \startxmlsetups xml:demo:base
>  \xmlsetsetup{#1}{*}{xml:demo:*}
> \stopxmlsetups
> \xmlregisterdocumentsetup{demo}{xml:demo:base}
>
> \startxmlsetups xml:demo:book
>  \xmlflush{#1}
> \stopxmlsetups
>
> \startxmlsetups xml:demo:para
>  \xmlflush{#1}\endgraf
> \stopxmlsetups
>
> \startluacode
>  function lxml.preprocessor(data,settings)
>   return string.find(data,"")
>and string.gsub(data," *force_line_stop?>","")
>or data
>  end
> \stopluacode
>
> \startxmlsetups xml:demo:capdmlinestop
>  \crlf
>  \xmlflush{#1}
> \stopxmlsetups
>
> \setupbodyfont[modern]
> \starttext
> \xmlprocessbuffer{demo}{demo}{}
> \stoptext
>
>
>
> --
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] XML processing instructions

2022-05-02 Thread Duncan Hothersall via ntg-context
Apologies, there are two rogue * in the lxml.preprocessor code, but even
when they are removed it doesn't work.

On Mon, 2 May 2022 at 08:19, Duncan Hothersall  wrote:

> I have a big set of existing XML books (held in a derivative of DocBook)
> which I'm looking to start processing directly with ConTeXt. (Up to now I
> have a system which converts the XML into ConTeXt code which is then
> processed, but this is inefficient and lots of the code is now unsupported.)
>
> I've had some success producing output, but my first real sticking point
> has come with processing instructions. The existing XML contains lots of
> processing instructions of the form
> , some of which can be conditional and introduce new
> data etc. But I'd be happy at this stage if I could just process the most
> basic one of them, which is used to introduce a line stop in a running
> paragraph of text.
>
> My best guess at how to do this was to use the lxml.preprocessor function
> to convert the processing instruction into an element, and then process the
> element as normal. But (a) my attempt didn't work, and (b) there may well
> be a better way.
>
> Minimal working example below, except that obviously the processing
> instruction bit doesn't work!
>
> Thanks for any help or insights.
>
> Duncan
>
>
> MWE:
> --
>
> \startbuffer[demo]
> 
>   A paragraph witha processing
> instruction.
> 
> \stopbuffer
>
> \startxmlsetups xml:demo:base
>  \xmlsetsetup{#1}{*}{xml:demo:*}
> \stopxmlsetups
> \xmlregisterdocumentsetup{demo}{xml:demo:base}
>
> \startxmlsetups xml:demo:book
>  \xmlflush{#1}
> \stopxmlsetups
>
> \startxmlsetups xml:demo:para
>  \xmlflush{#1}\endgraf
> \stopxmlsetups
>
> \startluacode
>  function lxml.preprocessor(data,settings)
>   return string.find(data,"")
>and string.gsub(data," *force_line_stop?>","")
>or data
>  end
> \stopluacode
>
> \startxmlsetups xml:demo:capdmlinestop
>  \crlf
>  \xmlflush{#1}
> \stopxmlsetups
>
> \setupbodyfont[modern]
> \starttext
> \xmlprocessbuffer{demo}{demo}{}
> \stoptext
>
> --
>


-- 
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] XML processing instructions

2022-05-02 Thread Duncan Hothersall via ntg-context
I have a big set of existing XML books (held in a derivative of DocBook)
which I'm looking to start processing directly with ConTeXt. (Up to now I
have a system which converts the XML into ConTeXt code which is then
processed, but this is inefficient and lots of the code is now unsupported.)

I've had some success producing output, but my first real sticking point
has come with processing instructions. The existing XML contains lots of
processing instructions of the form
, some of which can be conditional and introduce new data
etc. But I'd be happy at this stage if I could just process the most basic
one of them, which is used to introduce a line stop in a running paragraph
of text.

My best guess at how to do this was to use the lxml.preprocessor function
to convert the processing instruction into an element, and then process the
element as normal. But (a) my attempt didn't work, and (b) there may well
be a better way.

Minimal working example below, except that obviously the processing
instruction bit doesn't work!

Thanks for any help or insights.

Duncan


MWE:
--

\startbuffer[demo]

  A paragraph witha processing
instruction.

\stopbuffer

\startxmlsetups xml:demo:base
 \xmlsetsetup{#1}{*}{xml:demo:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:book
 \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:demo:para
 \xmlflush{#1}\endgraf
\stopxmlsetups

\startluacode
 function lxml.preprocessor(data,settings)
  return string.find(data,"")
   and string.gsub(data,"","")
   or data
 end
\stopluacode

\startxmlsetups xml:demo:capdmlinestop
 \crlf
 \xmlflush{#1}
\stopxmlsetups

\setupbodyfont[modern]
\starttext
\xmlprocessbuffer{demo}{demo}{}
\stoptext

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Space around figure

2022-04-28 Thread Duncan Hothersall via ntg-context
You should be able to change the space above and below a float with the
spacebefore and spaceafter keys to \setupfloat. I think the default value
is big for each, but you can override that with null. Something like

\setupfloat[figure][spacebefore=,spaceafter=]

Hope that helps.

Duncan

On Thu, 28 Apr 2022 at 11:41, Alain Delmotte via ntg-context <
ntg-context@ntg.nl> wrote:

> Hi,
>
> When one insert a figure in a text, I think that the default behaviour is
> to add space around the figure.
>
> Is tit possible to manage that space or suppress it?
>
> Thanks in advance,
>
> --
>
> Alain
>
> ___
> 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] How to group list of figures and list of tables by chapter?

2022-03-30 Thread Duncan Hothersall via ntg-context
You could try using \writebetweenlist hooked into \setuphead[chapter]?
Something like (untested):

\setuphead[chapter][before={\writebetweenlist[figure][location=here]{\blank}}]

(Sorry, can't currently test this.)

Duncan

On Thu, 31 Mar 2022 at 06:31, Werner Schmidt via ntg-context <
ntg-context@ntg.nl> wrote:

> Hi,
>
> How can I set up \placelistoffigures and \placelistoftables that figures
> and tables are grouped by chapter, i.e. separated by a blank line between
> chapters (see example below)?
>
> Thanks in advance for your help!
>
> Best Werner
>
>
> (Default:)
> Figures
>
> 1.1 Caption Chapter01-Section01-01 . . . . . . . . . . . . . . . . . 2
> 2.1 Caption Chapter02-Section01-01 . . . . . . . . . . . . . . . . . 3
> 2.2 Caption Chapter02-Section01-02 . . . . . . . . . . . . . . . . . 3
> 3.1 Caption Chapter03-Section01-01 . . . . . . . . . . . . . . . . . 4
> 3.2 Caption Chapter03-Section01-02 . . . . . . . . . . . . . . . . . 4
> 3.3 Caption Chapter03-Section02-03 . . . . . . . . . . . . . . . . . 4
>
> (Wanted:)
> Figures
>
> 1.1 Caption Chapter01-Section01-01 . . . . . . . . . . . . . . . . . 2
>
> 2.1 Caption Chapter02-Section01-01 . . . . . . . . . . . . . . . . . 3
> 2.2 Caption Chapter02-Section01-02 . . . . . . . . . . . . . . . . . 3
>
> 3.1 Caption Chapter03-Section01-01 . . . . . . . . . . . . . . . . . 4
> 3.2 Caption Chapter03-Section01-02 . . . . . . . . . . . . . . . . . 4
> 3.3 Caption Chapter03-Section02-03 . . . . . . . . . . . . . . . . . 4
>
> ___
> 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] Bloody PDF boxes and cr*p marks!

2021-10-31 Thread Duncan Hothersall via ntg-context
Thank you for this, that's the first time this stuff has made any sense to
me.

On Sat, 30 Oct 2021 at 20:22, Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:

> I finally reworked the wiki page https://wiki.contextgarden.net/PDF_Boxes
> and also extended https://wiki.contextgarden.net/PDFX a bit.
>
> Hraban
>
> ___
> 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] A book with sections

2021-10-24 Thread Duncan Hothersall via ntg-context
Worth just quickly noting that the default for \part is placehead=no. You
need to explicitly set placehead=yes for it to actually output the heading.
See https://wiki.contextgarden.net/Command/_section#Parts

On Sun, 24 Oct 2021 at 00:02, Bruce Horrocks via ntg-context <
ntg-context@ntg.nl> wrote:

>
>
> > On 23 Oct 2021, at 14:51, Gerben Wierda via ntg-context <
> ntg-context@ntg.nl> wrote:
> >
> >
> >> On 23 Oct 2021, at 15:34, Wolfgang Schuster <
> wolfgang.schuster.li...@gmail.com> wrote:
> >>
> >>  Gerben Wierda via ntg-context schrieb am 23.10.2021 um 15:20:
> >>> I’d like a book with chapters to have sections/parts, e.g. something
> that groups a few \chapter elements together. Is there support for this in
> LMTX? I.e. in such a way that it also shows up in the table of contents?
> >>
> >> You can use \part.
> >
> > Yes. Thanks. But that leads to additional questions:
> > - how do I get the parts to show up in the table of contents? Because I
> tried \part but it did not show up
> > - how do I let chapters number on (not restart in each part, and not a
> x.y number but simply ‘2. Chapter’
> > - what is a good way to create actual RHS ‘title’ pages for each chapter?
> > - how do I get parts to number with Roman numerals?
>
> I define my own versions of \part and \chapter (called \Part and \Chapter)
> and specify a different display style using setups. The definition for
> \Part is below, \Chapter is very similar so I haven't included it.
>
> %% Double rule above part title
> \startsetups PartSetup
>  \setupheader[state=empty]
>  \par
>  \startMPcode
>draw (0,2mm)--(TextWidth,2mm) withpen pensquare scaled 1.5mm ;
>draw (0,0)--(TextWidth,0) withpen pensquare scaled 1.0mm ;
>clip currentpicture to unitsquare yscaled 1cm xscaled TextWidth
>  \stopMPcode
> \stopsetups
>
> \define[2]\placePartTitle{\midaligned{#2}}
> %% The above line is what I use. You want Roman numerals so maybe adapt it
> to:
> %% \define[2]\placePartTitle{\midaligned{\convertnumber[Romannumerals][#1]
> #2}}
>
> \definehead [Part] [part]
> \setuphead[Part]
>  [ page=right,
>placehead=yes,
>style={\stylePartTitle}, %% this is just from a \definefont
>before={\setups{PartSetup}},
>command=\placePartTitle,
>  ]
>
> With \setuplayout[location=doublesided] this then comes out on the RHS.
>
> For the ToC, I use:
>
> \setuplist [alternative=b]
> \setuplist [Part]
>  [ headnumber=no,
>margin=0cm,
>width=0cm,
>distance=0cm,
>style=\tocStylePartTitle,
>  ]
> \setuplist [Chapter]
>  [ headnumber=no,
>margin=1em,
>width=0cm,
>distance=0cm,
>  ]
> \setupcombinedlist [content] [list={Part,Chapter}]
>
> then \placecontent prints the chapter titles indented under each part.
>
> HTH
> —
> Bruce Horrocks
> Hampshire, UK
>
>
>
> —
> Bruce Horrocks
> Hampshire, 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://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
___


Re: [NTG-context] mathcolor attribute in MathML (mkiv)

2021-05-27 Thread Duncan Hothersall
Understood and appreciated, Hans, and many thanks for the patch which I
will be testing shortly.

Completely agree re the real world of MathML. We are still converting our
MathML masters to other formats after many years for various uses and fixes
because of the situation you describe with patchy and dodgy support
especially in the browser world. Maths on the web is still a little bit
wild west.

Thanks again.

Duncan

On Thu, 27 May 2021 at 18:00, Hans Hagen  wrote:

> On 5/27/2021 6:30 PM, Duncan Hothersall wrote:
> > Apologies Hans.
> >
> > MWE:
> >
> > \usemodule[newmml]
> > \starttext
> > \xmlprocessdata{}{
> >   
> >E
> >
> >  π
> >
> >   
> > }{}
> > \stoptext
> >
> > The π symbol does not show in red.
> Kind of trivial ... i'll send you a patched module.
>
> If you want you can check with the standard and see where we need to add
> it. I'll then adapt the mkiv file before taking a look at upgrading the
> lmtx one.
>
> For decades this mathml stuff has been a bit of a pain, because when one
> uses it for a mixed web / text project one always needs to satisfy the
> latest greatest either or not bugged web rendering, it disappearing from
> browsers, coming back, rendered remote or in the browser, mixed
> (in/with) asciimath which has its own tweaks. A pitty that content
> mathml never took off, probbably also due to the failure of openmath
> which took away attention from it and that we actually sort of
> support(ed). So when it comes to (reasonable quality) rendering in print
> one always runs a bit behind.
>
> I'm also always a bit hesitant to touch the code because it's actually
> used by a collegue in some (zero budget, so me looking at the mml is
> just hobbying) projects concerning math school books where often the web
> part controls the limitations and enforces weird coding (tens of
> thousands of files with plenty mathml). Btw, especially symbols are a
> mess and interfere with assumed structure, so that's always tricky to
> touch. Especially when you want to have it specific for (mid/high)
> school math.
>
> But anyway things like a bit of color and so are not that hard to
> support (more a matter of making sure performance is not hit).
>
> Hans
>
> -
>Hans Hagen | PRAGMA ADE
>    Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>


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


Re: [NTG-context] mathcolor attribute in MathML (mkiv)

2021-05-27 Thread Duncan Hothersall
Apologies Hans.

MWE:

\usemodule[newmml]
\starttext
\xmlprocessdata{}{
 
  E
  
π
  
 
}{}
\stoptext

The π symbol does not show in red.

Duncan


On Thu, 27 May 2021 at 17:18, Hans Hagen  wrote:

> On 5/27/2021 5:47 PM, Duncan Hothersall wrote:
> > Hello list.
> >
> > I'm trying to use colour in some MathML formulae using the mathcolor
> > attribute. It seems to have no effect on the output. I can
> > see \applymmlmathcolor in the x-mathml.mkiv source but I can't see how
> > to make it work. Does anyone have any pointers?
> >
> > (Does lmtx support this?)
> MWE needed
>
> -
>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] mathcolor attribute in MathML (mkiv)

2021-05-27 Thread Duncan Hothersall
Hello list.

I'm trying to use colour in some MathML formulae using the mathcolor
attribute. It seems to have no effect on the output. I can
see \applymmlmathcolor in the x-mathml.mkiv source but I can't see how to
make it work. Does anyone have any pointers?

(Does lmtx support this?)

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] arbitrary context commands in xml file

2021-03-08 Thread Duncan Hothersall
On Mon, 8 Mar 2021 at 12:46, Hans Hagen  wrote:

> > I'd like to second Denis' request for support for XML processing
> > instructions to execute ConTeXt code, rather than elements which can
> > cause big problems if one is working to a fixed schema. It would be a
> > boon to be able to drop in  in an XML source.
> one of the things that can already be done ...
>
> \def\xmltexdirective#1#2{\doif{#1}{command}{#2}}
>
> \xmlinstalldirective{tex}{xmltexdirective}
>
>  
>  
>
> (the #2 is something without spaces btu one can work around that)
>

Aha. Useful, thanks!
___
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] arbitrary context commands in xml file

2021-03-08 Thread Duncan Hothersall
On Mon, 8 Mar 2021 at 10:21,  wrote:

> > -Ursprüngliche Nachricht-
> > Von: Hans Hagen 
> > Gesendet: Freitag, 5. März 2021 23:17
> > An: mailing list for ConTeXt users ; Maier, Denis
> > Christian (UB) ;
> > wolfgang.schuster.li...@gmail.com
> > Betreff: Re: [NTG-context] arbitrary context commands in xml file
>
>
> [...]
>
> > >
> > > Here, I was thinking if something like this could be easier:
> > >
> > > 
> > you can also do this:
> >
> > 
> >
> > \startxmlsetups xml:testpage
> >\testpage[\xmlatt{#1}{n}]
> > \stopxmlsetup
> >
> > and register that one (as in previous examples)
>
> Thanks,. That's a good idea, but it will also make the XML invalid.
>
> Denis
>

I'd like to second Denis' request for support for XML processing
instructions to execute ConTeXt code, rather than elements which can cause
big problems if one is working to a fixed schema. It would be a boon to be
able to drop in  in an XML source.

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


  1   2   >