[NTG-context] List of special characters?

2006-12-25 Thread cormullion
Is there a list of special characters anywhere (eg \percent,  
\upperleftsingle6quote, etc) ? I'm trying to insert a |, at the  
moment, but I can't find a list...


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


[NTG-context] Making a verbatim file for another language

2006-12-25 Thread cormullion
I'm going to try to make a 'verbatim- module' (don't know what the  
right word is) for another language. I've found:

/usr/local/teTeX/share/texmf.tetex/tex/context/base/verb-pl.tex

and can probably have a go at making a version of this. Some  
questions occur:

1: where should i put my file?
2: do I have to do anything else to get Context to recognise and use it?

cheers


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


Re: [NTG-context] Making a verbatim file for another language

2006-12-25 Thread Taco Hoekwater
[EMAIL PROTECTED] wrote:
 I'm going to try to make a 'verbatim- module' (don't know what the  
 right word is) for another language. I've found:
 
 /usr/local/teTeX/share/texmf.tetex/tex/context/base/verb-pl.tex

The syntax of your intended language is indeed similar to perl?

There a few definition files already there, and you should start
from the one that is closest to the language you want to define
(especially wrt comment and string syntax).

   verb-cC
   verb-eif  Eiffel
   verb-js   JavaScript
   verb-jv   Java
   verb-mp   MetaPost  MetaFont
   verb-pas  Pascal  Modula
   verb-pl   Perl 5
   verb-sql  SQL
   verb-tex  TeX
   verb-xml  XML

 and can probably have a go at making a version of this. Some  
 questions occur:
 
 1: where should i put my file?

Possibly the
best place is: in the context distribution, but that depends a bit
on what language it is, precisely (you can email me
the completed file, in that case).

Second best place: http://modules.contextgarden.net, so it can be
included in cont-ext.zip (third-party addons that
are distributed by Pragma-Ade alongside the normal
distribution).

Third best:The directory $HOME/texmf/tex/context/base (the
place where your TeX installation finds local files,
I do not immediately recall the name gwTeX uses).

Final option:  Same directory as the file to be processed

 2: do I have to do anything else to get Context to recognise and use it?

Your file has to have a name like verb-.tex, with  a lowercase
short identifier (example: verb-php.tex), and then you have to use one
or two commands to make ConTeXt use the file.

First:

\installprettytype [PHP][PHP]

This maps the command \starttyping[option=PHP] to verb-php.tex.
The first argument is the option as passed to \starttyping,
the second argument is an uppercase version of  (thus
allowing context to find the file),

And you probably also want:

\definetyping[PHP]   [option=PHP]

Because that allows  \startPHP ... \stopPHP as a shortcut to
\setuptyping[option=PHP]


Good luck, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] List of special characters?

2006-12-25 Thread Taco Hoekwater
[EMAIL PROTECTED] wrote:
 Is there a list of special characters anywhere (eg \percent,  
 \upperleftsingle6quote, etc) ? I'm trying to insert a |, at the  
 moment, but I can't find a list...

I don't know if there is a list out there somewhere by a user, but
there is no 'official' one that I know of. Sounds like you are
looking for \textbar (found by grepping for \definecharacter in
the ConTeXt sources).

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


Re: [NTG-context] Installing Cyrillic font

2006-12-25 Thread Taco Hoekwater

Hi,

Vyatcheslav Yatskovsky wrote:
 Hello
 
 I'm looking for help with installing the Adobe Times font with
 Cyrillic support.
 
 I have TIR_.PFB and all other companion files. It surely contains
 Cyrillic glyphs because I can type Russian using a font viewer. I run
 the texfont utility as follows

 texfont  -fontroot=e:/texmf --sourcepath=. --vendor=adobe
 --encoding=t2a --collection=timescyr --makepath --install
 
 and it performs good. But created t2a-adobe-timescyr.pdf test file
 shows no Cyrillic glyphs (it seems like there are vacant empty spaces
 from 192 to 255). Also I cannot make use of Russian in my context
 scripts. (Latin goes well)

Assuming your copy of TIR_.PFB really has cyrillic (I am a bit
   suspicious because mine doesn't, and Adobe's website says that the
   character set for Times Std is Adobe Western 2, and that
   charset doesn't contain cyrillic at all.
   But I could be wrong and/or just confused by the file name):

The most likely problem is that you do not have a correct .enc file
(the log of the t2a-adobe-timescyr.tex pdftex run would definately
help).

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


Re: [NTG-context] Installing Cyrillic font

2006-12-25 Thread Taco Hoekwater
Hi Vyatcheslav,

(I intercepted your message because it was a bit too big for the list)


 From Vyatcheslav Yatskovsky [EMAIL PROTECTED]:
 
 This is the INF file for my Times-Roman:
 
 FontName (Times-Roman)
 FullName (Times Roman)
 AppleName (Times)
 AppleFONDID 20
 FamilyName (Times)
 version (001.007)
 isFixedPitch false
 CharacterSet (isoadobe)
 Encoding (StandardEncoding)
 ItalicAngle 0
 CapHeight 662
 UnderlinePosition -100
 UnderlineThickness 50
 StemWidth 84
 Serif true
 Pi false
 SuperiorBaseline 270
 MSMenuName (Times)
 VPMenuName (Times Roman)
 WORDMenuName (Times)
 VPTypefaceID 14
 VPStyle (N)
 PCFileNamePrefix (TIR__)
 PCLTypefaceID 20485
 PCLStrokeWeight 0
 PCLStyle 0

I am sorry to say that this really looks like the INF of the standard
Times-Roman font that does not have cyrillic glyphs (and the same was
true of your log file).

Can you explain to the people on the list how you could successfully
use cyrillic, what operating system you are using, and in which
previewer exactly?

I myself am lost as to what is going wrong exactly, but I find it
hard to believe that the previewer is using tir_.pfb, from the
information you have provided so far.

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


Re: [NTG-context] Making a verbatim file for another language

2006-12-25 Thread cormullion
On 2006-12-25, at 10:38.0, Taco Hoekwater wrote:

 [EMAIL PROTECTED] wrote:
 I'm going to try to make a 'verbatim- module' (don't know what the
 right word is) for another language. I've found:

 Good luck, Taco

Thanks - I'll need it, I think. ;-) Your very helpful reply is most  
appreciated.

cheers

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


Re: [NTG-context] List of special characters?

2006-12-25 Thread pete . boardman
On 2006-12-25, at 10:46.0, Taco Hoekwater wrote:

 [EMAIL PROTECTED] wrote:
 Is there a list of special characters anywhere (eg \percent,
 \upperleftsingle6quote, etc) ? I'm trying to insert a |, at the
 moment, but I can't find a list...

 I don't know if there is a list out there somewhere by a user, but
 there is no 'official' one that I know of. Sounds like you are
 looking for \textbar (found by grepping for \definecharacter in
 the ConTeXt sources).

Thanks Taco - textbar is indeed the one. I'll do some more searching  
and find the rest. But a list sounds like a nice thing to have...


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


[NTG-context] Spacing after defined word: beginner's question

2006-12-25 Thread cormullion
This must be a beginner's question, but I can't find the answer to it  
in the manuals...

Take this ConTeXt source:

--
\def\Acme{%
{\ss\sc ACME}}

Welcome from \Acme. \Acme make fine products.
--

When this is made into a PDF, it looks like this:

--
Welcome from ACME. ACMEmake fine products.
--

- because I didn't have a space in the definition, I don't get a  
space in the second sentence, but the period didn't interfere with  
the execution of the first occurrence. But if I put a space in the  
definition after the 'E', I get this:

--
Welcome from ACME . ACME make fine products.
--

- and there's a space after the first 'E', which I don't want, even  
though there is now a space after the second...

What am I doing wrong?
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Spacing after defined word: beginner's question

2006-12-25 Thread Aditya Mahajan
On Mon, 25 Dec 2006, [EMAIL PROTECTED] wrote:

 This must be a beginner's question, but I can't find the answer to it 
 in the manuals...

:) Read below.

 Take this ConTeXt source:
 
 --
 \def\Acme{%
   {\ss\sc ACME}}
 
 Welcome from \Acme. \Acme make fine products.
 
 When this is made into a PDF, it looks like this:
 --
 Welcome from ACME. ACMEmake fine products.

 [snip]

 What am I doing wrong?

You are not doing anything wrong. This is how TeX operates. A macro 
with no argument gobbles the spaces after it. One way to ensure that 
you get a space is to tell TeX that you are done with the macro, for 
example

Welcome from \Acme. \Acme{} makes fine products.

or

Welcome from \Acme. \Acme\ makes fine products.

After a while you get used to adding a \ where you want. There is an 
automated way, but it is (and will remain) undocumented. You can 
append \autoinsertnextspace at the end of your macro. So, something 
like

\def\Acme{{\ss\sc ACME}\autoinsertnextspace}

The reason that this is undocumented is because it makes it harder for 
other parsers to parse TeX.

BTW, ConTeXt has a sorting and abbreviation mechanism for the kind 
of thing that you are doing. With \definesorting or \abbreviation, you 
can also get a list of logos or list of abbreviations free of cost :). 
Look up the manual for details. And as a futher incentive, you can use

\setupsorting[logo][next=\autoinsertnextspace]

to get the behaviour you want.

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


Re: [NTG-context] pb inserting multipage documents

2006-12-25 Thread Aditya Mahajan
On Sat, 23 Dec 2006, olivier Turlier wrote:

 Le Thu, 21 Dec 2006 11:23:03 -0500, Aditya Mahajan a écrit :

 On Thu, 21 Dec 2006, olivier Turlier wrote:

 PS : I try to frenchise your well documented  nice homework
 assignment seen at http://dw.tug.org/pracjourn/2006-4/mahajan/

 If you just want the Problem and Solution to come out in french,
 you can just change

 \setuplabeltext[problem=Problem,solution=Solution ]
 \setuplabeltext[point=point,points=points]

 If you want to change the interface \assignment, \startproblem and
 \startsolution to french, let me know the french words for them, and I
 will try to re-implement the environment in a multi-lingual way, and
 maybe release it as a module.

 Aditya

 Thanks for the hint. I'll put on the same website
 (http://profteb.free.fr/) results of changements of your source, plus
 prior attempts in homework assignment/ examination test, when it'll be
 done.

Send me an email when you are done with it.

 By the way, have you tried to make online tests (sendable by a click)
 with random order of questions (avoid copying pbs thru neighboors). It's
 involving javascript (answering in editable fields + feedback + collecting
 answers when sending, etc. ) and I never succeed in !

The randomizing part is easy (since Hans has already implemented 
that). See 
http://archive.contextgarden.net/message/20060528.172535.9581c3c3.en.html

I have never tried the online part, since I never needed it. There 
is AcroTeX by D. P. Story. See http://www.acrotex.net/ in particular
the examples at http://www.acrotex.net/aeb_index.php?page=examples

This shows that this type of things is doable in JavaScript. I have 
not looked at AcroTeX license, maybe it allows you to copy the 
javascript code, and you can then try to implement it in ConTeXt.

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


Re: [NTG-context] Making a verbatim file for another language

2006-12-25 Thread Mojca Miklavec
On 12/25/06, [EMAIL PROTECTED] wrote:
 I'm going to try to make a 'verbatim- module' (don't know what the
 right word is) for another language. I've found:

 /usr/local/teTeX/share/texmf.tetex/tex/context/base/verb-pl.tex

 and can probably have a go at making a version of this. Some
 questions occur:

 1: where should i put my file?
 2: do I have to do anything else to get Context to recognise and use it?

 cheers

Unless you need that highlighting urgently, I would wait for luatex in
your case and write it in lua then (which is certainly less painful
than writing it in plain TeX). But it's up to you. I found those TeX
definitions too complicated to even try to understand, I would never
dare to try writing one by myself.

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


Re: [NTG-context] List of special characters?

2006-12-25 Thread Mojca Miklavec
On 12/25/06, [EMAIL PROTECTED] wrote:
 On 2006-12-25, at 10:46.0, Taco Hoekwater wrote:

  [EMAIL PROTECTED] wrote:
  Is there a list of special characters anywhere (eg \percent,
  \upperleftsingle6quote, etc) ? I'm trying to insert a |, at the
  moment, but I can't find a list...
...
 Thanks Taco - textbar is indeed the one. I'll do some more searching
 and find the rest. But a list sounds like a nice thing to have...

There's a file contextnames.txt in the ConTeXt tree, see
http://source.contextgarden.net/context/data/contextnames.txt
Or a html version of it on
http://pub.mojca.org/tex/enco/contextlist/contextnames.html
- sorry, I should find a better place for it. However, there's only
the most common name listed (some glyphs have synonyms and they're not
collected there).

If you have any comments or suggestions, feel free to tell them.

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


Re: [NTG-context] Spacing after defined word: beginner's question

2006-12-25 Thread Wolfgang Schuster
On Mon, 25 Dec 2006 16:45:15 +
[EMAIL PROTECTED] wrote:

 This must be a beginner's question, but I can't find the answer to it  
 in the manuals...
 
 Take this ConTeXt source:
 
 --
 \def\Acme{%
   {\ss\sc ACME}}
 
 Welcome from \Acme. \Acme make fine products.
 --
 
 When this is made into a PDF, it looks like this:
 
 --
 Welcome from ACME. ACMEmake fine products.
 --
 
 - because I didn't have a space in the definition, I don't get a  
 space in the second sentence, but the period didn't interfere with  
 the execution of the first occurrence. But if I put a space in the  
 definition after the 'E', I get this:
 
 --
 Welcome from ACME . ACME make fine products.
 --
 
 - and there's a space after the first 'E', which I don't want, even  
 though there is now a space after the second...
 
 What am I doing wrong?

Hi ???,

TeX ignores spaces after commands. This is now problem when your
command is before an period, comma ...,but it will it up the next space
in a sentence.

You can write you sentence in the following ways:
  Welcome from \Acme. \Acme\ make fine products.
  Welcome from \Acme. \Acme{} make fine products.
  Welcome from \Acme. {\Acme} make fine products.

There is also a predefined command to define and setup your own
abbreviations and syonyms. You can find an example at page 55 in the
beginners manual (ma-cb-en.pdf).

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


Re: [NTG-context] Making a verbatim file for another language

2006-12-25 Thread Aditya Mahajan
On Mon, 25 Dec 2006, Mojca Miklavec wrote:

 On 12/25/06, [EMAIL PROTECTED] wrote:
  I'm going to try to make a 'verbatim- module' (don't know what the
  right word is) for another language. I've found:
 
  /usr/local/teTeX/share/texmf.tetex/tex/context/base/verb-pl.tex
 
  and can probably have a go at making a version of this. Some
  questions occur:
 
  1: where should i put my file?
  2: do I have to do anything else to get Context to recognise and use it?
 
  cheers
 
 Unless you need that highlighting urgently, I would wait for luatex in
 your case and write it in lua then (which is certainly less painful
 than writing it in plain TeX). But it's up to you. I found those TeX
 definitions too complicated to even try to understand, I would never
 dare to try writing one by myself.

Any update on 2context.vim? Then things could be as simple as

\startVIMtyping[ft=mylang,colorscheme=fancy]
Your code
\stopVIMtyping

with a external call to vim -u NONE buffer.tmp
with an appropriate autocommand to set filetype, colorscheme and 
source 2context.

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


[NTG-context] mkiv files

2006-12-25 Thread plink
Hi,

I am wondering if there are some of the mkiv files available anywhere? 
It would make luatex experiments so much more ConTeXish ...

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