[NTG-context] m-bib and \setupinteraction

2004-06-06 Thread Peter Mnster
Not so important, but strange behaviour:

\setupoutput[pdftex]
\usemodule[bib] % no problem if this line comes after \setupinteraction
\setupinteraction[author=Jan,title=Titel] % strange: title ok, but not author
\starttext
bla
\stoptext

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
_
FilmSearch engine: http://f-s.sf.net/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: pdfTeX questions

2004-06-06 Thread Peter Mnster
On Mon, 31 May 2004, Patrick Gundlach wrote:

  FitBH means, fit to width of bounding box. When reading text on the screen,
  the combination of FullScreen and FitBH seems to me optimal.
 
 I could not find anything like this in ConTeXt.

After a while of searching, I found in spec-fdf.tex the following lines:

\def\PDFpageviewkey{  fit}
\def\PDFpageviewwrd{ /Fit}
\def\PDFpageview   {/View [\PDFpageviewwrd] }

I changed /Fit to /FitBH and indeed, I get lines like this:
/S /GoTo /D [0 /FitBH]
in the pdf-file. When clicking on a link, I get into FitBH mode, but not at
startup. Does anybody know a little bit more about PDF to get this working
as in LaTeX?

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
_
FilmSearch engine: http://f-s.sf.net/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Perl scripting (was: Arabic-utf-8)

2004-06-06 Thread Henning Hraban Ramm
Am Sonntag, 06.06.04, um 02:19 Uhr (Europe/Zurich) schrieb Idris Samawi 
Hamid:

open(NEW,new.tex); #opens file to print out the result
better:
open NEW, , new.tex || die $!;
$_ =~ s/\xD8\xA7/A/g; #this is the actual conversion
if you work with $_ you can leave it out, simply:
s/\xD8\xA7/A/g;
But for a series of conversions I'd suggest an hash for better overview.
Whole script like this:
-
#!/usr/bin/perl -w
use strict;
use warnings;
my ($Source, $Target) = (shift, shift); # gets 2 file names from 
command line

my %conv = (# enhance as needed
\xD8xA7 = A,
\xD8xA8 = b,
\xD8xAC = j,
\xD8xAF = d
);
open SOURCE, , $Source || die $!;
open TARGET, , $Target || die $!;
# there are ways to read a whole file in one scalar,
# e.g. with File::Slurp, but I don't know them by heart...
while (my $line = SOURCE) {
foreach my $key (keys %conv) {
$line =~ s/$key/$conv{$key}/g;
} # foreach
print TARGET $line;
} # while
close SOURCE;
close TARGET;
-
BTW: ActiveState has Perl 5.8.4, at least for Windows (I use it at 
work).

Grüßlis vom Hraban!
--
http://www.fiee.net/texnique/
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Arabic-utf-8 (plus a sample)

2004-06-06 Thread George N. White III
On Sat, 5 Jun 2004, Idris Samawi Hamid wrote:
Hi gang,
For Arabic we use a Latin transcription in Aleph/(e-)Omega (or even ArabTeX) 
unless one of the encoding filters like utf-8 is used. Even for utf-8 files, 
however, it would be very useful to be able to convert a utf-8 file to Latin 
transcription for further processing by Aleph/(e-)Omega. For example, adding 
diacritics is much easier to do in Latin than in an Arabic script editor 
because Latin transcription is one-dimensional and adding diacritics to 
Arabic is a 2-dimen affair.

The best thing would be a perl script but I don't know perl at all (except to 
run some some precreated scripts). If someone out of the kindness of their 
heart could write a short and simple script for just seven characters I could 
do the rest myself and present it back here.
Can you use (or extend) GNU recode?  It does include support for
utf-8 and several TeX encodings.
From the manual: It is easy for a programmer to add a new charset to 
`recode'.  All it requires is making a few functions kept in a single `.c' 
file, adjusting `Makefile.am' and remaking `recode'.

--
  George N. White III [EMAIL PROTECTED]
  Head of St. Margarets Bay, Nova Scotia, Canada
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Perl scripting (was: Arabic-utf-8)

2004-06-06 Thread Idris Samawi Hamid
On Sun, 6 Jun 2004 11:09:32 +0200, Henning Hraban Ramm [EMAIL PROTECTED] 
wrote:

-
#!/usr/bin/perl -w
use strict;
use warnings;
my ($Source, $Target) = (shift, shift); # gets 2 file names from command 
line

my %conv = (# enhance as needed
\xD8xA7 = A,
\xD8xA8 = b,
\xD8xAC = j,
\xD8xAF = d
);
open SOURCE, , $Source || die $!;
open TARGET, , $Target || die $!;
# there are ways to read a whole file in one scalar,
# e.g. with File::Slurp, but I don't know them by heart...
while (my $line = SOURCE) {
foreach my $key (keys %conv) {
$line =~ s/$key/$conv{$key}/g;
} # foreach
print TARGET $line;
} # while
close SOURCE;
close TARGET;
-
Thnx; I'll play around with this as well. BTW: is there any way to do this 
without the hex editor and just enter the full 4-digit character (a la 
Thomas's original suggestion) e.g.,

\x0627 = A
While the hex editor certainly works it is really slow and tedious work...
BTW: ActiveState has Perl 5.8.4, at least for Windows (I use it at work).
Ok, I found it:
http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.3.809-MSWin32-x86.zip
But the web site (at first glance) sure gives one the impression that 
their latest release is
5.6.1.638

http://www.activestate.com/
http://www.activestate.com/Products/ActivePerl/
Best
Idris

--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context