[NTG-context] Possible bug in texexec

2004-04-15 Thread Morten Høgholm
Dan Luecking has reported the following problem on c.t.t.:

When mptopdf is used on a .mp file it preprocesses the file and
the result (on my system it seems always to be named mptrace.tmp)
is run through mpost.  This mptrace.tmp has new-lines after every
semicolon (;).  This causes an error when the semicolon is part of
a literal string, because mpost syntax requires such strings to be
entirely on one line.
I mentioned also texexec, because mptopdf seems to call texexec for
some purposes. I know too little perl to even know what to look for,
much less propose a patch.
This behavior has been confirmed under WinXP (fptex = TeXLive8) and
Mac OS X (tetex).
This particular problem can affect the latest mfpic (0.7, which I
maintain) if a user processes mfpic's .mp output file with mptopdf.
Users can work around the bug by modifying their copy of mfpic.tex,
changing the line
   GBmsg "Bad mfpic installation; mfpic and grafbase %
to something like
   GBmsg "Bad mfpic installation: mfpic and grafbase %
This change will be provided as patch to mfpic shortly.
--
Morten Høgholm
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt and the blind

2004-04-15 Thread Hans Hagen
At 17:32 15/04/2004, you wrote:

There is a utility called untex, that strips LaTeX formating from a tex
file.  I didn't test it with ConTeXt, but it may work too.  If you can
produce a dvi file, there is couple of programs: dvi2tty  and catdvi
that can extract text from a dvi file,  Finally, pdftotext, which I
believe is a part of the xpdf package, can extract text from many pdf
files.
Finally, there is a program called tex2page, that convert TeX to html.
Unlike latex2html, it can handle at least some plain TeX, so it may be
possible to use it on ConTeXt files.  Again, I didn't try it.  If you
want to experiment with it, it is at
http://www.ccs.neu.edu/home/dorai/tex2page/tex2page-doc.html
since most context commands are instances of more generic ones, you can 
define another style to process the file to something suited for blind, say:

\setuphead[chapter][style=normal]

but that could be a lot of work. More simple is to use pdftotext which 
works ok for most cases,

\setuplayout[header=0pt,footer=0pt]
\setupcolumns[n=1]
is then probably enough

btw, there are ways to get auditive info in the pdf file, for instance let 
the voice engine speak and so

Hans  

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


Re: [NTG-context] vim syntax file for ConTeXt

2004-04-15 Thread Gour
John Culleton ([EMAIL PROTECTED]) wrote:

> I just use the generic TeX syntax file.  It works well 
> enough to satisfy me. I have programmed the F5 key to wite 
> out the current file and texexec a file called "book.tex."  
> F3 fires up Xpdf for "book.pdf." As you may know Xpdf can 
> update on the fly when the file being viewed is changed 
> without losing the page location. this combination gives me 
> semi-wsywig without ever leaving Gvim.  

Today I got a reply on comp.text.tex that there was some context.vim file
circulating around in the past. Are you aware of it?

It would be nice to take more advantage of vim capabilities, isn't it?

Sincerely,
Gour

-- 
Gour
[EMAIL PROTECTED]
Registered Linux User #278493

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


[NTG-context] Re: request for help with suffix arrays

2004-04-15 Thread Jonathan Nicholl
Message: 11
From: "vinuth madinur" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Thu, 15 Apr 2004 11:40:27 +0800
Subject: [NTG-context] Re: help required w.r.t " vardef "
Reply-To: [EMAIL PROTECTED]
Thanks Hans!
  That wolud help me a lot.Also thanks for the reference u 
mentioned.I'll try it.

Now one last thing :

 Is there a way of having variable arrays whose contents can be used 
as "suffixes"?

 something like ,

a[0]:= "A" ;
a[1]:= "B" ;
a[2]:= "C" ;   %a variable array "a[]"
there are other three "pair" variables : T.A,T.B,T.C;

so now I want to have ,

i := 0;
T.a[i] = blahblah();
so here I want to use the contents of "a[]" as suffix of variable " T 
" .

I don't know what kind of data type to use for "a[]".
I tried a[] as string type and used it with
 forsuffixes $=a[0],a[1],a[2]:
   .
 endfor;
but this does not work.
So, can u please help me out here?
thanx in advance.
Vinuth.
--
__
Check out the latest SMS services @ http://www.linuxmail.org
This allows you to send and receive SMS through your mailbox.
Powered by Outblaze
You could use 'scantokens':

	string a[];

a 1 := "A";
a 2 := "B";
a 3 := "C";
T A := 11;
T B := 12;
T C := 13;
for i = 1 upto 3:
show (T scantokens a [i]);
endfor;
	end

This produces the output

>>11
>>12
>>13
The idea is to store the suffixes as strings, and then use 'scantokens' 
to extract them.

Best wishes,

Jonathan

---

Jonathan Nicholl
Department of Philosophy
King's College London
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Generalized \installcompoundcharacter

2004-04-15 Thread Gary Pajer
Aha.  Now I get it.  I withdraw my comment, and wait for more expert
opinion.

-Gary


- Original Message - 
From: "Matija Pretnar" <[EMAIL PROTECTED]
> Maybe I gave a bad example.
> Try this one.
> http://www.pretnar.info/compare.pdf
>
> On 15. apr 2004, at 16:38, Gary Pajer wrote:
>
> >> With the advent of UTF-8, there comes a great possibility to improve
> >> readability of the TeX code.
> >> For example: instead of \int_a^b, you could write S_a^b, where S is
> >> the
> >> character for integral.
> >
> > IMHO, this is less readable.
> > ___
> > ntg-context mailing list
> > [EMAIL PROTECTED]
> > http://www.ntg.nl/mailman/listinfo/ntg-context
> >
>
> ___
> ntg-context mailing list
> [EMAIL PROTECTED]
> http://www.ntg.nl/mailman/listinfo/ntg-context

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


Re: [NTG-context] ConTeXt and the blind

2004-04-15 Thread Jan Hlavacek
On Wed, Apr 14, 2004 at 04:50:04PM -0400, Alan Bowen wrote:

> So, does anyone on the list have ideas about how to produce such files 
> from the files I currently have in hand or any experience with this 
> sort of problem? Is there, for instance, a way to strip away all the 
> formatting commands from a ConTeXt source file automatically so as to 
> leave an unencoded .txt file that I could send him? I gather that he 
> can use .htm files, but so far as I can tell there is no path from a 
> ConTeXt source file to an HTML file?at least, a specific query about 
> this made recently on this list by someone else seems to have gone 
> unanswered.

There is a utility called untex, that strips LaTeX formating from a tex
file.  I didn't test it with ConTeXt, but it may work too.  If you can
produce a dvi file, there is couple of programs: dvi2tty  and catdvi
that can extract text from a dvi file,  Finally, pdftotext, which I
believe is a part of the xpdf package, can extract text from many pdf
files. 

Finally, there is a program called tex2page, that convert TeX to html.
Unlike latex2html, it can handle at least some plain TeX, so it may be
possible to use it on ConTeXt files.  Again, I didn't try it.  If you
want to experiment with it, it is at
http://www.ccs.neu.edu/home/dorai/tex2page/tex2page-doc.html

-- 
Jan Hlavacek(260) 434-7566
Department of Mathematics [EMAIL PROTECTED]
University of Saint Francis   http://www.sf.edu/jhlavacek/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Generalized \installcompoundcharacter

2004-04-15 Thread Matija Pretnar
Maybe I gave a bad example.
Try this one.
http://www.pretnar.info/compare.pdf
On 15. apr 2004, at 16:38, Gary Pajer wrote:

With the advent of UTF-8, there comes a great possibility to improve
readability of the TeX code.
For example: instead of \int_a^b, you could write S_a^b, where S is 
the
character for integral.
IMHO, this is less readable.
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Generalized \installcompoundcharacter

2004-04-15 Thread Gary Pajer
> With the advent of UTF-8, there comes a great possibility to improve 
> readability of the TeX code.
> For example: instead of \int_a^b, you could write S_a^b, where S is the 
> character for integral. 

IMHO, this is less readable.
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Generalized \installcompoundcharacter

2004-04-15 Thread Matija Pretnar
With the advent of UTF-8, there comes a great possibility to improve 
readability of the TeX code.
For example: instead of \int_a^b, you could write S_a^b, where S is the 
character for integral. Or greek letters and any other math symbol 
imaginable.
I tried using \installcompoundcharacter S {\int} and similar commands 
and all the characters show up nicely, but the spacing is all wrong, 
because they are interpreted as variables instead of operations, 
relations, ...
I think this replacement would be easy to implement (if it isn't 
already implemented), because with math symbols, you don't have to 
worry about hyphenation. You could simply replace the characters with 
corresponding command before sending it to TeX. I already made some 
kind of python script that does that, but for each file separately. And 
with many files, you have to preprocess each one individually, which 
sums up to another shell script and many temporary files.

Cheers, Matija

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


Re: [NTG-context] ConTeXt and the blind

2004-04-15 Thread Bill McClain
On Thu, 15 Apr 2004 10:00:12 -0400
Alan Bowen <[EMAIL PROTECTED]> wrote:

> Thank you very much for the suggestions. I will explore pdftotext and 
> the Acrobat _Save As_ options. 

Another issue with these methods is that the header and footer
information on each page will be included, which could be irritating or
helpful, depending on the application.

> One of the problems for all_and perhaps
> it is insuperable_is the ability of such reading software to present 
> phrases in foreign languages and mathematical expressions.

I haven't done any XML writing, but I think that would be the superior
approach. If special elements of the text are tagged, then they could be
translated appropriately for the blind reader. 

I use a text-to-speech program for proofing some of my documents and
have found it helpful to filter the original text and emit a coded
version which makes it easy for the speech program to read, and easier
for me to understand. I'll have it say "quote", "endquote", "italics",
etc. I'm working from the Context source directly, but XML sources could
be used similarly, and there are lots of XML tools in the world. 

-Bill
-- 
Sattre Press  History of Astronomy 
http://sattre-press.com/   During the 19th Century
[EMAIL PROTECTED]   by Agnes M. Clerke
  http://sattre-press.com/han.html
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt and the blind

2004-04-15 Thread Alan Bowen
Bill, Erik, and Matthew—

Thank you very much for the suggestions. I will explore pdftotext and 
the Acrobat “Save As” options. One of the problems for all—and perhaps 
it is insuperable—is the ability of such reading software to present 
phrases in foreign languages and mathematical expressions. I will 
report to you at least on what I discover.

Best, Alan

On Apr 14, 2004, at 7:44 PM, Matthew Huggett wrote:

You'd have to do it a file at a time, but does the Acrobat Reader's 
"save as text" function do what you need?

A much bigger solution would be to have your source as xml and then go 
from there to ConTeXt and pdf or straight to plain text via XSLT.

Matt

Alan Bowen wrote:

I have very recently launched a new journal which has been designed 
on the assumption that it will exist in both electronic form and in 
print—hence, it is produced using ConTeXt and exists natively in PDF 
files. This morning I was asked by a colleague who is totally blind 
whether it would be possible to for him have ASCII or .txt files that 
he could use easily with his screen reading software. (My sense is 
that he may be able to use PDF files with this software, but that it 
is not easy.)

So, does anyone on the list have ideas about how to produce such 
files from the files I currently have in hand or any experience with 
this sort of problem? Is there, for instance, a way to strip away all 
the formatting commands from a ConTeXt source file automatically so 
as to leave an unencoded .txt file that I could send him? I gather 
that he can use .htm files, but so far as I can tell there is no path 
from a ConTeXt source file to an HTML file—at least, a specific query 
about this made recently on this list by someone else seems to have 
gone unanswered.

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

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