[NTG-context] Fwd: Former YY Lucida fonts available from TUG

2005-12-11 Thread Brooks Moses

Hello!

The following message was posted to comp.text.tex yesterday; I thought some 
of you who don't read the newsgroup regularly would like to hear about it, 
and so I'm passing it along.


For those who haven't been following the story: Since the demise of YY, 
there hasn't been a place to obtain a legal copy of their Lucida font 
distribution, which was the only place to get the Lucida New Math fonts 
needed for doing TeX math properly in Lucida.  TUG has been in negotiations 
with the relevant copyright holders for a while in order to be able to 
distribute the fonts; this has finally come to fruition, and the fonts are 
now available again -- for prices considerably lower than what I gather YY 
charged, and with a license that allows embedding the fonts in PDF files.


- Brooks




Subject: Lucida fonts available from TUG
Date: 10 Dec 2005 15:26:44 -0800
From: Karl Berry [EMAIL PROTECTED]
Newsgroups: comp.text.tex

Hi everyone,

The Lucida fonts are now available through TUG; visit
http://tug.org/lucida if you're interested.

In short, the complete set offered by TUG is exactly the
same 41 Lucida fonts which YY sold.  (The pfb's are
completely unchanged.)  There is also a basic set with 22
fonts -- all the math fonts and the essential text fonts.
Both individual and site licenses are available.  There is a
substantial discount for TUG members.

Due to legal and overhead considerations, we aren't
currently planning to offer the fonts one at a time, or in
any other bundles.  Hopefully the price is low enough that
this will not be a significant problem.

The Lucida TeX support metrics and lucidabr (psnfssx) macros
have been (slightly) updated.  They have been uploaded to
CTAN and should appear there in due course.  Of course all
the support files are included in the downloads from tug;
they're on CTAN primarily for the benefit of YY users who
already have the fonts.

We have also established a mailing list [EMAIL PROTECTED] for
user questions, suggestions, bug reports, etc.  Please feel
free to post and/or join.
http://tug.org/mailman/listinfo/lucida

A separate address, [EMAIL PROTECTED], should be used for
licensing, billing, and other such admin questions.

Font samples, documentation, and more are available on the
web site.

Although we still expect to offer a license upgrade for YY
users, this has proven legally complicated, so it's not
online quite yet.  I'll post again when it is ready; it
might be a few more weeks, given the holidays (and lawyers'
usual working pace, anyway :).  I didn't want this to delay
making the fonts available, so decided to go ahead.

Major thanks to Chuck Bigelow and Kris Holmes for generously
allowing TUG to offer this to the TeX community - and
especially for designing this remarkable typeface in the
first place.  Also thanks to Walter Schmidt for creating and
updating the TeX font support files, PCTeX for sponsoring
him and allowing his work to be redistributed, and to Morten
Hoegholm for working on the samples and other TeXnical help.

Happy Lucida holidays,
Karl

(R) Lucida is a trademark of Bigelow  Holmes
Inc. registered in the U.S. Patent  Trademark Office and
other jurisdictions.

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


Re: [NTG-context] formatting \note output

2005-09-22 Thread Brooks Moses

At 04:18 AM 9/22/2005, Alan Bowen [EMAIL PROTECTED] wrote:

Though I have asked this question before and there was no response, I
thought I would ask the following once more (before going through my
source files and making the changes by hand).

Does anyone know how to modify or adapt \note so that the output is a
footnote number in normal/body text format---e.g., (ref.\ \note [lemur]) 
becomes (ref.\ 9)---rather than a superscripted numeral?


As I noted on the Wiki's footnotes page when I discovered this, \note is 
basically equivalent to the standard \in function for accessing references, 
except that it typesets the result as a superscript.


Thus, you can use \in rather than \note to reference a footnote number in 
normal format -- e.g., (ref.\ \in[lemur]), for your example, though using 
(\in{ref.}[lemur]) will do a better job with any hyperlinks, since the 
word ref. will be included in the hyperlink.  And, if for some bizarre 
reason you want to reference a section number by setting it as a 
superscript, you can use \note instead of \in for that.


- Brooks

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


Re: [NTG-context] Re: Small matrices

2005-09-18 Thread Brooks Moses

At 12:41 PM 9/18/2005, Hans Hagen wrote:

David Arnold wrote:

In amsmath, there is

\begin{smallmatrix}

\end{smallmatrix}

Don't know how in Context. I'll find out.

Does anyone on the context list know how to do this?


\usemodule[newmat]

\startsmallmatrix
\stopsmallmatrix


what is a small matrix? small font?


Look in the m-newmat.tex file -- according to the comments, you had exactly 
the same question about what it was supposed to be when you implemented 
it!  (It's a copy of the AMSmath declaration, I believe.)


In any case, it's a simplified matrix using only one column and using 
scriptsize fonts -- it's intended for constructions where you have a 
multi-line subscript on something like a summation.


- Brooks

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


Re: [NTG-context] Re: Small matrices

2005-09-18 Thread Brooks Moses

At 01:15 PM 9/18/2005, Brooks Moses wrote:

At 12:41 PM 9/18/2005, Hans Hagen wrote:

what is a small matrix? small font?


Look in the m-newmat.tex file -- according to the comments, you had 
exactly the same question about what it was supposed to be when you 
implemented it!  (It's a copy of the AMSmath declaration, I believe.)


In any case, it's a simplified matrix using only one column and using 
scriptsize fonts -- it's intended for constructions where you have a 
multi-line subscript on something like a summation.


Sorry -- I should have looked this up first; I got the descriptions 
wrong.  The subarray environment is the one that does that; the 
smallmatrix array is exactly what David described -- a matrix environment 
set in scriptsize font with tight linespacing, intended for use within a 
text line.


In any case, your question about what does this do? in the m-newmat.tex 
comments applies to both.  :)


- Brooks

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


Re: [NTG-context] lgrind...

2005-09-13 Thread Brooks Moses

At 01:44 AM 9/13/2005, Taco Hoekwater wrote:

Andre van der Vlies wrote:

I use 'lgrind' to format my 'source code' (C, python, sricpts, etc.). I
like the  'layout' (highlighting, line numbering...). Is there something
equivalent (or better :) in/for ConTeXt?


I personally do not know of anything that is comparable right away, but
I could be wrong.


I don't know of anything either.  The LaTeX listings package is mostly 
just TeX at its core, so it's feasible to think of translating it -- but, 
even if it's only 5% LaTeX, that's still quite a lot of code, so it's still 
a good bit of work!


The lgrind documentation does refer to an earlier tgrind which worked in 
Plain TeX; this might also work in ConTeXt.



Side note: I looked at the source of lgrind and it looks rather simple,
so it may be possible to replace the lgrind executable with a perl (or
ruby) script that can be targeted at ConTeXt as well as LaTeX.


In my opinion, that would be a useful thing, since lgrind itself is 
non-free.  (Specifically, it's based on code with a no-commercial 
license.)  An implementation that was careful to avoid any literal copying 
would get around that, and be a useful thing to have.


Meanwhile, though, after looking through the code, I don't think there's 
actually much need to modify the executable.  Lgrind mostly doesn't write 
LaTeX (which is why Andre found it so obscure) -- it writes TeXcode that 
uses its own simple commands, which are then defined in lgrind.sty.  To use 
Lgrind in ConTeXt, one needs to translate the style file into a 
t-lgrind.tex, at which point the same Lgrind output files can be used in 
both systems.


If you do re-implement it as a Python script, I would suggest keeping 
things similarly flexible, as it would be good to be able to use the 
re-implementation in LaTeX as well (due to the aforementioned license 
issues, an also just because it's convenient to be able to use the same 
system, for those of us likely to be writing papers in LaTeX and 
presentations in ConTeXt).


- Brooks

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


Re: [NTG-context] lgrind (An intro to LaTeX package conversion)

2005-09-13 Thread Brooks Moses
(Andre: I'm sending this reply back to the ConTeXt list, because I think a 
fair bit of my reply might be generally useful to other people who want to 
try to convert LaTeX packages to ConTeXt.  I hope that's ok!)


At 01:58 PM 9/13/2005, Andre van der Vlies wrote:

Brooks Moses said:
 Meanwhile, though, after looking through the code, I don't think there's
 actually much need to modify the executable.  Lgrind mostly doesn't write
 LaTeX (which is why Andre found it so obscure) -- it writes TeXcode that
 uses its own simple commands, which are then defined in lgrind.sty.  To
 use
 Lgrind in ConTeXt, one needs to translate the style file into a
 t-lgrind.tex, at which point the same Lgrind output files can be used in
 both systems.

Hmmm, that sure sounds promising. I've just recently using ConTeXt, this
week actually. I am trying to rebuild a, few paged, LaTeX document which
is typical for me...

I think that renaming the 'sty' file will not be enough :-/


Not really, no.  Though it's potentially a start.  What you'll need to do 
then is to translate all of the LaTeX bits in it to ConTeXt bits.


(Also, it may be easier to start with the lgrind.dtx file, since that has 
all the comments that explain what's going on.)



Thus, I produce a t-lgrind.tex, which I can \input and henceforth use
something like \plasterthis{fine.grind}?


I should perhaps have explained that more thoroughly.  ConTeXt has 
modules, which are roughly equivalent to LaTeX's packages; the filename 
t-lgrind.tex indicates a module.  (Specifically, the t- prefix 
indicates that it's a third-party module, which is everything other than 
the modules that are actually part of ConTeXt itself.)


Thus, you'd use it with \usemodule[lgrind] rather than \input.  It amounts 
to pretty much the same thing, except ConTeXt does keep track of things so 
as not to load it twice, and things like that.


One big difference is that LaTeX puts all package code in a \makeatletter / 
\makeatother block.  ConTeXt doesn't do this, so you need to put those in 
manually -- the ConTeXt equivalent is \unprotect / \protect (which also 
allow ! and ? in macro names, along with @).



Or, am I on the wrong track???

I sure need to to a lot of reading...


Feel free to ask questions, too!

Some information to get you started:

= An introduction to translating packages to modules =
(As exemplified by a detailed discussion of lgrind.dtx)

First, copy everything in lgrind.dtx from about line 609 (Implementation 
of Lgrind) to the end of the file into t-lgrind.tex.


Put a \unprotect command at the beginning, and a \protect command at the 
end, so that you can use @ in macro names.


\newcommand and \renewcommand are LaTeX-specific.  The easiest way to deal 
with this is to simply replace it with TeX \def macros, though that loses 
the error messages that come from checking whether the command exists or not.


\DeclareOption is LaTeX's way of handling package options.  For a first 
pass, it's probably easiest to just delete these.  (Or, if you usually use 
the option, then include the option's code directly.)


All of the \sffamily, \rmfamily, \itshape, and other font formatting 
commands on lines 727-736 are LaTeX-specific; you can replace them with the 
ConTeXt equivalents, which are on a Wiki page on Basic Text Formatting.


I'm not sure whether \normalfont (lines 893, 901, and so forth) is 
LaTeX-specific or not.  You might have to replace that with the ConTeXt 
equivalent.


At line 818, the lgrind environment is defined.  The \newenvironment 
command is definitely a LaTeXism; you'll want to replace that with 
definitions for \startlgrind and \stoplgrind.


The use of the minipage and figure environments in lines 1060 or so and 
later are going to require a bit of looking at to figure out how to best 
replace them with ConTeXt equivalents.  Luckily, it looks like these are 
some of the advanced bits, so you could just not worry about this until 
you've got the basic lgrind environment working.


And I think that should do it.  There may be a few other LaTeXisms in the 
file that I missed, but a bit of testing should find those


= end =

Probably by the time you've done that, you'll have had quite a thorough 
introduction to ConTeXt!  :)


- Brooks

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


Re: [NTG-context] Matrices LaTeX - ContTeXt

2005-09-12 Thread Brooks Moses

At 01:40 AM 9/12/2005, Jilani Khaldi wrote:

Hi All,
how tow write these matrices in Context?

% []
\begin{bmatrix}
12\\
34
\end{bmatrix}


ConTeXt uses Plain TeX syntax for math, mostly.  Thus, you use Plain TeX's 
\matrix command to create the matrices:


\left[\matrix{
  12 \cr
  24 \cr
}\right]


% {}
\begin{Bmatrix}
12\\
34
\end{Bmatrix}


\left\lbrace\matrix{
  12 \cr
  34 \cr
}\right\rbrace

Hope that helps,
- Brooks

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


Re: [NTG-context] free keycaps font

2005-09-12 Thread Brooks Moses

At 02:16 PM 9/12/2005, you wrote:

I'm not sure what you mean by lay closer to a standard baseline. The
baseline of the glyph inside the key is aligned with text outside the
key. I waffled back and forth trying to find the most attractive
position while building the font. The majority of keycaps fonts I looked
at chose the same baseline.

I welcome any tweaking. Especially the addition of keys from other
keyboard layouts.


It occurs to me that one thing that would be particularly useful in a 
keycaps font would be pieces from which one could construct a key around 
a letter from another font -- specifically, a left side, a right side, and 
a middle portion made up only of purely horizontal lines so as to be 
extensible.  One could potentially also have these in short and tall 
versions, depending on how the rest of the font worked.


- Brooks

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


Re: [NTG-context] free keycaps font

2005-09-12 Thread Brooks Moses

At 02:16 PM 9/12/2005, you wrote:

On Mon, 2005-09-12 at 23:08 +0200, Nikolai Weibull wrote:
 Very nice!  I would like them to lay closer to a standard baseline,
 though,

I'm not sure what you mean by lay closer to a standard baseline. The
baseline of the glyph inside the key is aligned with text outside the
key. I waffled back and forth trying to find the most attractive
position while building the font. The majority of keycaps fonts I looked
at chose the same baseline.


Having looked at the uploaded .pdf, I agree: very nice!

I do agree with Nikolai that there appears at first glance to be a bit of a 
baseline problem.  As you mention, though, the baselines are right.  The 
actual difficulty, in my opinion, is that the font is just a bit too small, 
and so the _tops_ of the keys are too low -- it looks odd for them to be 
lower than the tops of the capital letters, when the depth of the keys is 
so large.


Here's what I would suggest for the enlargement amounts: consider the 
examples where you have a key enclosed in parentheses.  The bottom of the 
key drops below the bottom of the parentheses just a bit, which in my 
opinion looks quite good.  I think it would be good to enlarge the font so 
that the top of the keys extend above the tops of the parentheses by an 
equal amount, so that this would look balanced -- in other words, so that 
the vertical center of the keys is aligned with the math 
axis.  (Admittedly, this does mean realigning the baselines, rather than 
just scaling the font.)


This enlargement would also hopefully enable you to make the text within 
the keys larger -- at present, they're just barely legible on my 
1280-pixel-wide monitor when I have the sample sheet sized to 
full-secreen-width.


Aside from that quibble, though, they do look quite good.

- Brooks

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


Re: [NTG-context] \begin{cases} .. \end{cases} in ConTeXt

2005-09-12 Thread Brooks Moses

At 04:42 PM 9/12/2005, you wrote:

I have tried with:

\startcases
.. \stopcases

and many others variations but I have got only errors.
Any hint?


Much like the bmatrix environment, the cases environment is an AMSmath 
package feature, and ConTeXt at present has very few of the direct 
equivalents to those implemented.  You'll need to make this one up with a 
Plain TeX \matrix, as well.  (The TeXbook is a pretty good reference for this.)


Something like this should work, to recreate the example from page 8 of the 
AMSmath manual:


  P_{r-j} =
  \left\lbrace
\matrix{
   0 \hfill \text{if $r-j$ is odd}   \hfill\cr
   r!(-1)^{(r-j)/2}  \hfill \text{if $r-j$ is even}  \hfill\cr
}
  \right.

The \left\lbrace and \right. create the properly expanded brace at the 
left, the \matrix handles putting things in the right places, the \hfills 
make each of the columns left-aligned, and the \text{} commands (which _do_ 
exist in ConTeXt, unlike in Plain TeX) typeset their arguments as text 
rather than math.


- Brooks

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


Re: [NTG-context] \begin{cases} .. \end{cases} in ConTeXt

2005-09-12 Thread Brooks Moses

At 04:58 PM 9/12/2005, Brooks Moses wrote:

At 04:42 PM 9/12/2005, Jilani Khaldi [EMAIL PROTECTED] wrote:

I have tried with:

\startcases
.. \stopcases

and many others variations but I have got only errors.
Any hint?


Much like the bmatrix environment, the cases environment is an AMSmath 
package feature, and ConTeXt at present has very few of the direct 
equivalents to those implemented.  You'll need to make this one up with a 
Plain TeX \matrix, as well.  (The TeXbook is a pretty good reference for this.)


I should follow my own advice!  As the TeXbook points out, Plain TeX has a 
perfectly good \cases command which is also present in ConTeXt, and which 
you use like this:


  P_{r-j} =
  \cases{
   0  if $r-j$ is odd,\cr
   r!(-1)^{(r-j)/2}   if $r-j$ is even.\cr
}

Note that, in this version, the text in the second column is _not_ enclosed 
in a \text command; the \cases command handles that automatically.


In any case, the output is identical to the previous version I gave you, 
but this is easier to type.


- Brooks

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


Re: [NTG-context] Some Footnote Questions (from the Wiki)

2005-09-09 Thread Brooks Moses

At 10:40 AM 9/9/2005, Christopher Creutzig wrote:

Brooks Moses wrote:
 Not quite, as it doesn't generate a number I can reference.  What I'm
 thinking of is something that does what \nomarkfootnote does in the
 following example:

   A sentence\footnote{With a note\note[footB].}.\nomarkfootnote[footB]{And
   another.}

\starttext
A sentence\footnote{With a note.\note[footB]}\footnotetext[footB]{And
another.}
\stoptext

works for me, assuming I interpreted your wish correctly.


You did, indeed, interpret my wish correctly.  Thanks!

Unfortunately, this is buggy when faced with a more complicated example -- 
though I'm not sure whether the bug is in ConTeXt, or if it's because we're 
not using \footnotetext correctly.  Consider the following:


  \starttext
  This%
  \footnote(Or that\note[footB], if you prefer.}%
  \footnotetext[footB]{Or possibly even the other\note[footC].}%
  \footnotetext[footC]{It could be something entirely different.}
  is a sentence with nested footnotes\note[footB]\note[footC].
  \stoptext

The footnotes themselves are numbered properly: 1, 2, 3.  However, the 
references are not -- the \note[footC] reference within the second footnote 
produces a superscript 2 rather than a superscript 3 -- and the references 
to \note[footB] and \note[footC] at the end of the text both produce 
superscript 3's!


- Brooks

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


[NTG-context] A number of footnote bugs.

2005-09-04 Thread Brooks Moses
In playing with footnotes on the Wiki, I've come across a number of bugs, 
as well as the questions I mentioned earlier.


Consider the following example text:

  \setupfootnotes[n=3]
  \starttext
   \strut\vfill  % A hack to shorten the page, for Wiki use.
   This\footnote[footA](Or that\footnote{Or the other.}, if you prefer.}
   is a sentence with a footnote\footnote{Actually, two footnotes; this
   one and \in{footnote}[footA] on \at{page}[footA], denoted by
   \note[footA].}.
  \stoptext

This illustrates the following bugs:

1.) Without the \setupfootnotes line, this leaves a vertical space of about 
one blank line between the bottom of the text and the footnote 
separator.  With the \setupfootnotes line, we see that this space is 
proportional to n -- for n=3, it leaves three blank lines.


2.) The columns are ill-spaced in the default case; the footnote markers 
are closer to the column on their left than they are to the column they 
belong to.


3.) Footnotes in footnotes do not produce their numbers in the correct 
order, though they do set the footnotes in the proper order on the bottom 
of the page.  Specifically, the second footnote in the text is 
(incorrectly) numbered 3 rather than 2, but it is (correctly) placed before 
the footnote on the footnote.


4.) According to the comments on lines 63-65 of core-not.tex, setting n=0 
should set the footnotes in a continuous paragraph, using an algorithm from 
the TeXbook.  This does not work at all; the footnotes are set in a single 
column but with a smaller interline space.


Hans, are any of these readily fixable?

- Brooks

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


[NTG-context] Some concerns about the ConTeXt license.

2005-09-04 Thread Brooks Moses
I have a number of concerns about wording of the ConTeXt license (as given 
in the readme file), which I'd like to bring up.  In virtually all cases, 
my concern is simply that the actual wording of the license does not appear 
to be sufficient to provide the permissions that it intends to -- that is, 
the letter of the license does not live up to its spirit.


(Note that I am not a lawyer, and that none of the below comments should be 
construed as legal advice.)


I'm going by the text on http://wiki.contextgarden.net/Read_Me, which I 
believe to be the current version.




First, starting with section 3.1: ConTeXt is available as free software in 
the spirit of the gnu general public licence.


In the spirit of the GPL is not really useful in a license -- my idea of 
what's in the spirit of may be vastly different from Hans's idea of 
it.  So this unfortunately offers nothing solid with regards to 
permission.  It is, at best, a statement of intent.


So, what else is there in the license that actually and clearly offers me a 
grant of permission to redistribute?  I can find only the following:


2.7: ConTeXt is available for free for everyone who want to use it. 
Distributors are free to choose between the latest official release and the 
(in most cases stable) beta version.


7.2: We hereby grant permission to the de facto official TeX distributors 
teTeX, fpTeX and TeXlive to replace this licence with their own, i.e. their 
licence may supersede or enhance this one.


7.3: ConTeXt may be distributed as part of a public distribution in the 
spirit of free distributions.


In addition, there is the following comment, which appears to be a 
restriction, but is relevant here:


3.3: The official version (i.e. the original zipped archive recognized by 
the prefix cont-) may only be redistributed as a whole and under this licence.


To analyze those in turn: 2.7 does not offer any permission to 
redistribute; all it appears to offer is that ConTeXt will not charge for 
downloads.  It implicitly offers distributors the opportunity to 
distribute the latest official release and the beta version, but it does 
not offer permission for any other versions.


Of the items in section 7, 7.2 is not useful to the end user, as teTeX seem 
to incorporate the existing license rather than superceding it.  Section 
7.3 is, again, merely a description of intent with in the spirit of 
language rather than a clear grant of permission.


Finally, 3.3 appears to restrict all distributions of any part of ConTeXt, 
as there is no unofficial version available from Pragma, and there is no 
provision for anyone else creating one -- we can only redistribute the 
official version as a whole, and thus it remains the official version.


Thus, in sum: there is what appears to be an implicit grant for people to 
distribute the latest release or the current beta version, so long as it is 
complete and unchanged.


There is nothing that I see as a clear grant of permission to distribute an 
unofficial modified copy, nor of permission to extract a portion of the 
code for use in another project, except for the in the spirit of the GPL 
language, which is IMHO very insufficient for this.


Further, there is not even a clear grant of permission for the distribution 
of non-current official versions, aside again from the in the spirit of 
language.




Suppose that we consider the above issues to be addressed, by treating 
section 3.1 as saying effectively The permissions granted under the GPL 
are also granted by this license.


Let us now consider how the rest of the license actually agrees with that 
(and with section 4.1: This sections will not introduce limitations in use 
that conflict with the gnu general public licence.).


First, section 2.7, as quoted above.  The GPL would allow distribution of 
any released version, whether current or not.  It is not clear whether 2.7 
is supposed to be a restriction of this or merely a statement about what 
Pragma offers.


Section 4.2: However, the interface of such modules should fit the general 
scheme philosophy.  In the context of a file which purports to be a 
license file, this appears to be a legal requirement, not merely as a 
friendly guideline.  If treated as a requirement, this would not be in the 
spirit of the GPL.


Section 4.3: Keywords and command names should conform to the already 
defined ones and therefore not clash with existing functionality.  Again, 
same problem as 4.2.


Section 4.5: This also means that for instance in the texmf directory 
structure, the context/base, context/extra and context/sample locations are 
reserved for the official distribution.  This prohibits the distribution 
of a modified unofficial version, which is contrary to the spirit of the 
GPL, though perhaps in the spirit of the LPPL.  It also appears to restrict 
what I can personally do on my own computer, which is definitely contrary 
to the spirit of the GPL.


Section 4.8: When adapted 

[NTG-context] Some Footnote Questions (from the Wiki)

2005-09-03 Thread Brooks Moses
I've been updating the Footnotes page on the Wiki, and have a few questions 
as a result:


1.) Footnotes in footnotes in footnotes.  Are these possible?  When I do 
something like \footnote{A note\footnote{With a note\footnote{With a third 
footnote.}.}.}, only the first two notes are included in the footnote 
block, though the number for the third footnote is generated.


2.) Footnotes as marginals.  There was text on the Wiki saying that it's 
possible to typeset footnotes as marginals, but I can't find any references 
to this in the ConTeXt manual.  Am I missing something?  I know it's 
possible to do marginal notes, but those don't get footnote numbers, and so 
aren't the same thing


3.) Footnotes placed without line breaks.  If one does a number of short 
footnotes, they get set like so:


  1. One
  2. Two
  3. Three
  4. Four

Is it possible to have them set without line breaks, like this?  If so, how?

  1. One2. Two3. Three4. Four

4.) Footnote alignment.  Currently, footnotes are set so that the left end 
of the text of the footnote is aligned with the left edge of the text, and 
the footnote number hangs out into the margin.  Is it possible to change 
this?  (For instance, suppose I would like the number aligned to the 
text-edge, and then a fixed-width space, and then the text?)


5.) In LaTeX, there's a means to place a footnote (and generate a number 
and reference for the footnote) without typesetting the number in the text, 
in order to handle cases where the real footnote mechanism breaks 
down.  Is it possible to do this in ConTeXt?


6. When I reference a footnote's number using \note[ref], I get the number 
typeset as a superscript.  This looks a little odd to me in sentences such 
as See footnote \note[ref] on the previous page -- it would look better 
if the number (or symbol) were typeset in the normal font.  Is there 
another way to reference it so as to do that?


7. What does the location=high in \setupfootnotes do?

Thanks!
- Brooks

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


[NTG-context] A TABLE bug (?) from the Wiki.

2005-09-03 Thread Brooks Moses

The Wiki page on TABLE contains the following example:


\setupTABLE[r][each][height=1cm]
\setupTABLE[c][each][width=1cm]
\setupTABLE[r][1][height=0cm,frame=off]
\bTABLE
\bTR \bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD \bTD \eTD \eTR
\bTR \bTD[nc=2,nr=2] r1c1 \eTD \bTD r1c3 \eTD \bTD[nr=2] r1c4 \eTD 
\bTD[nr=2,nc=2] r1c5 \eTD \eTR

\bTR \bTD[nr=2] r2c3 \eTD \eTR
\bTR \bTD[nc=2] r3c1 \eTD \bTD[nc=2] r3c4 \eTD \bTD r3c6 \eTD \eTR
\bTR \bTD r4c1 \eTD \bTD[nc=2] r4c2 \eTD \bTD[nr=2] r4c4 \eTD \bTD[nc=2]
 r4c5 \eTD \eTR
\bTR \bTD[nr=2,nc=2] r5c1 \eTD \bTD[nr=2] r5c3 \eTD \bTD[nr=2,nc=2] r5c5
 \eTD \eTR
\bTR \bTD r6c4 \eTD \eTR
\eTABLE


This comes with a note: There is an ugly hack in the code. An empty first 
row with zero height and no borders is added. If the row is omitted, then 
something odd happens to the number of columns.


Is this an actual bug in ConTeXt, or is it a bug in the example?  If the 
latter, what's the fix?


Thanks,
- Brooks

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


Re: [NTG-context] Some Footnote Questions (from the Wiki)

2005-09-03 Thread Brooks Moses
Replying to myself (sorry); I discovered the answer to one of these 
questions already.


At 01:39 PM 9/3/2005, I wrote:
6. When I reference a footnote's number using \note[ref], I get the number 
typeset as a superscript.  This looks a little odd to me in sentences such 
as See footnote \note[ref] on the previous page -- it would look better 
if the number (or symbol) were typeset in the normal font.  Is there 
another way to reference it so as to do that?


It is, indeed, possible to reference footnotes in the usual way for other 
references, with \in{}[] and \at{}[], and they act as one would expect.


(I haven't investigated whether \note[] works for non-footnote references. :)

- Brooks

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


Re: [NTG-context] Re: Toward an errata sheet.

2005-09-02 Thread Brooks Moses

At 06:20 AM 9/1/2005, John R. Culleton wrote:

Looking to the future, if I see a post with errata in the subject
line I can inspect it and mark up my manual. At that point I
don't need the particular post any more.

If instead we are to use the wiki, then someone (not me) needs to
explain the ins and outs of wikidom, create a page etc.
 as outlined in my first paragraph.


I have created a page for errata in the ConTeXt-EN manual, here:
  http://wiki.contextgarden.net/ConTeXtEN_Errata

The relevant ins and outs of Wikidom should be fairly straightforward -- to 
add an erratum, click on the edit link at the top of the page, and then 
add your erratum in the edit window (at this point, you should be able to 
simply duplicate the formatting of an existing item, without needing to 
know anything else), and click submit.


As you note, it's useful to post here about the errata one discovers, so 
that people know of them (and also so that they can be discussed -- perhaps 
an erratum is itself in error!).  My suggestion would be to post everything 
here, and include a note as to whether it has or has not been added to the 
Wiki page.  If it hasn't been added, someone will surely add it.


The three errata mentioned in this thread are on the page; I'll go back and 
see what else I find in the archives.


- Brooks

P.S. I think there should be a page for Errata in general, linked from the 
front page of the Wiki.  (Or, else, the Bugs and Workarounds page should 
be changed to be Bugs, Workarounds, and Errata)  However, I don't have 
access to the front page of the Wiki to change that; can someone who has 
access do that?


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


Re: [NTG-context] Accessibility

2005-09-02 Thread Brooks Moses

At 10:03 PM 9/2/2005, David Arnold wrote:
We got the note below from our college president today. What does anyone 
know about making context and pdf accessible to student with vision problems?


I don't know that much offhand.  However, with web pages, one of the 
simpler ways of testing compatibility with screen-readers is using lynx to 
view the file; I'd think that using one of the pdf-to-text converters on 
the pdf file would do about the same for .pdf files.  It's not a perfect 
test by any means, but it's a good first start.


Given that the TeX-PDF-text pathway is often recommended for getting text 
out of TeX documents, I suspect it's likely to be reasonably ok.


- Brooks

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


Re: [NTG-context] Upgrading ConTeXt and testing

2005-08-29 Thread Brooks Moses

At 06:04 AM 8/29/2005, Hans Hagen [EMAIL PROTECTED] wrote:

Taco Hoekwater wrote:

* A read-only CVS containing as many of the old ConTeXt releases as
  we can find, for reference and regression checks.


subversion -)

i'll set that up as soon as possible and taco can mirror that (interesting 
experiment anyway, mirroring a svn archive)


Recently, I came across something called SVK, which apparently is 
specifically intended for mirroring and merging subversion archives.  It 
looks like it might also solve the problem you (Hans) were mentioning 
earlier of wanting to have a local version of the repository on your laptop 
that you could periodically merge with the main repository.


There's a webpage on it here:
  http://svk.elixus.org/

Personally, I haven't used it yet, but I got the link from a friend of mine 
who is a very competent sysadmin, and he seemed happy with it.


- Brooks

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


Re: [NTG-context] Re: blocks in itemize

2005-08-22 Thread Brooks Moses

At 04:58 AM 8/22/2005, you wrote:

Thanks for your reaction. My original proposal was:

\startitemize
  \beginblockA
\item Apple
  \endblockA
  \beginblockB
\item Pomme
  \endBlockB
  \beginblockA
\item Pear
  \endblockA
  \beginblockB
\item Poire
  \endBlockB
\stopitemize

This does not work.


I don't know anything about how blocks work, so this may be completely 
off-base, but if they do any sort of grouping, that would be quite 
sufficient to cause problems in a situation like that.  Does this work?


\startitemize
  \item \beginblockA
Apple
  \endblockA
  \item \beginblockB
Pomme
  \endBlockB
  \item \beginblockA
Pear
  \endblockA
  \item \beginblockB
Poire
  \endBlockB
\stopitemize

- Brooks

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


[NTG-context] Why do size changes affect my math font?

2005-08-15 Thread Brooks Moses
Consider the following simple document, with is a minimalist version of the 
slides that I'm currently working on:


  \starttext
  The variables are $u$ and $p$.
  \stoptext

This works fine; the text is in roman and the math in italics, just as I 
desire.  However, I need a larger font for my slides, and thus I'm also 
using a font size command, like so:


  \starttext
  \tfc
  The variables are $u$ and $p$.
  \stoptext

This causes the math to be in roman instead of italic.  (It's not in text 
font per se; an \it after the \tfc will italicise the text but not the 
math, creating a quite odd effect.)


Is there a reason for this?  What's the cleanest way to fix it for all the 
various size commands?


Thanks,
- Brooks

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


Re: [NTG-context] Why do size changes affect my math font?

2005-08-15 Thread Brooks Moses

At 12:33 AM 8/15/2005, Hans Hagen wrote:

Brooks Moses wrote:

[...]

  \starttext
  \tfc
  The variables are $u$ and $p$.
  \stoptext

This causes the math to be in roman instead of italic.  (It's not in 
text font per se; an \it after the \tfc will italicise the text but not 
the math, creating a quite odd effect.)


Is there a reason for this?  What's the cleanest way to fix it for all 
the various size commands?


i'll have a look, for teh moment say:
\bigmath

at the top of your document (this triggers a more extensive synchronization)


Thanks!  That's exactly the simple and quick workaround that I was hoping 
for, for this project that's due tomorrow.  :)


I look forward to the proper fix for the future, as well.

- Brooks

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


Re: [NTG-context] enumerated lists

2005-08-04 Thread Brooks Moses

At 12:31 AM 7/7/2005, Frank Grieshaber wrote:

Hello all (esp. the ConTeXt-Developers),

some time ago I sent the following email to this list and got no reply so 
I'm resending it.

Dear all,
I have a manuscript with long nested numbered enumerations and I want the 
numbers of all levels to be printed automatically like:

1. one
1.1 one-one
1.2 one-two
2. two
2.1 two-one
2.2.1 two-two-one
...
Using the following prints only the current level's number, not all levels:
\startitemize[n,packed]
\item
\item
  \startitemize[m,packed]
  \item
  \item
  \stopitemize
\item
\item
\stopitemize

For Latex there is the package paralist.sty for doing the desired 
numbering, how can this be done with ConTeXt?


(I wrote this before I noticed that Hans had already replied, but I'm 
sending this anyway in case someone finds it useful.)


I just accidentally solved this problem, in some of the LaTeX-compatibility 
stuff that I've been working on.  Have a look at t-ltenum.tex for the 
kernel code that does it, and latextest.tex for an example of how to use it 
for something akin to that effect.  It's fairly self-contained; you should 
be able to use t-ltenum.tex, t-ltcnts (which does counters) and 
t-ltbase.tex to get the LaTeX-style enumerations working, without needing 
any of the other bits.  All my current files are in this repository:

  http://dpdx.net/context/latex-compat/

That's sort of the long way around to doing what you're looking for, 
though, and you can get the same effect without the LaTeX-compatibility 
overhead.  Here's the trick


First, you create a set of conversions for each level of the list -- see 
the Wiki page linked off Enumerations for how to do that.  The conversion 
for level one will look something like this:


  \def\listconversioni{%
 \edef\listheadi{\numbers{#1}.}%
 \numbers{#1}}

  \defineconversion[listconvi][\listconversioni]

That returns the list-counter in number form, but it also stores it (with a 
. after it) in a header.  (I don't know whether that should be \edef or 
just \def, but I _think_ \edef is right.)


Then, the conversion for level two looks something like this:

  \def\listconversionii{%
 \edef\listheadii{\listheadi\numbers{#1}.}%
 \listheadi\numbers{#1}}

  \defineconversion[listconvii][\listconversionii]

That does the same thing, but now it's prefixing it with \listheadi.  This 
then continues down the list as deep as you want to go.  You then do a 
\defineitemgroup and some \setupitemgroup commands (again, see the Wiki's 
Enumerations page) to set it so that each one of those is associated with 
the appropriate level, and off you go; it's all automatic from there.



Depending on whether \startitemize / \stopitemize includes grouping or not 
(and on exactly where that grouping is placed), it may be possible to do 
this in a more general form -- have \startitemize execute some code to set 
\parentlisthead to the current \listhead (which comes from the next level 
up), and then have one conversion for all levels which uses \parentlisthead 
and defines a new \listhead to be used on any child itemizations.  The 
trick here is that \stopitemize will (hopefully) contain a \endgroup or 
\egroup, so that after it the \listhead value will revert to what it was 
before the corresponding \startitemize.  This has the advantage of being 
able to go arbitrarily deep, but you can't do things like 1.a where the 
levels are enumerated differently.



There are, of course, variations on all of these, but that general idea 
should be enough to get you going.


And I'll second the recommendation that something like this ought go in the 
kernel; I'm actually rather surprised that it's not already in there!


Actually, what I would specifically suggest is that the \item code should 
place the converted item counter -- the result of calling \doconversion -- 
into something like \currentitemlabel, and then \startitemize should move 
that to \parentitemlabel, all automatically, so one can simply define 
conversions with \parentitemlabel in them without having to implement the 
machinery oneself.


Or ... ah, wait; I see that Hans already replied to this shortly after you 
posted, and I missed it.  Oh, well; I'll send this anyway.  :)


- Brooks

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


Re: [NTG-context] Presentation

2005-08-03 Thread Brooks Moses

At 12:09 AM 8/3/2005, Jessica Holle wrote:

I've searching for a dokumentation how to build a presentation, like
in Powerpoint but better :-) with ConTeXt.
I haven't found somethink in the PDF's on the Pragma page and on the
Wiki.
Only the Raw Steps module, which I doesn't understand.
Has somebody information to this theme?


There should be quite a bit around; I think you're just not finding 
it.  (Unfortunately, it's rather late here, so I shall leave that to 
someone else)


One thing that you might find useful as an example, though, is a 
presentation that I recently created in ConTeXt, and then put online (with 
both the PDF and the ConTeXt source available -- though, without the images 
and the fonts, it's a little hard to process directly).  That's on my 
webpage here:


  http://dpdx.net/research/papers/ILASS2005_Moses_abstract.html

(See the Slides: tex and pdf links.)

- Brooks

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


Re: [NTG-context] Presentation

2005-08-03 Thread Brooks Moses

At 06:25 AM 8/3/2005, Wolfgang Zillig wrote:

Hello Brooks,

nice presentation! With which software do you produce your graphics?


Thanks!

I used TecPlot for those, since our department has a site 
license.  (Unfortunately, it seems to be one of the sorts of software that 
is difficult to purchase as an individual, so I'll have to find something 
else once I graduate.)


For importing the images into ConTeXt, I printed them using Acrobat 5.0's 
print to PDF driver, and then did some minor cropping before importing them.



Maurice Diamantini schrieb:

Nice self contained slides, thanks you for the model;
but the pdf link for the slides actualy links to the tex files
(changing the .tex suffix to .pdf is OK)


Ah, indeed.  That should be corrected now; thanks for telling me.

- Brooks

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


[NTG-context] Non-square roots?

2005-07-31 Thread Brooks Moses
LaTeX offers the following way to write a cube root: $\sqrt[3]{x}$.  Is 
there a way to do this in ConTeXt other than the TeX way of $\root 3\of x$?


Also, Hans, if there isn't a direct way to do this, the following code is 
pretty much how LaTeX implements it, with an extra line at the top to make 
it work in ConTeXt.  Would it be reasonable to put something like this (or 
something that implements this syntax) in m-newmat?


   \let\sqrtsign=\sqrt
   [EMAIL PROTECTED]@sqrt\sqrtsign}
   [EMAIL PROTECTED] #1\of}

- Brooks

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


[NTG-context] A couple more suggestions for m-newmat.

2005-07-31 Thread Brooks Moses
While I'm thinking about it, here are a couple more things from LaTeX's 
math stuff that might be useful to include in m-newmat:


The \stackrel command is listed as a disguise for plain TeX's \buildrel, 
much like \frac is a disguise for \over:


  \def\stackrel#1#2{\mathrel{\mathop{#2}\limits^{#1}}}

There's also the \lefteqn command:

  \def\lefteqn#1{\rlap{$\displaystyle #1$}}

The \lefteqn command is useful for doing partly-aligned equations, of the 
sort that get displayed as:


  long left-hand-side
  = long right-hand-side part 1
+ long right-hand-side part 2
+ long right-hand-side part 3

Essentially, you'd write that in an eqalign (or something like it), as:

  \placeformula
  \startformula
  \eqalign{%
\lefteqn{long left-hand-side}\qquad  \cr
= long right-hand-side part 1 \cr
\quad {}+ long right-hand-side part 2 \cr
\quad {}+ long right-hand-side part 3 \cr
  }
  \stopformula

As can be seen, \lefteqn lets the long left-hand-side overlap the alignment 
point, without shifting it excessively to the right.  It's not perfect -- 
for one thing, if the left-hand-side extends farther to the right than the 
right-hand-sides, the equation won't be centered -- but it's a good start 
and works right most of the time.  :)


- Brooks

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


Re: [NTG-context] Non-square roots?

2005-07-31 Thread Brooks Moses

At 01:25 PM 7/31/2005, Hans Hagen wrote:

\let\normalsqrt\sqrt % \dohandlemathtoken {sqrt}

\def\sqrt{\doifnextcharelse[\notsosqrt\normalsqrt}
\def\notsosqrt[#1]{\root#1\of}

$\sqrt[3]{10}$

Do you want this in the kernel?


I'd like to have it there, yes.  Thanks!

- Brooks

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


Re: [NTG-context] Ligature handling for PDF searching.

2005-07-27 Thread Brooks Moses

At 01:25 AM 7/27/2005, you wrote:

Attached is pdfr-ec.tex. I don't really understand what is going on,
so the texnansi version is out of my reach. Also, I cannot/will not
test because AR7 has no problem with ffi anyway.


I'm perfectly glad to test this, but I'm not at all sure how to use 
it.  What do I need to do to use it?


Thanks!
- Brooks

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


Re: [NTG-context] Very dirty localisation request for a rainy evening

2005-07-26 Thread Brooks Moses

At 02:01 PM 7/26/2005, Mojca Miklavec wrote:
Hello Hans, Today I saw a webpage of someone, who is very active in the 
field of translation and localisation of free software into Slovenian. It 
astonished me the way he numered the items on his webpage: (a) 
approximation ... (b) Gauss ... (c) numerical solutions ... (è) solving 
parabolic ... % [\ccaron] (d) ... This should actually be the only proper 
way to number items in Slovenian, but you can imagine that nobody is able 
to use that since the beginning of computer era.


As it happens, I've just been looking at the ConTeXt code for doing 
counters as characters, and it's really pretty simple:


\def\character#1%
  {\ifcase#1\unknowncharacter
 \or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or l\or m%
 \or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z%
   \else
 \unknowncharacter
   \fi}

(There's also an equivalent \Character for the uppercase letters.)

All you need to do Solvenian ordering is to put a \ccaron in the list 
between c and d, and maybe call the macros sloveniancharacter and 
slovenianCharacter to keep them distinct.  Then, when you want to specify 
a numbering format for an enumeration, you should be able to use 
conversion=solveniancharacter rather than conversion=characters.


This isn't quite a complete solution -- ConTeXt has some more code that 
defines a \characters macro (with the s on the end) that keeps counting 
after z, as x, y, z, aa, ab, ac, and so on.  Duplicating that requires 
only a little more work.


- Brooks

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


Re: [NTG-context] Very dirty localisation request for a rainy evening

2005-07-26 Thread Brooks Moses

At 02:01 PM 7/26/2005, Mojca Miklavec wrote:
Hello Hans, Today I saw a webpage of someone, who is very active in the 
field of translation and localisation of free software into Slovenian. It 
astonished me the way he numered the items on his webpage: (a) 
approximation ... (b) Gauss ... (c) numerical solutions ... (è) solving 
parabolic ... % [\ccaron] (d) ... This should actually be the only proper 
way to number items in Slovenian, but you can imagine that nobody is able 
to use that since the beginning of computer era. (Another example is the 
usage of quotation marks: most people use the American quotation marks 
instead of the German ones just because MS Word defaults to that.) 
However, those people who really care, use the Slovenian alphabet when 
enumerating (manually, of course). I'm proud, for example, that I was in 
the class 1.È in the high school. Not right away, but any time in the 
future when unicode, fonts and similar will be updated/reimplemented/fully 
supported and when it will be raining cats and dogs and nothing 
interesting will be on TV: can you think on this this tiny request to 
switch to local enumeration if \mainlanguage[sl] (or any other language 
with a similar request) is selected?


I decided that this would be a good excuse to learn a little more about how 
ConTeXt handles enumerations.  It turns out (as Hans just mentioned while I 
was writing this!) that there is already the functionality to define 
language-specific enumerations, so no need to wait for that.


So, anyhow, I wrote up a short third-party module to handle Slovenian 
character enumeration (can I presume that the rest of the alphabet ordering 
is the same as English?), along with a test file.  You can get them here 
for now:


  http://dpdx.net/context/slovenian/

Hans (or anyone else who knows more than I do), is there a better place to 
put this?


- Brooks

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


Re: [NTG-context] Very dirty localisation request for a rainy evening

2005-07-26 Thread Brooks Moses

At 04:35 PM 7/26/2005, Mojca Miklavec wrote:

Brooks Moses wrote:
So, anyhow, I wrote up a short third-party module to handle Slovenian 
character enumeration (can I presume that the rest of the alphabet 
ordering is the same as English?),


Ordering is the same, but in English some very strange letters are used in 
addition to the standard alphabet :)


 \or a\or b\or c\or \ccaron\or d\or e\or f\or g\or h\or i\or j\or k\or l%
 \or m\or n\or o\or p\or r\or s\or \scaron\or t\or u\or v\or z\or 
\zcaron%


Ok; I've updated the versions on my website to include the other two extra 
characters as well.


  http://dpdx.net/context/slovenian/

Does the test file look like it does all of the enumerations correctly now?


Thank you very much again,


You're quite welcome!
- Brooks

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


Re: [NTG-context] Very dirty localisation request for a rainy evening

2005-07-26 Thread Brooks Moses

At 05:29 PM 7/26/2005, Mojca Miklavec wrote:

Brooks Moses wrote:
 Ok; I've updated the versions on my website to include the other two extra
 characters as well.

http://dpdx.net/context/slovenian/

 Does the test file look like it does all of the enumerations correctly now?

Only the four extra English characters are still too much (so there
are 25 characters altogether) ... otherwise it looks just perfect!


Oh, I missed those -- that's what you meant by strange English 
characters!  Sorry about that.  I've taken those out now, and corrected 
the numbers in the docharacters macro, so it should now be working properly.



 \dorecurse{30}{\item test\endgraf}

There's always something new that I learn. After I figured out that
  \dorecurse{30}{\item test}
doesn't work, I gave up and used copy-paste instead. Thanks for this
little tricky detail as well!


That one's from Hans; I simply borrowed it from his example.  :)

- Brooks

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


[NTG-context] PDF output versions?

2005-07-26 Thread Brooks Moses
I just noticed that when I compile ConTeXt files with texexec -pdf, my copy 
of Acrobat 5 complains about the PDF version of this file is too new for 
this viewer, but when I compile LaTeX files with pdflatex, I don't get 
that complaint.


Is there some way to set ConTeXt and texexec to create PDF files of the 
earlier version?


(I'll upgrade Acrobat eventually, but I have the full version and use the 
editing features a fair bit, and I gather that having the full version of 
Acrobat 5 and the free version of Acrobat 7 on the same machine causes lots 
of headaches.)


- Brooks

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


Re: [NTG-context] Very dirty localisation request for a rainy evening

2005-07-26 Thread Brooks Moses

Oh, one more thing

At 05:29 PM 7/26/2005, Mojca Miklavec wrote:

I'm looking forward to what my LaTeX colleagues will say about that
when I present them ConTeXt and the tricks like that :)


After you've had your fun with them, you can give them the 
slovenianletters.sty file (and the associated latex_slovenian.tex test 
file) that's now up in the same directory, and then they can do the same in 
LaTeX.  :)


It doesn't do the clever aa, ab, ac, ... continuation after \zcaron that 
ConTeXt allows, though; it just gives an error for any number after 25, 
same as LaTeX's default alphabetic enumerations do for numbers after 
26.  And ConTeXt's multicolumn enumerations are much nicer for 
demonstrating this sort of thing!


- Brooks

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


[NTG-context] Ligature handling for PDF searching.

2005-07-26 Thread Brooks Moses
(This came up on comp.text.tex in a question about LaTeX, but it also 
applies to ConTeXt, and the proposed solution for LaTeX doesn't apply.)


Consider the following document:

  \starttext
  Some ligature tests: ff, fi, ffi, fl, ffl.
  \stoptext

If I process that with texexex -pdf, load it into Acrobat 5, and then 
copy-and-paste the text from the PDF into a text editor, the fi and fl 
ligatures are correctly treated as two letters, but the ff, ffi, and ffl 
ligatures are treated as single (unknown) characters.  Similarly, searching 
for f within the document only finds the fi and fl ligatures; it doesn't 
find the others.  Searching for ff finds nothing.


This is a fairly significant problem in the on-screen usability of 
ConTeXt-created documents.


In LaTeX, there is apparently a solution in the cmap.sty package (though it 
currently only works for T1 encoding):

  http://www.ctan.org/tex-archive/macros/latex/contrib/cmap/

Is there a similar solution for ConTeXt?  (Has this perhaps been solved 
with a later version of ConTeXt than I have on my computer?)


Thanks,
- Brooks

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


[NTG-context] LaTeX \newcommands in ConTeXt.

2005-07-25 Thread Brooks Moses
I've recently been doing a little work on implementing a few LaTeX kernel 
bits in ConTeXt, to simplify porting LaTeX code over.  It's now at a point 
where a few of the pieces might actually be useful, and certainly to a 
point where some comments would be welcomed, so I've put up a version of it 
online, in this directory:


http://dpdx.net/context/latex-compat/

What you'll find there is a fair number of module files, along with a 
couple of latextest files that I've been using to try out the 
results.  latextext.tex is to be compiled in ConTeXt; latextext-latex.tex 
is to be compiled in LaTeX for purposes of comparison.


In any case, I think the implementation of \newcommand (and its relatives) 
is about up to beta level.  Ditto with LaTeX lengths.  And there's a 
working LaTeX-like counter implementation, based on ConTeXt counters 
underneath.  (It's not yet hooked into ConTeXt's counters for footnotes and 
equations and pages, though; I'm not really sure how to do that.)


Also, environments are working, in a sort of hackish way.  The array 
environment works, but again a bit hackish; I'm planning to clean that up 
soon, so both of those will get major revisions.


I'd particularly appreciate any comments on the \newcommand and counters 
implementations -- those are in the t-ltcmds and t-ltcnts modules, though 
\newcommand also depends on t-lterrs and t-ltbase.


- Brooks

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


Re: [NTG-context] LaTeX \newcommands in ConTeXt.

2005-07-25 Thread Brooks Moses

At 04:28 PM 7/25/2005, you wrote:

Brooks Moses wrote:
I'd particularly appreciate any comments on the \newcommand and counters 
implementations -- those are in the t-ltcmds and t-ltcnts modules, though 
\newcommand also depends on t-lterrs and t-ltbase.


i just took a quick look at the code; if you run into tricky definitions, 
let me know, often there are either already low level macros that do the 
job, or i can add some stuff;


Thanks!  I'll probably have lots of questions as I go along -- this is 
certainly becoming a tour of the internals of both systems.


btw, i renamed the internal \end macro so that you can get away from 
stoptext refinitions (too messy)


Yeah, the \stoptext redefinition was one of the first pieces I wrote, 
nearly a year ago.  The reason I was doing the \stoptext redefinition 
wasn't the internal \end macro (which didn't exist then, I think) -- it was 
that the ConTeXt version I used then didn't have an \everystoptext 
hook.  But now that it exists, I can just use it.


One other question I have right now: what's a good way to duplicate LaTeX's 
\vspace macro (which is effectively a \vskip inside), without causing the 
problems that the ConTeXt manual warns about if we use \vskip?


- Brooks

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


Re: [NTG-context] ConTeXt to XML?

2005-07-19 Thread Brooks Moses

At 01:40 PM 7/19/2005, you wrote:

Brooks Moses wrote:
The other alternative I know of for doing math in XML is embedding bits 
of LaTeX code within the XML.  Since most conversion to non-PDF formats 
involves converting the math to bitmap images anyway (or, at least, any 
conversion to HTML for the web does!), I don't think that's really 
complicating things much.  It's certainly possible in theory to embed 
LaTeX-coded equations in ConTeXt, and there's a small bit of comment on 
this on the Wiki.  In practice, it may take a bit of coding to make work, 
but the amount won't be excessive.


there is a math module (m-math) and a new implementation of that 
(m-newmat) which does quite some ams math;


It does some, yes, though not (yet) the multiline alignment parts that I need.

i have no problem with adding more code but each time i ask for specs, 
nothing comes up -)


Yeah, I know.  The specs for what I need are I've got this pile of 
equations written in LaTeX with the AMSmath package, and I'd like to be 
able to copy them back and forth between LaTeX and ConTeXt without needing 
to edit them.  I'm slowly working on reducing that to something that's 
actually useful as specifications (and as some code), and I hope to get 
some of that to you within the next few months or so.


- Brooks

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


Re: [NTG-context] Visual Debugging (was: Basic question)

2005-07-18 Thread Brooks Moses

At 09:18 AM 7/18/2005, you wrote:


Am 2005-07-18 um 00:36 schrieb Hans Hagen:

\showcharacters
\showaccents

BTW I finally created the wiki page Visual Debugging for all
the  \show... commands; I guess there are even more than I listed
there,  and some descriptions are still missing (had no time to
try them all).

(\trace... is also handy)


Hm, there's no trace in texshow, but a lot of trace...true in the
sources; hopefully I catched them all on http://contextgarden.net/ 
Visual_Debugging

I found some \tracing in the jEdit xml, but nowhere in the sources,
and some single \traced... (with d).


I had also put some lists of all the \show... and \trace... commands I 
found in the sources on the Discussion page for Visual_Debugging; it may be 
useful to go through and compare our lists.


Note that the \trace... commands seem to be defined with \newif; thus, they 
come in \iftrace..., \trace...true, and \trace...false trios.


- Brooks

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


Re: [NTG-context] RFE: Better error messages for \usemodule

2005-07-17 Thread Brooks Moses

At 11:16 PM 7/16/2005, you wrote:

Brooks Moses wrote:
After scratching my head over no macros found in module mymodule, I 
decided to try replacing the line with \input{t-mymodule}.



This produced the very cryptic result of a I can't find the file 
't-mymodule'.  Please type another filename: error.  However, simply 
using t-mymodule as a replacement filename worked fine.


The \input with braces is latex-ese. The TeX primitive is
  \input t-mymodule
and that would have worked.


Ah, ok.  I hadn't realized those were different!


However, as of ConTeXt release 2005.05.25, the original \usemodule
would also have worked: the automatic filename truncation was removed
in that version.


Good to know; it _did_ seem like something that really was likely to be 
more of an annoyance than a useful thing.


Thanks for the corrections.  :)

- Brooks

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


Re: [NTG-context] Escaping tabulate

2005-07-17 Thread Brooks Moses

At 12:21 PM 7/17/2005, Radhelorn wrote:

Christopher Creutzig wrote:
 I believe in ConTeXt you'd usually(?) use \start and \stop instead of 
\bgroup and \egroup, though.  What do the experts say about this?


I've seen \start \stop pairs in some examples, but there are so many of 
them in sources that I can not find their definition.


Doing a \show\start in a document finds a definition for \start as 
\docomplexorsimple \complexstart \simplestart; grepping for 
'def\\complexstart' (the \\ being the shell escape for \) finds the 
definition of that in core-sys.tex.


In any case, \start expands (in a somewhat complex way to \bgroup, while 
\start[something] appears to expand to \startsomething.  \stop does 
something similar.


Given this, I don't think there's any reason not to use \bgroup and \egroup 
if that's what you mean.


- Brooks



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


[NTG-context] RFE: Better error messages for \usemodule

2005-07-16 Thread Brooks Moses
Just now, I was trying to figure out how to write a module that ConTeXt 
would load.  Should be simple, right?  I wrote a file called 
t-mymodule.tex, put it in a directory next to a test file that had the 
line \usemodule[mymodule], and tried processing it.


After scratching my head over no macros found in module mymodule, I 
decided to try replacing the line with \input{t-mymodule}.


This produced the very cryptic result of a I can't find the file 
't-mymodule'.  Please type another filename: error.  However, simply using 
t-mymodule as a replacement filename worked fine.


Eventually, after much consternation, I tracked the problem down to the 
fact that ConTeXt truncates input file names to 8 letters.  Thus, my 
\usemodule command was looking for files called t-mymodu and so forth.


Given the amount of trouble that I had with figuring that out, I'd like to 
suggest the following enhancement: can the no modules found in... and I 
can't find the file... errors be adjusted so that they give the shortened 
file name that ConTeXt is actually looking for, rather than the long file 
name?


I would also tend to suggest that no macros found in module... is a 
fairly misleading error message anyway, since it seems to imply that the 
module file itself was found.  It is particularly unclear given that it 
_doesn't_ show up if the module file exists but contains no macros!


- Brooks

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


Re: [NTG-context] color transparency

2005-07-13 Thread Brooks Moses

At 12:44 PM 7/13/2005, Hans Hagen wrote:

\setupcolors[state=start]

\definecolor [luigi]  [r=1,t=.5,a=1]
\definecolor [scarso] [b=1,t=.5,a=1]

\starttext

\startTEXpage
\blackrule[width=2cm,height=2cm,color=luigi]\hskip-1cm
\blackrule[width=2cm,height=2cm,color=scarso]
\stopTEXpage

\stoptext

since you could not find the trick ... this looks wikiable to me


I've added it to http://contextgarden.net/index.php?title=Colors.

- Brooks

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


[NTG-context] A couple of questions on math customizing.

2005-07-11 Thread Brooks Moses
I'm working on doing my own math alignment routines.  After a lot of poking 
about in core-mat.tex, I came to the conclusion that \startinnermath and 
\stopinnermath were probably the things to modify, and the most polite 
way to do that was by defining my own alignment name.  So, the following 
does what I want for a test case:


(Note that \defineinnermathhandler is a shortcut to define versions of 
\startinnermath and \stopinnermath corresponding to the given alignment.)


  \starttext
  \defineinnermathhandler{test}
{\let\doplaceformulanumber\empty}
{}
  \setupformulas[align=test]
  \placeformula{a}
  \startformula
  c^2 = a^2 + b^2  \eqno{\formulanumber}
  \stopformula
  \stoptext

First, if I want \stopinnermath to handle the formula number, I have to 
somehow turn off the \doplaceformulanumber that gets called at the 
beginning of \dostopformula.  Redefining the macro to \empty in 
\startinnermath works, but it seems a bit inelegant.  Is there a better way?


Second, if I move that \eqno{\formulanumber} up into \stopinnermath, as in 
the following sample, I get an error about \eqno not allowed in math 
mode, despite the fact that it seems to be doing the exact same thing as 
the previous example.


  \starttext
  \defineinnermathhandler{test}
{\let\doplaceformulanumber\empty}
{\eqno{\formulanumber}}
  \setupformulas[align=test]
  \placeformula{a}
  \startformula
  c^2 = a^2 + b^2
  \stopformula
  \stoptext

Then, if I enclose the \eqno in an if statement borrowed from the 
just-erased definition of \doplaceformulanumber, it works again:


  \starttext
  \unprotect
  \defineinnermathhandler{test}
{\let\doplaceformulanumber\empty}
{\eqno{\formulanumber}}
{\doifelse \@@fmlocation \v!left%
{\normalleqno {\formulanumber}}%
{\normalreqno {\formulanumber}}}
  \protect
  \setupformulas[align=test]
  \placeformula{a}
  \startformula
  c^2 = a^2 + b^2
  \stopformula
  \stoptext

What's up with that, and what do I need to do to be able to put a bare 
\eqno in the \stopinnermath macro?


Thanks!
- Brooks

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


[NTG-context] Math bug: \tracemathtrue doesn't work without alignment.

2005-07-10 Thread Brooks Moses
I was recently going through the core-mat.tex file (the one from teTeX 
3.0.whatever-it-is) and trying out some of the examples given in the 
comments, and came across an odd little bug.  Consider the following:


  \tracemathtrue
  \setupformulas[align=middle]
  \placeformula \startformula \fakeformula \stopformula

This works fine.  However, if I take out the align= argument from 
\setupformulas, the tracing boxes disappear.


Meanwhile, I'm trying to figure out exactly how the alignment works in 
formulas, from a programming viewpoint.  What's a good place to start with 
this?


- Brooks

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


[NTG-context] Removing space between figure and caption

2005-05-20 Thread Brooks Moses
I'm working on a presentation in ConTeXt, and running into a problem with 
some figures; I can't seem to figure out how to get things to do what I 
want.  Here's a small file that demonstrates the problem:

-
\setupoutput[pdftex]
\starttext
\tfd \setupinterlinespace
\setupcaptions[number=no]
\setupcombinations[distance=5mm]
\placefigure
  [here]
  {none}
  {\startcombination[2*1]
{\scale[width=3in, height=2in]{X}}
{\bfc Caption 1 \crlf Line 2}
{\scale[width=3in, height=2in]{X}}
{\bfc Caption 2 \crlf Line 2}
   \stopcombination}
\stoptext
-
My problem is that space between the figures and the captions is much 
larger than I'd like.  In the actual document, the figure contains its own 
whitespace, and so I'd like the top of the caption text to be right up 
against the bottom of the figure.

Also, I'd like to make the spacing between the two caption lines a lot smaller.
How can I accomplish this?
Thanks,
- Brooks
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Math Diagrams in ConTeXt

2004-09-29 Thread Brooks Moses
At 11:53 AM 9/29/2004, you wrote:
I need to typeset a few (simple) diagrams in ConTeXt,
like the ones mathematicians use, with arrows. In LaTeX, one can use
pictex or DCpic. The latter claims also to work with ConTeXt, but I 
couldn't find an example. Has anybody managed to do something like this?
Why not use MetaPost?  With all of ConTeXt's features for doing in-document 
MetaPost code, this would be the perfect solution for your problem.  Have a 
look at Hans's MetaFUN manual for a good starting point on using it.

Also, I believe the original MetaPost manual has some examples of figures 
very much like the ones that you want to draw.

- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] metafun manual

2004-08-30 Thread Brooks Moses
On Mon, Aug 30, 2004 at 09:21:29PM +0200, Floris van Manen wrote:
  I'm going to 'finish' the metafun manual, so if you have topics that
  need to be covered ...

If you'd like volunteers to proofread the finished version, I'd be glad
to help with that.

My main request is the addition of an index, but I presume that was
already on the to-do list.
 
 the topic as how to define and use user defined functions / macros / procedure
 could have some more explanation / samples.

This might indeed be helpful, if the metafun manual is intended as a
complete guide to both metapost and metafun (replacing the old metapost
manual).  My recollection is that the manual has very little (if any) on
how to use suffix variables, and it would be nice to have a good
overview of that somewhere other than the metafont (!) manual.

 also a suggested way as how to handle and use the definition of
 multiple (different) graphics within a single file could be helpful.
 e.g. where to put the graphics definitions. how to re-use pieces of
 graphics for other images (like axis frames).

Agreed, although that's actually fairly simple (which is probably an
argument _for_ including it, rather than against).

- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metapost and TeX [OT]

2004-08-24 Thread Brooks Moses
On Mon, Aug 23, 2004 at 10:48:42PM -0400, [EMAIL PROTECTED] wrote:
 I don't have any experience in metapost.  I would appreciate if someone would
 please answer this question without me having to do thru tutorials and
 metapost source code.
 
 I was wondering how does metapost talk to TeX?  Quicky glancing through the
 metafun book, I found out that you can super-impose text typeset by
 TeX on top of a diagram.  I imagine you could do the same with
 mathematical equations too.

The following is as I understand it; others can I'm sure correct any
misunderstandings:

Metapost dumps out a TeX file, consisting of any header commands
specified in the Metapost file, and whatever is between btex and etex
tags.  It also puts in stuff so that what's between each pair of tags
gets put on its own page.  (This is actually done with the mpto command,
rather than in Metapost itself; if you just run that, you can examine
the output to see what TeX commands it uses.)

TeX is then run on this file, creating a .dvi file.

Metapost then reads in the .dvi file, using that to create the typeset
text that appears in the output Postscript file.

- Brooks

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] defining a frame with embedded typing

2004-08-17 Thread Brooks Moses
On Tue, Aug 17, 2004 at 06:18:31PM +0200, Floris van Manen wrote:
 how would i define a frame with the typing environment embedded.
 
 the way i thought to solve it does *not* work (of course)
 
 \def\startTTinput%
 {\startframedtext[width=\makeupwidth,background=screen,backgroundscreen=.8]
 \starttyping
 }
 
 \def\stopTTinput%
 {\stoptyping\stopframedtext}

Taco already showed the solution to this (use before= and after=
commands in a \definetyping or \setuptyping command), but it might be
useful to also explain why the above doesn't work.

It doesn't work, because \starttyping, like most verbatim environments,
scans through the following text until it gets to the appropriate end
text.  It doesn't expand tokens while doing this; in particular,
\stopTTinput never gets expanded, and so the sequence \stoptyping
never shows up to end the input.

Incidentally, there's also a bit more answer to how to do framed typing
environments in some answers to one of my questions a couple of weeks
ago; you might find it useful to look in the archives for that.

- Brooks

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Some problems with framing typed text.

2004-08-10 Thread Brooks Moses
In the document I'm working on, I'd like to put some typed code bits in 
frames, to get an appearance sort of like the code excerpts on the 
ConTeXtWiki.  However, I've found myself needing to do a couple of rather 
ugly hacks to get that to work right, and I'm hoping for some suggestions 
on how to avoid that.

Here's what I have so far:
\def\typebufferframed[#1]{%
  \vskip\parskip
  \framed[background=color,
   backgroundcolor=gray,
   frame=on,
   strut=yes,
   offset=2mm,
   width=broad,
   framecolor=black,
   align=right]%
   {\vskip -11mm\typebuffer[#1]\vskip -5mm}}
\starttext
Plain text before the code.
\startbuffer[ex1]
This is an example.
\stopbuffer
\typebufferframed[ex1]
Plain text after the code.
\stoptext
The hacks that I'd like to get rid of:
It would be nice not to have to put the code in a buffer before typing it, 
since in general I only use these once.  However, if I put \starttyping and 
\stoptyping inside a framed command (even if I don't encapsulate it in 
another function) it breaks, and putting \startframedtext in the before= 
command and \stopframedtext in the after= command of \setuptyping also 
doesn't work.

The spacing, when I do things the way that I'm doing them, is all 
wrong.  The \vskip\parskip at the top is reasonably ok (although a bit 
annoying), but I'd really like to figure out how to get rid of the large 
negative \vskip's inside the frame.

Thanks!
- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Blank figure hack: is there a better way?

2004-08-10 Thread Brooks Moses
I'm doing a document which has a large logo in the upper right corner of 
the page.  The logo (which is on a background layer) intrudes into the text 
area by a small amount, and so it would be nice to have the text wrap 
around it rather than having to do the wrapping by manual spacers and 
line-breaks.

The obvious solution that I came up with for this is to put a blank 
right-aligned float at the top of each page (it's a presentation where all 
the page breaks are hand-coded, so that's easy to do), of about the size of 
the part of the logo that intrudes into the text.  I defined a class of 
floats just for this:

  \definefloat[logospacer][logospacer]
(Using the same name for the singular and plural was a hack to get around 
the fact that the manual doesn't indicate which of the two the \setupfloat 
command uses.  Which is it?)

So far, so good.  Except that it's exceptionally hard to _get_ a blank 
float in ConTeXt, particularly one of a specified size.

If I do this (and specify the size in a \setupfloat command):
  \placelogospacer[right, force]{none}{}
I get a nice float exactly the size I want, but with a frame around it and 
the word undefined in the middle.

If I put something in the float -- say, a letter, or a non-breaking space:
  \placelogospacer[right, force]{none}{~}
The float suddenly becomes \textwidth wide, which is of course all wrong, 
but at least I have a blank float that's not undefined.

If I put an \hbox in the float, with a fixed width, it stops stretching to 
fill the pagewidth, but unless I put something that actually makes a mark 
on the page, it still comes up with undefined.  (The ~ that worked 
earlier doesn't work if it's in an \hbox.)  I tried a number of tricks -- 
hiding the nothing in a macro, using a zero-height rule, and so forth -- 
and ConTeXt was sufficiently clever to see through them all.

There's also the annoyance that I have to specify the size of the float by 
the size of the \hbox, rather than in a convenient [width=...,height=...] 
fashion.

Eventually, what I came up with was putting the mark somewhere off the 
page, with the following command:

  \placelogospacer[right, force]{none}{\hbox to 1cm{\hskip 5cm x}}
This of course gives overfull \hbox errors, and is a really ugly hack, 
but the results are acceptable -- a float of size 1cm by 1 x-height, which 
doesn't put marks on the physical page.

How can I do this better?  Better yet, how can I do this properly?
Thanks,
- Brooks

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] 2 m-bib questions

2004-08-08 Thread Brooks Moses
At 10:25 AM 8/8/2004, you wrote:
* I'm going to add some multi-lingual support to m-bib. My idea is, to
  replace in cont-XX.bst and bibl-XXX.tex page by \pagename, and by
  \andname and so on. Is this method ok? If not, how should I do it (not
  too complicated please ;) ?
One problem with that method is that those names seem relatively common, 
and thus likely to lead to conflicts in the future.

I would thus suggest \bibitempagename, \bibitemandname, and 
similar.  (Since ConTeXt allows ! in macro names, maybe 
\bibitem!pagename, \bibitem!andname, and so forth would be more readable.)

- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: new stuff for brave users

2004-08-04 Thread Brooks Moses
On Thu, Aug 05, 2004 at 12:51:13AM +0200, Hans Hagen Outside wrote:
 so ... not you can write a myway about it -)

I seem to have lost my link to the existing MyWays, if I ever had
one.  Where can I find them?

Thanks,
- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Bug report, \frac as redefined in m-newmat.tex

2004-08-03 Thread Brooks Moses
At 01:40 PM 8/2/2004, you wrote:
ah ... the alignment lookahead problem, i think we can safely patch 
\mathematics to catch lookahead as well as make frac more robust for 
unwanted expansion

\usemodule[newmat]
\unexpanded\def\frac#1#2{\mathematics{\genfrac{}{}{}\donothing{#1}{#2}}}
\def\mathematics#1{\relax\ifmmode#1\else$#1$\fi}
[...]
That fixes the problem on my end; thanks!
Will you be updating the defintions of \tfrac, \dfrac, and so forth in 
m-newmat to match?  I admit to not being too sure whether I think it's a 
good idea to support using math constructs such as \frac outside of math 
mode, but I do think that if one's going to do that, it's good to be 
consistent and do it with the variants too.

- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Bug report, \frac as redefined in m-newmat.tex

2004-08-03 Thread Brooks Moses
On Wed, Aug 04, 2004 at 12:14:29AM +0200, Hans Hagen Outside wrote:
 Brooks Moses wrote:
  That fixes the problem on my end; thanks!
 
  Will you be updating the defintions of \tfrac, \dfrac, and so forth in 
  m-newmat to match?  I admit to not being too sure whether I think it's 
  a good idea to support using math constructs such as \frac 
 
 do they need patching? they don't use \mathematics afaik

They don't need patching in the sense of fixing a bug, no -- it's more a
matter of consistency in behavior.

What I see is that there's a list of definitions for \frac, \dfrac,
\tfrac, and various other similar forms, all of which can be used in
math mode only, and do not use \mathematics.

Then, a couple of lines after that, there's the second definition for
\frac, which is the one that needed patching.  This one, unlike the
first definition, is wrapped in \mathematics so that it can work outside
math mode.

So I'm wondering why only \frac has this second definition that allows
it to work outside of math mode.  I would think that things should be
consistent -- either that all of the definitions in the first list
should be changed to use \mathematics, or that \frac should be returned
to the simpler version -- so that \tfrac is still simply \frac typeset
in text mode as one would expect it to be.

Even if they're all left in the current form, I'd think that the unused
definition of \frac in the first list should be removed.

My argument for simplifying \frac to take the \mathematics out of it is
that it is a math-mode construct that typesets its arguments in math
mode, and allowing it to be used outside of math mode encourages sloppy
TeXing.  It also hides the point of transition to math mode, meaning
that x and \frac{1}{x} will typeset x differently, which strikes me as
confusing.  I recognize that this is a very debatable position, though,
and that there are at the very least arguments for backwards
compatiblity that contradict it.

- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: Collecting command arguments in a startstop environment

2004-08-02 Thread Brooks Moses
At 01:37 AM 8/2/2004, you wrote:
 Anyhow, I'm finding myself wanting to do this in ConTeXt, with of
 course replacing \newenvironment with \definestartstop.
I didn't want to fiddle with \definestartstop, but here is a quick
hack:
--
\long\def\foo#1{ Hello #1!}
\long\def\startfoo #1 \stopfoo{\unskip \foo{#1}}
[...]
Oh, that's clever.  I'll have to ponder at whether it's got some drawbacks 
that mean it doesn't work for what I need, but it does seem promising.  Thanks!

- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Bug report, \frac as redefined in m-newmat.tex

2004-08-02 Thread Brooks Moses
The following simple file works fine if I comment out the 
\usemodule[newmat] line, but crashes if I put it in.

  \usemodule[newmat]
  \starttext
  \placeformula
   \startformula
   \eqalign{\frac{1}{2} \cr}
   \stopformula
  \stoptext
- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Collecting command arguments in a startstop environment

2004-08-02 Thread Brooks Moses
To answer my own question:
At 10:39 PM 8/1/2004, I wrote:
There's a nice little problem that arises in LaTeX, of wanting to write a 
bit of code like the following, to define an environment that passes the 
contents of the environment to a command as an argument:

  \newcommand{\foo}[1]{...}
  \newenvironment{fooenv}{%
\foo\bgroup
  }{%
\egroup
  }
There's even a nice FAQ entry about this. [1]  As it turns out, the 
amsmath package defines a handy [EMAIL PROTECTED] command that handles 
collecting the environment body to pass it to a command.

Anyhow, I'm finding myself wanting to do this in ConTeXt, with of course 
replacing \newenvironment with \definestartstop.  Is there by any chance a 
built-in ConTeXt macro that can do this?  Or even things that would make a 
decent foundation for building such a thing?
The \grabuntil and \processbetween commands, as defined in syst-ext.tex, do 
exactly what I'm asking for.

- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Some proposed improvements for t-amsl.tex.

2004-08-02 Thread Brooks Moses
Giuseppe and ConTeXt list members -
Having figured out how to use \grabuntil (see my previous messages to this 
list), I've realized that it's really an inconvenient solution in some 
cases, because it's searching for a literal bit of text rather than an end 
to the appropriate grouping level.  (Apparently there isn't a way to do the 
latter in TeX, given that AMSmath's [EMAIL PROTECTED] also searches for literal 
text.)  This means that, if I write a LaTeX compatibility function that 
does things like define \end{myenvironment} to expand to 
\stopmyenvironment, my redefinition will not work on any environments using 
\grabuntil.

This inconvenience happens to show up in t-amsl.tex's align and gather 
implementations, which is one place where I really need that compatibility 
function.  However, it turns out that there's a simple way to rewrite the 
implementation so to avoid needing \grabuntil.

Mostly, this works on the fact that the definition of Plain TeX's \eqalign 
function can be split apart into a before and after part, as follows:

\def\starteqalign{\null\,\vcenter\bgroup
  \openup\jot {\mathsurround=0pt}%
  \ialign\bgroup
  \strut\hfil$\displaystyle{##}$$\displaystyle{{}##}$\hfil
  \crcr}
\def\stopeqalign{\crcr\egroup\egroup\,}
(This, aside from the \bgroup's and \egroup's, is copied directly from 
Appendix B of The TeXbook.)  Thus, we could expand the instances of 
\eqalign in the \startalign and \startgather definitions, shuffle things 
around appropriately, and obtain the following:

\def\startalign{\startformula
   \let\\\cr
   \starteqalign}
\def\stopalign{\crcr\stopeqalign\stopformula}
\def\startgather{\startformula
   \def\\{\cr}%
   \starteqalign}
\def\stopgather{\crcr\stopeqalign\stopformula}
This exactly duplicates the existing functionality in the t-amsl.tex 
package.  However, that functionality could be improved to be a better 
match to what's provided in amsmath.tex; in particular, align should accept 
multiple columns of equations, and gather should center its lines.  Thus, I 
propose that the following redefinitions be included in t-amsl:

\def\startalign{\startformula
  \let\\\cr
  \null\vcenter\bgroup
  \openup\jot {\mathsurround=0pt}%
  \everycr={}\tabskip=4pt plus1fil \halign to \displaywidth\bgroup
  \strut\hfil$\displaystyle{##}$%
  \tabskip=0pt $\displaystyle{{}##}$\hfil%
  \tabskip=4pt plus1fil \hfil$\displaystyle{##}$%
  \tabskip=0pt $\displaystyle{{}##}$\hfil%
  \tabskip=4pt plus1fil \crcr}
\def\stopalign{\crcr\crcr\egroup\egroup\stopformula}
\def\startgather{\startformula
  \let\\\cr
  \null\,\vcenter\bgroup
  \openup\jot {\mathsurround=0pt}%
  \ialign\bgroup
  \strut\hfil$\displaystyle{##}$\hfil
  \crcr}
\def\stopgather{\crcr\crcr\egroup\egroup\,\stopformula}
Also, a similar method can be used to replicate the split environment 
(which, unlike the above, should go inside an explicit \startformula and 
\stopformula pair).  I propose the following definition be added as well:

\def\startsplit{%
  \let\\\cr
  \null\,\vcenter\bgroup
  \openup\jot {\mathsurround=0pt}%
  \ialign\bgroup
  \strut\hfil$\displaystyle{##}$$\displaystyle{{}##}$\hfil
  \crcr}
\def\stopsplit{\crcr\egroup\egroup\,}
This still doesn't address the fact that the lines in the align and gather 
environments are not given individual equation numbers as they should be, 
but I think that is a project for another day.

- Brooks
P.S. A question: is it intentional that the array environment in t-amsl 
produces notably different spacing than LaTeX's array environment?

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Best source of ConTeXt documentation?

2004-08-01 Thread Brooks Moses
In my efforts to learn ConTeXt, I'm continually getting stuck by a lack of 
having complete documentation.  For example, consider the \definestartstop 
command, which I was recently looking at.

* In the cont-enp.pdf manual, it's not mentioned.
* In the mp-cp-en.pdf manual, there's an example of it, but it's not really 
very clear what the difference is between what the commands= and 
before= options do.  In addition, there's no indication whether these are 
all the possible options or not, or whether there's any way to define a 
start/stop pair that takes an argument.

* In the source, I can find the definitions, but for that particular one 
there seems to be very little commentary, and I also suspect I'd need to be 
rather familiar with the ConTeXt core before I could understand it -- I 
certainly can't see where the before= goes in, for instance.

And that's about all I know about, other than doing a Google search on the 
mailing-list archives, which rarely addresses the general stuff.

Is this all due to an actual lack of documentation for ConTeXt itself, or 
is there something large and important that I'm missing?

Thanks,
- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Collecting command arguments in a startstop environment

2004-08-01 Thread Brooks Moses
There's a nice little problem that arises in LaTeX, of wanting to write a 
bit of code like the following, to define an environment that passes the 
contents of the environment to a command as an argument:

  \newcommand{\foo}[1]{...}
  \newenvironment{fooenv}{%
\foo\bgroup
  }{%
\egroup
  }
There's even a nice FAQ entry about this. [1]  As it turns out, the amsmath 
package defines a handy [EMAIL PROTECTED] command that handles collecting the 
environment body to pass it to a command.

Anyhow, I'm finding myself wanting to do this in ConTeXt, with of course 
replacing \newenvironment with \definestartstop.  Is there by any chance a 
built-in ConTeXt macro that can do this?  Or even things that would make a 
decent foundation for building such a thing?

Thanks much,
- Brooks
[1] http://www.tex.ac.uk/cgi-bin/texfaq2html?label=cmdasenv
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] PDFTeX Homepage

2004-07-31 Thread Brooks Moses
At 12:56 AM 7/31/2004, you wrote:
If I google for pdfTeX homepage, then I get the following link:
http://www.tug.org/applications/pdftex/
However, this must not be the official homepage as it seems to not have been
updated in a long time and also does not mention anything about the available
1.20 version.
This is, as best I can tell, the official homepage.  See below for why it's 
quite reasonable that it doesn't contain version 1.20.

Also I cannot find the file named pdftexlib.zip as mentioned in the user
manual on the above site.
Where I can find the latest and greatest versions and documentatio on PDFTeX?
The official testing page, which contains version 1.20a-rc6 -- you'll note 
that version is still only a release candidate in testing, not an official 
release, which is undoubtably why it's not available on the official 
distribution site -- is at:
  http://pdftex.sarovar.org/

I find very few online references to pdftexlib.zip, and all of them are 
rather old, so I wonder if the files it contains are now included in with 
the rest of the standard distibution rather than being a separate file.

I suspect that the documentation at http://www.tug.org/applications/pdftex/ 
is as up-to-date as exists.

- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Converting math from LaTeX to ConTeXt

2004-07-29 Thread Brooks Moses
At 04:42 AM 7/27/2004, you wrote:
On Sun, Jul 25, 2004 at 10:31:24PM -0700, Brooks Moses wrote:
[things I need to translate from LaTeX to ConTeXt]
   \renewcommand{\vec}[1]{{\boldsymbol{#1}}}
   \renewcommand{\hatn}{\hat{\vec{n}}}
   \newcommand{\filter}[1]{\overline{#1}}
You can use the tex primitve
\def\vec#1{{\boldsymbol{#1}}
or the context way
\define[1]\vec{{\boldsymbol{#1}}
But afaik there is no checking if a command is already defined?
I started poking through the ConTeXt source to see what I could find, and 
came across the following in the syst-ext.tex file:

  \def\define#1%
{\ifx#1\undefined
   \expandafter\def
 \else
   \message{[\noexpand#1is already defined]}%
   \expandafter\def\expandafter\gobbleddefinition
 \fi#1}
  \def\redefine#1%
{\ifx#1\undefined\else
   \message{[\noexpand#1is redefined]}%
 \fi
 \def#1}
This appears to be doing the checks for commands being previously defined 
or not, as desired.  However, I'm completely lost as to how we get from 
here to the \define[1] syntax.  What am I missing?

- Brooks
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context