ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* A few questions (mostly about fonts)
@ 2006-08-16 18:52 Jeff Smith
  2006-08-16 20:08 ` Mojca Miklavec
  2006-08-16 20:08 ` Ricard Roca
  0 siblings, 2 replies; 16+ messages in thread
From: Jeff Smith @ 2006-08-16 18:52 UTC (permalink / raw)


Hi!

I'm fairly new to ConTeXt (which I greatly admire, by the way) and
after reading a couple of provided manuals, I have some lingering
questions. I thank anyone in advance for replying to any number of
them.

The fonts manual mentions how TeX is often qualified as 'the font
mess'. Well, yeah, my head hurts right now... :-( Here are some
font-related issues that are very important to me:

a) Somehow I can't come up with small caps in a Times font. Is this
normal? This happens either by using \sc or \setupcapitals[sc=yes]
along with \cap.

b) LaTeX has a package for the International Phonetic Alphabet called
tipa. Is it possible to use it in ConTeXt? If not, can anybody point
me to the relevant manuals that will help me incorporate official IPA
fonts (say, the TTF version) in my ConTeXt installation? I'm using the
stand-alone Windows distribution, btw.

Two language related issues:

c) There was a French language specific package in LaTeX that made
possible the direct use of accented characters in the source text
(like é, à, ô) without using the explicit commands themselves. Can
this be achieved in ConTeXt (because right now their direct use simply
halts the compiling)? I would believe so, since the manual for French
documents by Peter Münster shows how to set up automatic spacing
before the strong punctuation marks (! ? ; :) without explicit
commands every time. I'm guessing the strategy would be the same with
accented characters, but so far I haven't been able to make it work.

d) Is it possible to build some sort of macro that would automatically
make \quotation marks different when inside another \quotation
command? Basically, we use « » (the French guillemets) as standard
quotation marks, but we use single quotes instead inside another
quotation. At this point, I'd only need a yes or no answer. It would
ease my mind to know there can be a way to streamline this usage of
quotation marks, thereby simplifying greatly the input text.

And finally, a silly question:

e) If purists say that LaTeX is to be pronounced latek, is ConTeXt to
be pronounced contekt? :-)

Thanks for your help!
Jeff Smith
Québec, Canada

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-16 18:52 A few questions (mostly about fonts) Jeff Smith
@ 2006-08-16 20:08 ` Mojca Miklavec
  2006-08-16 21:41   ` Hans Hagen
  2006-08-16 22:13   ` Taco Hoekwater
  2006-08-16 20:08 ` Ricard Roca
  1 sibling, 2 replies; 16+ messages in thread
From: Mojca Miklavec @ 2006-08-16 20:08 UTC (permalink / raw)


On 8/16/06, Jeff Smith wrote:
> Hi!
>
> I'm fairly new to ConTeXt (which I greatly admire, by the way) and
> after reading a couple of provided manuals, I have some lingering
> questions. I thank anyone in advance for replying to any number of
> them.
>
> The fonts manual mentions how TeX is often qualified as 'the font
> mess'. Well, yeah, my head hurts right now... :-( Here are some
> font-related issues that are very important to me:

Some of the font mess might disappear when the new pdfTeX comes out
(next year). If you're a font fan and if you're in a hurry, you might
try XeTeX (it supports Unicode & OpenType fonts, which are much easier
to use than if you want to install your own font into TeX tree and use
it with standard pdfTeX), but when I last tried it, it didn't support
inclusion of external figures on Windows. (I don't know if Hans has
included it into the standalone Windows version already.)

> a) Somehow I can't come up with small caps in a Times font. Is this
> normal? This happens either by using \sc or \setupcapitals[sc=yes]
> along with \cap.

Left for someone else to answer.

> b) LaTeX has a package for the International Phonetic Alphabet called
> tipa. Is it possible to use it in ConTeXt? If not, can anybody point
> me to the relevant manuals that will help me incorporate official IPA
> fonts (say, the TTF version) in my ConTeXt installation? I'm using the
> stand-alone Windows distribution, btw.

It's not there yet, but as far as I can remember someone (probably
Taco?, I might be wrong) was willing to help incorporating it if one
of the users would describe what exactly is neeeded and help testing
it.

(with XeTeX and a proper OpenType font you would probably get them
out-of-the-box)

> Two language related issues:
>
> c) There was a French language specific package in LaTeX that made
> possible the direct use of accented characters in the source text
> (like é, à, ô) without using the explicit commands themselves. Can
> this be achieved in ConTeXt (because right now their direct use simply
> halts the compiling)? I would believe so, since the manual for French
> documents by Peter Münster shows how to set up automatic spacing
> before the strong punctuation marks (! ? ; :) without explicit
> commands every time. I'm guessing the strategy would be the same with
> accented characters, but so far I haven't been able to make it work.
>
> d) Is it possible to build some sort of macro that would automatically
> make \quotation marks different when inside another \quotation
> command? Basically, we use « » (the French guillemets) as standard
> quotation marks, but we use single quotes instead inside another
> quotation. At this point, I'd only need a yes or no answer. It would
> ease my mind to know there can be a way to streamline this usage of
> quotation marks, thereby simplifying greatly the input text.

The answer to both questions:

\enableregime[utf-8] % or latin9/iso-8859-15 or cp1252
\mainlanguage[fr]

See lang-ita.tex. I didn't understand which quotes exactly you want to
have, but if you want the english ones for some reason:

\setuplanguage[fr]
   [leftquote=\upperleftsinglesixquote,
    rightquote=\upperrightsingleninequote]

Mojca

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-16 18:52 A few questions (mostly about fonts) Jeff Smith
  2006-08-16 20:08 ` Mojca Miklavec
@ 2006-08-16 20:08 ` Ricard Roca
  1 sibling, 0 replies; 16+ messages in thread
From: Ricard Roca @ 2006-08-16 20:08 UTC (permalink / raw)


Hi!

Quick answers:

> a) Somehow I can't come up with small caps in a Times font. Is this
> normal? This happens either by using \sc or \setupcapitals[sc=yes]
> along with \cap.

Times font that comes with TeX distros doesn't have real small caps, but \cap 
should work, as with any font. The only Times with real small caps is sold by 
Adobe (and others, probably).

> b) LaTeX has a package for the International Phonetic Alphabet called
> tipa. Is it possible to use it in ConTeXt? If not, can anybody point
> me to the relevant manuals that will help me incorporate official IPA
> fonts (say, the TTF version) in my ConTeXt installation? I'm using the
> stand-alone Windows distribution, btw.

Well, some time ago an experimental tipa module for Context was posted in this 
list, but it was never finished. It works only for simple characters (no 
accents, diacritics, tonal marks, etc.; this part was not adapted). I can 
send you it if you want to test a bit. Using non-tipa (computer modern like) 
ipa fonts is difficult, because you would have to write encoding files for 
dvips, ConTeXt, etc. (if you don't understand this terms, better forget 
that). But this happens with pdfTeX...
 I think the way to do ipa typesetting with ConTeXt is using XeTeX. With XeTeX 
you can use ipa *unicode* fonts (not old fonts), like Gentium, Lucida Sans, 
new versions of Doulos, etc., using directly unicode ipa input in your text 
which was not possible with tipa.

> Two language related issues:
>
> c) There was a French language specific package in LaTeX that made
> possible the direct use of accented characters in the source text
> (like é, à, ô) without using the explicit commands themselves. Can
> this be achieved in ConTeXt (because right now their direct use simply
> halts the compiling)? I would believe so, since the manual for French
> documents by Peter Münster shows how to set up automatic spacing
> before the strong punctuation marks (! ? ; :) without explicit
> commands every time. I'm guessing the strategy would be the same with
> accented characters, but so far I haven't been able to make it work.

You can use accented characters in the source with latin1 or utf8 encodings 
(use \enableregime[il1] or [utf]). You can get colon spacing using 
\useencoding[ffr] *before* \mainlanguage[fr] or \fr.

> d) Is it possible to build some sort of macro that would automatically
> make \quotation marks different when inside another \quotation
> command? Basically, we use « » (the French guillemets) as standard
> quotation marks, but we use single quotes instead inside another
> quotation. At this point, I'd only need a yes or no answer. It would
> ease my mind to know there can be a way to streamline this usage of
> quotation marks, thereby simplifying greatly the input text.

Don't know. Possibly, but I'm not a TeX guru.

> And finally, a silly question:
>
> e) If purists say that LaTeX is to be pronounced latek, is ConTeXt to
> be pronounced contekt? :-)

I think it is correct to pronounce ['leiteks] too.

> Thanks for your help!
> Jeff Smith
> Québec, Canada
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-16 20:08 ` Mojca Miklavec
@ 2006-08-16 21:41   ` Hans Hagen
  2006-08-16 22:13   ` Taco Hoekwater
  1 sibling, 0 replies; 16+ messages in thread
From: Hans Hagen @ 2006-08-16 21:41 UTC (permalink / raw)


Mojca Miklavec wrote:
> On 8/16/06, Jeff Smith wrote:
>   
>> Hi!
>>
>> I'm fairly new to ConTeXt (which I greatly admire, by the way) and
>> after reading a couple of provided manuals, I have some lingering
>> questions. I thank anyone in advance for replying to any number of
>> them.
>>
>> The fonts manual mentions how TeX is often qualified as 'the font
>> mess'. Well, yeah, my head hurts right now... :-( Here are some
>> font-related issues that are very important to me:
>>     
don't forget that when tex came around much of this digital font was 
still unexplored

also, any font related mechanism is complex as soon as math gets 
involved; if computer modern would not have had design sizes much would 
have been simplier as well; another factor is that  most font 
subsystems  were written when tex's hash was still small and font memory 
expensive ; of course the (sometimes global) character of font settings 
also plays havoc

anyhow, tex users will always demand features beyond what is easy

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-16 20:08 ` Mojca Miklavec
  2006-08-16 21:41   ` Hans Hagen
@ 2006-08-16 22:13   ` Taco Hoekwater
  2006-08-17  1:19     ` Jeff Smith
  1 sibling, 1 reply; 16+ messages in thread
From: Taco Hoekwater @ 2006-08-16 22:13 UTC (permalink / raw)


Mojca Miklavec wrote:
> 
>>b) LaTeX has a package for the International Phonetic Alphabet called
>>tipa. Is it possible to use it in ConTeXt? If not, can anybody point
>>me to the relevant manuals that will help me incorporate official IPA
>>fonts (say, the TTF version) in my ConTeXt installation? I'm using the
>>stand-alone Windows distribution, btw.
> 
> It's not there yet, but as far as I can remember someone (probably
> Taco?, I might be wrong) was willing to help incorporating it if one
> of the users would describe what exactly is neeeded and help testing
> it.

Yes that was me. Progress would be made faster if I could keep the 
beta-testers from vapourising right after I receide their agreement
email to test stuff.

> (with XeTeX and a proper OpenType font you would probably get them
> out-of-the-box)

Ricard mentioned this also. Anyway, if you want to spend some time
helping me port the functionality of tipa, drop me a line.

Cheers,
Taco

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-16 22:13   ` Taco Hoekwater
@ 2006-08-17  1:19     ` Jeff Smith
  2006-08-17  2:53       ` Mojca Miklavec
  2006-08-17  4:03       ` Aditya Mahajan
  0 siblings, 2 replies; 16+ messages in thread
From: Jeff Smith @ 2006-08-17  1:19 UTC (permalink / raw)


Thank you all for your answers!

A quick follow-up, and a new question at the end:

Ad question a) My problem with Times and small caps was just a bad
mapping of names on my side. So I'm told that \cap should work, and
well, of course it does! :-)

Ad question b) Ricard Roca said:

"I think the way to do ipa typesetting with ConTeXt is using XeTeX.
With XeTeX you can use ipa *unicode* fonts (not old fonts), like
Gentium, Lucida Sans,new versions of Doulos, etc., using directly
unicode ipa input in your text which was not possible with tipa."

This sounds like very, very beautiful music to my ears! Now I'm a
happy man. Still, I have no idea yet how to use XeTeX with ConTeXt,
but I will investigate shortly. This truly is the best solution for my
needs. Thanks!

Ad question c) I already had \enableregime[utf] in my source but it
doesn't work for a reason I still don't know. \enableregime[il1] does
make things work like I wanted, however, but I had to remove the line
\usemodule[french] which I took from the French template I mentioned
in my other mail. So thanks a lot again!

Ad question d) Still waiting to see if someone will come up with an
idea. To explain it in other words, I want to use only one command
(namely, \quote or \quotation) but I want two different types of quote
characters to be used depending on the context. For example:

"This quote has 'quotes' in it."

which would be

\quotation{This quote has \quotation{quotes} in it.}

I'm just inquiring as to the possibility of this being macroed.

New question:

All the examples that I find of \setupparagraphs in the manuals are
cases of different paragraphs layed out in columns. Is it still this
command I have to use in order to style in advance single-column
custom paragraphs that I can apply anywhere according to my needs?
This would seem much better than styling individual paragraphs all
throughout. The thing is, in the document I am typesetting with
ConTeXt (an etymological dictionary), the main organizing unit is the
paragraph, not the chapter, section, and such.

Thanks again for your patience with me! It's greatly appreciated.
Jeff Smith

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-17  1:19     ` Jeff Smith
@ 2006-08-17  2:53       ` Mojca Miklavec
  2006-08-17  4:03       ` Aditya Mahajan
  1 sibling, 0 replies; 16+ messages in thread
From: Mojca Miklavec @ 2006-08-17  2:53 UTC (permalink / raw)


On 8/17/06, Jeff Smith wrote:
> Thank you all for your answers!
>
> A quick follow-up, and a new question at the end:
>
> Ad question a) My problem with Times and small caps was just a bad
> mapping of names on my side. So I'm told that \cap should work, and
> well, of course it does! :-)
>
> Ad question b) Ricard Roca said:
>
> "I think the way to do ipa typesetting with ConTeXt is using XeTeX.
> With XeTeX you can use ipa *unicode* fonts (not old fonts), like
> Gentium, Lucida Sans,new versions of Doulos, etc., using directly
> unicode ipa input in your text which was not possible with tipa."
>
> This sounds like very, very beautiful music to my ears! Now I'm a
> happy man. Still, I have no idea yet how to use XeTeX with ConTeXt,
> but I will investigate shortly. This truly is the best solution for my
> needs. Thanks!

There are two options:
a) ask Hans to include it into the standalone windows distribution (it
might be that he did that already, but I didn't check since it's 200
MB, but it's been updated to the new version today anyway, so it might
be worth refreshing it anyway)

b) Download ftp://akagi.ms.u-tokyo.ac.jp/pub/TeX/win32/xetex-w32.tar.bz2
(I unpack it with Total Commander; you need a plugin for it, available
on the official website)

copy the content of "bin" into "texmf-mswin/bin" (just the missing
files, or simply overwrite them all, I don't think that it makes much
difference)

Copy the content of share/texmf to "texmf". If you really mind, you
can delete the following before copying (but it's not necessary):
- tex/xetex/xelatex
- tex/xetex/generic/hyphen
- tex/xetex/generic/ifxetex
- web2c/xetex/xe[la]tex.fmt
- (doc in case you don't need it)

(web2c/xetex/xetex.pool should better go to texmf-mswin/web2c/, but
that doesn't make that much difference either)

Open setuptex.bat and add the following three lines (surrounded by the
best place where they should be put):

set HOMETEXMF=

set FONTCONFIG_FILE=fonts.conf
set FONTCONFIG_PATH=%TEXMFMAIN%\fonts\conf
set PKGCACHEDIR=%TEXMFMAIN%\fonts\cache

if not "%CTXDEVTXPATH%"=="" SET CTXDEVTXPATH=


Next step is not necessary, but might be handy of you only want to
access some fonts with TeX, but not with OS.

I added the following line to C:\Programs\context\texmf\fonts\conf\fonts.conf:

<dir>c:/Programs/context/texmf/fonts/opentype/public/lm</dir>


Then go to command line and say
    fc-cache -f -v (you have to do that every time when you install a
new font if you want to use it in XeTeX)

    texexec --xtx --make --all

You can then compile your document using
    texexec --xtx filename

See http://wiki.contextgarden.net/Fonts_in_XeTeX for some further instructions.

Basically all you need to do is something like

\definetypeface[gentium][rm][Xserif][Gentium]
\setupbodyfont[gentium,12pt]

\starttext
ɸ β f v θ ð s z ʃ ʒ ʂ ʐ ç ʝ
\stoptext

(But you need an editor suitable for Unicode. See
http://pub.mojca.org/tex/temp/ipa.pdf for the result.)

You can retrieve a list of fonts available on your system with something like:
    fc-list >namelist.txt

I should put that to
http://wiki.contextgarden.net/Windows_Installation, but if Hans ads it
to standalone, the instructions will become obsolete anyway.

> Ad question c) I already had \enableregime[utf] in my source but it
> doesn't work for a reason I still don't know. \enableregime[il1] does
> make things work like I wanted, however, but I had to remove the line
> \usemodule[french] which I took from the French template I mentioned
> in my other mail. So thanks a lot again!

If your document is in latin1 then utf cannot/won't work. (If you also
need the Euro symbol, you should use \enableregime[il9] or [latin9] or
[iso-8859-15] instead of [il1].)

> Ad question d) Still waiting to see if someone will come up with an
> idea. To explain it in other words, I want to use only one command
> (namely, \quote or \quotation) but I want two different types of quote
> characters to be used depending on the context. For example:
>
> "This quote has 'quotes' in it."
>
> which would be
>
> \quotation{This quote has \quotation{quotes} in it.}
>
> I'm just inquiring as to the possibility of this being macroed.

\let\normalquotation=\quotation
\def\quotation#1
	{\bgroup\def\quotation##1{\quote{##1}}\normalquotation{#1}\egroup}

Leaving your last question to the others ...

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-17  1:19     ` Jeff Smith
  2006-08-17  2:53       ` Mojca Miklavec
@ 2006-08-17  4:03       ` Aditya Mahajan
  2006-08-17 16:12         ` Jeff Smith
  1 sibling, 1 reply; 16+ messages in thread
From: Aditya Mahajan @ 2006-08-17  4:03 UTC (permalink / raw)


On Wed, 16 Aug 2006, Jeff Smith wrote:

Mojka answered your other questions.

> New question:
>
> All the examples that I find of \setupparagraphs in the manuals are
> cases of different paragraphs layed out in columns. Is it still this
> command I have to use in order to style in advance single-column
> custom paragraphs that I can apply anywhere according to my needs?
> This would seem much better than styling individual paragraphs all
> throughout. The thing is, in the document I am typesetting with
> ConTeXt (an etymological dictionary), the main organizing unit is the
> paragraph, not the chapter, section, and such.

If I understand you correctly, you can get this by a custom 
environment. For example

\def\startMYLAYOUT%
    {\begingroup
      whatever settings you want}

\def\stopMYLAYOUT{\endgroup\endgraf}

and then you can use

\startMYLAYOUT
....
\stopMYLAYOUT

in your text.

Aditya

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-17  4:03       ` Aditya Mahajan
@ 2006-08-17 16:12         ` Jeff Smith
  2006-08-17 16:55           ` Hans Hagen
                             ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Jeff Smith @ 2006-08-17 16:12 UTC (permalink / raw)


Hi!

Thank you yet another time for the helpful replies. You guys rock! A
couple of things:

Aditya, the \startMYLAYOUT .... \stopMYLAYOUT strategy seems to be
perfect. Thanks!

Now, from Mojca's reply:

> MB, but it's been updated to the new version today anyway, so it might
> be worth refreshing it anyway)

Is it? I still see 2006-08-05 on the download page.... Anyway, I
didn't really think I could come here and ask things directly to Hans!
It seems a good idea, but first I'll try it with your instructions
(see below). I want/need to familiarize myself with at least some of
the technicalities.

> \let\normalquotation=\quotation
> \def\quotation#1
>        {\bgroup\def\quotation##1{\quote{##1}}\normalquotation{#1}\egroup}

This almost works like a charm! I say almost because the command
\mainlanguage[fr] seems to interfere with it. When I comment out this
line, it works, with single quotes (precisly, the six/nine single
quotes) inside English double quotes (" and "). However, the outer
quotes must be the French guillemets « » instead of " " (the inner
ones are fine). That's why I used \mainlanguage[fr]. Can both work
together?

Now, about the XeTeX installation. A few things didn't go as smoothly
as expected. Running fc-cache (with the appropriate parameters, of
course) returned this:

Fontconfig error: Cannot load default config file
fc-cache: "": skipping, no such directory
ret = 0
fc-cache: succeeded

And compiling the document returned the following:

TeXExec | processing document 'd:\context\tex\quotes.tex'
TeXExec | no ctx file found
TeXExec | utf mode forced (bom found)
TeXExec | tex processing method: context
TeXExec | TeX run 1
TeXExec | writing option file quotes.top
TeXExec | using randomseed 412
TeXExec | tex engine: xetex
TeXExec | tex format: cont-en
TeXExec | progname: context
This is XeTeX, Version 3.141592-2.2-0.995 (Web2C 7.5.5)
 \write18 enabled.
 (WARNING: translate-file "natural.tcx" ignored)
kpathsea: Running mktexfmt cont-en.fmt
I can't find the format file `cont-en.fmt'!
TeXExec | runtime: 0.321

By the way, I'm still unsure about what sort of resulting file this
compiling is supposed to give, and how this integrates with my normal
way of building a PDF output with SciTE.

Again, thank you for your patience!
Jeff Smith

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-17 16:12         ` Jeff Smith
@ 2006-08-17 16:55           ` Hans Hagen
  2006-08-17 21:34           ` Hans Hagen
  2006-08-18  9:58           ` Mojca Miklavec
  2 siblings, 0 replies; 16+ messages in thread
From: Hans Hagen @ 2006-08-17 16:55 UTC (permalink / raw)


Jeff Smith wrote:
> Hi!
>
> Thank you yet another time for the helpful replies. You guys rock! A
> couple of things:
>
> Aditya, the \startMYLAYOUT .... \stopMYLAYOUT strategy seems to be
> perfect. Thanks!
>
> Now, from Mojca's reply:
>
>   
>> MB, but it's been updated to the new version today anyway, so it might
>> be worth refreshing it anyway)
>>     
>
> Is it? I still see 2006-08-05 on the download page.... Anyway, I
> didn't really think I could come here and ask things directly to Hans!
> It seems a good idea, but first I'll try it with your instructions
> (see below). I want/need to familiarize myself with at least some of
> the technicalities.
>
>   
>> \let\normalquotation=\quotation
>> \def\quotation#1
>>        {\bgroup\def\quotation##1{\quote{##1}}\normalquotation{#1}\egroup}
>>     
>
>   
cleaner

\def\quotation#1{\dontleavehmode\bgroup\let\quotation\quote\normalquotation{#1}\egroup}


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-17 16:12         ` Jeff Smith
  2006-08-17 16:55           ` Hans Hagen
@ 2006-08-17 21:34           ` Hans Hagen
  2006-08-18  9:58           ` Mojca Miklavec
  2 siblings, 0 replies; 16+ messages in thread
From: Hans Hagen @ 2006-08-17 21:34 UTC (permalink / raw)


Jeff Smith wrote:
>> \let\normalquotation=\quotation
>> \def\quotation#1
>>        {\bgroup\def\quotation##1{\quote{##1}}\normalquotation{#1}\egroup}
>>     
the next version will support level specific symbols:

\quotation{... \quotation{...} ...}

\startquotation ... \startquotation... \quotation{...} 
\stopquotation\space ...\stopquotation

\setupdelimitedtext[quotation][1][left=(,right=)]
\setupdelimitedtext[quotation][2][left={[},right={]}]
\setupdelimitedtext[quotation][3][left=\{,right=\}]

\quotation{... \quotation{...} ...}

\startquotation ... \startquotation... \quotation{...} 
\stopquotation\space ...\stopquotation

\stoptext

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-17 16:12         ` Jeff Smith
  2006-08-17 16:55           ` Hans Hagen
  2006-08-17 21:34           ` Hans Hagen
@ 2006-08-18  9:58           ` Mojca Miklavec
  2006-08-18 18:22             ` Jeff Smith
  2 siblings, 1 reply; 16+ messages in thread
From: Mojca Miklavec @ 2006-08-18  9:58 UTC (permalink / raw)


On 8/17/06, Jeff Smith wrote:
> Hi!
>
> Thank you yet another time for the helpful replies. You guys rock! A
> couple of things:
>
> Aditya, the \startMYLAYOUT .... \stopMYLAYOUT strategy seems to be
> perfect. Thanks!
>
> Now, from Mojca's reply:
>
> > MB, but it's been updated to the new version today anyway, so it might
> > be worth refreshing it anyway)
>
> Is it? I still see 2006-08-05 on the download page....

XeTeX, not ConTeXt. (see the homepage of W32TeX,
http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-ptex/web2c75-e.html)

> Anyway, I
> didn't really think I could come here and ask things directly to Hans!
> It seems a good idea, but first I'll try it with your instructions
> (see below). I want/need to familiarize myself with at least some of
> the technicalities.

That always helps.

> > \let\normalquotation=\quotation
> > \def\quotation#1
> >        {\bgroup\def\quotation##1{\quote{##1}}\normalquotation{#1}\egroup}
>
> This almost works like a charm! I say almost because the command
> \mainlanguage[fr] seems to interfere with it. When I comment out this
> line, it works, with single quotes (precisly, the six/nine single
> quotes) inside English double quotes (" and "). However, the outer
> quotes must be the French guillemets « » instead of " " (the inner
> ones are fine). That's why I used \mainlanguage[fr]. Can both work
> together?

Apart from what Hans has written you: add

\setuplanguage[fr]
  [leftquote=\upperleftsinglesixquote,
   rightquote=\upperrightsingleninequote]

before setting the french language.

In http://source.contextgarden.net/lang-ita.tex there is:
\in
stalllanguage
  [\s!fr]
  [...
   \c!leftquote=\leftguillemot,
   \c!rightquote=\rightguillemot,
   \c!leftquotation=\leftguillemot,
   \c!rightquotation=\rightguillemot,
  ...
  ]

You have to ask other French guys why they decided to put
   \c!leftquote=\leftguillemot,
   \c!rightquote=\rightguillemot,
instead of single guillemots there (well, I don't know which ones are
the once that should be used by default).

Perhaps it can be changed, but "everyone" (from the French guys on the
list) has to agree on that. In any case: if you want to use english
quotes, you have to add those three lines mentioned above in any case.

(Now I understand your question better: you can use \quote{...}
instead of \quotation{...} to get single quotes, but French wasn't
"configured properly", so you didn't get any single quotes with \quote
either.)

> Now, about the XeTeX installation. A few things didn't go as smoothly
> as expected. Running fc-cache (with the appropriate parameters, of
> course) returned this:
>
> Fontconfig error: Cannot load default config file
> fc-cache: "": skipping, no such directory
> ret = 0
> fc-cache: succeeded

Did you add these lines to setuptex.bat?

set FONTCONFIG_FILE=fonts.conf
set FONTCONFIG_PATH=%TEXMFMAIN%\fonts\conf
set PKGCACHEDIR=%TEXMFMAIN%\fonts\cache

I have no idea how/when you configure the installation. I have created
a mytex.bat file with the content (in a single line, folders depend on
your local structure):

C:\Programs\context\usr\local\context\tex\setuptex.bat
C:\Programs\context\usr\local\context\tex

And when I want to use it, I have to run "mytex" (otherwise MikTeX is used).

Another option is to go to control
panel->system->advanced->environmental variables (I'm guessing now, I
have no WIndows here) and then put the three variables there. Just
create a new variable called "FONTCONFIG_FILE" with content
"fonts.conf" and similar for the other two (I don't know if you can
use % or if you have to provide the full path).

After you do that you have to launch a new "cmd" (the old one won't
see the new encvironmental variables).

The message appears because the environment is not set up properly,
but if you added those lines to setuptex.bat and if they weren't
found, I'm affraid that something else will fail as well. The fact
that the formats were not placed properly either (if you tried to
create them) makes me suspect exactly the same thing.

See if http://wiki.contextgarden.net/Windows_Installation can help you
understand some problems better (and feel free to correct it/suggest
improvements).

> And compiling the document returned the following:
> ...
> This is XeTeX, Version 3.141592-2.2-0.995 (Web2C 7.5.5)
>  \write18 enabled.
>  (WARNING: translate-file "natural.tcx" ignored)
> kpathsea: Running mktexfmt cont-en.fmt
> I can't find the format file `cont-en.fmt'!
> TeXExec | runtime: 0.321

Did you run
   texexec --xtx --make --all

One reason may be that the formats were generated and not moved to the
proper folder. (take a look if there were some files like cont-en.fmt
generated in the folder where you executed texexec --xtx --make --all.
If yes, then something is not configured properly.)

> By the way, I'm still unsure about what sort of resulting file this
> compiling is supposed to give, and how this integrates with my normal
> way of building a PDF output with SciTE.

The result of basic stuff should be the same, but you will be able to
use IPA for example, like I posted in the first mail already:

\definetypeface[gentium][rm][Xserif][Gentium]
\setupbodyfont[gentium,12pt]

\starttext
ɸ β f v θ ð s z ʃ ʒ ʂ ʐ ç ʝ
\stoptext

If you add a line (I'm guessing a bit)
% tex=xetex
at the top of the file, your file will be compiled with XeTeX in any
case. But you can probably also configure SciTE to call texexec with
the switch "--xtx" by default. (I don't use SciTE, so someone else
will have to help you with that).

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-18  9:58           ` Mojca Miklavec
@ 2006-08-18 18:22             ` Jeff Smith
  2006-08-18 19:05               ` Hans Hagen
  0 siblings, 1 reply; 16+ messages in thread
From: Jeff Smith @ 2006-08-18 18:22 UTC (permalink / raw)


Hi again,

On 8/18/06, Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote:

> You have to ask other French guys why they decided to put
>    \c!leftquote=\leftguillemot,
>    \c!rightquote=\rightguillemot,
> instead of single guillemots there (well, I don't know which ones are
> the once that should be used by default).

I admit this can get confusing here. Remember that the norm in French
is always to use double quotes of either kind: « » or " ", preferably
the former. The single quote is rarely used, if at all, and is
associated (rightly, I would think) with the English language.

But *I* need single quotes anyway (to be used inside « », that is)
because it's part of our typography habits here, for reasons I don't
really know (nor do my colleagues, and the boss is away today --
perhaps because we're in Canada after all).

What you and Hans have told me to do works quite well. I do have my
single quotes (' ') within my guillemets (« ») now, while I use only
one command (\quotation) all throughout. It's the hierarchy that
decides what to display. Marvelous.

But the matter is still not completely solved. Am I getting annoying
here? I hope not. :-( I know I'm being picky... But here I'm convinced
it's really the last glitch!

What the system does with the guillemets is to add some spacing around
the symbols. This is quite correct and corresponds to the typographic
norm in French. « » always have some spacing between them and the
quoted text. So it's never «quote», but always « quote ».

However, with what you and Has told me to do, by compiling this...

\quotation{This quote has \quotation{quotes} in it.}

... I get ...

« This quote has ' quotes ' in it. »

The spacing is retained for the single quotes. But it shouldn't be --
this sort of spacing in French is used with guillemets, but never with
single quotes (') or double quotes ("). At the very least, I can
confirm this is the French Canadian norm, which I want to use. So,
from what I understand,  the system reacts with the quote as it is
instructed to do with French guillemets -- add the spacing -- but only
its appearance is changed. I'm afraid it's not enough. The result I
want is...

« This quote has 'quotes' in it. »

Am I asking too much here? Typographic norms across languages can vary
a lot, I'm afraid.

As to XeTeX, don't worry anymore. I've managed to make it work, with
my system fonts. This is sweet indeed! I also edited my ScITE config
to add the --xtx parameter, and everything works. Thank you so much!

Jeff Smith






>
> Perhaps it can be changed, but "everyone" (from the French guys on the
> list) has to agree on that. In any case: if you want to use english
> quotes, you have to add those three lines mentioned above in any case.
>
> (Now I understand your question better: you can use \quote{...}
> instead of \quotation{...} to get single quotes, but French wasn't
> "configured properly", so you didn't get any single quotes with \quote
> either.)





>
> > Now, about the XeTeX installation. A few things didn't go as smoothly
> > as expected. Running fc-cache (with the appropriate parameters, of
> > course) returned this:
> >
> > Fontconfig error: Cannot load default config file
> > fc-cache: "": skipping, no such directory
> > ret = 0
> > fc-cache: succeeded
>
> Did you add these lines to setuptex.bat?
>
> set FONTCONFIG_FILE=fonts.conf
> set FONTCONFIG_PATH=%TEXMFMAIN%\fonts\conf
> set PKGCACHEDIR=%TEXMFMAIN%\fonts\cache
>
> I have no idea how/when you configure the installation. I have created
> a mytex.bat file with the content (in a single line, folders depend on
> your local structure):
>
> C:\Programs\context\usr\local\context\tex\setuptex.bat
> C:\Programs\context\usr\local\context\tex
>
> And when I want to use it, I have to run "mytex" (otherwise MikTeX is used).
>
> Another option is to go to control
> panel->system->advanced->environmental variables (I'm guessing now, I
> have no WIndows here) and then put the three variables there. Just
> create a new variable called "FONTCONFIG_FILE" with content
> "fonts.conf" and similar for the other two (I don't know if you can
> use % or if you have to provide the full path).
>
> After you do that you have to launch a new "cmd" (the old one won't
> see the new encvironmental variables).
>
> The message appears because the environment is not set up properly,
> but if you added those lines to setuptex.bat and if they weren't
> found, I'm affraid that something else will fail as well. The fact
> that the formats were not placed properly either (if you tried to
> create them) makes me suspect exactly the same thing.
>
> See if http://wiki.contextgarden.net/Windows_Installation can help you
> understand some problems better (and feel free to correct it/suggest
> improvements).
>
> > And compiling the document returned the following:
> > ...
> > This is XeTeX, Version 3.141592-2.2-0.995 (Web2C 7.5.5)
> >  \write18 enabled.
> >  (WARNING: translate-file "natural.tcx" ignored)
> > kpathsea: Running mktexfmt cont-en.fmt
> > I can't find the format file `cont-en.fmt'!
> > TeXExec | runtime: 0.321
>
> Did you run
>    texexec --xtx --make --all
>
> One reason may be that the formats were generated and not moved to the
> proper folder. (take a look if there were some files like cont-en.fmt
> generated in the folder where you executed texexec --xtx --make --all.
> If yes, then something is not configured properly.)
>
> > By the way, I'm still unsure about what sort of resulting file this
> > compiling is supposed to give, and how this integrates with my normal
> > way of building a PDF output with SciTE.
>
> The result of basic stuff should be the same, but you will be able to
> use IPA for example, like I posted in the first mail already:
>
> \definetypeface[gentium][rm][Xserif][Gentium]
> \setupbodyfont[gentium,12pt]
>
> \starttext
> ɸ β f v θ ð s z ʃ ʒ ʂ ʐ ç ʝ
> \stoptext
>
> If you add a line (I'm guessing a bit)
> % tex=xetex
> at the top of the file, your file will be compiled with XeTeX in any
> case. But you can probably also configure SciTE to call texexec with
> the switch "--xtx" by default. (I don't use SciTE, so someone else
> will have to help you with that).
>
> Mojca
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-18 18:22             ` Jeff Smith
@ 2006-08-18 19:05               ` Hans Hagen
  2006-08-21 17:48                 ` Jeff Smith
  0 siblings, 1 reply; 16+ messages in thread
From: Hans Hagen @ 2006-08-18 19:05 UTC (permalink / raw)


Jeff Smith wrote:
>
> The spacing is retained for the single quotes. But it shouldn't be --
> this sort of spacing in French is used with guillemets, but never with
> single quotes (') or double quotes ("). At the very least, I can
> confirm this is the French Canadian norm, which I want to use. So,
> from what I understand,  the system reacts with the quote as it is
> instructed to do with French guillemets -- add the spacing -- but only
> its appearance is changed. I'm afraid it's not enough. The result I
> want is...
>
> « This quote has 'quotes' in it. »
>
> Am I asking too much here? Typographic norms across languages can vary
> a lot, I'm afraid.
>   
grep the base path for \definehspace and search for line with "fr" in 
the tag and you'll see how things can be influences

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-18 19:05               ` Hans Hagen
@ 2006-08-21 17:48                 ` Jeff Smith
  2006-08-21 19:29                   ` Aditya Mahajan
  0 siblings, 1 reply; 16+ messages in thread
From: Jeff Smith @ 2006-08-21 17:48 UTC (permalink / raw)


Hi,

On 8/18/06, Hans Hagen <pragma@wxs.nl> wrote:

> grep the base path for \definehspace and search for line with "fr" in
> the tag and you'll see how things can be influences

Hans, the answer was in lang-spa.tex! I then regenerated the format
and it works absolutely perfectly, my single quotes as much as my
guillemets.

Thanks a lot!
JFS

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: A few questions (mostly about fonts)
  2006-08-21 17:48                 ` Jeff Smith
@ 2006-08-21 19:29                   ` Aditya Mahajan
  0 siblings, 0 replies; 16+ messages in thread
From: Aditya Mahajan @ 2006-08-21 19:29 UTC (permalink / raw)


On Mon, 21 Aug 2006, Jeff Smith wrote:

> Hi,
>
> On 8/18/06, Hans Hagen <pragma@wxs.nl> wrote:
>
>> grep the base path for \definehspace and search for line with "fr" in
>> the tag and you'll see how things can be influences
>
> Hans, the answer was in lang-spa.tex! I then regenerated the format
> and it works absolutely perfectly, my single quotes as much as my
> guillemets.

Do not change your local copy of lang-spa.tex. It will be rewritten 
with the next update of ConTeXt. You can copy the changed part in your 
environment file (inside \unprotect... \protect if the code has some 
special characters like !@? etc). Or you can keep your changes in 
/texmf-local/tex/context/user/cont-sys.tex

Aditya

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2006-08-21 19:29 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-16 18:52 A few questions (mostly about fonts) Jeff Smith
2006-08-16 20:08 ` Mojca Miklavec
2006-08-16 21:41   ` Hans Hagen
2006-08-16 22:13   ` Taco Hoekwater
2006-08-17  1:19     ` Jeff Smith
2006-08-17  2:53       ` Mojca Miklavec
2006-08-17  4:03       ` Aditya Mahajan
2006-08-17 16:12         ` Jeff Smith
2006-08-17 16:55           ` Hans Hagen
2006-08-17 21:34           ` Hans Hagen
2006-08-18  9:58           ` Mojca Miklavec
2006-08-18 18:22             ` Jeff Smith
2006-08-18 19:05               ` Hans Hagen
2006-08-21 17:48                 ` Jeff Smith
2006-08-21 19:29                   ` Aditya Mahajan
2006-08-16 20:08 ` Ricard Roca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).