[NTG-context] Re: [External] Re: Looking for itemize help

2024-01-15 Thread Rogers, Michael K
Hi Jim,

I think you want alternative “a”, if the dot instead of a letter is the problem 
and not the whitespace:

%%

\starttext

This is a short paragraph.

This is a line before a {\bf packed, joinedup} itemization.
\startitemize[a,packed,joinedup]
\item First item.
\item Second item.
\stopitemize
This is a line immediately following the above itemization.

This is a short paragraph.

\stoptext

%%

Cheers,

Michael

> On Jan 15, 2024, at 6:36 AM, Jim  wrote:
>
> Hi Hraban,
>
> thanks for your response.  But...
>
> On Mon, Jan 15, 2024 at 08:17 (+0100), Henning Hraban Ramm wrote:
>
>> Am 15.01.24 um 01:42 schrieb Jim:
>
>>> Some text preceding the list of items:
>>> a. Item one.
>>> b. Second item.
>>> This sentence is part of the same paragraph.
>
>>> The next paragraph starts here...
>
>> \startitemize[packed,joinedup] should be the right combination.
>
> I won't argue about "should", but I will point out it isn't, at least on my
> computer with a recently updated context.
>
> Here is a non-minimal but short non-working example.
>
> %%%
>
> \setupwhitespace [big]
>
> \setuppapersize [letter]
>
> \starttext
> This is a short paragraph.
>
> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
> This is a line immediately following the above itemization.
>
> This is a short paragraph.
>
> This is a line before a {\bf packed, joinedup} itemization.
> \startitemize[packed,joinedup]
> \item First item.
> \item Second item.
> \stopitemize
>
> This is another short paragraph.
>
> \stoptext
>
> %%%
>
> Thoughts?
>
>Jim
> ___
> 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] cont-new.mkiv and \everymathematics

2024-01-20 Thread Rogers, Michael K
Hi all,

In writing class notes, I frequently make one-letter macros for formatted 
symbols, such \v and \w for vectors. Generally speaking, one-letter names for 
function/macros/variables is frowned upon in programming, but I find this 
localized use very convenient.

In cont-new.mkiv, one finds definitions of \t and \w (via \let) appended to 
\everymathematics, which overwrites my definition of \w every time TeX enters 
math mode. I can fix this by appending my definition to \everymathematics. The 
inefficiency seems minor, and I can live with it. I have a question and a 
couple of points:

1. Is there a better way than adding the definition to \everymathematics?

2. I don’t think these definitions should be in ConTeXt. Let users add them if 
they wish. Or add a ‘useshortcuts’ option to \setupmathematics.

3. \t and \w are undocumented, \mathword is undocumented, and it took me a 
while to track down the bug it created for me. In particular, they overwrote my 
definition only in math mode, and “\show\w” did not work in math mode. 
Frustrating.  I could add a wikipage, I suppose, but I’m not proud of the 
extent of my knowledge: “\mathword{word} typesets “word” in math mode in a 
normal text font, somewhat like \text{word}, and \w is an abbreviation of it 
that is added to \everymathematics on startup.” 

Thank you very much,

Michael

___
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: [External] Extra space in numbers

2024-07-15 Thread Rogers, Michael K
Hi,
Braces around the comma, $10{,}000$, works for me. It’s the plain TeX way. If 
there’s a way to set up mathematics in ConTeXt to do this, perhaps someone else 
will fill us in.

Michael

On Jul 15, 2024, at 10:01 PM, Shiv Shankar Dayal  
wrote:

Suppose I have  $10,000$ then in the output there is extra space after comma. 
How can I get rid of it?


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


Re: [NTG-context] sqrt(3)/2 with metafun

2017-02-02 Thread Rogers, Michael K
This seems to work in place of 0.866cm: sqrt(3)/2*cm

Michael

On Feb 2, 2017, at 3:54 PM, Fabrice Couvreur 
mailto:fabrice1.couvr...@gmail.com>> wrote:

Hello,
I wanted to use sqrt(3)/2 but without success. Instead, I replaced this value 
with an approximate value 0.866
How should it be done ?
Thank you
Fabrice

\starttext

\startMPcode
draw fullcircle scaled 1cm withcolor magenta ;
draw fullcircle scaled 1cm shifted (1cm,0) withcolor magenta ;
draw fullcircle scaled 1cm shifted (0.5cm,0.866cm) withcolor magenta ;
 \stopMPcode

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




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Encoding reserved characters in URI query strings

2017-02-05 Thread Rogers, Michael K
Let's say I want a link to plot x+2 in Wolfram|Alpha.  I need to catenate 
"http://www.wolframalpha.com/input/?i="; and  "plot+x%2B2".  Is there any way 
already available in ConTeXt to translate reserved characters like "+" to the 
percent-hexcode "%2B"?

Something like

\encode[plot x+2]

would become

plot+x%2B2

Or more generally, some languages have a query constructor like this

\queryURI
  [http://www.wolframalpha.com/input]
  [i=plot x+2]

which would construct the URI

http://www.wolframalpha.com/input/?i=plot+x%2B2

I could write my own, of course.  But no need to reinvent the wheel.

TIA,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Encoding reserved characters in URI query strings

2017-02-05 Thread Rogers, Michael K

> On Feb 5, 2017, at 12:09 PM, Aditya Mahajan  wrote:
>
> On Sun, 5 Feb 2017, Rogers, Michael K wrote:
>
>> Let's say I want a link to plot x+2 in Wolfram|Alpha.  I need to catenate 
>> "http://www.wolframalpha.com/input/?i="; and  "plot+x%2B2".  Is there any way 
>> already available in ConTeXt to translate reserved characters like "+" to 
>> the percent-hexcode "%2B"?
>>
>> Something like
>>
>>   \encode[plot x+2]
>>
>> would become
>>
>>   plot+x%2B2
>>
>> Or more generally, some languages have a query constructor like this
>>
>>   \queryURI
>> [http://www.wolframalpha.com/input]
>> [i=plot x+2]
>>
>> which would construct the URI
>>
>>   http://www.wolframalpha.com/input/?i=plot+x%2B2
>>
>> I could write my own, of course.  But no need to reinvent the wheel.
>
> url.escape does exactly that.
>
> \startluacode
>  local base="http://www.wolframalpha.com/input";
>  local query="i=plot x+2"
>  local fullname = base .. query
>  print(url.escape(fullname))
> \stopluacode
>
> gives
>
> http%3A//www.wolframalpha.com/inputi%3Dplot%20x%2B2
>
> Also look at l-url.lua for other helper functions for parsing and 
> escaping/unescaping urls.
>
> Aditya

Thanks! I figured there must be a function like that.

Michael




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Initials and short paragraph

2017-06-20 Thread Rogers, Michael K
Hi,

Perhaps this?:

\starttext
\placeinitial
Knuth writes:
\hfill\break
\input knuth
\stoptext

There may be a more ConTeXt-idiomatic way, in which case someone else will 
probably say.  Note that structurally the above combines "Knuth writes:" and 
the first text segment (up to the first blank line or \par) of knuth.tex into a 
single paragraph with some glue and a break between them.  You would lose any 
paragraph-formatting of the first segment of knuth.tex.  If there is any, you 
might have to do that by hand.

If you wanted to have the Knuth quote begin below the initial K, then someone 
else will have to answer.  I don't know off hand.

Cheers,

Michael

> On Jun 8, 2017, at 10:05 PM, Martin Oppegaard  
> wrote:
>
> Hi,
>
> When placing an initial and the paragraph is short, the initial is laid over 
> the next paragraph. Example:
>
> \starttext
> \placeinitial
> Knuth writes:
>
> \input knuth
> \stoptext
>
> Is there anything to do about this?
>
> Regards,
> Martin Oppegaard
> ___
> 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
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] \pmatrix changed?

2018-02-16 Thread Rogers, Michael K
Hi,

This sort of thing worked a year ago and two years ago (sorry, not sure of the 
versions now):

%%
\starttext
\startformula
A = \pmatrix{
 0.006525 \hfill& 0.006331 \hfill& 0.006828 \hfill\cr
 1.006\hfill& 0.009352 \hfill& 1.010 \hfill\cr
 0.002385 \hfill& 0.006376 \hfill& 1.001 \hfill\cr
}
\stopformula
\stoptext
%%

Now the ampersands are not treated as alignment characters, but as ordinary 
characters in the version

system  > ConTeXt  ver: 2018.01.24 10:47 MKIV beta  fmt: 2018.2.6  int: 
english/english

There is a similar sort of behavior with \cases:

%%
\starttext
$\cases{x & if $x>0$ \cr y &if $x>0$ \cr}$
\stoptext
%%

Is there an easy fix? I'd like not to have to edit old files.

Thanks,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] \pmatrix changed?

2018-02-16 Thread Rogers, Michael K
Thank you very much, Hans.

On Feb 16, 2018, at 10:52 AM, Hans Hagen mailto:pra...@wxs.nl>> 
wrote:

On 2/16/2018 3:16 PM, Rogers, Michael K wrote:

This sort of thing worked a year ago and two years ago (sorry, not sure of the 
versions now):

because it's too fragile for general use (xml etc) you now have to explicitly 
enable it:

\setupmathematics[ampersand=normal]
%%
\starttext
\startformula
A = \pmatrix{
 0.006525 \hfill& 0.006331 \hfill& 0.006828 \hfill\cr
 1.006\hfill& 0.009352 \hfill& 1.010 \hfill\cr
 0.002385 \hfill& 0.006376 \hfill& 1.001 \hfill\cr
}
\stopformula
\stoptext
%%
Now the ampersands are not treated as alignment characters, but as ordinary 
characters in the version
system  > ConTeXt  ver: 2018.01.24 10:47 MKIV beta  fmt: 2018.2.6  int: 
english/english
There is a similar sort of behavior with \cases:
%%
\starttext
$\cases{x & if $x>0$ \cr y &if $x>0$ \cr}$
\stoptext
%%
Is there an easy fix? I'd like not to have to edit old files.
Thanks,
Michael

--

-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.nl<http://www.pragma-ade.nl/> | 
www.pragma-pod.nl<http://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<mailto:ntg-context@ntg.nl> / 
http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl<http://www.pragma-ade.nl/> / 
http://context.aanhet.net<http://context.aanhet.net/>
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net<http://contextgarden.net/>
___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Using \stretched in macro fails

2013-04-06 Thread Rogers, Michael K
Hi,

Below \stretched works by itself, but causes a fatal error when in the macro 
(\Name).  I get the same result with all variants.
Perhaps there's a better way?

MWE:


\def\Name{\stretched[width=]}
%\def\Name#1{\stretched[width=]{#1}}
%\define[1]\Name{\stretched[width=]{#1}}

\starttext

\stretched[width=]{Hi there!}

St. \Name{Banach}

\stoptext


Here's part of the log:

ConTeXt  ver: 2013.04.05 22:00 MKIV beta  fmt: 2013.4.6  int: english/english
…
! This can't happen (add_disc_widths).

system  > tex > error on line 10 in file foo18453.tex: This can't 
happen ( ...

 1 \def\Name{\stretched[width=]}
 2 \def\Name#1{\stretched[width=]{#1}}
 3 %\define[1]\Name{\stretched[width=]{#1}}
 4
 5 \starttext
 6
 7 \stretched[width=]{Hi there!}
 8
 9 St. \Name{Banach}
10 >>
11 \stoptext
12
13

l.10

!  ==> Fatal error occurred, no output PDF file produced!
mtx-context | fatal error: return code: 1



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Using \stretched in macro fails

2013-04-06 Thread Rogers, Michael K
OK, it's not the macro.  This fails (same error: ! This can't happen 
(add_disc_widths)):

\starttext
St. \stretched[width=]{Banac}
\stoptext

This works:

\starttext
St. \stretched[width=]{Bana}
\stoptext

Strange.

On Apr 6, 2013, at 10:26 AM, "Rogers, Michael K" 
 wrote:

> Hi,
> 
> Below \stretched works by itself, but causes a fatal error when in the macro 
> (\Name).  I get the same result with all variants.
> Perhaps there's a better way?
> 
> MWE:
> 
> 
> \def\Name{\stretched[width=]}
> %\def\Name#1{\stretched[width=]{#1}}
> %\define[1]\Name{\stretched[width=]{#1}}
> 
> \starttext
> 
> \stretched[width=]{Hi there!}
> 
> St. \Name{Banach}
> 
> \stoptext
> 
> 
> Here's part of the log:
> 
> ConTeXt  ver: 2013.04.05 22:00 MKIV beta  fmt: 2013.4.6  int: english/english
> …
> ! This can't happen (add_disc_widths).
> 
> system  > tex > error on line 10 in file foo18453.tex: This can't 
> happen ( ...
> 
> 1 \def\Name{\stretched[width=]}
> 2 \def\Name#1{\stretched[width=]{#1}}
> 3 %\define[1]\Name{\stretched[width=]{#1}}
> 4
> 5 \starttext
> 6
> 7 \stretched[width=]{Hi there!}
> 8
> 9 St. \Name{Banach}
> 10 >>
> 11 \stoptext
> 12
> 13
> 
> l.10
> 
> !  ==> Fatal error occurred, no output PDF file produced!
> mtx-context | fatal error: return code: 1
> 
> 
> 
> This e-mail message (including any attachments) is for the sole use of
> the intended recipient(s) and may contain confidential and privileged
> information. If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination, distribution
> or copying of this message (including any attachments) is strictly
> prohibited.
> 
> If you have received this message in error, please contact
> the sender by reply e-mail message and destroy all copies of the
> original message (including attachments).
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

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

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


Re: [NTG-context] MAC (preview, finder) and ConTeXt pdf

2013-05-30 Thread Rogers, Michael K
I do not have this problem with the documents I produce on my Mac.  I have had 
it with some (but not all) documents on ConTeXt sites, such as Hans' "ConTeXt 
Lua Documents."  Also I can select text but copy/paste does not work.  Perhaps 
it has to do with fonts.

Michael

On May 30, 2013, at 5:00 AM, Alan BRASLAU 
 wrote:

> Hello,
>
> A colleague who uses a very recent MacBook with the latest MacOS
> has a problem with PDF files that I provide produced with ConTeXt/luatex.
>
> It appears that he cannot search for words (text) in the document,
> neither with preview nor in the finder (they must be based on the same code).
> However, I had him install Adobe Reader, and using this he can search for text
> in the ConTeXt produced document, so I do not believe that the PDF has a 
> problem,
> rather this is a bug with the Apple PDF tools.
>
> Does anyone else using MacOS have any experience with this?
> Or can you all search for text (words) within ConTeXt produced PDF documents
> using preview and the finder?
>
> Thank you
>
> Alan
> ___
> 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
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] joinedup in itemize changed?

2014-05-02 Thread Rogers, Michael K
The keys packed and joinedup seem to control the keys before, after, and 
inbetween.  You can use these keys directly to get whatever style you like.  
The setting packed is equivalent to

\startitemize[3][before=\blank,after=\blank,inbetween=]

The setting joinedup is equivalent to

\startitemize[3][before=,after=,inbetween=]

If you want the first and last items joined to the text with whitespace between 
the items, then try this:

\starttext
\startitemize[3][before=,after=,inbetween=\blank]
\item One
\item Two
\item Three
\stopitemize
\stoptext

On May 2, 2014, at 3:17 AM, "Mikael P. Sundqvist" 
 wrote:

> On Wed, Apr 30, 2014 at 8:38 PM, Mikael P. Sundqvist  wrote:
>> Hi,
>> 
>> has joinedup changed? At the moment it gives no white space before
>> first item and last item _and_ pack it. See example.
>> 
>> Best regards, Mikael
>> 
>> \starttext
>> Bla
>> \startitemize[3]%OK
>> \item One
>> \item Two
>> \item Three
>> \stopitemize
>> Bla
>> \startitemize[3,joinedup]% Not as expected
>> \item One
>> \item Two
>> \item Three
>> \stopitemize
>> Bla
>> \startitemize[3,packed]%OK
>> \item One
>> \item Two
>> \item Three
>> \stopitemize
>> Bla
>> \startitemize[3,packed,joinedup]%OK
>> \item One
>> \item Two
>> \item Three
>> \stopitemize
>> Bla
>> \stoptext
> 
> I hate to bump, but can someone confirm that this is a problem in
> ConTeXt or show me the right way of doing this?
> 
> /Mikael
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___
> 

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

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


Re: [NTG-context] Deprecated $…$ for inline math?

2016-02-17 Thread Rogers, Michael K
I use $…$.  And for copying text from one TeX to another (e.g. ConTeXt <—> 
PlainTex/Latex/Markdown/Jax), it would be a pain if I couldn't.

Michael

> On Feb 17, 2016, at 1:24 PM, Aditya Mahajan  wrote:
>
> On Wed, 17 Feb 2016, Alan BRASLAU wrote:
>
>> However, I can see situations where one might want to tighten spacing
>> in order to fit a particular expression within a line or in a table,
>> for example. Here, \math[options]{expression} is a reasonable syntax,
>> yet I cannot foresee ever using the very cryptic \m{} for any reason:
>> it is just plain ugly! (No TeXie would ever find $$ as
>> ugly...)
>
> I am curious to know if there is ANYONE who types in a lot of math and 
> regularly uses \m{...} or \math{...}. I still use $$ and use \math{..} or 
> \mathematics{...} only when generating output from lua code: 
> context.math("") etc. is cleaner than context("$%s$", ...)
>
> Aditya
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Length range control of the last line of paragraph

2016-03-21 Thread Rogers, Michael K
Perhaps this?  (I'm still better at Plain TeX than ConTeXt.)


\starttext
\setupindenting[yes,40pt]
\dimen0=\hsize
\advance\dimen0 by -\parindent
\advance\dimen0 by -2em
\parfillskip=2em plus \dimen0
\tolerance=0   % strictly enforces glue dimensions/stretching - may have 
unwanted side effects

\dorecurse{41}{wxyz }\par
\dorecurse{42}{wxyz }\par
\dorecurse{26}{wxyz }

\blank
\hrule
\blank

% compare
\parfillskip=0ptplus1fill

\dorecurse{35}{wxy x } xy.\par
\dorecurse{42}{wxyz }\par
\dorecurse{26}{wxyz }

\stoptext


- Michael

> On Mar 21, 2016, at 3:14 PM, Jan Tosovsky  wrote:
>
> Dear All,
>
> when paragraphs are separated by indenting the first line (instead of an
> empty line), these rules should be followed:
>
> (1) the last line lenght is greater than the left indent
>
>
>  xx
>
>
> (2) the last line is shorter than block width
>
>xx
>  xx
>
>
>
> (ad 1) Some suggestions can be found in
> http://tex.stackexchange.com/questions/28357/ensure-minimal-length-of-last-l
> ine - but to be honest, it is not very clear to me how to apply it and even
> combine with (2)
>
> (ad 2) This can be done using \parfillskip XXpt plus 1fil (where XX is
> required gap)
>
> I'd be grateful for any command which would set this globally for all
> paragraphs. Partly requested here  http://tracker.luatex.org/view.php?id=885
>
> One could set
> (a) minimum length - default=2*indent
> (b) minimum gap - default=indent
> (c) minimum block width where (a) and (b) are still to be applied -
> default=2*a+b
>
> (ad c) if there are narrower blocks within the document (e.g. blockquotes),
> we should still have some room for typesetting the last line content. If the
> area width is insufficient, the last line would be typeset without these
> (a+b) restrictions.
>
> In meantime, any suggestion how to combine a+b manually are welcome.
>
> Thanks, Jan
>
> ___
> 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
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Command in enumeration title

2012-02-26 Thread Rogers, Michael K

On Feb 26, 2012, at 6:44 AM, Stefan Müller wrote:

> Hi list,
>
> there is possibly an easy explanation for my following problem, but I don't 
> know it.  Why does \Word have no effect in the following example, and how can 
> I make it work?  In my real document I have \Word in a macro inside the 
> title, so I can't just write "Foo" in the title.
>
> \defineenumeration[myenum][title=yes]
>
> \starttext
>
> \startmyenum{\Word{foo}}
>   bar
> \stopmyenum
>
> \stoptext
>
> Any help appreciated, thanks in advance!
> Stefan
> --

Hi,

I'm new to ConTeXt, but I tried your example, adding

  \def\Word#1{#1-#1}

and got

  myenum 1 (foo-foo)

  bar

for output.  It seems right to me, perhaps?  Maybe the problem is with your 
macro \Word?  I'm running:

  ConTeXt  ver: 2011.05.18 18:04 MKIV  fmt: 2012.1.25  int: english/english

Michael




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Command in enumeration title

2012-02-26 Thread Rogers, Michael K
Hi Stefan,

I didn't know about \Word.  It retried your example and it works as is in my 
version of ConTeXt, which is an earlier one that yours it seems.  [Your other 
enumeration example, with way=bychapter etc., works the way you want, too.]  
Sorry, I don't think I can help.  Perhaps one of the more expert users can 
verify whether it works or not.

Best,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Linebreak between Chapter Number and Name

2012-02-26 Thread Rogers, Michael K

On Feb 26, 2012, at 7:13 PM, Marc Trius wrote:

Hi,
I am trying to format a chapter heading so that there is a linebreak between 
the number and the name. The only way I managed to do this is this:


\setuphead[
chapter][command=\ChapTitle]
\def\ChapTitle#1#2%
{\framed[height=2cm,width=broad]{#1\\#2}
}

This worked for me:

\def\ChapTitle#1#2{\framed{\vbox{\startalignment[center]#1\par#2\stopalignment}}}

I don't know if \vbox's are frowned on in ConTeXt, but my fix doesn't work if 
you remove it.  I've just started migrating from Plain Tex to ConTeXt, so 
please excuse a naive response.



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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 Indexed Words Within the Text

2012-03-23 Thread Rogers, Michael K
On Mar 23, 2012, at 6:57 AM, Malte Stien wrote:

> Is it possible to format indexed words in a particular style within the text 
> more or less automatically. For example, if I write
>
>  There are some \index[ducks] in the zoo.
>
> ...I would like the term "ducks" to appear in small-capitals to indicate the 
> that term can be found in the index. Ideally, I'd like to do that without 
> explicit manual formatting. Is that possible?
>
> Thank you,
> Malte.

One way is to use your own macro:

\def\MyIndex#1{\index{#1}{\sc #1}}
\starttext
There are some \MyIndex{ducks} in the zoo.
\stoptext

By the way, your \index[ducks] didn't work for me the way I thought you wanted; 
I changed the [] to {} and added the word to the text body.  As far as I can 
tell, \index only adds entries to the index register and not to the text.



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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 can I use framewidth in calculations

2012-03-23 Thread Rogers, Michael K

On Mar 23, 2012, at 6:55 PM, Thomas A. Schmitz wrote:

But is there a method for similar calculations inside a frame? Here's what I 
tried, but it doesn't give the expected result (the image is much smaller than 
expected):

\starttext

\framed[width=7cm]{\externalfigure[cow][width=\the\dimexpr0.9\framedparameter{width}\relax]}

\stoptext

Thanks for any pointers!

Thomas

Try

\framed[width=7cm]{\externalfigure[cow][width=\dimexpr\framedparameter{width}*9/10]}

[I don't understand \dimexpr.   For instance 7cm = ~198pt, 0.9 * 7 cm = ~179pt, 
but \dimexpr0.9\framedparameter{width} yields 27.5992pt.  It doesn't seem to 
work well with decimals.  No wiki page for it, that I can find.]



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Problem Nesting defineitemgroups

2012-03-25 Thread Rogers, Michael K
You can use \startitemize[1] directly.  (You can put it in a macro, so if you 
ever want to change the style of bullets, you just have to adjust the macro.)

\startnlist
\item Foo
\startitemize[1]
\item Some bullet item 1,
\item Some bullet item 2.
\stopitemize
\item Baz
\startnlist % start level=2 nlist
\item sub Baz 1
\startitemize[1]
\item Another bullet item 1,
\item Another bullet item 2.
\stopitemize
\item sub Baz 2
\stopnlist % stop level=2 nlist
\stopnlist

If you want complicated nesting of the two types with automatically chosen 
symbols, you'll have to do some programming of ConTeXt, I think.  Here's hack, 
which I can offer as a hint.  I'm just beginning to learn ConTeXt, so I fear to 
wade in deeper than this:

% bulleted nlist
\def\startBnlist{\doifelse{\currentitemlevel}{1}{\startitemize[1]}{\startitemize[2]}}
%\def\startBnlist{\expanded{\startitemize[\currentitemlevel]}} % this works too
\def\stopBnlist{\stopitemize}

The bullet used in the above depends on the overall item level, which is a 
solution I doubt anyone would ever want.  To really get it to work right you 
would probably need to define your own blist item level variable and do your 
own bookkeeping.



On Mar 25, 2012, at 7:25 AM, Malte Stien wrote:

> Wolfgang,
>
> Thank you for that info. That is unfortunate. Is there any way I can achieve 
> what I need? That is
>
>> 1. Foo
>>   + Some bullet item 1,
>>   + Some bullet item 2,
>>   + Some bullet item 3.
>> 2. Baz
>
> Thank you.
> Malte.
>
>
> On 25/03/2012, at 3:54, ntg-context-requ...@ntg.nl wrote:
>
>> ConTeXt uses the type of the item group in the first level also for the 
>> inner levels
>> and handles the inner \startblist as if it was \startnlist.
>
> ___
> 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
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Commands with arguments with MetaPost

2012-04-25 Thread Rogers, Michael K

On Apr 25, 2012, at 12:15 PM, Troy Henderson wrote:

> I would like to be able to do something like this
>
> \def\foo#1{
>\startMPcode
>fill (0,0)--(598,0)--(598,50)--(0,50)--cycle withcolor green;
>label.rt(btex #1 etex),(50,25);
>  \stopMPcode
> }
>


Looks like a misplaced parenthesis:

   label.rt(btex #1 etex,(50,25));

  - Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Problem with \inmargin on \item lines

2012-05-02 Thread Rogers, Michael K
Hi,

It is not a bug. It is standard TeX: a space counts after "}" and is ignored 
immediately after a control sequence such as "\item".  To override either, you 
have to be explicit, "\ignorespaces" as Hans suggested in your case and "\ " 
(backslash-space) in the other to put a space in.  My preferred, idiosyncratic, 
pedantic way to ignore spaces in this case is a comment symbol and newlines:

\starttext
\startitemize
\item
This is just a normal completely innocent paragraph against which one will be 
able to judge the amount of indentation of the next paragraph.
\item\inmargin{Duck}%
This paragraph has a duck inmargin comment
\stopitemize
\stoptext

But I like newlines in my code, probably because I started editing text on 
24x80 crt that would show only the first 80 characters of a line.

Michael

On May 2, 2012, at 12:33 AM, Malte Stien wrote:

> Hi everyone,
>
> I am experiencing a problem with \inmargin{some text} in \itemized lists. I 
> am using them a lot in my documents, and it is kind of annoying. It appears 
> that if one uses the \inmargin macro just prior to the \item macro, the 
> in-margin text is typeset against the previous line, not the line with the 
> \item. Minimal example.
>
> \starttext
> \startitemize
>   \item This is just a normal completely innocent paragraph against which 
> one will be able to judge the amount of indentation of the next paragraph.
>   \inmargin{Duck}\item This paragraph has a duck inmargin comment
> \stopitemize
> \stoptext
>
> That seems fair enough and even makes sense on some level. If however, one 
> reverses the two macros, like so:
>
>   \item\inmargin{Duck} This paragraph has a duck inmargin comment
>
> the leading space just after the closing brace is actually printed. I take 
> this to be a bug, or is this by design? The only way I can around this is to 
> not use a space, like so:
>
>   \item\inmargin{Duck}This paragraph has a duck inmargin comment
>
> But I don't find that to be a satisfying solution. After all I am using 
> ConTeXt because I am a bit pedantic about text, even the source code in this 
> case.
>
> Regards,
> Malte.
>



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] drawarrow and transparency

2012-05-03 Thread Rogers, Michael K
On May 3, 2012, at 6:32 AM, Alan BRASLAU wrote:

I believe that this is somewhat a bug with transparency under MetaFun.
For I tried the following:

\startMPcode
picture pic ; pic := image(drawarrow origin--(1cm,0)) ;

draw pic withtransparency(1,.5) ;
draw pic rotated 90 withtransparency(1,.5) ;
\stopMPcode

Here, the arrowhead is totally opaque and only the "stem"
has transparency. Something is fishy.

Alan

I noticed the same thing.  I think original problem is with how an arrow is 
converted to PDF/Postscript drawing commands and how the color is computed when 
commands are combined.  The only solution I can imagine is to define a new 
arrow macro that constructs the boundary path of the arrow and fills it (i.e., 
up one side of the stem, around the arrowhead, and down the other side of the 
stem).  As far as I can tell, MetaPost/Postscript does not have commands that 
compute the boundary path of the region painted by a sequence of commands.  (I 
think that computing the boundary might be a much harder problem in general 
than computing which points to paint.  A straight arrow would be fairly simple.)

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] atpage || number comparing

2012-05-15 Thread Rogers, Michael K
Hi,

I'm a neophyte using last year's TeXLive context.  An expert can probably 
improve my answer.  Does this work for you?:

\def\atPage[#1]%

{\doifnot{\doifreferencefoundelse{#1}{\currentreferencepage}{?}}{\currentpage}%
{\at[#1]}%
}

I adapted it from code in strc-ref.mkiv.  The \doifreferencefoundelse seems to 
set up \currentreferencepage properly.  I don't understand it any deeper than 
that.

As for testing for adjacent pages, TeX has count registers (through \newcount) 
and ConTeXt has counters (see wiki).  In TeX one can do arithmetic on registers 
with \advance, \multiply, \divide and test results with \ifnum, \ifodd.  One 
can do some arithmetic with ConTeXT counters, but I haven't figured it all out 
yet; and of course, one can use Lua.

Michael

On May 15, 2012, at 8:28 AM, Peter Schorsch wrote:

> Hi,
>
> it tried to do a \atpage command that results
> a) some page => nothing
> b) different page => pagenumber with some text (e.g. "auf Seite XY")
>
> \def\atPage[#1]%
>   {\doifnot{\at[#1]}{\currentpage}%
>   {\at[#1]}%
>   }
>
> My problem with this is, that the \doifnot always results as not equal;
> it is like the types mismatch as if I exchange \at[#1] with a pure
> number the comparing works. If so, how can the types be corrected?
>
> Additionally - if possible - I would like to add case that the referred
> page is on the other page but in duplex mode adjacent to the actual
> page. Is that possible to do this? I unluckily dont know how to make
> working simple calculation in tex code.
>
> To be complete I found in the file strc-ref.mkiv some notes about a
> planed \atpage command:
>
> %D A still very rudimentary|/|experimental forward|/|backward
> %D reference mechanism is provided by the macro \type{\atpage}:
> %D
> %D \starttyping
> %D ... \somewhere{backward text}{forward text}[someref] ...
> %D ... \atpage[someref] ...
> %D \stoptyping
> %D
> %D In future versions there will be more sophisticated
>
> % 0 = no page reference
> % 1 = same page
> % 2 = preceding page
> % 3 = following page
> % 4 = backward, same page (todo)
> % 5 = forward, same page  (todo)
>
> But that level of the ambient tex is still out of my scope.
>
> Thanks
> P.
> ___
> 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
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Insertion of a Document I.D.

2012-05-15 Thread Rogers, Michael K
\jobname  yields the filename (in my last year's TeX Live ConTeXt).

On May 15, 2012, at 11:08 PM, 
 wrote:

>
> I want to generate a document i.d. from the .tex source filename and the 
> current date and put it into the footer.
>
> This might be possible already, but I could find it by searching the wiki for
> filename and document it, or rather too much since filename is mainly used 
> for command line parameters, etc.
>
> I know the \currentdate will give the current system date part that I can 
> use, but
> is there any \filename type command for the master filename, so that a 
> document i.d. could be generated automatically.
>
> e.g.   \filename\currentdate
>
> Regards
> ___
> 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
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Local modules not found

2012-05-17 Thread Rogers, Michael K
Hi,

I upgraded to the latest beta from the 2011 stable version for the first time.  
Now my local modules are not found.  Having searched the wiki and the mailing 
list, I can find no help.  Any ideas?

Error messages:

\usemodule[homework-fmt] -->
resolvers   > modules > not found: 'homework-fmt'

\input homework-fmt -->
! I can't find file `homework-fmt'.

Here is a snippet from "context --generate"  that might indicate the problem 
(/Users/mike/Library/texmf contains my tex modules :

resolvers   | methods | resolver: method=generators, how=uri, scheme=file, 
argument=/Users/mike/Library/texmf
resolvers   | expansions | scanning path '/Users/mike/Library/texmf', 
branch '/Users/mike/Library/texmf'
resolvers   | expansions | 266 files found on 20 directories with 58 
uppercase remappings
resolvers   | resolving |
resolvers   | resolving | not saving runtime tree 
'/Users/mike/Library/texmf'

Thanks!

Michael

[Background: I started learning ConTeXt last winter using the 2011 TeXLive 
version and TeXShop (I've a Mac).  Now the semester is over, I'm trying to 
update to a more recent ConTeXt.  First I got TeXLive 2012 pre-release, but 
TeXShop still used last year's ConTeXt.  So I followed the wiki instructions 
for getting the latest beta.  Eventually I found a directory name was different 
and now TeXShop uses the latest beta.  The latest beta is in a separate 
directory tree from TeXLive, which I set up 6 months ago or so from 
instructions on the wiki for running Mark IV.]



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Local modules not found

2012-05-17 Thread Rogers, Michael K
On May 17, 2012, at 9:09 AM, Marco Pessotto wrote:
> "Rogers, Michael K"  writes:
>
>> Hi,
>>
>> I upgraded to the latest beta from the 2011 stable version for the
>> first time.  Now my local modules are not found.  Having searched the
>> wiki and the mailing list, I can find no help.  Any ideas?
>
> Try to put the modules in
> /path/where/the/new/context/lives/tex/texmf-local
>
> Or even in the current directory or in the parent (..)

Thanks.  Part of the problem was that PATH was not set correctly everywhere, 
and context is the name of both the TeXLive and standalone versions.  Your hint 
did help, because in trying to make it work, I figured out where the problem 
was.



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Lists and alternative=command

2012-05-17 Thread Rogers, Michael K
I'd love help with this:  I have list that uses alternative=command, and it 
stopped working when I switched from last year's TeXLive context to a recent 
beta.  I've minimized the problem to this example:

\definelist  [MyList]
\define[3]\MyListEntry{:#1:#2:#3:}
\setuplist   [MyList] [alternative=command,command=\MyListEntry]
\starttext
\writetolist[MyList]{First}{Second}
\placelist[MyList]
\stoptext

It generates the following error three times, once per argument in 
\MyListEntry, I suppose.

ConTeXt  ver: 2012.05.14 16:00 MKIV  fmt: 2012.5.16  int: english/english
...
! Argument of \MyListEntry has an extra }.

system  > tex > error on line 11 in file foo1789.tex: Argument of  ...

1 \definelist  [MyList]
2 \define[3]\MyListEntry{:#1:#2:#3:}
3 \setuplist   [MyList] [alternative=command,command=\MyListEntry]
4 \starttext
5 \writetolist[MyList]{First}{Second}
6 \placelist[MyList]
7 \stoptext


\par

   }
\12>:79>:command ...ernativeparameter \c!command }
  \ifx \p_command \empty [\c...
\strc_lists_apply_renderingsetup ...nderingsetup }
  \relax \the \t_lists_every...
\strclistsentryprocess ... \fi \fi \fi \endcsname
  \dostoptagged \listextrapa...
l.11 {}

...
l.7 \stoptext

Thanks,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Lists and alternative=command

2012-05-17 Thread Rogers, Michael K

On May 17, 2012, at 2:34 PM, Wolfgang Schuster wrote:

>
> Am 17.05.2012 um 20:29 schrieb Rogers, Michael K:
>
>> I'd love help with this:  I have list that uses alternative=command, and it 
>> stopped working when I switched from last year's TeXLive context to a recent 
>> beta.  I've minimized the problem to this example:
>>
>> \definelist  [MyList]
>> \define[3]\MyListEntry{:#1:#2:#3:}
>
> \unexpanded\def\MyListEntry#1#2#3{:#1:#2:#3:}
>
> Wolfgang

Thank you very much.

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] References to itemize items

2012-05-18 Thread Rogers, Michael K
Hi,

Under the beta version (ConTeXt  ver: 2012.05.14 16:00 MKIV  fmt: 2012.5.16), 
item numbers in references (with \in[..]) are not converted automatically in 
the way they used to be done under last year's "current" ConTeXt.  I have 
macros that do something like below that no longer work.  The level two items 
are converted to letters, but references to them appear as unconverted numbers. 
 Is there a way to convert them?

\setupitemgroup[itemize][1][n]
\setupitemgroup[itemize][2][a]
\starttext
\startitemize %level 1
\item One
\startitemize %level 2
\item AA \item[BB] BB
\stopitemize\stopitemize
In BB = \in[BB] (used to print b, not 2)
\stoptext


Thanks,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] References to itemize items

2012-05-22 Thread Rogers, Michael K
I'll try again:

ConTeXt used to match the conversion style in a reference to the itemize item 
with the number/character of the item.  Now it doesn't convert numbers to 
characters.  Does this happen to anyone else?  Example:

\setupitemgroup[itemize][1][n]
\setupitemgroup[itemize][2][a]
\starttext
\startitemize %level 1
\item One
\startitemize %level 2
\item AA \item[BB] BB
\stopitemize\stopitemize
\type{\in[BB]} = \in[BB] (used to print b, now prints 2)
\stoptext

Is there a way to get \in[BB] to convert the reference to the corresponding 
character?

Thanks,

Michael




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] indexing puzzle

2012-05-24 Thread Rogers, Michael K
1. For \ab you might want
\def\ab{\unskip}
since the space is not the same as the width of a digit.

2. Does your solution work with line numbers greater than 99?  I tried to 
implement your idea and I got the order 25.7, 25.117, 25.37.  Probably more 
than 99 lines never occurs on a page, so it's a non-issue.  But Homer, for 
instance, is often referred to by Book.Line, and the lines go past 100.  Again, 
perhaps a non-issue for you.

3.  My own attempts:  At first I though what a nice opportunity for me to learn 
a little more Lua, which it was.  After, I read you wanted a MKII solution.  
Well, I'm embarrassed at how long I took to do the MKII, but I'm not good at 
controlling expansion.  Anyway, it automatically generates sort keys for the 
pages by converting digits to letters and padding with initial a's, so that 
each page or line number is a fixed length (4 in this case, up to 1 
pages/lines).  For instance,
123.4--56 is mapped to  abcdaaaeaafg
MKII does not seem to sort digit-based keys reliably; MKIV does, and you can 
just pad out the digits with zeros.  The complete sort key that worked was the 
catenation of the author, text, and locus key, which is similar to what you 
have.

MKII:
\defineregister[Passage][Passages]
...
% interface to register -- \locuskey indirectly returns a key in \nextkey
\def\MyPassage#1#2#3{\locuskey{#3}\expandoneargafter\doMyPassage{\nextkey}{#1}{#2}{#3}}
\def\doMyPassage#1#2#3#4{\Passage[#2#3#1]{{#2}+{#3}+{#4}}}
% Def. of \locuskey#1
%In: #1<-p1[.l2[--l3]] Out: key stored in \nextkey
... (see attached file, if interested)

MKIV:
% interface to register -- expansion in MKIV must be different, because a 
direct approach works:
\def\MyPassage#1#2#3{\Passage[#1#2\locuskey{#3}]{#1+#2+#3}}
% Def. of \locuskey
\startluacode
userdata = userdata or { }
function userdata.locuskey(x)
context(string.gsub(x,"(%d+)",function (s) return 
string.format("%04d",tonumber(s)) end))
end
\stopluacode
\def\locuskey#1{\ctxlua{userdata.locuskey("#1")}}

The Mark IV/Luatex one was much nicer, less frustrating to figure out.


On May 24, 2012, at 7:06 AM, Alan Bowen wrote:

For anyone interested in producing classical indices locorum, I have devised a 
way that seems to work, although it is not that elegant.

The first step is to modify the sort keys by counting the number of digits in 
the page number:
thus,
[AuthorText01] for pages 1–9,
[AuthorText02] for pages 10–99, and so on

The next is to insert the command “ \ab” (note the space) when the line number 
is a single digit:
thus
391. \ab{}2 but 391.12 in the entry specification {Author+Text+page.line}

For \ab, I have:

\newdimen\digitwidth
\setbox0=\hbox{\tfx\char32}
\digitwidth=\wd0

\def\ab{\tfx\kern-\digitwidth}

The hitch here is that the font size is not context dependent.

Alan

On Tue, May 22, 2012 at 6:39 PM, Alan Bowen 
mailto:bowenala...@gmail.com>> wrote:
I have been trying to index the passages cited in a book and would be grateful 
for some tactical advice.

There are several works by a single author, and it is customary to cite each 
text by page and line number, as in 1253.12 (page 1253, line12), for example.

I have a sort key for each work. But now I need a way to get the entry

1253.7 (page 1253, line 7) before the entry
1253.12 (page 1253, line 12).

\[Passage[AuthorText]{Author+Text+1253.07}1253.7 or
\[Passage[AuthorText]{Author+Text+1253.07}1253. 7
would work, but it is really better to have the index entry as “1253.7” rather 
than as “1253.07” or “1253. 7”

I have experimented with different sort keys—e.g., AuthorText125307—and can 
generate an index with the 1235.7 and so on in the proper place and form, say, 
before 1253.12.

But then the problem is that I also get entire sequences of entries out of 
order (485.19, 485.21 before 477.31, and so on). Very puzzling. (Restoring the 
sort key AuthorText removes the latter problems but then leaves 1253.7 in the 
wrong place.)

If anyone has experience with this or just some ideas for a solution, their 
suggestions will be most welcome.

I am using the MKII in the latest ConTeXt standalone.

Alan




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).


SortkeyMkII.tex
Description: SortkeyMkII.tex
___
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://w

Re: [NTG-context] References to itemize items

2012-05-24 Thread Rogers, Michael K

On May 24, 2012, at 6:06 AM, Hans Hagen wrote:

> On 23-5-2012 04:54, Rogers, Michael K wrote:
>> I'll try again:
>>
>> ConTeXt used to match the conversion style in a reference to the itemize 
>> item with the number/character of the item.  Now it doesn't convert numbers 
>> to characters.  Does this happen to anyone else?  Example:
>>
>> \setupitemgroup[itemize][1][n]
>> \setupitemgroup[itemize][2][a]
>> \starttext
>> \startitemize %level 1
>> \item One
>> \startitemize %level 2
>> \item AA \item[BB] BB
>> \stopitemize\stopitemize
>> \type{\in[BB]} = \in[BB] (used to print b, now prints 2)
>> \stoptext
>>
>> Is there a way to get \in[BB] to convert the reference to the corresponding 
>> character?
>
> fixed in next beta

Great!  It works.  Thanks.



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Linenumbering

2012-05-25 Thread Rogers, Michael K
On May 25, 2012, at 6:33 AM, Willi Egger wrote:
> Hi,
> On May 25, 2012, at 12:30 PM, Willi Egger wrote:
>
>> Oh dear, stupid me…
>>
>> Still I have two things:
>>
>> - It appears that the intent option is not honored and the numbers appear 
>> always in the margin.
>
> should read as intext ..  ;-)
>> - The numbers are flush right in the margin, but after line >99 the third 
>> number is placed outside the margin towards the text.
>>
>> Willi

Try
\setuplinenumbering[step=5,location=text]

>From page.lin.mkiv, there seems to be these options now:
\setnewconstant\linenumberlocation \plusone  % 0=middle, 1=left, 2=right, 
3=inner, 4=outer, 5=text, 6=begin, 7=end
One may also use command=\myLocation, e.g., to put the line number in text at 
right, use
\def\myLocation#1{\rlap{\hskip\leftmargindistance\hskip\textwidth{#1}}}

Note:  Changing to location=middle in your (or any) example gives an error, 
\domakelinenumber undefined:

\starttext
\setuplinenumbering[step=5,location=middle]
\startlinenumbering
\startlines
Een nieuwe lente en een nieuw geluid:
Ik wil dat dit lied klinkt als het gefluit,
Dat ik vaak hoorde voor een zomernacht,
In een oud stadje, langs de watergracht ---
In huis was 't donker, maar de stille straat
Vergaarde schemer, aan de lucht blonk laat
Nog licht, er viel een gouden blanke schijn
Over de gevels van mijn raamkozijn.
\stoplines
\stoplinenumbering
\stoptext




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] indexing puzzle

2012-05-26 Thread Rogers, Michael K
Thanks, Alan.  Actually, I now think MKIV works without any trickery.  I was 
perhaps too eager to try a Lua solution.  \Passage{Author+Text+Locus} seems to 
work fine in the beta today.

Cheers,  Michael


On May 26, 2012, at 8:41 AM, Alan Bowen wrote:

Michael—

Thank you so much for your very helpful response.

1. \unskip works well.

2. What I currently have is admittedly an ad hoc system for encoding my 
indices. As you note, the system works for  page numbers > 99 where line 
numbers < 99. When line numbers > 99, I adapt the sort key differently: thus, 
for Cleomedes, Cael. I have [CleomCael105001] for 1.5.1. This works (in MKII) 
but only because the number of entries is very small.

3. I like your MKII solution—it is much more general, works well on what I 
have, and is certainly less taxing to encode. Many thanks!

The book that I trying to index right now is the last of my MKII projects. So I 
am also interested in, and very grateful, for  your MKIV solution.

All best, Alan


On Thu, May 24, 2012 at 5:14 PM, Rogers, Michael K 
mailto:mrog...@emory.edu>> wrote:
1. For \ab you might want
\def\ab{\unskip}
since the space is not the same as the width of a digit.

2. Does your solution work with line numbers greater than 99?  I tried to 
implement your idea and I got the order 25.7, 25.117, 25.37.  Probably more 
than 99 lines never occurs on a page, so it's a non-issue.  But Homer, for 
instance, is often referred to by Book.Line, and the lines go past 100.  Again, 
perhaps a non-issue for you.

3.  My own attempts:  At first I though what a nice opportunity for me to learn 
a little more Lua, which it was.  After, I read you wanted a MKII solution.  
Well, I'm embarrassed at how long I took to do the MKII, but I'm not good at 
controlling expansion.  Anyway, it automatically generates sort keys for the 
pages by converting digits to letters and padding with initial a's, so that 
each page or line number is a fixed length (4 in this case, up to 1 
pages/lines).  For instance,
123.4--56 is mapped to  abcdaaaeaafg
MKII does not seem to sort digit-based keys reliably; MKIV does, and you can 
just pad out the digits with zeros.  The complete sort key that worked was the 
catenation of the author, text, and locus key, which is similar to what you 
have.

MKII:
\defineregister[Passage][Passages]
...
% interface to register -- \locuskey indirectly returns a key in \nextkey
\def\MyPassage#1#2#3{\locuskey{#3}\expandoneargafter\doMyPassage{\nextkey}{#1}{#2}{#3}}
\def\doMyPassage#1#2#3#4{\Passage[#2#3#1]{{#2}+{#3}+{#4}}}
% Def. of \locuskey#1
%In: #1<-p1[.l2[--l3]] Out: key stored in \nextkey
... (see attached file, if interested)

MKIV:
% interface to register -- expansion in MKIV must be different, because a 
direct approach works:
\def\MyPassage#1#2#3{\Passage[#1#2\locuskey{#3}]{#1+#2+#3}}
% Def. of \locuskey
\startluacode
userdata = userdata or { }
function userdata.locuskey(x)
context(string.gsub(x,"(%d+)",function (s) return 
string.format("%04d",tonumber(s)) end))
end
\stopluacode
\def\locuskey#1{\ctxlua{userdata.locuskey("#1")}}

The Mark IV/Luatex one was much nicer, less frustrating to figure out.


On May 24, 2012, at 7:06 AM, Alan Bowen wrote:

For anyone interested in producing classical indices locorum, I have devised a 
way that seems to work, although it is not that elegant.

The first step is to modify the sort keys by counting the number of digits in 
the page number:
thus,
[AuthorText01] for pages 1–9,
[AuthorText02] for pages 10–99, and so on

The next is to insert the command “ \ab” (note the space) when the line number 
is a single digit:
thus
391. \ab{}2 but 391.12 in the entry specification {Author+Text+page.line}

For \ab, I have:

\newdimen\digitwidth
\setbox0=\hbox{\tfx\char32}
\digitwidth=\wd0

\def\ab{\tfx\kern-\digitwidth}

The hitch here is that the font size is not context dependent.

Alan

On Tue, May 22, 2012 at 6:39 PM, Alan Bowen 
mailto:bowenala...@gmail.com>> wrote:
I have been trying to index the passages cited in a book and would be grateful 
for some tactical advice.

There are several works by a single author, and it is customary to cite each 
text by page and line number, as in 1253.12 (page 1253, line12), for example.

I have a sort key for each work. But now I need a way to get the entry

1253.7 (page 1253, line 7) before the entry
1253.12 (page 1253, line 12).

\[Passage[AuthorText]{Author+Text+1253.07}1253.7 or
\[Passage[AuthorText]{Author+Text+1253.07}1253. 7
would work, but it is really better to have the index entry as “1253.7” rather 
than as “1253.07” or “1253. 7”

I have experimented with different sort keys—e.g., AuthorText125307—and can 
generate an index with the 1235.7 and so on in the proper place and form, say, 
before 1253.12.

But then the problem is that I also get entire sequences of entries out of 
order (485.19, 485.21 before 477.31, and so on). Very

Re: [NTG-context] Use figures without file extension

2012-05-26 Thread Rogers, Michael K
I don't know if this helps but the following tells what the type of the image 
file is.  (In my case I copied a jpg to img1 and a png to img2, without 
extensions of course.)

\startluacode
userdata = userdata or { }
function userdata.mytype(s)
context(img.scan({filename=s}).imagetype)
end
\stopluacode
\starttext
img1 is \ctxlua{userdata.mytype("img1")}\par
img2 is \ctxlua{userdata.mytype("img2")}
\stoptext

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Use figures without file extension

2012-05-27 Thread Rogers, Michael K
On May 26, 2012, at 10:49 PM, Aditya Mahajan wrote:
using the inbuilt library is definely simpler!

Yes, but as you said earlier, you'll still have to do something about GIFs.  It 
would be nice if luatex had at worst a non-fatal error on scanning a 
non-supported file.

Michael




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Spacing for {\cal P} in XITS

2012-05-29 Thread Rogers, Michael K

On May 29, 2012, at 8:13 AM, Khaled Hosny wrote:

> On Tue, May 29, 2012 at 01:19:00PM +0300, Janne Junnila wrote:
>> Hi,
>>
>> I just noticed that the spacing after ${\cal P}$ looks a bit too tight
>> (non-existent?) while using XITS fonts.
>> ...
>
> Looks fine here (in my eyes at least), can you attach the resulting PDF?
>
> Regards,
> Khaled

On this input:

\setupbodyfont[xits]
\starttext
The spacing of ${\cal P}$ looks like this.\par
The spacing of \vrule${\cal P}$\vrule looks like this.
\stoptext

I got similar to what Janne described.  See attached (beta ver. 2012.05.29 
00:12).  Looks like the kerning might be a little off?

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).


foo1307.pdf
Description: foo1307.pdf
___
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] Spacing for {\cal P} in XITS

2012-05-29 Thread Rogers, Michael K
I'm using a Mac, too, with OSX 10.6, if that helps.

On May 29, 2012, at 9:43 AM, Andy Thomas wrote:

> Hello,
>
> it looks off on my computer (Mac 10.6 with preview and acrobat) and with the 
> context-standalone (from 1 hour ago). However, it does work with TL2011 (not 
> 12).
>
> Then, I copied (overwrote) the fonts from TL into the standalone (from 
> /Library/TeX/Root/texmf-dist/fonts/opentype/public/xits/ to 
> ~/context/tex/texmf/fonts/opentype/public/xits/) and deleted the cache. But 
> that did not help, the context standalone still produces the 'too-close P'. I 
> also tried the newest font files from yesterday, but still no luck. Hope that 
> help finding the bug.
>
> Andy
>
> P.S. Is there more to be considered than only the font files (the .otf s)?
>
>
>
> On 29.05.2012, at 14:39, Khaled Hosny wrote:
>
>> On Tue, May 29, 2012 at 12:29:02PM +, Rogers, Michael K wrote:
>>>
>>> On May 29, 2012, at 8:13 AM, Khaled Hosny wrote:
>>>
>>>> On Tue, May 29, 2012 at 01:19:00PM +0300, Janne Junnila wrote:
>>>>> Hi,
>>>>>
>>>>> I just noticed that the spacing after ${\cal P}$ looks a bit too tight
>>>>> (non-existent?) while using XITS fonts.
>>>>> ...
>>>>
>>>> Looks fine here (in my eyes at least), can you attach the resulting PDF?
>>>>
>>>> Regards,
>>>> Khaled
>>>
>>> On this input:
>>>
>>> \setupbodyfont[xits]
>>> \starttext
>>> The spacing of ${\cal P}$ looks like this.\par
>>> The spacing of \vrule${\cal P}$\vrule looks like this.
>>> \stoptext
>>>
>>> I got similar to what Janne described.  See attached (beta ver.
>>> 2012.05.29 00:12).  Looks like the kerning might be a little off?
>>
>> Looks fine here, bot TL 2012 presets and up to date minimals.
>>
>> Regards,
>> Khaled
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> ___
>
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] transluency/transparency

2012-06-04 Thread Rogers, Michael K
On Jun 4, 2012, at 5:45 AM, Jan Pohanka wrote:

>> See page 204, section 8.5 of the metafun book
>>
>> loadfigure "gracht.mp" number 1 scaled .5 ;
>> addto currentpicture also
>> (currentpicture softened .8)
>> shifted (bbwidth(currentpicture)+.5cm,0) ;
>>
>
> thank you for the hint, but it seems, that softened does not work for 
> externalfigure
>
> \startMPcode
> draw externalfigure "logo.pdf" scaled 5cm softened 0.5;
> \stopMPcode
>
>  ...lable:=true; ]===], false)}
>
> \meta_process_graphic ...!!es , \MPaskedfigure )}}
>  \egroup \placeMPgraphic \m...
>
> regards
> Jan

What about drawing a translucent white rectangle over the graphic?



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] \externalfigure and factor=max

2012-06-07 Thread Rogers, Michael K
On Jun 6, 2012, at 2:45 PM, Marco wrote:
> Hi,
>
> according to the wiki the \externalfigure key “factor” has the
> options:
>
> max: aspect ratio is kept, the image is scaled to
> the bigger (oversized) variant
>
> fit: aspect ratio is kept, the image is scaled to
> the smaller (fitted) variant
>
> In the following example I expect the third image to have a width of
> 4cm and a height of 4cm. However, both values are 3cm. The aspect
> ratio is kept, but “max” and “fit” behave the same.
>
> \startbuffer [img]
>  \useMPlibrary [dum]
>  \startTEXpage
>\externalfigure [dummy] [width=5cm,height=5cm]
>  \stopTEXpage
> \stopbuffer
> \ctxcommand{runbuffer("img", "img", true)}
>
> \starttext
>
> \externalfigure [\jobname-img]
>  [width=3cm, height=4cm]
>
> \blank
> \externalfigure [\jobname-img]
>  [factor=fit, width=3cm, height=4cm]
>
> \blank
> \externalfigure [\jobname-img]
>  [factor=max, width=3cm, height=4cm]
>
> \stoptext
>
> Is this a bug or am I misunderstanding the wiki? Anyhow, is there a
> clean solution to keep the aspect ratio and scale the image to
> whichever value is larger?
>
>
> Marco


I played with your example a little and rooted around in grph-trf.mkiv.  It 
seems "max" selects how to scale based on which dimension in the original 
figure is greater.  Oddly, the dimensions of the MP figure are 142.26682pt by 
142.2377pt.  So I suspect that "max" is selecting the width as the dimension to 
scale to the specified width=3cm in your case.  (Change the height of the MP 
figure to 5.01cm and you'll see a change.)  Whether that's a bug or intended is 
a question for others.  If not, then "max" is for this problem:

Q. How to scale an image so that the largest dimension is 4cm?
A.  \externalfigure [\jobname-img] [factor=max, width=4cm, height=4cm]

If this is correct, I'd be glad to try to clarify the wiki. (I've not done much 
wiki-ing.)

I suppose you could fix your problem with something like

\ifdim\desiredwidth>\desiredheight
\externalfigure [\jobname-img][width=\desiredwidth]
\else
\externalfigure [\jobname-img][height=\desiredheight]
\fi





This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Confused again :-)

2012-06-07 Thread Rogers, Michael K

On Jun 7, 2012, at 3:15 PM, Bill Meahan wrote:

> I'm getting a handle on page layout and headings but there are some things I 
> haven't figured out.
>
>  1) How does one specify they want the "outer" margin to be a different size 
> than the "inner" margin? "Outer," of course, is the right margin on a 
> right-hand (odd) page and the left margin on a left-hand (even) page.
>
>  2) How does one put a frame around a margin? Layers? Overlay? \framedtext?
>
>  3) Am I correct I can use the "COMMAND" parameters in \setuplayout to 
> specify there is some text to use as a marginal in the (chapter | section) 
> header (using \margintext, I presume)?
>
> I am working on a couple of novels I want to typeset using ConTeXt since I 
> think it will allow me to produce what I want for typographic style much 
> easier than using LaTeX.  I'm pretty adept at using LaTeX but brand new to 
> ConTeXt. One of _my_ problems is so many examples on the wiki seem oriented 
> towards people setting math which could not be farther from my intended 
> usages. (Not that I'm unfamiliar with math, I have a degree in Physics and 
> would have had a double degree in math except for a choice to take a 
> different course (helpful in physics) instead of one mandatory for the math 
> degree).
>
> Thanks!
>
> --
> Bill Meahan K8QN

1)  You might want to look through Ch. 3 in the manual.  The dimension called 
"backspace" is sometimes described as the space between the spine and the text, 
and sometimes as the space to the left.  But the manual shows various ways to 
set up ConTeXt for books.  It should help you.  One place to get it is 
http://www.tug.org/texlive/Contents/live/texmf-dist/doc/context/manuals/reference/en/contextref.pdf

2, 3) I'll let experts tell you.

Strangely, my intended products are math, and I find ConTeXt has too many 
examples aimed at general printing problems (books, brochures, ...) that I'm 
not interested in producing.  Maybe LaTeX is the same way.  I learned Plain TeX 
before there was LaTeX

Best,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Portrait -> Landscape -> Portrait

2012-06-11 Thread Rogers, Michael K

On Jun 9, 2012, at 7:08 AM, pddzaic wrote:

Hello context-friends,

I have switched from Latex to Context and my first impression of Context is: 
WOW :-)

Unfortunately, I did not understand how to switch between landscape and 
portrait. Here a minimal working example:


\mainlanguage[en]

\setuplayout[
paper=A4,
topspace=1cm,
header=2cm,
headerdistance=0.25cm,
footerdistance=0.25cm,
footer=0.6cm,
bottomspace=1cm,
margin=2.5cm,
width=middle,
height=middle]


\starttext
\showframe

\chapter{First chapter}
\input knuth

% Change to landscape
\page\setuppapersize[A4,landscape][A4,landscape]

\section{First section}
\input knuth

% Reverts to the global layout
\page\setuppapersize[A4,portrait][A4,portrait]
\chapter{Second chapter}
\input knuth

\stoptext

As you can see in the result the layout of the landscaped-page is not as I 
expected.

Can somebody help me?

Works for me: portrait, landscape, portrait. What version of ConTeXT do you 
have?  I have ver: 2012.06.09 01:22 MKIV  fmt: 2012.6.10




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] clutter with \start and \stop

2012-07-04 Thread Rogers, Michael K
On Jul 4, 2012, at 1:29 PM, Peter Münster wrote:
> On Wed, Jul 04 2012, Hans Hagen wrote:
>
>> no, mixing this way is asking for troubles, if not now, than maybe in the
>> future
>>
>> just use \section
>
> Yes, but isn't \startsection the recommended method for the future and
> needed for XML output?

XML documents should form a tree, so a structure like

\startA % 
\startB % 
\stopA % 
\stopB % 

won't translate to XML.

Grouping in TeX follows the same restrictions, and \start... and \stop... 
behave like \begingroup and \endgroup.  The \stop... is supposed to restore the 
state before the corresponding \start... (at least I assume so -- \endgroup 
works that way).  One cannot stop A in the middle of B and return to the state 
before \startA without also stopping B.  So one should put \stopB before 
\stopA, not after it.

Have you considered structuring your example like this?:

\starttext
\startsection[title=Tufte]
\startcolumns[n=2]
\input tufte
\stopcolumns
\stopsection
\startsection[title=Tufte and Knuth]
\startcolumns[n=2]
\switchtobodyfont[big] % Note that the font size is switched back after 
\stopcolumns
\input tufte
\stopcolumns
\input knuth
\startcolumns[n=2]
\input tufte
\stopcolumns
\stopsection
\stoptext

XML seems a nice way for machines to deal with data.  But it's not a very human 
way to speak.  I mean, if I write "\section{One}...\section{Two}" isn't it 
obvious that section One ends when section Two begins?  Why should I have to 
write \endsection, when the machine can do the bookkeeping for me?  The 
start/stop mechanism is nice as an option, if you plan to produce an XML 
document from ConTeXt.  However the XML translator could implement 'if not 
first section then "" else ""' and add "if 
in_a_section then ""' when \stoptext is reached.



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] clutter with \start and \stop

2012-07-04 Thread Rogers, Michael K

On Jul 4, 2012, at 9:42 PM, Peter Münster wrote:

> On Thu, Jul 05 2012, Rogers, Michael K wrote:
>
>> Have you considered structuring your example like this?:
>
> The output is not the same...

Sorry, I misunderstood.



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] clutter with \start and \stop

2012-07-05 Thread Rogers, Michael K

On Jul 4, 2012, at 10:56 PM, luigi scarso wrote:
On Thu, Jul 5, 2012 at 12:44 AM, Rogers, Michael K 
mailto:mrog...@emory.edu>> wrote:

XML seems a nice way for machines to deal with data.  But it's not a very human 
way to speak.  I mean, if I write "\section{One}...\section{Two}" isn't it 
obvious that section One ends when section Two begins?  Why should I have to 
write \endsection, when the machine can do the bookkeeping for me?  The 
start/stop mechanism is nice as an option, if you plan to produce an XML 
document from ConTeXt.  However the XML translator could implement 'if not 
first section then "" else ""' and add "if 
in_a_section then ""' when \stoptext is reached.

Hm, consider this
\section{One} \input knuth
Text
\section{Two} \input knuth
and
\startsection{One} \input knuth
\stopsection
Text
\startsection{Two} \input knuth
\stopsection

In the last one it's clear that Text is not in the section One  or in the 
section Two: In the first one, Text is in section One ---  but how can I put 
Text so that is not in section One and not in section Two ?
Most of the time section One  ends where section Two begins, but  it's not true 
that *always* section One  ends where section Two begins :  infact the last one 
is a legal example.

I agree.  When I said start/stop mechanisms are nice options, I had in mind 
they are useful, even indispensable, alternatives for certain sorts of 
structuring, as your example shows -- at the time of writing, I focused on XML. 
 I could equally say \section is a nice option.  Still, if I want to write a 
paper that consists of a sequence of sections, it's easier to just use 
\section, and an XML translator could be written to mark it up accordingly.


This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] clutter with \start and \stop

2012-07-05 Thread Rogers, Michael K

On Jul 5, 2012, at 1:23 AM, luigi scarso wrote:
On Thu, Jul 5, 2012 at 12:44 AM, Rogers, Michael K 
mailto:mrog...@emory.edu>> wrote:
XML documents should form a tree, so a structure like

\startA % 
\startB % 
\stopA % 
\stopB % 

won't translate to XML.

Grouping in TeX follows the same restrictions, and \start... and \stop... 
behave like \begingroup and \endgroup.  The \stop... is supposed to restore the 
state before the corresponding \start... (at least I assume so -- \endgroup 
works that way).  One cannot stop A in the middle of B and return to the state 
before \startA without also stopping B.  So one should put \stopB before 
\stopA, not after it.

It depends.

\starttext
\long\def\startA#1\stopA{<\low{A}#1>\low{A}}
\long\def\startB#1\stopB{<\low{B}#1>\low{B}}

\startA
textAA
\startB
textAB
\stopA
textBB
\stopB
\stoptext


is ok  (not the context way, btw: real code is more complex).


The meaning of this can be
content of \startA..\stopA = textAA ⋃ textAB
content of \startB..\stopB = textAB ⋃ textBB
\startA..\stopA ⋂  \startB..\stopB = textAB

If we are describing programs, textAB can be the common code between the 
function A and B.



--
luigi

Again, I agree with what you write.  Somewhere I must have expressed myself 
poorly and I apologize.  It seems like a side issue (my issue with XML), and I 
did not mean to hijack the thread.  Sorry.



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Returning...need advice on manuals for MKIV

2012-07-15 Thread Rogers, Michael K
I'm familiar with TeX, not with LaTeX, and started ConTeXt last December.  Here 
are what I've found most useful:

1. In my TeXLive 2011, there is 
texlive/2011/texmf-dist/doc/context/manuals/reference/en/contextref.pdf, dated 
July 2011 and unfinished.  (The change to MKIV is immense and has outpaced the 
documentation.)

2. There is the wiki, which has some more current information about commands as 
well as gaps: http://wiki.contextgarden.net/Main_Page

3. And then there is the source, which has some helpful comments in it.  The 
explanation of the system macros, 
http://tex.aanhet.net/context/syst-gen-doc.pdf, has been helpful in many ways, 
including guessing at what the source is about.

4. This mailing list.

Aside from these, some things particularly related to my interests (tables, 
XML) have been helpful.  If you're interested in using MetaPost for graphics, 
there's John Hobby's MetaPost manual and Hans Hagen's ConTeXt-related Metafun 
manual (http://wiki.contextgarden.net/Metapost).  If you're interested in using 
Lua, see the LuaTeX manual and ConTeXt interface to Lua 
(http://wiki.contextgarden.net/Lua) as well as the Lua manual (lua.org).

Hope that helps,

Michael

On Jul 15, 2012, at 1:04 PM, john Culleton wrote:

> Returning after a long absence...
>
> Downloaded a fistful of manuals, concentrating on MKIV. One of
> these lists commands, and is dated 2012 which is promising. Many
> of these commands are not included in "Context, The Manual". So
> is there a manual or guide (or multiples) that expains these new
> commands?
>
> Let me put it a different way. If a person familiar with TeX but
> not Context wanted  to use MKIV what documents beyond "Context
> the Manual" would that person need to understand and use Context
> for ordinary documents (like a book on another software project)?
>
> I use TexLive 2011 on a Slackware Linux platform.
> --
> John Culleton
>
> ___
> 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
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Informations about nodes

2012-07-16 Thread Rogers, Michael K
On Jul 16, 2012, at 4:13 AM, Jaroslav Hajtmar wrote:

> Hallo ConTeXist.
>
> is there anything about nodes for beginners? I think any manual or practical 
> examples. I would like trying make anything experiments with this.
> I found anything only on wiki 
> (http://wiki.luatex.org/index.php/TeX_without_TeX)
>
> Thanks Jaroslav Hajtmar

The Luatex reference manual has a chapter on nodes.  
http://www.luatex.org/svn/trunk/manual/luatexref-t.pdf




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Returning...need advice on manuals for MKIV

2012-07-17 Thread Rogers, Michael K
On Jul 16, 2012, at 10:27 AM, Philipp Gesang wrote:

> ·
>
>> 3. And then there is the source, which has some helpful
>> comments in it.  The explanation of the system macros,
>> http://tex.aanhet.net/context/syst-gen-doc.pdf, has been helpful
>> in many ways, including guessing at what the source is about.
>
> Fwiw Taco’s “System Macros” is part of the wiki as well:
> . As it was written
> with MkII in mind, you might want to check the definitions in
> syst-aux.mkiv in your /context/base/ directory if they are
> still around and, if applicable, what their replacement is (\@EA
> and family come to my mind that have been purged from MkIV).
>
> Regards
> Philipp

Thanks for the tip.



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Is startalign broken in mkiv?

2012-07-17 Thread Rogers, Michael K
Here's a backward-compatibility hack that works on your minimal example.  Maybe 
it will save the dozens of files without changing all the &s:

\let\oldstartalign=\startalign
\let\oldstopalign=\stopalign
\let\oldbs=\\
\def\startalign{\catcode`&=4\let\\=\cr\oldstartalign}
\def\stopalign{\oldstopalign\catcode`&=12\let\\=\oldbs}
\starttext
This \& that & the other thing:
\startformula \startalign
v &= u + at \\
h &= ut + \frac12 gt^2 \\
\stopalign \stopformula
That \& this & yet another thing.
\stoptext

Hope that helps.

Michael

On Jul 17, 2012, at 6:48 PM, Matthias Weber wrote:

> It was never a problem in TeX to modify the control characters used according 
> to your own pleasure. For me, the problem is now to change the 200+ 
> occurrences of start/stopaligns distributed over dozens of files to the 
> politically correct syntax.
>
> Matthias
>
> On Jul 17, 2012, at 7:41 PM, Khaled Hosny  wrote:
>
>> The use of & (which is a common symbol) as a control character is a long
>> standing idiosyncrasy of TeX that I'm glad ConTeXt has got rid of.
>>
>> On Tue, Jul 17, 2012 at 07:32:09PM -0400, Matthias Weber wrote:
>>> Thanks - I wasn't aware that the human readable version had been deprecated 
>>> :(
>>>
>>> Matthias
>>>
>>> On Jul 17, 2012, at 7:17 PM, Hans Hagen  wrote:
>>>
 On 18-7-2012 00:22, Matthias Weber wrote:
> \starttext
> \startformula \startalign
> v &= u + at \\
> h &= ut + \frac12 gt^2 \\
> \stopalign \stopformula
> \stoptext
>
>
> >>
>
> ConTeXt  ver: 2012.07.17 16:42 MKIV  fmt: 2012.7.17  int: english/english
> (...)
> ! Missing $ inserted.
>
> system  > tex > error on line 3 in file test.tex: Missing $ 
> inserted ...
>
> 1 \starttext
> 2 \startformula \startalign
> 3 >>  v &= u + at \\
> 4 h &= ut + \frac12 gt^2 \\
> 5 \stopalign \stopformula
> 6 \stoptext
>
> Thanks -

 the context way is:

 \startformula \startalign
 \NC v \NC = u + at \NR
 \NC h \NC = ut + \frac12 gt^2 \NR
 \stopalign \stopformula


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




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] A "Lorem ipsum" module?

2012-07-18 Thread Rogers, Michael K
On 2012-07-18 Marcin Borkowski  wrote:

> in LaTeX, there is quite a useful package called "lipsum", for
> typesetting varioud amounts of "Lorem ipsum" stuff. Is there anything
> like that in ConTeXt? (I know about \input knuth, \input tufte etc.,
> but that is not exactly what I have in mind, especially when giving a
> sample of some design to a customer;).)

The LaTeX lipsum seems to have been pre-download from 
lipsum.com.  ConTeXt makes this relatively easy.  The one 
problem that might be solved better is that the paragraphs come in a single xml 
node separated by single newlines.  I defined a lines environment to make these 
into paragraphs, which is not as pretty as I would like.

\startxmlsetups xml:Lorem:base
\xmlsetsetup{Lorem}{*}{-}
\xmlsetsetup{Lorem}{feed|lipsum}{xml:Lorem:*}
\stopxmlsetups
\xmlregisterdocumentsetup{Lorem}{xml:Lorem:base}
\startxmlsetups xml:Lorem:feed
  \xmlflush{#1}
\stopxmlsetups
\startxmlsetups xml:Lorem:lipsum
  \xmlflush{#1}
\stopxmlsetups
\definelines[LoremLines]
\def\Lorem#1{% #1 = number of paragraphs to request
  \startLoremLines
  
\xmlprocessfile{Lorem}{http://www.lipsum.com/feed/xml?amount=#1&what=paras&start=yes}{}
  \stopLoremLines
}
\starttext
\setupindenting[yes,20pt]
\setuplines[LoremLines][command=\blank,indenting=yes]
\Lorem{12}
\stoptext




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] alignment in TABLE

2012-07-24 Thread Rogers, Michael K

On Jul 24, 2012, at 5:45 PM, Peter Münster wrote:

> Hi,
>
> How could I please align vertically the 2 table cells in the following
> example:
>
> --8<---cut here---start->8---
> \starttext
> \bTABLE
> \bTR \bTD 1 \eTD \bTD \framed{1 Über} \eTD \eTR
> \eTABLE
> \stoptext
> --8<---cut here---end--->8---
>
> I've tried various combination with offset=0pt/overlay, strut=yes/no,
> rulethickness=0pt, but without success...
>
> TIA for any help!
> --
>   Peter

Try \inframed instead of \framed.  See

http://wiki.contextgarden.net/Framed#Inline_Frames

Michael




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Small caps?

2012-07-24 Thread Rogers, Michael K

On Jul 24, 2012, at 10:33 PM, Shriramana Sharma wrote:

> Hi -- is there absolutely no way for obtaining these "fake small caps"
> in ConTeXT?

Here's a hack, which sort of works, definitely doesn't handle  -- there 
must be a better way.  I hope you don't mind my using your text as text. :-)

\usemodule[simplefonts]
\setmainfont[DejaVuSansCondensed]
\def\smallcaps{\begingroup\obeyspaces\let\myspace=\space\dosmallcaps}
\def\dosmallcaps#1{\dosc#1\end\endgroup}
\def\dosc#1{%
  \ifx#1\end \let\next=\relax
  \else\if#1\space \myspace\let\myspace=\relax% skip repeated spaces
\else\ifnum\lccode`#1=`#1{\tfx \uppercase{#1}}% change \tfx to your desired 
size
  \else #1\fi
  \let\myspace=\space
\fi
\let\next=\dosc
  \fi\next}
\starttext
Not everyone is a
typographer to produce the appropriate fine-typography glyphs for
their favourite font to cater to a particular style. Why should the
system impose
\smallcaps{"super-duper" Typography}
on users when they are willing
to settle for less?
\smallcaps{Watch out  for
returns.}
\stoptext

Alternatively, you could settle for a font that has small caps.




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Small caps?

2012-07-25 Thread Rogers, Michael K

On Jul 25, 2012, at 1:06 AM, Shriramana Sharma wrote:

> On Wed, Jul 25, 2012 at 10:29 AM, Rogers, Michael K  wrote:
>>
>> Here's a hack, which sort of works, definitely doesn't handle  -- 
>> there must be a better way.  I hope you don't mind my using your text as 
>> text. :-)
>
> Hi thanks for your help. Sorry to keep returning with errors (but as I
> said I'm a noob):
>
> loading : ConTeXt User Module / Simplefonts
> ! Undefined control sequence.
> l.144 \ctxloadluafile
> {t-simplefonts}{}
>
> I checked and the package context-modules is installed on my system.

Sorry about that.  You should load your font in your usual way.  As has been 
pointed out, this is not a robust solution.

% load your favorite font here
\def\smallcaps{\begingroup\let\par=\space\obeylines\obeyspaces\let\myspace=\space\dosmallcaps}
\def\dosmallcaps#1{\dosc#1\end\endgroup}
\def\dosc#1{% assumes #1 is a sequence of characters
 \ifx#1\end \let\next=\relax
 \else\if#1\space \myspace\let\myspace=\relax% skip repeated spaces
   \else\ifnum\lccode`#1=`#1{\tfx \uppercase{#1}}% change \tfx to your desired 
size
 \else #1\fi
 \let\myspace=\space
   \fi
   \let\next=\dosc
 \fi\next}
\starttext
Basically I'm trying to move away from wordprocessors, and while I'm
not looking for meaningless effects like "walking ants"
\smallcaps{(from MS Word)}
to be provided by \TeX\ macro packages, faux smallcaps (and oblique and
bold) is not an unreasonable thing to expect IMO. Not everyone is a
typographer to produce the appropriate fine-typography glyphs for
their favourite font to cater to a particular style. Why should the
system impose
\smallcaps{"super-duper" Typography}
on users when they are willing
to settle for less?
\smallcaps{Look,
returns now work}
%\smallcaps{but \TeX\ and other control sequences do not.}
\stoptext




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Variables how-to needed

2012-07-25 Thread Rogers, Michael K
On Jul 25, 2012, at 12:50 AM, Mari Voipio wrote:

> Hello All,
>
> I'm looking for some "for dummies" information about using variables.
> I tried looking for it in the wiki, but only found this "Internals"
> page that's a bit too advantaged to me:
> http://wiki.contextgarden.net/Inside_ConTeXt#Using_variables
> I'm obviously missing something important, so I'd love to see a few
> more examples of variables and variable input files...
>
>
> What I want is price tags with the item name in Finnish and
> English/Swedish and then the price. These are placed on a small page
> and those small pages are then fit onto one A4 by imposition.
>
> Like this:
>
> Pieni nyörihaarukka, koivua   %variable 1,v-descr-fi
> {\em Small lucet, beech}   %variable 2, v-descr-en
>
> 6 eur  %variable 3, v-price1
>
> Made in xxx %variable 4, v-origin
>
>
> I can do the imposition, that is not a problem - and it works a lot
> better than a table, so no tables this way...
> .
> My data is in a list that can be converted to csv (although it'll then
> have a bunch of quotes to be removed), the list format is just like
> above:
> Item in Finnish, Item in English, price, country of origin.
>
> So the main problem is database/mailmerge/variablerelated: How do I
> (or should I) use variables to fetch this information from a separate
> spreadsheet type file, i.e. my price list?
>
> (IF this was MS Word or OpenOffice, it would be called Mail Merge, but
> in OO it sucks a bit; and I think the operation itself should be easy
> if  I just figure out how to do it...

Does this give you the sort of thing you want?  Sorry it's so kludgy (hey, 
\relax ;-).  There is an example of an address label in Mojca's 
http://dl.contextgarden.net/myway/csv.pdf but it threw an error in the current 
beta (I will write about that on a separate thread).  So I made the following 
(stupid) workaround:

\usemodule[database]
%\defineseparatedlist
%  [PriceTag]
%  [separator={:},command=\MyTag]
\defineseparatedlist
  [PriceTag]
  [separator={:},
   first=\MyTag,
   last=\blank,
   left=,
   right=\relax] % a hack, because command=\MyTag wasn't working in MKIV
\unexpanded\def\MyTag#1\relax#2\relax#3\relax#4\relax{ % ditto
  \framed
   [align={flushleft,lohi},
width=6cm,
height=3.2cm]{#1\crlf#2\crlf\crlf#3\crlf\crlf Made in #4}}
\starttext
\startPriceTag
Finnish thing:English name:2.15 eur:Finland
Pieni nyörihaarukka, koivua:Small lucet, beech:6 eur:xxx
\stopPriceTag

% or process the file
%\processdatabasefile[PriceTag][prices.txt]

\stoptext




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Database module gives an error

2012-07-25 Thread Rogers, Michael K
There is an example of an address label in 
Mojca'shttp://dl.contextgarden.net/myway/csv.pdf that throws an error in the 
current beta.  I changed "\def\SendMe" to "\unexpanded\def.." which fixed one 
error.  But now I get the following.  Can it be fixed?

\usemodule[database]
\unexpanded\def\SendMe#1#2#3#4{\framed [align={flushleft,lohi},
width=6cm, height=2.6cm]{#1\crlf#2\crlf\crlf\uppercase{#3\crlf#4}}}
\starttext
\defineseparatedlist[Address][separator={;},command=\SendMe]
\startAddress
NTG;Maasstraat 2;NL-5836 BB Sambeek;The Netherlands
Dante~e.V.;Postfach 101840;D-69008 Heidelberg;Germany
\stopAddress
\stoptext

! Missing { inserted.

system  > tex > error on line 18 in file foo9094.tex: Missing { 
inserted ...

 8 Dante~e.V.;Postfach 101840;D-69008 Heidelberg;Germany
 9 \stopAddress
10 \stoptext
11


   \unskip
\crlf ->\ifhmode \unskip
 \prewordbreak \crlfplaceholder \ifcase \raggedstatu...
 \uppercase \crlf
MAASSTRAAT 2\crlf \SendMe
\SendMe ...f #2\crlf \crlf \uppercase {#3\crlf #4}
  }
\SendMe ...f #2\crlf \crlf \uppercase {#3\crlf #4}
  }
l.18 \SendMe

...
l.9 \stopAddress

?

Thanks,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] 2 columns: 1 language per column (solved)

2012-07-31 Thread Rogers, Michael K
If you wish to use TeXShop, you can set it up...in my typically kludgy way.  
This mimics the TeXShop setup for Context Standalone (see 
http://wiki.contextgarden.net/ConTeXt_Standalone/Mac_Installation) and assumes 
that "context" is in your regular execution path.

Create a new plain-text file in ~/Library/TeXShop/Engines -- call it whatever 
you like -- let's say "ConTeXt-CLD.engine".  Add these lines
CUT HERE--
#!/bin/bash
context --forcecld "$1"
CUT HERE--

This will create a ConTeXt-CLD menu item in the popup menu on new file windows. 
(You may have to restart TeXShop first.)  You can select it and run Peter's 
column program.

If you like, add these three lines to the beginning of your .tex file to force 
TeXShop to use ConTeXt-CLD:

CUT HERE--
--[[
%!TEX TS-program = ConTeXt-CLD
]]--
CUT HERE--

A drawback is that your cld files will be masquerading as .tex files.  But you 
can process cld files in TeXShop if you want to.

Michael

On Jul 31, 2012, at 5:46 PM, Otared Kavian wrote:

> Thanks Peter! It is a very nice piece of code, but could this be included in 
> a TeX file? (Otherwise one cannot use something like TeXShop on a Mac to 
> typeset the file).
>
> Best regards: OK
>
>
> On 31 juil. 2012, at 18:23, Peter Münster  wrote:
>
>> On Tue, Jul 31 2012, Otared Kavian wrote:
>>
>>> Can you give please an example showing how to use your code?
>>
>> Save it in "test.cld", then run "context test.cld".
>> Then open "test.pdf" in a PDF-viewer.
>>
>> --
>>  Peter
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> ___
>
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] 2 columns: 1 language per column (solved)

2012-08-01 Thread Rogers, Michael K
On Aug 1, 2012, at 2:39 AM, Otared Kavian wrote:

...
However adding the line
%!TEX TS-program = ConTeXt-CLD
at the top of the file results in an error message saying:
> tex > error on line 72 in file 
> /context-minimal/tex/texmf-context/tex/context/base/cont-yes.mkiv: LuaTeX 
> error
(here context-minimal is the directory where I have the latest version of the 
standalone ConTeXt)...

On 1 août 2012, at 00:41, "Rogers, Michael K" 
mailto:mrog...@emory.edu>> wrote:

...
If you like, add these three lines to the beginning of your .tex file to force 
TeXShop to use ConTeXt-CLD:

CUT HERE--
--[[
%!TEX TS-program = ConTeXt-CLD
]]--
CUT HERE--

You need all three lines.  The TeX comment has to be enclosed in a Lua comment. 
 The double hyphen after the "]]" is optional, I think, but I've seen it done 
that way.  (As a neophyte, I imitate.)

@Hans, the problem with TeXShop is that it seems to refuse to process files 
whose names do not end in .tex, AFAIK.  (The typeset button is disabled.)  So a 
straightforward solution seems impossible.  You can always type "context 
file.cld" in a terminal window.

Also enclosing the code written by Peter between \startluacode …. \stopluacode 
in a TEX file does not allow to to typeset the file

Good to know.



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Can't generate an epub - what am I doing wrong?

2012-08-09 Thread Rogers, Michael K
Hi,

I don't seem to have an epub reader that can format the output.  (MS Word 
complain there was no xslt file,  But the xhtml file produced contains the 
metadata and the document structure.  Output pasted below.

Michael

On Aug 9, 2012, at 9:09 AM, Marcin Borkowski wrote:

Hello all,

my problem is as in the topic;).  The minimal example from the wiki
works fine, but this does not:


\setupbackend[export=yes,xhtml=yes]

\settaggedmetadata
 [title=My Document,
  author=A. U. Thor]

\starttext

\startchapter[title={First chapter}]
\input tufte
\stopchapter

\startchapter[title={Second chapter}]
\input knuth
\stopchapter
\stoptext


The resulting epub file (after the mtxrun, of course) does not contain
any metadata; also, there is no chapter structure whatsoever.

What am I missing?

TIA,

--
Marcin Borkowski
http://mbork.pl

XHTML output (text shortened):









http://www.w3.org/1998/Math/MathML"; version="0.30" 
language="en" date="Thu Aug  9 09:30:38 2012" file="foo13338" 
context="2012.08.05 12:52" xmlns:xhtml="http://www.w3.org/1999/xhtml";>

  A. U. Thor
  My Document

  
1
First chapter

We thrive...

  
  
2
Second chapter

Thus,...
  
The separation...
  
But...

  




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Figured bass symbols in a text.

2012-08-10 Thread Rogers, Michael K
Hi,

Since no one has offered a quick ConTeXt solution, I offer my usual -- a dumb 
Plain TeX solution:

\def\lomihi#1#2#3{${\scriptstyle{#2}}\limits_{#1}^{#3}$}

With the Computer Modern font, the top is a little further away from the middle 
than the bottom.  It can be adjusted with something like

\def\lomihi#1#2#3{${\scriptstyle{#2}}\limits_{#1}^{\lower0.23pt\hbox{$\scriptstyle{#3}$}}$}

but this would probably have to be adjusted for each font and size.

Hope that helps,

Michael

On Aug 10, 2012, at 5:35 AM, Robert Blackstone wrote:

> Dear all,
>
> Is there a neat way to insert a stack of three figures in a line of text with 
> the middle one sitting on the base line?
> I need it in a discussion of figured bass. (Figured bass is a system to 
> indicate harmonies to be played above a bass-line. The figures can be single 
> or stacked, two or three above each other. In discussing this topic in 
> articles and books these "figures" are usually written as they appear in the 
> music scores, in other words, stacked.)
> For a stack of  two figures it can be done perfectly with \lohi{}{}.
>
> Is there a way to do it for a stack of three figures with the middle one 
> sitting on the base line? (Something like \lomihi{}{}{}?)
>
> Here is an example in which the problem is stated once more.
> ---
> \starttext
>
> This does not look professional.
>
> A typical problematic example of this printing practice is Monteverdi's  {\em 
> L'Orfeo}, where, in the third act, in Speranze's recitative  {\em Ecco l'atra 
> palude}, several single fourths are printed, leaving for the continuo player 
> the choice to play 5/4, 6/4, or 7/4/2.
> \medskip
>
> This does, for  \lohi{4}{5} and \lohi{4}{6}. But how could this be done also 
> for 7/4/2? (Interline distance may be enlarged as necessary.)
>
> A typical problematic example of this printing practice is Monteverdi's  {\em 
> L'Orfeo}, where, in the third act, in Speranze's recitative  {\em Ecco l'atra 
> palude}, several single fourths are printed, leaving for the continuo player 
> the choice to play \lohi{4}{5}, \lohi{4}{6}, or 7/4/2.
> \stoptext
> 
> Thanks in advance for any help.
>
> Best regards,
> Robert Blackstone
> ___
> 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
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Figured bass symbols in a text.

2012-08-12 Thread Rogers, Michael K
On Aug 12, 2012, at 5:00 AM, Robert Blackstone wrote:
> On 10 aug. 2012, at 21:09, 19:59:36, Hans Hagen  wrote
>> The next beta has:
>>
>> \starttext
>>
>> \definelow   [MyLow]   [style=\txx]
>> \definehigh  [MyHigh]  [style=\txx]
>> \definelowhigh   [MyLoHi]  [style=\txx]
>> \definelowmidhigh[MyLoMiHi][style=\txx]
>>
>> We have
>>\ruledhbox{\low {L}} and \ruledhbox{\MyLow {L}} and
>>\ruledhbox{\high{H}} and \ruledhbox{\MyHigh{H}} and
>>\ruledhbox{\lohi {L}{H}} and \ruledhbox{\MyLoHi {L}{H}} and
>>\ruledhbox{\lomihi{L}{M}{H}} and \ruledhbox{\MyLoMiHi{L}{M}{H}}.
>>
>> \stoptext
>
> Hi Hans,
> I just tested this for the figured bass symbols in my text. It is perfect.
>
> And it has at least one important advantage over the plain-TeX method, kindly 
> offered by Michael Rogers, in that it uses the same font as that for he main 
> text,...

It uses the math font, which is worse.  I should have wrapped the arguments 
with \hbox and thrown in a \tx or \txx.  Or waited a little longer for the good 
solution. :)

Best,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Lua: document v. userdata

2012-08-22 Thread Rogers, Michael K
In a recent thread, Hans used the document namespace, where I (naively) 
expected userdata:

On Aug 22, 2012, at 6:32 AM, Hans Hagen wrote:

\ctxlua{document.myluadimension = "200pt"}

Is there a reason not to use userdata.myluadimension? Or is 
document.myluadimension safe, because myluadimension is almost certainly not an 
entry used by ConTeXt?  Is using document.myluadimension better "style" here, 
in some sense?  Somewhere I had gotten the idea that if a ConTeXt user wanted 
to store something in Lua, they ought to store it in the userdata namespace.

Thanks,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Stretching width in natural TABLEs

2012-09-03 Thread Rogers, Michael K

On Sep 3, 2012, at 9:39 PM, Aditya Mahajan wrote:

> On Mon, 3 Sep 2012, Michael Rogers wrote:
>
>> On Sep 2, 2012, at 12:24 PM, Aditya Mahajan wrote:
>>
>>> Is it possible to stretch the widths of each column in natural TABLEs, so 
>>> that the widths are in a certain propotion? For example, suppose I have a 
>>> table with three columns and I want to set the width of the first column to 
>>> a fixed amount, and split the remaining space between columns two and three 
>>> in a 1:2 ratio.
>>>
>
>> If you know the width of the first column and total width, then you can use 
>> arithmetic, as in the example below.  But perhaps this already occurred to 
>> you, and you were wondering if the widths and stretching can be handled 
>> automatically -- the short answer is I don't know.
>>
>> \starttext
>> \setupTABLE[c][1][width={2cm}]
>> \setupTABLE[c][2][width={\dimexpr(\textwidth-2cm)/3\relax}]
>> \setupTABLE[c][3][width={\dimexpr(\textwidth-2cm)* 2 / 3\relax}]
>> \startTABLE
>> \NC One \NC Two \NC Three \NC\NR
>> \NC A \NC B \NC C \NC\NR
>> \stopTABLE
>> \stoptext
>
> Apart from being hard to maintain, this works well if I know the width of a 
> cell in advance. But most of the time I want something the width of the fixed 
> column to be determined using width=fit option, so I cannot precompute the 
> width of other columns.
>
> Aditya

That's what I was afraid.  It's just I had the same problem last week, and a 
deadline made me settle for the ad hoc approach.  You made me curious enough to 
go look at the source, and one can hack it to work.  See below, if interested.  
Not optimal, and might break in future.

By the way, what you posted in your other message,

> \setupTABLE[c][1][width=fit]
> \setupTABLE[c][2][width=0.33\hsize]
> \setupTABLE[c][3][width=0.66\hsize]

extends into the right margin by the width of the first column or thereabouts, 
for me.

Michael

The hack:

\unprotect
% adapted from \tabl_ntb_stretch_widths, tabl-ntb.mkiv, ll. 1296f
\def\tabl_ntb_mystretch_widths % more variants, e.g. a max to \dimend
  {\ifcase\c_tabl_ntb_maximum_col\else % else division by zero
 \!!dimend\zeropoint
 \!!dimene\hsize
 \dorecurse\c_tabl_ntb_maximum_col
   
{\advance\!!dimend\dimexpr\tabl_ntb_get_wid\recurselevel+\naturaltablelocalparameter\c!columndistance\relax
\advance\!!dimene-\tabl_ntb_get_dis\recurselevel}%
 
\advance\!!dimend\dimexpr-\naturaltablelocalparameter\c!columndistance+\naturaltablelocalparameter\c!leftmargindistance+\naturaltablelocalparameter\c!rightmargindistance\relax
 % distribute width (stretch)
 \ifdim\!!dimend<\!!dimene
   \advance\!!dimend-\!!dimene
   \!!dimend-\!!dimend
%  \divide\!!dimend\c_tabl_ntb_maximum_col
%   \dorecurse\c_tabl_ntb_maximum_col
% 
{\tabl_ntb_set_wid\recurselevel{\the\dimexpr\tabl_ntb_get_wid\recurselevel+\!!dimend\relax}}%
   \divide\!!dimend3  %%% divide remainder into three equal parts
   {\tabl_ntb_set_wid2{\the\dimexpr\tabl_ntb_get_wid2+\!!dimend\relax}}%%% 
add one part to 2nd column
   {\tabl_ntb_set_wid3{\the\dimexpr\tabl_ntb_get_wid3+\!!dimend * 
2\relax}}%%% add two parts to 3rd column
 \fi
   \fi}
\def\usemystretch{\let\tabl_ntb_stretch_widths\tabl_ntb_mystretch_widths}
\protect

\starttext
\startsetups mystretch
   \usemystretch
   \setupTABLE[option=stretch]
\stopsetups
\startTABLE[setups=mystretch]
\NC One \NC Two \NC Three \NC\NR
\NC A \NC B \NC C \NC\NR
\stopTABLE
\stoptext

BTW, the above could be adapted to a key of the form stretch={n1,n2,...} (e.g. 
stretch={0,1,2}) which would divide the remaining proportionally.  Maybe not 
worth doing, though...maybe harder than I think -- the table stuff is 
complicated, and I'm assuming that since it worked once, I haven't messed 
anything up.



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Include chapter number in figure numbering

2012-09-04 Thread Rogers, Michael K
On Sep 4, 2012, at 4:00 AM, Sietse Brouwer wrote:

 how do I include the chapter number in the figure numbering?
>
>>> Untested:
>>> \setupcaptions[prefixsegment=chapter]
>
>> This works with beta 2011-11-29, but unfortunately not in a current
>> one. Does it work for you?
>
> You're right: it doesn't work for me, either. A bug, then, or possibly
> an unannounced interface change.
> --Sietse

I think the key name is plural, and you need to turn on prefixes.  Try

\setupcaptions[prefix=yes,prefixsegments=chapter]
\starttext
\chapter{One}
\section{Cow}
\placefigure{Caption}{\externalfigure[cow][width=2cm]}
Text.
\section{Cow revisited}
\placefigure{Caption}{\externalfigure[cow][width=2cm]}
Text.
\chapter{Two}
\placefigure{Caption}{\externalfigure[cow][width=2cm]}
Text.
\stoptext





This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Change color of EPS file.

2012-09-15 Thread Rogers, Michael K

On Sep 15, 2012, at 1:36 AM, luigi scarso 
mailto:luigi.sca...@gmail.com>>
 wrote:
On Sat, Sep 15, 2012 at 1:23 AM, Troy Henderson 
mailto:thend...@gmail.com>> wrote:

and which uses Cairo and Poppler for its conversion.  Now in order for my 
simplistic filter to function,
Why 'simplistic' and not 'simple'  ?
I always thought that its meaning is negative (something like " 'simplistic' is 
a bad imitation of 'simple' ")

That's often true.  Here I think the intention is to imply that the filter is 
simple and naive, perhaps not robust, might not work for everybody, etc.  In 
that sense, the meaning does have a negative connotation.



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] \everymath

2012-09-15 Thread Rogers, Michael K
I often want every math mode (between single $) be \displaystyle.  In Plain 
TeX, you do something like

\everymath={\displaystyle}

Is the best ConTeXt way to do something like this?

\appendtoks\displaystyle\to\everymathematics

Or is there a key in \setupmathematics?

Thanks,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Ctx: list of commands

2012-09-18 Thread Rogers, Michael K
On Sep 18, 2012, at 2:44 AM, Procházka Lukáš Ing. - Pontex s. r. o.
 mailto:l...@pontex.cz>>
 wrote:

It seems that my question is not so straightforward - I didn't think it would 
it could be problem to separate "public macros" (= public ConTeXt commands = 
these that are cited in manuals, on wiki or simply - which "you can use").

I haven't been following the answers closely as they seemed to focus on getting 
ALL commands.  So excuse me if this is too naive, but have you looked at the 
"quick reference"?:

http://pragma-ade.com/general/qrcs/setup-en.pdf

I think it does not contain all commands, however, not even all the "public" 
ones.  But maybe it's a good starting place.  It is based on

… tex/texmf-context/tex/context/interface/cont-en.xml

(There are ones for the other languages, too.)  The xml database contains the 
source file name, too, which helps me sometimes.  One could probably develop a 
quicker reference based on it in the format you asked for.

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Conditionals

2012-09-28 Thread Rogers, Michael K

On Sep 28, 2012, at 8:31 PM, Troy Henderson 
 wrote:

> I have a list of numbers,
>
> 2, 6, 7, 8, 12, 14, 18, 20, 186, 188, 316, 318, 354, 372, 376
>
> that I would like to use as exceptions in a \dostepwiserecurse loop.  That 
> is, within the loop if \recurselevel is NOT EQUAL to either of these numbers, 
> then I want to do something -- otherwise, I simply increment \recurselevel.
>
> I would appreciate an example of how to do this.
>
> Thanks,
>
> Troy Henderson

\starttext
\dorecurse{400}
{\doifnotinset{\recurselevel}{2, 6, 7, 8, 12, 14, 18, 20, 186, 188, 316, 318, 
354, 372, 376}
{\recurselevel, }}
\stoptext


Michael




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Error with \section name

2012-10-05 Thread Rogers, Michael K
I encountered a strange error.  If the section name contains "iffer" then an 
error is produced, with some joke-like comments.

Minimal example:

\starttext
\chapter{One}
\section{iffer}
\stoptext

The original title was "Differentiating an integral" but I kept taking away 
until I got to "iffer".

Michael

Excerpt of log file:

ConTeXt  ver: 2012.10.05 19:52 MKIV  fmt: 2012.10.5  int: english/english
...
error: ...lone/tex/texmf-context/tex/context/base/font-otn.lua:347: Invalid 
field id components for node type disc (3)
.
system  > tex > error on line 3 in file foo4580.tex: ? ...
….
l.3 \section{iffer}

?
! I can't go on meeting you like this.
...
l.3 \section{iffer}

One of your faux pas seems to have wounded me deeply...
in fact, I'm barely conscious. Please fix it and try again.




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Error with \section name

2012-10-05 Thread Rogers, Michael K
Actually it happens with the text "iffer":

\starttext
iffer
\stoptext

On Oct 5, 2012, at 9:44 PM, "Rogers, Michael K" 
 wrote:

> I encountered a strange error.  If the section name contains "iffer" then an 
> error is produced, with some joke-like comments.
> 
> Minimal example:
> 
> \starttext
> \chapter{One}
> \section{iffer}
> \stoptext
> 
> The original title was "Differentiating an integral" but I kept taking away 
> until I got to "iffer".
> 
> Michael
> 
> Excerpt of log file:
> 
> ConTeXt  ver: 2012.10.05 19:52 MKIV  fmt: 2012.10.5  int: english/english
> ...
> error: ...lone/tex/texmf-context/tex/context/base/font-otn.lua:347: Invalid 
> field id components for node type disc (3)
> .
> system  > tex > error on line 3 in file foo4580.tex: ? ...
> ….
> l.3 \section{iffer}
> 
> ?
> ! I can't go on meeting you like this.
> ...
> l.3 \section{iffer}
> 
> One of your faux pas seems to have wounded me deeply...
> in fact, I'm barely conscious. Please fix it and try again.
> 
> 
> 
> 
> This e-mail message (including any attachments) is for the sole use of
> the intended recipient(s) and may contain confidential and privileged
> information. If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination, distribution
> or copying of this message (including any attachments) is strictly
> prohibited.
> 
> If you have received this message in error, please contact
> the sender by reply e-mail message and destroy all copies of the
> original message (including attachments).
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

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

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


[NTG-context] Misplaced figure

2012-10-09 Thread Rogers, Michael K
Hi,

I wanted to start a proof with "Proof:" in italics and place a figure next to 
the right margin.  There are many ways to accomplish this, but my normal way, 
{\it Proof:\/}, fails.  Is this a bug or am I making a mistake?

\starttext
\startuseMPgraphic{ProofPQR}
numeric u; u:=2.5cm;
draw ((0, 0)--(1,0)--(1, 0.7)) scaled u withpen pencircle;
dotlabel.bot(textext("$P$"),(0,0)*u);
dotlabel.bot(textext("$R$"),(1,0)*u);
dotlabel.rt(textext("$Q$"),(1,0.7)*u);
\stopuseMPgraphic

% MISPLACED
\placefigure[right,none]{}{\useMPgraphic{ProofPQR}}
{\it Proof:\/}
\input knuth

\hairline
% WORKS
\placefigure[right,none]{}{\useMPgraphic{ProofPQR}}
%{\it Proof:\/}
\input knuth

\hairline
% WORKS
\placefigure[right,none]{}{\useMPgraphic{ProofPQR}}
\strut{\it Proof:\/}
\input knuth
\stoptext

Thanks,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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: header with a thick bottom line

2012-10-23 Thread Rogers, Michael K
One issue is that the overlay overlaps the text space (reduces whitespace or 
potentially overlaps letters).  One could use a blank row with a black 
background, but a row seems to have a minimum height of about 2mm.  I 
discovered the "boffset" key, which can be used with the overlay, but it's 
kludgy.

Perhaps there is a better way...

Michael


\startuseMPgraphic{MP:thickBtm}
 draw bottomboundary OverlayBox withpen pensquare scaled 
\frameddimension{bottomrulethickness};
 clip currentpicture to OverlayBox;
 setbounds currentpicture to OverlayBox;
\stopuseMPgraphic

\defineoverlay[OL:thickBtm][\useMPgraphic{MP:thickBtm}]

\starttext
 \bTABLE % Overlay method
   \setupTABLE[align=middle]
   % By eye, by trial: boffset = bottomrulethickness/2 - 0.2mm
   
\setupTABLE[header][background={OL:thickBtm},bottomrulethickness=3mm,boffset=1.3mm]
   \setupTABLE[row][4][background={OL:thickBtm},bottomrulethickness=1.5mm, 
boffset=.55mm]
   %
   \bTABLEhead\bTR\dorecurse{3}{\bTH#1\eTH}\eTR\eTABLEhead
   \bTABLEbody\dorecurse{6}{\bTR\dorecurse{3}{\bTD#1-##1\eTD}\eTR}\eTABLEbody
 \eTABLE
\stoptext




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] \overrightarrow{AB} gives under rightarrow

2012-11-02 Thread Rogers, Michael K
Hi,

It seems fixed with the current beta (2012.10.30 21:13) and broken with a beta 
from a week or two ago.  (I just updated after your example failed.)

-mkr

On Nov 2, 2012, at 6:09 AM, Jeong Dal mailto:hak...@me.com>>
 wrote:

Dear all.

The following short sample gives a under right arrow instead of over right 
arrow.
Would you please check it?

\starttext
$\overrightarrow{AB}$
\stoptext

Thanks.

Best regards,

Dalyoung


ConTeXt ver: 2012.10.06 15:31 MKIV fmt: 2012.10.8 int: english/english

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




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Is http://source.contextgarden.net/ down? [EOM]

2012-11-03 Thread Rogers, Michael K
I cannot get to it….




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Paths for ConTeXt in Texworks

2012-11-16 Thread Rogers, Michael K
On Nov 16, 2012, at 5:25 AM, "H. Özoguz"   wrote:
>
> So which paths I have to add to get the standalone version working with 
> texworks?
>

Have you tried the procedure in 
http://wiki.contextgarden.net/Setting_up_TeXworks ?

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Problems with Standalone ConTeXt

2012-11-18 Thread Rogers, Michael K
On Nov 18, 2012, at 8:30 AM, "H. Özoguz" 
 wrote:

> After installing the standalone version (was quite hard for me with 
> TexWorks), now several problems arises. The simplest document
>
> \starttext
> Test
> \stoptest
>
> compiles without problems. But my book gives now several errors. F.e.:
…
> This is pdfTeX, Version 3.1415926-2.5-1.40.13 (TeX Live 2012/W32TeX)
...

If you want to run MKIV, you need to select the  ConTeXt (LuaTeX)  typesetting 
option.  The output you posted shows you're using pdfTeX.  You can also create 
your own typesetting option (Edit > Preferences) that calls  /tex/texmf-osx-64/bin/context  directly with the argument  $fullname.

When I tried out TeXWorks after your post, I had to put the standalone binary 
path,  /tex/texmf-osx-64/bin, above  /usr/texbin.  It seems the 
scripts all run a program with the name "context" and the first one found in 
the path list is used.




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Odd bug with \startitemize

2012-11-18 Thread Rogers, Michael K
For some reason I used someone's earlier posting to test something about my tex 
software and accidentally happened upon this odd behavior.  If the 
\startitemize code below is repeated 10 or more times, either with \dorecurse 
or by pasting it ten times, only one is typeset.  If nine times, then all nine 
are typeset.  If "Some text" is un-commented, then all ten are typeset along 
with "Some text."  (If working with the pasted version, the "Some text" can 
appear after the first or second iteration, or before any iteration that 
appears on the first page, and all itemizations will appear.)

Michael

MWE:


\starttext
%Some text
\dorecurse{10}{
\startitemize

\item Find a well-ordered set.

\startitemize[n, columns, four][stopper=,left=(, right=)]
\item $\{ 2 + \frac{1}{n}, n \in\naturalnumbers\}$
\item $[0, 1)$
\item $\{3 - \frac{2}{n}, n \in \naturalnumbers\}$
\item $ \reals$
\stopitemize
\stopitemize
}

\stoptext




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Including movies in pdf files

2012-12-02 Thread Rogers, Michael K
On Dec 2, 2012, at 1:02 PM, Aditya Mahajan 
 wrote:

> On Fri, 30 Nov 2012, Aditya Mahajan wrote:
>
>> Hi,
>>
>> I was updating the wiki entry on \externalfigures 
>> (http://wiki.contextgarden.net/Command/externalfigure) and noticed that I 
>> cannot get ConTeXt to include a movie.
>>
>> [...]
>> So, does ConTeXt support including movies in pdf files, and if so, can 
>> someone provide a minimal working example.
>
> It appears to be a viewer issue.
>
> \pdfcompresslevel=0
> \setupinteraction[state=start]
> \starttext
> \externalfigure[clip.mov][height=2cm, width=2cm, preview=yes]
> \stoptext
>
> The pdf file has
>
> <<
> /Type /Annot
> /A << /ShowControls true >> /Subtype /Movie /T (movie clip.mov) /Border [ 0 0 
> 0 ] /Movie << /Poster true /Aspect [ 56.692913385827 56.692913385827 ] /F 
> (clip.mov) >>
> /Rect [70.867 657.6468 127.5599 714.3397]
>>>
>
> so, ConTeXt appears to be including the right annotation, but the viewer 
> (acroread) is not rendering the movie.

Your example works on my Mac with Adobe Reader 10.1.4, with one of my own .mov 
files substituted.  The pdf code is the same, except with a different filename.





This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Math not loaded?

2012-12-06 Thread Rogers, Michael K
The following gives the error with the latest beta:

! Math error: parameter \Umathquad\displaystyle is not set.

with or without setting the font.  Is there a quick fix?


%\usetypescript[pagella]
%\setupbodyfont[pagella,12pt]
\starttext
$f$
\stoptext


Thanks,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Math not loaded?

2012-12-06 Thread Rogers, Michael K
On Dec 6, 2012, at 8:39 AM, Mojca Miklavec 
 wrote:

> On Thu, Dec 6, 2012 at 2:29 PM, Hans Hagen wrote:
>>
>> are there messages on the console with respect to missing fonts?
>
> The font is now called "latinmodernmath-regular.otf". You need to
> change or add that name.

Yes, that's one it complains about for me (ConTeXt  ver: 2012.12.06 01:21 MKIV  
fmt: 2012.12.6  int: english/english).

Am I right to assume that Hans is the person to change this in a future beta, 
or is it something I can do?

Thanks for all the replies.

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] MetaPost Animations

2012-12-28 Thread Rogers, Michael K

On 12/28/2012 8:41 PM, Troy Henderson wrote:
> I've created several animations using MetaPost/ConTeXt, and I have also
> created a webpage with these animations.  The URL to the page is
>
> http://www.tlhiv.org/animations/
>
> Feedback is appreciated, and if there is a particular animation that you
> would like to see included, let me know and I will attempt to code them
> up in MetaPost, provide the source code, and include them on the webpage.

Neat.  MP -> Flash seems to work well.

One thing, which you may know, gear teeth do not normally have rectangular 
profiles.  Nowadays, they are usually involutes of a circle and formerly were 
usually cycloids (so the gears don't slip against each other when they turn).  
I don't have a reference, but google turned up 
http://www.cadquest.com/books/pdf/gears.pdf, which shows how to draw involute 
gears.

Are you using the animations, or some frames perhaps, in a ConTeXt document?  I 
usually use Mathematica for such animations, but it and its ilk are expensive, 
although there are other alternatives.  As I'm still learning MP/Lua/ConTeXt, 
I'm just interested in the ways others use the system.

Thanks for sharing.

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] MetaPost Animations

2012-12-28 Thread Rogers, Michael K
On Dec 28, 2012, at 3:49 PM, Troy Henderson 
mailto:thend...@gmail.com>> wrote:

One thing, which you may know, gear teeth do not normally have rectangular 
profiles.

This must be what Hans was talking about.

I thought Hans was talking about the animations of the construction of Bezier 
curves, which are pretty cool.

Thanks again for the response.



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] MetaPost Animations

2013-01-07 Thread Rogers, Michael K

On Jan 7, 2013, at 11:46 AM, Marco Patzer 
mailto:home...@lavabit.com>> wrote:

On 2013–01–07 Troy Henderson wrote:

http://www.tlhiv.org/animations

There is one in particular that, I think, is quite impressive.  It is an
animation of a function f(x,y,t) where t is time.

I love that one. Very impressive, indeed! Although my browser
flickers for about 20s until it eventually starts, but that might
just be my flash player.

That is cool!  I think the flicker is from loading all the polygons.  Once it 
cycles through once or twice, they're all loaded and it plays smoothly.  (Or so 
it appears in my browser.)



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Any ConTeXt-Lua changes

2013-01-14 Thread Rogers, Michael K
Hi,

I wrote Lua routines a while back that parse a string representation of a 
weekly schedule to create a table representation of the schedule.  It worked 
last fall.  Certainly in August, 2012 and I think at least as late October.  I 
just tried it again, but it failed; and it failed on the same file it worked on 
before.

Before I roll up my sleeves and starting digging through the code, I was 
wondering if something had changed in the last two or three months that I 
should know about.  No MWE for you, but here's the ConTeXt command that sends 
an ID (#1) and a parameters (#2) to Lua

\def\defineschedule{\dodoubleempty\dodefineschedule}
\def\dodefineschedule[#1][#2]{\ctxlua{userdata.schedule.new("#1","#2")}}

Thanks for any tips,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Any ConTeXt-Lua changes

2013-01-14 Thread Rogers, Michael K
The error is basically that a variable is 'nil'.  I figure it's my job to track 
down why -- the code is long and boring and sometimes complicated.  I just 
thought if there's been some change in how parameters are passed or strings 
handled.  A typical use would be

\defineschedule[test][sched={M--Th 8.05a--9:20,1:45--2:30}]

The 'sched' is parsed to {day, interval = {start, stop}} pairs and stored in a 
table.  It seems the interval table is nil now, but it used to work.  Here's 
the actual error:

! LuaTeX error [string "\directlua "]:529: attempt to index field '?' (a nil 
value)
stack traceback:
[string "\directlua "]:529: in function 'dotablerow'
[string "\directlua "]:658: in function 'tablefromschedule'
[string "\directlua "]:1: in main chunk.

system  > tex > error on line 58 in file Syllabus112.tex: LuaTeX error  
…

I thought something must have changed, since nothing has changed in the 
syllabus file or the module file, since a couple of months ago.  If nothing 
occurs to anyone, I'll just have to trace it down.  Thanks in any case, whether 
you can think of something or not.


On Jan 14, 2013, at 9:21 AM, Wolfgang Schuster 
 wrote:

>
> Am 14.01.2013 um 15:08 schrieb "Rogers, Michael K" :
>
>> Hi,
>>
>> I wrote Lua routines a while back that parse a string representation of a 
>> weekly schedule to create a table representation of the schedule.  It worked 
>> last fall.  Certainly in August, 2012 and I think at least as late October.  
>> I just tried it again, but it failed; and it failed on the same file it 
>> worked on before.
>>
>> Before I roll up my sleeves and starting digging through the code, I was 
>> wondering if something had changed in the last two or three months that I 
>> should know about.  No MWE for you, but here's the ConTeXt command that 
>> sends an ID (#1) and a parameters (#2) to Lua
>>
>> \def\defineschedule{\dodoubleempty\dodefineschedule}
>> \def\dodefineschedule[#1][#2]{\ctxlua{userdata.schedule.new("#1","#2")}}
>
> What’s the error message, there is no way to tell what’s wrong with only 
> these two code lines.
>
> 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
> ___




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] PDF Bookmarks

2013-01-26 Thread Rogers, Michael K
On Jan 26, 2013, at 1:01 PM, Troy Henderson 
 wrote:

> I would like to create PDF bookmarks in my ConTeXt document, but I do not 
> want my document arranged in "normal" chapter/sections.  I know that I can do
>
> \setupinteraction[state=start]
> \placebookmarks[chapter,section,subsection][chapter,section]
> \setupinteractionscreen[option=bookmark]
>
> and then in my document I can do
>
> \chapter{Foo}
>
> In this case, my PDF bookmark appears as "1 Foo".  Furthermore, in the 
> document itself, the chapter heading shows as "1 Foo".  I would like the 
> bookmark to just appear as "Foo" and I do not want ANY chapter/section 
> headings when I issue the \chapter{Foo} or \section{Bar} commands.  That is, 
> in the document, I would like those commands to basically JUST create the 
> bookmarks and have the bookmarks omit the chapter/section number.
>
> Troy

Try this:

\setuphead[chapter,section,subsection][number=no,placehead=no]





This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] PDF Bookmarks

2013-01-26 Thread Rogers, Michael K
On Jan 26, 2013, at 4:21 PM, Troy Henderson 
 wrote:

> \chapter{Foo}\page[no]
> \copypages[path/to/file.pdf]
>
> did the trick.
>
> Troy

This should work, too:

\setuphead[chapter,section,subsection][number=no,placehead=no,page=no]





This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Math typesetting problems

2013-01-27 Thread Rogers, Michael K

On Jan 27, 2013, at 7:09 AM, Sietse Brouwer 
 wrote:

> This is because \startformula can take one optional argument in square
> brackets, and [x,x] is interpreted as that argument. You can make
> \startformula stop looking for [...] either by telling it to `\relax`,
> or by giving it an empty `[]` of its own to chew on.
>
> ...
>
> I can't quite find at the moment what sort of options the [...] can
> contain, sorry.

It takes the same options as \switchtobodyfont

\starttext
\startformula[]
[x,x]_t = x
\stopformula
\startformula[small]
[x,x]_t = x
\stopformula
\startformula[24pt]
[x,x]_t = x
\stopformula
\stoptext





This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] block with different formatting per line?

2013-02-02 Thread Rogers, Michael K

On Feb 1, 2013, at 6:16 PM, Ingo Hohmann  wrote:

> Hi,
>
> is it possible to define a block, where lines are automatically formatted 
> differently?
> For example:
> first line in caps,
> second in bold,
> others normal.
>
> Is this possible? And how?

If you mean input lines, then yes.  But if you mean output lines, then I don't 
know.  It seems a well-defined task, but a hard task judging by how the 
line-breaking algorithm is described by Knuth.  I'll leave that question to 
experts.

Here's a way to process the input lines.  If there's a counter that counts the 
line number, there would be another way; but I couldn't find out that there was 
a counter.  There may be better ways anyway.

\define\FirstLine{\let\myLine\SecondLine\sc}
\define\SecondLine{\let\myLine\OtherLine\bf}
\define\OtherLine{\tf}
\definelines[doMyLines][command=\myLine]
\def\startMyLines{\let\myLine\FirstLine\startdoMyLines}
\def\stopMyLines{\stopdoMyLines}

\starttext

\startMyLines
First line in caps,
Second in bold,
Others normal.
Others normal.
Others normal.
\stopMyLines

And again:

\startMyLines
First line in caps,
Second in bold,
Others normal.
Others normal.
Others normal.
\stopMyLines

\stoptext

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] \goto links to figures are inactive

2013-02-02 Thread Rogers, Michael K
Hi Alan,

Try something like this:

\setupinteraction[state=start]

\starttext
\define[1]\MyCaptions{My caption is \quotation{#1}}
%\define[1]\MyCaptions{} % gives empty caption
\setupcaptions[command=\MyCaptions]
\startplacefigure[reference=fig:cow.pdf,title=Figure 
A][here,page,force,nonumber]
\externalfigure[cow.pdf][width=.5\textwidth]
\stopplacefigure

\page
See \goto{that cow}[fig:cow.pdf]

\stoptext


Beware it changes all captions.  I suppose you might use setups if you need 
different kinds of captions.  You can also see from the first definition of 
\MyCaptions that the key 'command' was not intended to be used that way, which 
makes me wonder whether this will work for you or not.  I hope it does.

Michael


On Feb 2, 2013, at 1:12 PM, Alan Bowen 
mailto:bowenala...@gmail.com>>
 wrote:

Hi, Otared—

I am using MKIV. Many thanks for the news about the changes to \placefigure and 
the sample alternative: that is very helpful and much appreciated.

The only problem remaining is how to cancel the automatic titling/numbering. In

\startplacefigure[reference=fig:cow.pdf,title=Figure 
A][here,page,force,nonumber]
\externalfigure[cow.pdf][width=.5\textwidth]
\stopplacefigure

the output has two titles (“Figure 1” and “Figure A”).

I have checked the wiki (which does not show this as a possibility) and 
experimented with “nonumber” and “number=no”, all without success. 
\setupcaptions[number=no] gets rid of “Figure 1” but while the links show 
properly, they do not actually work.

Alan

On Sat, Feb 2, 2013 at 11:16 AM, Otared Kavian 
mailto:ota...@gmail.com>> wrote:
Hi Alan,

I guess you are using mkiv, since in mkii your code seems to work here.
Then, I think the way references to floats should be entered have changed and 
one should use a construction such as:

\setupinteraction[state=start]

\starttext
\goto{Figure A}[fig:cow.pdf]

Reference to Figure A on page \at[fig:cow.pdf]

\goto{Table 1}[tab:Table01]

\goto{Some text}[Text]

\page
\startplacefigure[reference=fig:cow.pdf,title=Figure 
A][here,page,force,nonumber]
\externalfigure[cow.pdf][width=.5\textwidth]
\stopplacefigure
\page
\startplacetable[reference=tab:Table01,title=Table 1][here,force,nonumber]
{\starttabulate[| l | l |]
\NC 1000
\NC 2000
\NC\NR
\stoptabulate}
\stopplacetable

\page
Some text\reference[Text]{}
\stoptext

which gives appropriate working links.
There should be also a short version of \placefigure or \placetable, but I 
don't remember the correct syntax… Sorry!

Best regards: OK

On 2 févr. 2013, at 14:25, Alan Bowen 
mailto:bowenala...@gmail.com>> wrote:

Sorry to keep pushing this—it is a problem for a journal that I publish.

I have re-installed the ConTeXt standalone and the problem persists with

\setupinteraction[state=start]

\starttext
\goto{Figure A}[fig:cow.pdf]

Reference to Figure A on page \at[fig:cow.pdf]

\goto{Table 1}[tab:Table01]

\goto{Some text}[Text]

\page
\useexternalfigure[Graphic][cow.pdf][]
\placefigure [here,page,force,nonumber]
[fig:cow.pdf]
  {Figure A}
{\externalfigure[cow.pdf][type=pdf,
width=.5\textwidth]}
\page
\placetable [here,force,nonumber]
[tab:Table01]
{Table 1}
{\starttabulate[| l | l |]
\NC 1000
\NC 2000
\NC\NR
\stoptabulate}

\page
Some text\reference[Text]{}
\stoptext

Only the last \goto works. Even the \at link fails, which is really 
discouraging.

Alan



On Thu, Jan 31, 2013 at 8:28 AM, Alan Bowen 
mailto:bowenala...@gmail.com>> wrote:
The problem persists with the latest beta. Am I not encoding this properly?

And in such cases, should one include a sample .pdf file as well?

Alan


On Wed, Jan 30, 2013 at 8:17 AM, Alan Bowen 
mailto:bowenala...@gmail.com>> wrote:
The following compiles in the latest beta standalone but with dead links to the 
Figure:

\setupinteraction[state=start]
\starttext
\goto{Figure A}[fig:Figure.pdf]

\goto{Text A}[TextA]
\page
\useexternalfigure[Graphic][Figure.pdf][]
\placefigure
[here,page,force,nonumber]
[fig:Figure.pdf]
  {Figure A}
{\externalfigure[Figure.pdf][type=pdf,
width=\textwidth]}

\reference[TextA]{}
\input knuth
\stoptext

Any suggestions?

Alan


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

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


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

maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade

Re: [NTG-context] block with different formatting per line?

2013-02-06 Thread Rogers, Michael K

On Feb 6, 2013, at 1:04 AM, Ingo Hohmann 
mailto:cont...@ingohohmann.de>> wrote:

On 02/03/2013 04:56 AM, Rogers, Michael K wrote:

On Feb 1, 2013, at 6:16 PM, Ingo Hohmann 
<mailto:cont...@ingohohmann.de> wrote:



Hi,

is it possible to define a block, where lines are automatically formatted 
differently?
For example:
first line in caps,
second in bold,
others normal.

Is this possible? And how?


If you mean input lines, then yes.  But if you mean output lines, then I don't 
know.  It seems a well-defined task, but a hard task judging by how the 
line-breaking algorithm is described by Knuth.  I'll leave that question to 
experts.

Here's a way to process the input lines.  If there's a counter that counts the 
line number, there would be another way; but I couldn't find out that there was 
a counter.  There may be better ways anyway.

\define\FirstLine{\let\myLine\SecondLine\sc}
\define\SecondLine{\let\myLine\OtherLine\bf}
\define\OtherLine{\tf}
\definelines[doMyLines][command=\myLine]
\def\startMyLines{\let\myLine\FirstLine\startdoMyLines}
\def\stopMyLines{\stopdoMyLines}


As I said that works, but while trying to understand this, I found that the 
documentation for \definelines doesn't mention the "command=" option. On the 
other hand it does mention "align=" and this doesn't work. Neither does 
\setuplines.

I figured it out from the source, spac-lin.mkiv.  One might see there that the 
"align" key does not seem to be processed; it s a relic from a previous version 
of ConTeXt, I suppose.  Many macros have a "command" key, which usually seems 
to be a method for customizing the basic unit, in this case a line.  (The 
source is written in a certain style that makes it possible often to figure 
things out, even when the wiki is not up-to-date.  I say "possible" but not 
always easy.  And there's always this maillist.)



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] Math \not

2019-09-07 Thread Rogers, Michael K
In plain TeX you can get a slash through $\equiv$ with $\not\equiv$.  When I do 
the same in ConTeXt, the slash next to the $\equiv$.  Is there a way to get a 
not-equivalent sign in ConTeXt?

Thanks,

- Michael

\starttext
$\not\equiv$
\stoptext




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] [External] Re: Math \not

2019-09-07 Thread Rogers, Michael K
Thanks! I should have tried that.  -mkr

> On Sep 7, 2019, at 12:59 PM, Otared Kavian  wrote:
> 
> Hi you should use \nequiv as in
> 
> \starttext
> Let $f \nequiv 0$ be a function
> \stoptext
> 
> Best regards: OK
> 
>> On 7 Sep 2019, at 18:35, Rogers, Michael K  wrote:
>> 
>> In plain TeX you can get a slash through $\equiv$ with $\not\equiv$.  When I 
>> do the same in ConTeXt, the slash next to the $\equiv$.  Is there a way to 
>> get a not-equivalent sign in ConTeXt?
>> 
>> Thanks,
>> 
>> - Michael
>> 
>> \starttext
>> $\not\equiv$
>> \stoptext
>> 
>> 
>> 
>> 
>> This e-mail message (including any attachments) is for the sole use of
>> the intended recipient(s) and may contain confidential and privileged
>> information. If the reader of this message is not the intended
>> recipient, you are hereby notified that any dissemination, distribution
>> or copying of this message (including any attachments) is strictly
>> prohibited.
>> 
>> If you have received this message in error, please contact
>> the sender by reply e-mail message and destroy all copies of the
>> original message (including attachments).
>> ___
>> 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
> ___

___
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] Command completion in TeXShop

2019-09-19 Thread Rogers, Michael K
I was looking into command completion in TeXShop (MacOS) and came across this 
two-year-old call for help by one of the developers (I assume) for implementing 
it for ConTeXt:

http://macosx-tex.576846.n2.nabble.com/TeXShop-Command-Completion-ConTeXt-td7586673.html

As far as I found, command completion for ConTeXt has not yet been implemented. 
I’m pointing this out in case someone has sufficient knowledge of ConTeXt and 
is interested. Alternatively, perhaps it has been done, and someone can point 
me in the right direction.

Thanks,

Michael



This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___
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] [External] special case of hskip...?

2021-09-28 Thread Rogers, Michael K via ntg-context
Can you stick "\phantom{Introduction:}"  in front of “DIsability”?

Michael

> On Sep 28, 2021, at 11:08 PM, jbf via ntg-context  wrote:
> 
> In just one instance I would like the following to work differently:
> 
> \startchapter[title={Introduction\\Disability and 
> marginalisation},list={Introduction:\crlf Disability and marginalisation}].
> 
> That gives me:
> 
> Introduction:
> Disability and marginalisation
> 
> But I would like to have:
> 
> Introduction:
> Disability and marginalisation
> 
> Is there some way I can provide a space (whose amount I can determine 
> specifically) after the \crlf in list={}? Effectively I am trying to provide 
> a space at the beginning of a line, and I know I can't use \indentation or 
> similar here.
> 
> I may have to do it back at the preamble level by setting up a different kind 
> of \setuphead, but I was hoping that in just this one case I could do it 
> inside the existing setup.
> 
> Julian
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ntg.nl%2Fmailman%2Flistinfo%2Fntg-context&data=04%7C01%7Cmroge02%40emory.edu%7Cd3ee036baef14a0a7b1e08d982f6796a%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C637684818294886446%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=H8fboaArho8j7xXLUKeE0DVLRdFrUpqU6bVD3xiC1KA%3D&reserved=0
> webpage  : 
> https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pragma-ade.nl%2F&data=04%7C01%7Cmroge02%40emory.edu%7Cd3ee036baef14a0a7b1e08d982f6796a%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C637684818294886446%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=i2QT5FCZ3W9Het59v8N7gHdWZR%2BEQFBSskz10uep71Q%3D&reserved=0
>  / 
> https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcontext.aanhet.net%2F&data=04%7C01%7Cmroge02%40emory.edu%7Cd3ee036baef14a0a7b1e08d982f6796a%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C637684818294886446%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=w6LxBKRsOc7MyBCYT6AvoePEgs6EbC8Uhdlj08nO6Gw%3D&reserved=0
> archive  : 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fphg%2Fcontext-mirror%2Fcommits%2F&data=04%7C01%7Cmroge02%40emory.edu%7Cd3ee036baef14a0a7b1e08d982f6796a%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C637684818294896440%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vOPJYlZeb0xh9Empn6375r7roMzB%2F3u%2B9nUWz24ISaQ%3D&reserved=0
> wiki : 
> https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcontextgarden.net%2F&data=04%7C01%7Cmroge02%40emory.edu%7Cd3ee036baef14a0a7b1e08d982f6796a%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C637684818294896440%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=yE%2BbqpTLsZoGPWJPzddhBCZ803EhbUDuKwSAKSFdv80%3D&reserved=0
> ___

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