Re: [NTG-context] Fonts and equations

2018-05-18 Thread Lance Larsen
Henri,

Thanks for the suggestion. I tried to add the additional fonts, but this
did not seem to make a difference. The math equations render fine, but a
search performed for terms in an equation still does not work when I
specify the font. When I remove the font specification, it works fine.
There must be some difference in the font that is used even if I don't
specify a math font. Any other thoughts about why the math font changes or
how to get a math font that is searchable, or get back to the default math
font?

-Lance


--
>
> Message: 4
> Date: Fri, 18 May 2018 18:55:14 +1200
> From: Henri Menke <henrime...@gmail.com>
> To: ntg-context@ntg.nl
> Subject: Re: [NTG-context] Fonts and equations
> Message-ID: <12743277-ebd0-67c7-2393-fe33e97bf...@gmail.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
>
>
> On 17/05/18 23:19, Lance Larsen wrote:
> > I have a context document with several equations. One really nice
> > feature with equations is that by default you can search for variable
> > names in equation in a PDF reader like acrobat. However, I needed to
> > configure the document to use arial for the text. Once I do this, the
> > equations are no longer searchable. I assume something happened to the
> > mathematics font. How to I change the font for the document text, but
> > keep the math equations searchable? Is there a way to change the
> > document font, but not affect the math font? Here is a sample of how I
> > configured the font. The equations are no longer searchable.
> >
> > % Load the Arial font values for regular, italics, bold, etc.
> > \starttypescript [serif] [arial]
> >\definefontsynonym [Serif]   [name:arial]
> >\definefontsynonym [SerifBold]   [name:arialbold]
> >\definefontsynonym [SerifItalic] [name:arialitalic]
> >\definefontsynonym [SerifSlanted][name:arialitalic]
> >\definefontsynonym [SerifBoldItalic] [name:arialbolditalic]
> >\definefontsynonym [SerifBoldSlanted][name:arialbolditalic]
> >\definefontsynonym [SerifCaps]   [name:arial]
> > \stoptypescript
> >
> > % Now we define the 'arial' font as an available option
> > \definetypeface [arial][rm] [serif] [arial]
>
> The typeface "arial" you defined has no math font (and no sans and no
> mono font).  Add those and you should be fine:
>
> \definetypeface [arial] [rm] [serif] [arial]
> \definetypeface [arial] [ss] [sans]  [modern]
> \definetypeface [arial] [tt] [mono]  [modern]
> \definetypeface [arial] [mm] [math]  [modern]
>
> >
> > % Set 'arial' 10pt as the default font for the document
> > \setupbodyfont [arial,rm,10pt]
> >
> > \starttext
> >
> > $z_1 = x_1 + y_1$
> >
> > $a = b + c$
> >
> > \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
___

[NTG-context] Fonts and equations

2018-05-18 Thread Lance Larsen
I have a context document with several equations. One really nice feature
with equations is that by default you can search for variable names in
equation in a PDF reader like acrobat. However, I needed to configure the
document to use arial for the text. Once I do this, the equations are no
longer searchable. I assume something happened to the mathematics font. How
to I change the font for the document text, but keep the math equations
searchable? Is there a way to change the document font, but not affect the
math font? Here is a sample of how I configured the font. The equations are
no longer searchable.

% Load the Arial font values for regular, italics, bold, etc.
\starttypescript [serif] [arial]
  \definefontsynonym [Serif]   [name:arial]
  \definefontsynonym [SerifBold]   [name:arialbold]
  \definefontsynonym [SerifItalic] [name:arialitalic]
  \definefontsynonym [SerifSlanted][name:arialitalic]
  \definefontsynonym [SerifBoldItalic] [name:arialbolditalic]
  \definefontsynonym [SerifBoldSlanted][name:arialbolditalic]
  \definefontsynonym [SerifCaps]   [name:arial]
\stoptypescript

% Now we define the 'arial' font as an available option
\definetypeface [arial][rm] [serif] [arial]

% Set 'arial' 10pt as the default font for the document
\setupbodyfont [arial,rm,10pt]

\starttext

$z_1 = x_1 + y_1$

$a = b + c$

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

[NTG-context] Setting section margin

2013-09-05 Thread Lance Larsen
I would like to adjust the margin for sections, subsections, etc. I came
across a suggestion that you can use setuphead with the beforesection and
aftersection options to do something like this, but I tried this with MKIV,
and beforesection and aftersection appear to have no effect (see the example
below). Recent documentation doesn't show these as parameters for setuphead.
How do I do this with MKIV?

 

Example:

 

\setuphead[section] [margin=0.5in,
beforesection={\startnarrower[left=0.5in]}, aftersection={\stopnarrower}]

\setuphead[subsection] [margin=1in,
beforesection={\startnarrower[left=1.0in]}, aftersection={\stopnarrrower}]

 

\starttext

 

\chapter{chapter}

This is a chapter

 

\section{section}

This is a section

 

\section{subsection}

This is a subsection

 

\stoptext

 

-Lance Larsen

___
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] Appendix Numbering and TOC value

2013-08-02 Thread Lance Larsen
Thanks, Wolfgang. That was just what I needed. I appreciate the help.

-Lance

From: Wolfgang Schuster schuster.wolfg...@gmail.com

 I have a document with an appendix included:
  
 \setuplabeltext[appendix=APPENDIX~]
 \starttext
 \placecontent
 \chapter{One}
 \startappendices
 \chapter{In Appendix}
 \stopappendices
 \stoptext
  
 I would like to have the table of contents show:
  
 Appendix A  In Appendix
  
 But I get:
  
 A In Appendix
  
 How do I get the table of contents to show the heading ?Appendix? before
A?

You have to enable the label in the TOC with
\setuplist[chapter][label=yes,width=7em].

Wolfgang



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

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


[NTG-context] Appendix Numbering and TOC value

2013-08-01 Thread Lance Larsen
I have a document with an appendix included:

 

\setuplabeltext[appendix=APPENDIX~]

\starttext

\placecontent

\chapter{One}

\startappendices

\chapter{In Appendix}

\stopappendices

\stoptext

 

I would like to have the table of contents show:

 

Appendix A  In Appendix

 

But I get:

 

A In Appendix

 

How do I get the table of contents to show the heading 'Appendix' before A?

 

-Lance

___
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] NTG-context] How to hack the lua files

2013-06-18 Thread Lance Larsen
I haven't been using the project structure. From your question, I am
inferring that this might help. At present I have treated the files as two
separate documents. I didn't take too much time looking at how to set up the
project structure because it wasn't clear that I needed it. But I can see
how this might impact cross references between documents.

-Lance


On 6/17/2013 3:25 PM, Lance Larsen wrote:
 Hans,

 Thankyou for your suggestion of using the \usereferences tag to reference
 formulas in another document. This is a good solution. However the example
 below doesn't give usable results because the references to the external
 formula output by test2.tex does not include the chapter number:
Do you use the project structure? components and such?

Hans


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-

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

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


[NTG-context] NTG-context] How to hack the lua files

2013-06-17 Thread Lance Larsen
Hans,

Thankyou for your suggestion of using the \usereferences tag to reference
formulas in another document. This is a good solution. However the example
below doesn't give usable results because the references to the external
formula output by test2.tex does not include the chapter number:

test1.tex:
-
\starttext
\chapter{Chapter 1}
\placeformula[one] \startformula x = y \stopformula
\placeformula[two] \startformula y = z \stopformula
\chapter{Chapter 2}
\placeformula[three] \startformula z = x \stopformula
\stoptext


test2.tex:
--
\usereferences[test1.tex]
\starttext
\in{formula}[test1.tex::one]
\in{formula}[test1.tex::two]
\in{formula}[test1.tex::three]
\stoptext

In the output of test1.tex, the formulas are labeled (1.1), (1.2), and
(2.1). In the output of test2.tex the references are labeled 'formula 1',
'formula 2', and 'formula 1' (i.e. the section number is not included).

Using the \usereferences tag works if I label formulas 'bytext' rather than
by 'bysection' and turn off chapter prefixes in test1.tex using the
following at the start of the document:

\setupformulae[way=bytext,prefixsegments=None]

I would really prefer to maintain numbering by section, but to do this, I
need test2.tex to show external references in the same way as test1.tex (by
including the section number in front of the equation number). Is there a
way to do this at present? If not, labeling formulas 'bytext' will work for
now even if it isn't ideal.

-Lance Larsen


On 6/7/2013 4:01 PM, Lance Larsen wrote:
 luigi,

 When I started exploring how to map equation references (eq:name) to
 equation numbers (4.2), I noticed that the 'tuc' file included the
equation
 reference (eq:name), but I was not able to identify anywhere where it
 indicates the actual equation label specified in the document. Below is an
 example of the tuc output. 'eq:DVOL_RVI_17' is equation (4.28) in the
 document:

 {
[metadata]=142,
[numberdata]=237,
[prefixdata]=11,
[references]={
 [block]=bodypart,
 [internal]=122,
 [realpage]=47,
 [reference]=eq:DVOL_RVI_17,
 [section]=79,
},
   }

 There is nowhere in the tuc file that contains 4 and 28 near each other. I
 checked this for other equations as well and concluded that the tuc file
 does not contain the actual equation numbers that are used.

because there are indirect references to for instance 'numberdata' where 
this info sits

 If I am missing something or you have any other suggestions that might
help
 me to extract this info, I would sure appreciate the help.

see previous mail

btw, if you just want to use references in another tex doc, this will do 
the trick:

\usereferences[somedoc]

\starttext

 \in{formula}[somedoc::a]

 \in{formula}[somedoc::b]

\stoptext



-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-


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

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


Re: [NTG-context] How to hack the lua files

2013-06-07 Thread Lance Larsen
If I modify a core lua file how do I remake the format file? Is this
something that is done from mtxrun.exe? I would certainly prefer to use a
hook rather than modifying a core file, but how do I identify the hooks that
are available? Is there a list of hooks that are available, or a standard
way that hooks are called from the context code so that I can look for an
appropriate hook? Where do I place my hook scripts? Is there a guide that is
available that might get me started?

What I trying to do is map equation references to the equation number
generated by context. So for example, if I have an equation:

\placeformula \startformula 
\NC F = m a \NC  \NR[eq:newtonslaw]
\stopformula

I need a way to log the fact that 'eq:newton' became something like equation
(2.3). I hoped there was a tracker that printed this out (maybe there is,
but I haven't found it). So I thought maybe I could find where equation
numbers are defined by context and add a tracker. The code in
'strc-ref.mkvi' and 'strc-ref.lua' looked promising. 

Incidentally, is this where equation numbers are created, or should I be
looking in another file? Is there a lua function that gets called
consistently around the time equation numbers are defined where the equation
reference (i.e. eq:newtonslaw) and the associated equation number are both
available and could be logged?

I tried adding a new tracker in strc-ref.lua to see if I could narrow down
where the labels are created, but my tracker did not seem to work.
Therefore, I identified a tracker that was working and tried to modify the
output slightly only to find that this did not work either. It is not clear
to me at present how context loads the lua files. I hoped that it loaded
these directly, so that changes would take effect immediately. 

-Lance Larsen

--
On 6/7/2013 1:20 AM, Lance Larsen wrote:
 I have a version of context standalone installed, and I am trying to 
 add some functionality I need to strc-ref.lua. As a simple test to see 
 if modifying the file was working, I enabled the 
 ?structures.referencing.identifying? tracker and verified that I was 
 getting messages from this tracker in the log. I then modified the log 
 statement in strc-ref.lua and processed the document again. The 
 changes I made to the lua file did not seem to be active. I verified 
 that there is only one log statement that matches the output I am 
 seeing. Why would my lua code change not be active? Is the lua code 
 cached somehow? (I am running this from windows if that matters).

 The code I modified is under the path:

 context\tex\texmf-context\tex\context\base\ strc-ref.lua

if you patch files that way you need to remake the format file

I don't know what you patch, but changing something in a core file is no
guarantee for the future. It's not a problem to add functionality (lots of
hooks for that) but best do that in a local module that gets loaded at
runtime then.

Hans

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-


--


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

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

___

End of ntg-context Digest, Vol 108, Issue 19


___
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] How to hack the lua files

2013-06-07 Thread Lance Larsen
Hans,

Your reply below was very helpful. I looked at the context command line
options and saw 'make'. After running this, the code changes took effect.
Thankyou.

I could still use help in identifying where equation numbers are defined in
the code so that I can add a tracker. Do you have a suggestion of which
function (or at least lua file) I should look in for this?

I am also curious how hooks are defined, so that I can identify them in the
code and see if there is one that would meek my purpose - also where the
hook scripts are placed so that context can find them.

Thanks again for the reply which got me over the first hurdle.

-Lance

--

Message: 4
Date: Fri, 07 Jun 2013 09:25:36 +0200
From: Hans Hagen pra...@wxs.nl
To: ntg-context@ntg.nl
Subject: Re: [NTG-context] How to hack the lua files
Message-ID: 51b18af0.5010...@wxs.nl
Content-Type: text/plain; charset=windows-1252; format=flowed

On 6/7/2013 1:20 AM, Lance Larsen wrote:
 I have a version of context standalone installed, and I am trying to 
 add some functionality I need to strc-ref.lua. As a simple test to see 
 if modifying the file was working, I enabled the 
 ?structures.referencing.identifying? tracker and verified that I was 
 getting messages from this tracker in the log. I then modified the log 
 statement in strc-ref.lua and processed the document again. The 
 changes I made to the lua file did not seem to be active. I verified 
 that there is only one log statement that matches the output I am 
 seeing. Why would my lua code change not be active? Is the lua code 
 cached somehow? (I am running this from windows if that matters).

 The code I modified is under the path:

 context\tex\texmf-context\tex\context\base\ strc-ref.lua

if you patch files that way you need to remake the format file

I don't know what you patch, but changing something in a core file is no
guarantee for the future. It's not a problem to add functionality (lots of
hooks for that) but best do that in a local module that gets loaded at
runtime then.

Hans

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-


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

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


Re: [NTG-context] How to hack the lua files

2013-06-07 Thread Lance Larsen
luigi,

When I started exploring how to map equation references (eq:name) to
equation numbers (4.2), I noticed that the 'tuc' file included the equation
reference (eq:name), but I was not able to identify anywhere where it
indicates the actual equation label specified in the document. Below is an
example of the tuc output. 'eq:DVOL_RVI_17' is equation (4.28) in the
document:

{
  [metadata]=142,
  [numberdata]=237,
  [prefixdata]=11,
  [references]={
   [block]=bodypart,
   [internal]=122,
   [realpage]=47,
   [reference]=eq:DVOL_RVI_17,
   [section]=79,
  },
 }

There is nowhere in the tuc file that contains 4 and 28 near each other. I
checked this for other equations as well and concluded that the tuc file
does not contain the actual equation numbers that are used.

If I am missing something or you have any other suggestions that might help
me to extract this info, I would sure appreciate the help.

-Lance

P.S. Thanks for the tip on using 'context --make' to rebuild the files. I
figured this out by guesswork before I got your response, but I have
appreciated how helpful many of you have been on this list.

--
On Fri, Jun 7, 2013 at 3:00 PM, Lance Larsen lance.c.larsen at
gmail.comwrote:

 If I modify a core lua file how do I remake the format file? Is this
 something that is done from mtxrun.exe? I would certainly prefer to use a
 hook rather than modifying a core file, but how do I identify the hooks
 that
 are available? Is there a list of hooks that are available, or a standard
 way that hooks are called from the context code so that I can look for an
 appropriate hook? Where do I place my hook scripts? Is there a guide that
 is
 available that might get me started?

 What I trying to do is map equation references to the equation number
 generated by context. So for example, if I have an equation:

 \placeformula \startformula
 \NC F = m a \NC  \NR[eq:newtonslaw]
 \stopformula


\usemodule[newmath]

\setupformulas[way=bytext,prefix=no]
\setupsubformulas[conversion=romannumerals]

\starttext
\placenamedformula[eq:TEST]{Der einfache Test}
\startformula
c^2 = a^2 + b^2.
\stopformula

\stoptext

and look into the tuc file (it's a lua file)

-- 
luigi

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

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


Re: [NTG-context] ntg-context Digest, Vol 108, Issue 22

2013-06-07 Thread Lance Larsen
Hans,

Referencing equations from another context document is what I am trying to
do. It think the \usereferences tag that you noted in the ideal solution for
my case. Thanks again for the help.

-Lance

-
On 6/7/2013 4:01 PM, Lance Larsen wrote:
 luigi,

 When I started exploring how to map equation references (eq:name) to
 equation numbers (4.2), I noticed that the 'tuc' file included the
equation
 reference (eq:name), but I was not able to identify anywhere where it
 indicates the actual equation label specified in the document. Below is an
 example of the tuc output. 'eq:DVOL_RVI_17' is equation (4.28) in the
 document:

 {
[metadata]=142,
[numberdata]=237,
[prefixdata]=11,
[references]={
 [block]=bodypart,
 [internal]=122,
 [realpage]=47,
 [reference]=eq:DVOL_RVI_17,
 [section]=79,
},
   }

 There is nowhere in the tuc file that contains 4 and 28 near each other. I
 checked this for other equations as well and concluded that the tuc file
 does not contain the actual equation numbers that are used.

because there are indirect references to for instance 'numberdata' where 
this info sits

 If I am missing something or you have any other suggestions that might
help
 me to extract this info, I would sure appreciate the help.

see previous mail

btw, if you just want to use references in another tex doc, this will do 
the trick:

\usereferences[somedoc]

\starttext
 \in{formula}[somedoc::a]
 \in{formula}[somedoc::b]
\stoptext

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-

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

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


[NTG-context] How to hack the lua files

2013-06-06 Thread Lance Larsen
I have a version of context standalone installed, and I am trying to add
some functionality I need to strc-ref.lua. As a simple test to see if
modifying the file was working, I enabled the
'structures.referencing.identifying' tracker and verified that I was getting
messages from this tracker in the log. I then modified the log statement in
strc-ref.lua and processed the document again. The changes I made to the lua
file did not seem to be active. I verified that there is only one log
statement that matches the output I am seeing. Why would my lua code change
not be active? Is the lua code cached somehow? (I am running this from
windows if that matters).

 

The code I modified is under the path:

context\tex\texmf-context\tex\context\base\ strc-ref.lua

 

-Lance Larsen

 

___
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] Exporting labels from a ConTeXt document

2013-06-04 Thread Lance Larsen
I have a document with several equations included. I need to reference these
in an external document. To automate the process, I need a mapping between
the equation label (i.e.,  eq:my_eq_name) to an equation number such as
(4.22). Is there a way to export this mapping possibly as a command line
input? Or is there a log file I can parse to get this information (the *.tuc
file did list equation reference names, but I did not see a mapping to
equation numbers).

 

If there is not a command line option to dump this information, what is the
best way to extract it. Can I embed lua code in the document that reads the
equation number as the document in processed? If I could read the number
from lua, I could write this to a file. Any help is appreciated.

 

-Lance Larsen

___
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] Formatting enumerations in MKIV

2013-05-01 Thread Lance Larsen
Thankyou Wolfgang. This was what I was missing. I think I was not
understanding the purpose of the width parameter.

-Lance


 Lance Larsen lance.c.lar...@gmail.com:
 I am trying to configure an enumeration in MKiv, but it is not clear 
 how to set some of the formatting. I need to be able to control the 
 distance between the title and the enumeration text, but parameters 
 such as 'inbetween' seem to have no effect. Is there a parameter I can 
 use to set the spacing. Also, how do I find out what parameters are 
 available. I tried to figure out where defineenumeration is defined in 
 the lua or mkiv files without luck.
 
 \starttext
 
 \defineenumeration[ref][alternative=left,inbetween=\blank]
 
 \ref Testing \par
 \ref Testing \par
 
 \stoptext

Your inbetween setting is ignored because \blank is a command to add
vertical space but the text of your enumeration is on the same line as the
content and you need a horizontal space.

To control the spacing you can change the width of the text with the ?width?
key and the distance between the text and the content with the ?distance?
key.

\starttext
\defineenumeration[ref][alternative=left,width=2cm,distance=5mm]
\startref Testing \stopref
\startref Testing \stopref
\stoptext

Wolfgang


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

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


Re: [NTG-context] Heading flow

2013-05-01 Thread Lance Larsen
It looks like the 'after' property of \setuphead can be used to override the
'keep with next' behavior of the headings.

___
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] Heading flow

2013-05-01 Thread Lance Larsen
Using the continue=no option of setuphead (in MKIV) didn't seem to work (not
sure why). What I did as a workaround was to a blank paragraph after each
heading (using 'after' in setuphead) and then packed the result. Not
necessarily an ideal solution, but adequate for what I needed.

\definehead[references][subsection]
\setuphead[references][after={ ~ }]

\startpacked   % Get rid of large gaps between the references.
\dorecurse{10}{\references{Reference item}}
\stoppacked

-Lance


Am 01.05.2013 um 18:03 schrieb Lance Larsen lance.c.larsen at gmail.com:

 It looks like the 'after' property of \setuphead can be used to override
the
 'keep with next' behavior of the headings.

No, you need the continue key to disable this feature.

\setuphead[section][continue=no]

Wolfgang

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

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


[NTG-context] Header not repeating for tabulate

2013-04-30 Thread Lance Larsen
I created a table using tabulate. I want the header to repeat, and used the
following code. The table splits correctly, but the header doesn't repeat.
Any idea why the header doesn't repeat?

 

\setuptabulate[split=yes,header=repeat]

 

\starttabulatehead

\HL

\NC  \bf  Variable \NC \bf Value  \NC\bf Reference\NR

\HL \HL

\stoptabulatehead

 

\starttabulate[|lw(1in)|lw(1in)|l|]

\dorecurse{100}{\NC  Column 1 value \NC  Column 2 value \NC  Ref. Column 3
value  \NC \AR} \stoptabulate

 

-Lance

 

___
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] Formatting enumerations in MKIV

2013-04-30 Thread Lance Larsen
I am trying to configure an enumeration in MKiv, but it is not clear how to
set some of the formatting. I need to be able to control the distance
between the title and the enumeration text, but parameters such as
'inbetween' seem to have no effect. Is there a parameter I can use to set
the spacing. Also, how do I find out what parameters are available. I tried
to figure out where defineenumeration is defined in the lua or mkiv files
without luck.

\starttext

\defineenumeration[ref][alternative=left,inbetween=\blank]

\ref Testing \par
\ref Testing \par

\stoptext

-Lance Larsen

___
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] table formatting mystery

2013-04-29 Thread Lance Larsen
Thankyou luigi. The suggestion provided below worked. I wish I understood
why context thought that a cell height to two rows were needed, but the
combination of \hbox and alignment of lohi is a reasonable workaround.
 
-Lance
 
On Thu, Apr 25, 2013 at 5:02 PM, Lance Larsen lance.c.larsen at gmail.com
http://www.ntg.nl/mailman/listinfo/ntg-context  wrote:
 I created the following table, but I am running into a mysterious
 problem. When I include the text 'Geometry Calulations' in row 2, the
 table row expands as if this text takes up lines of text. However the
 text fits well within the cell length, and the text itself remains on
 one line. If I delete 'Geometry Calculations', the height of row 2 is
 the height of one line of text. How do I fix this? I have included
 snapshots of what I am getting with and without 'Geometry
 Calculations' included. Any help or insight is appreciated.
 
 \setupTABLE[c][1][width=0.16\textwidth]
 \setupTABLE[c][2,3,4][width=0.13\textwidth]
 \setupTABLE[c][5][width=0.20\textwidth, align=middle]
 \setupTABLE[c][6][width=0.25\textwidth, align=middle]
 \bTABLE[width=0.5\textwidth, rulethickness=0.5pt]
 \bTR \bTD[nc=2]   \bf ~\cb Preliminary \cb Final\eTD
 \bTD[align=middle] \bf Revision \eTD \bTD[align=middle] X \eTD \bTD
 \bf Document ID \eTD \bTD \DocID \eTD \eTR
 \bTR \bTD[nc=2]   \bf ~Document Title:  \eTD \bTD[nc=4,align=middle]
  Geometry Calculations  \eTD \eTR
 \bTR \bTD[nc=2]   \bf ~Originating Discipline:  \eTD
 \bTD[nc=4,align=middle]   \OrigDisc
   \eTD \eTR
 \bTR \bTD[nc=2]   \bf ~Effective Date:  \eTD \bTD[nc=3]  \tfx  ~\cb
 Approval Date \sp\sp\cb Other:    \eTD \bTD
 Page~\pagenumber~of~\totalnumberofpages  \eTD \eTR
 \bTR \bTD \bf ~Issued for: \eTD \bTD[nc=5,align=middle]
 \tfx Phase 1 Design \cb\sp Phase 2 Design \cb\sp Phase 3 Design \cb\sp
 Input to DCD \cb\sp N/A \cb \eTD \eTR
 \eTABLE
 
 -Lance Larsen
 
\bTR \bTD[nc=2,style=bold,align={flushleft,lohi}] \hbox{~Document
Title} \eTD \bTD[nc=4,align=middle]  Geometry Calculations  \eTD \eTR
 
seems to fix the things.
 
 
--
luigi

 

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

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

[NTG-context] How do you customize the chapter number format?

2013-04-29 Thread Lance Larsen
I am trying to update the chapter number formatting for the chapter heading.
By default the numbering is like

1 First Chapter
1.1 First Section

I would like to change this to:

1.0 First Chapter
1.1 First Section

Adding the following command worked, except it did not change the numbering
in the table of contents:

\setuphead[chapter][numbercommand=\groupedcommand{}{.0\blank[2cm]}]

Any suggestions for how I change the numbering so that the 1.0 shows up in
the table of contents as well?

-Lance Larsen

___
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] Supressing a heading from the table of contents

2013-04-26 Thread Lance Larsen
Can anyone tell me how to suppress individual numbered
chapter/section/subsection/etc. from the table of contents? Also how do you
set the last heading level included in the table of contents. I think I came
across this, but am having trouble finding it again.

 

Lance Larsen

___
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] disabling a header on the first page

2013-04-25 Thread Lance Larsen


I am building a context document with a title page. I want to disable 
the header on the title page. This comes before the first \chapter tag. 
The documentation indicated that you can disable the header on a page 
with the \page command. I tried several different things as the first 
command after \starttext, but none of these disabled the header:


\page[header=none]

\page[header]

\page[header=high]

Can anybody tell me how I disable the header on the first page? I would 
really appreciate the help.


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