Re: [NTG-context] stretching smallcaps with a style command

2008-11-20 Thread Bob Reynolds
Just to let anyone know who's interested, I more or less solved this problem 
with the (more or less undocumented) command \definealternativestyle 
[StretchedSmallCaps] [\StretchedSmallCaps] [\StretchedSmallCaps]. It allows me 
to set \setupsynonyms [abbreviation] [textstyle=StretchedSmallCaps, 
criterium=all], which essentially works. Is this generally applicable enough to 
put on the wiki somewhere?

I now have another abbreviations question. What is the easiest way to allow 
digits (and, ideally, the forward slash) in abbreviation names (i.e. be able to 
type \PS/2 and not get the error \PS is undefined)? This occurs quite 
commonly, particularly with numbers. I can define the abbreviation fine, and I 
can use the \infull version of it fine, but I can't use the command version at 
all. Another example: \ATX12V. I've been working around it by defining both 
synonyms and a logo like \PSTwo which typesets like I want \PS/2 to typeset, 
but what is a more elegent way of doing this that doesn't involve definining 
two different commands? I don't know how to change catcodes, despite numerous 
failed attempts to do just that with commands like \unprotect 
\catcode`2=\@@letter \protect.

Thanks,
Bob




- Original Message 
From: Bob Reynolds [EMAIL PROTECTED]
To: ntg-context@ntg.nl
Sent: Friday, November 14, 2008 10:24:26 AM
Subject: stretching smallcaps with a style command

Hello Everyone:

I'm an intermediate-skilled user trying to typeset notes for my CompTIA A+ 
certification course with ConTeXt, but I'm having trouble with styling 
abbreviations. I would like to letterspace (I think that is a correct 
typographical term, I'm a little new at typesetting, sorry) and smallcap my 
dozens of abbreviations, and I can get it to work manually but not with 
\setupsynonyms. Googling the wiki, mailing lists, etc. didn't help and I'm not 
enough of a TeX programmer to understand the definitions in the source code in 
this case. I run TeXLive 2008 on Gentoo Linux with ConTeXt version:

CtxTools | context version: 2008.05.21 15:21 
(/usr/share/texmf-dist/tex/context/base/context.tex)
CtxTools | context version: 2008.05.21 15:21 
(/usr/share/texmf-dist/tex/context/base/cont-new.tex)

http://live.contextgarden.net/ doesn't seem to be working for anything at the 
moment, so I don't know if it works there or not. Below is a small sample input 
I made to illustrate my attempts; I tried to make it as transparent as 
possible. I would greatly appreciate any help.

Thank You Very Much,
Bob



\setupcolor [hex]
\definecolor [LightBlue] [h=8080FF]
\setupcolors [state=start]

\setupbodyfont [10pt]
\setupcapitals [sc=yes]

\def\stretchedspaceamount {.1em}
\define [1] \StretchedSmallCaps {\smallcaps {\stretchedlowercase {#1}}}
\define \Term {\color [LightBlue]}

% \setupsynonyms [abbreviation] [textstyle=\StretchedSmallCaps] % I would like 
this to work, but it doesn't
% \setupsynonyms [abbreviation] [textstyle=\italic] % other commands like this 
work
\abbreviation {CPU} {central processing unit}


\starttext

\Term {\StretchedSmallCaps {CPU}} = \Term {\infull {CPU}} % this produces the 
output that I want

\Term {\smallcaps {\lowercase {CPU}}} = \Term {\infull {CPU}} % this is what it 
looks like without stretching

\Term {\CPU} = \Term {\infull {CPU}} % this is what I want to type to produce 
the stretched, smallcaps output

\stoptext


  
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New bibligraphy style

2008-11-20 Thread Taco Hoekwater
[EMAIL PROTECTED] wrote:
 Hello,
 
 I am using the bib module and I want to redefine the display style for the
 references.  I have therefore created a new file bibl-ris.tex which I
 have put in the same folder as bibl-apa.tex and the other existing ones.
 In my environment file I have \setuppublications[alternative=ris].
 Unfortunately, I get the error
 
 file bibl-ris not found, unknown style ignored
 
 Where should I put my bibl-ris file, or is there something else I need to
 do before it can find my file?

You need to execute mktexlsr (mkii) or luatools --generate (mkiv).
The file is in the right place, but the system cannot find it because
the file search database is not updated yet.


Best wishes,
Taco
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] space between publication items in bibliography

2008-11-20 Thread Taco Hoekwater
Yi Zhang wrote:
 Hi all,
 
 I'm using the bib module. How can I adjust the space between
 publication items? Is it just an itemization? Thankx,
 

It is a list, like the table of contents.

   \setuppublicationlist[inbetween=\blank]

should do it (untested).

Best wishes,
Taco
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] XeTeX and lmtypewriter10-regular

2008-11-20 Thread Hans Hagen
Bart C. Wise wrote:
 I'm running TeXLive 2008.
 When I compile for XeTeX (texexec --xtx) I get the following output that 
 appears to be generating the lmtypewriter10-regular font.  The bad part is 
 that this is very slow.  The part that's even worse, it does this probably 
 20...30...40 times?  A compilation takes 145 seconds, and about 130+ seconds 
 of time seem to be dealing with lmtypewriter10-regular.
 
 This doesn't happen on small test files, so I know I'm doing something wrong. 
  
 Any ideas?
 
 Thanks,
 Bart
 
 
 kpathsea: Running mktextfm lmtypewriter10-regular
 mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; 
 input lmtypewriter10-regular
 This is METAFONT, Version 2.718281 (Web2C 7.5.7)  
   
 
 
 kpathsea: Running mktexmf lmtypewriter10-regular
 ! I can't find file `lmtypewriter10-regular'.   
 * ...; nonstopmode; input lmtypewriter10-regular
   
 Please type another input file name   
 ! Emergency stop. 
 * ...; nonstopmode; input lmtypewriter10-regular
   
 Transcript written on mfput.log.  
 grep: lmtypewriter10-regular.log: No such file or directory
 mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input 
 lmtypewriter10-regular' failed to make lmtypewriter10-regular.tfm.
   

 kpathsea: Appending font creation commands to missfont.log.   


The file name is : lmmono10-regular
The font name is : LMTypewriter10-Regular

You can do (in context):

\definefontsynonym [MyMono] [file:lmmono10-regular]
\definefontsynonym [MyMono] [name:LMTypewriter10-Regular]

(i'm not sure if xetex is case sensitive)

All th emessages that you see on the console concern xetex calling 
metafont to generate a font which does not exist (a kind of fallback 
behaviour)



-
   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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modifying URL wrapping rules

2008-11-20 Thread Hans Hagen
Lars Huttar wrote:
 On 11/19/2008 2:35 PM, Lars Huttar wrote:
 However, I have a few unsolved problems here.

 1) I don't see a way, with the '\sethyphenatedurlbefore' or 'after'
 mechanism, to tell it not to break a URL between two slashes, as in
 http://;. At first I thought that since our text only had a few URLs,
 we'd likely never care. But ... you guessed it. One URL got broken
 between the slashes: http:/
 /www.sil.org/...
 
 I found a way to deal with this... Based on a tip from
 http://xpt.sourceforge.net/techdocs/language/latex/latex03-LaTexUsage/ar01s04.html,
 I used
   {\lefthyphenmin=64 http://}\hyphenatedurl{www.sil.org/...}
 It seems to work in practice -- hyphenation and breaking are disabled
 for the http://; chunk. And hyphenation seems to successfully resume
 afterwards.
 This also fixes the problem of a URL breaking before the //.
 
 The other problems are still outstanding though (wanting to break a URL
 after a slash, not before; and before a hyphen, not after).
 
 Thanks for any ideas...

cleaner than the lefthyphenmin hackery .,..

{\hbox{http://}\hyphenatedurl{www.sil.org/...

in context mkiv i can provide a hyphenater based on the url syntax 
(after all, mkiv already has an analyser for urls)


-
   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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] stretching smallcaps with a style command

2008-11-20 Thread Taco Hoekwater


Bob Reynolds wrote:
 I can define the abbreviation fine, and I can use the \infull version
 of it fine, but I can't use the command version at all. Another
 example: \ATX12V. I've been working around it by defining both
 synonyms and a logo like \PSTwo which typesets like I want \PS/2 to
 typeset, but what is a more elegent way of doing this that doesn't
 involve definining two different commands? I don't know how to change
 catcodes, despite numerous failed attempts to do just that with
 commands like \unprotect \catcode`2=\@@letter \protect.

Changing the catcode of digits is a bad idea because you are likely
to run into problems elsewhere (like in section headings etc.). The
cleanest solution is to use a small dedicated macro to call the
abbreviated version with:

  \logo [PS/2] [Play School Halved]

  \unexpanded\def\abbr#1{\getvalue{#1}}

  \starttext
  \abbr{PS/2}
  \stoptext

That takes a bit more typing, but is much safer and will work regardless
of the current catcode values.

Best wishes,
Taco


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] syntax highlighting problem with vim module

2008-11-20 Thread Shiv Shankar Dayal
Hi,

Finally some success. I get product-name-vimsyntax.tmp when I run context.
It complains about not finding product-name-vimsyntax.tmp-vimsyntax.tmp.

I kill the compilation and run the command for vim manually which generates
product-name-vimsyntax.tmp-vimsyntax.tmp. Then I run context again and I
get pretty printing. I am somewhat happy but I do not know why this is
happening.

-- 
Best regards,
Shiv Shankar Dayal
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] bug: \bot and \top in markiv

2008-11-20 Thread Chen Shen
Hi,

A small problem: the definition of \bot and \top in math mode should
be interchanged. Thanks.

regards,
shenchen
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modifying URL wrapping rules

2008-11-20 Thread Lars Huttar
On 11/20/2008 2:29 AM, Hans Hagen wrote:
 Lars Huttar wrote:
 On 11/19/2008 2:35 PM, Lars Huttar wrote:
 However, I have a few unsolved problems here.

 1) I don't see a way, with the '\sethyphenatedurlbefore' or 'after'
 mechanism, to tell it not to break a URL between two slashes, as in
 http://;. At first I thought that since our text only had a few URLs,
 we'd likely never care. But ... you guessed it. One URL got broken
 between the slashes: http:/
 /www.sil.org/...
 I found a way to deal with this... Based on a tip from
 http://xpt.sourceforge.net/techdocs/language/latex/latex03-LaTexUsage/ar01s04.html,
 I used
  {\lefthyphenmin=64 http://}\hyphenatedurl{www.sil.org/...}
 It seems to work in practice -- hyphenation and breaking are disabled
 for the http://; chunk. And hyphenation seems to successfully resume
 afterwards.
 This also fixes the problem of a URL breaking before the //.

 The other problems are still outstanding though (wanting to break a URL
 after a slash, not before; and before a hyphen, not after).

 Thanks for any ideas...
 
 cleaner than the lefthyphenmin hackery .,..
 
 {\hbox{http://}\hyphenatedurl{www.sil.org/...

Thank you!

 in context mkiv i can provide a hyphenater based on the url syntax 
 (after all, mkiv already has an analyser for urls)

That would be great, but as I understand it, using mkiv would require us
to move to a beta version of ConTeXt... and we're right at the end (we
hope!) of a production cycle, where moving to any new version (whether
beta or not) could cost us a lot of time if any behavior changes.

So while I would be glad to see a hyphenator based on URL syntax, I
don't think a mkiv version won't help us this time.

Lars
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Unicode Characters

2008-11-20 Thread Erich R Fickel
  This is one of the famous Zapf dingbats, available in dedicated fonts;
  you don't really need Unicode fonts in order to typeset it.
  Try the instructions by Adam Lindsay
 
 http://web.archive.org/web/20061130021250/homepage.mac.com/atl/tex/ZapfDingbats.pdf)

Thank you for the very quick answer. I read Mr. Lindsay's instruction. 
It worked, and quite easily. I also tried to just use the character in 
mkiv. That didn't work. However, in mkii, I tried the following:

\usesymbols[uzd]
\definecharacter crosssign{\uchar{39}{29}}
\starttext

Here is the \crosssign\ in a sentence.

\stoptext

That worked too, and seems easier.

I would like to figure it out it mkiv as well. I type the character in 
VIM, but it showed up as a space in the PDF.

-Erich

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Unicode Characters

2008-11-20 Thread Arthur Reutenauer
 I would like to figure it out it mkiv as well.

  Can you send a precise example, specifying in particular the font you use?

Arthur
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] bug: \bot and \top in markiv

2008-11-20 Thread Aditya Mahajan

On Thu, 20 Nov 2008, Chen Shen wrote:


Hi,

A small problem: the definition of \bot and \top in math mode should
be interchanged. Thanks.


Thanks for reporting this.

Hans, in math-ini.lua the unicode slots for top and bot are interchanged
(char-ini.lua is correct). top is 0x22A5 (Unicode DOWN TACK) and bot is 
0x22A4 (Unicode TOP TACK). Who came up with these unicode names.


Chen, if you want an immediate solution, replace math-ini.lua with the 
attached file and regenerate formats.


Adityaif not modules then modules = { } end modules ['math-ini'] = {
version   = 1.001,
comment   = companion to math-ini.tex,
author= Hans Hagen, PRAGMA-ADE, Hasselt NL,
copyright = PRAGMA ADE / ConTeXt Development Team,
license   = see context related readme files
}

--[[ldx--
pMath definitions. This code may move./p
--ldx]]--

-- if needed we can use the info here to set up xetex definition files
-- the 8000 hackery influences direct characters (utf) as indirect \char's

local texsprint, format, utfchar, utfbyte = tex.sprint, string.format, 
utf.char, utf.byte

mathematics   = mathematics   or { }
mathematics.data  = mathematics.data  or { }
mathematics.slots = mathematics.slots or { }

mathematics.classes = {
ord = 0,  -- mathordcomm mathord
op  = 1,  -- mathopcomm  mathop
bin = 2,  -- mathbincomm mathbin
rel = 3,  -- mathrelcomm mathrel
open= 4,  -- mathopencommmathopen
close   = 5,  -- mathclosecomm   mathclose
punct   = 6,  -- mathpunctcomm   mathpunct
alpha   = 7,  -- mathalphacomm   firstofoneargument
accent  = 8,
radical = 9,
inner   = 0,  -- mathinnercomm   mathinner
nothing = 0,  -- mathnothingcomm firstofoneargument
choice  = 0,  -- mathchoicecomm  @@mathchoicecomm
box = 0,  -- mathboxcomm @@mathboxcomm
limop   = 1,  -- mathlimopcomm   @@mathlimopcomm
nolop   = 1,  -- mathnolopcomm   @@mathnolopcomm
}

mathematics.classes.alphabetic  = mathematics.classes.alpha
mathematics.classes.unknown = mathematics.classes.nothing
mathematics.classes.punctuation = mathematics.classes.punct
mathematics.classes.normal  = mathematics.classes.nothing
mathematics.classes.opening = mathematics.classes.open
mathematics.classes.closing = mathematics.classes.close
mathematics.classes.binary  = mathematics.classes.bin
mathematics.classes.relation= mathematics.classes.rel
mathematics.classes.fence   = mathematics.classes.unknown
mathematics.classes.diacritic   = mathematics.classes.accent
mathematics.classes.large   = mathematics.classes.op
mathematics.classes.variable= mathematics.classes.alphabetic
mathematics.classes.number  = mathematics.classes.nothing

mathematics.families = {
mr = 0, bs  =  8,
mi = 1, bi  =  9,
sy = 2, sc  = 10,
ex = 3, tf  = 11,
it = 4, ma  = 12,
sl = 5, mb  = 13,
bf = 6, mc  = 14,
nn = 7, md  = 15,
}

mathematics.families.letters   = mathematics.families.mr
mathematics.families.numbers   = mathematics.families.mr
mathematics.families.variables = mathematics.families.mi
mathematics.families.operators = mathematics.families.sy
mathematics.families.lcgreek   = mathematics.families.mi
mathematics.families.ucgreek   = mathematics.families.mr
mathematics.families.vargreek  = mathematics.families.mi
mathematics.families.mitfamily = mathematics.families.mi
mathematics.families.calfamily = mathematics.families.sy

mathematics.families[0] = mathematics.families.mr
mathematics.families[1] = mathematics.families.mi
mathematics.families[2] = mathematics.families.sy
mathematics.families[3] = mathematics.families.ex

function mathematics.mathcode(target,class,family,slot)
if class = 7 then
return (\\omathcode%s=\%X%02X%04X ):format(target,class,family,slot)
end
end
function 
mathematics.delcode(target,small_family,small_slot,large_family,large_slot)
return (\\odelcode%s=\%02X%04X\%02X%04X 
):format(target,small_family,small_slot,large_family,large_slot)
end
function mathematics.radical(small_family,small_slot,large_family,large_slot)
return (\\radical%s=\%02X%04X%\02X%04X 
):format(target,small_family,small_slot,large_family,large_slot)
end
function mathematics.mathchar(class,family,slot)
return (\\omathchar\%X%02X%04X ):format(class,family,slot)
end
function mathematics.mathaccent(class,family,slot)
return (\\omathaccent\%X%02X%04X ):format(class,family,slot)
end
function mathematics.delimiter(class,family,slot,largefamily,largeslot)
return (\\odelimiter\%X%02X%04X\%02X%04X 
):format(class,family,slot,largefamily,largeslot)
end
function mathematics.mathchardef(name,class,family,slot) -- we can avoid this 
one
return (\\omathchardef\\%s\%X%02X%04X ):format(name,class,family,slot)
end

function 
mathematics.setmathsymbol(name,class,family,slot,largefamily,largeslot,unicode)
class = mathematics.classes[class] or class -- no real checks needed
family = 

Re: [NTG-context] syntax highlighting problem with vim module

2008-11-20 Thread Aditya Mahajan
On Thu, 20 Nov 2008, Shiv Shankar Dayal wrote:

 Hi,

 Finally some success. I get product-name-vimsyntax.tmp when I run context.
 It complains about not finding product-name-vimsyntax.tmp-vimsyntax.tmp.

 I kill the compilation and run the command for vim manually which generates
 product-name-vimsyntax.tmp-vimsyntax.tmp. Then I run context again and I
 get pretty printing. I am somewhat happy but I do not know why this is
 happening.

Do you have write18 enabled? see http://wiki.contextgarden.net/write18

Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] \placecontent doesn't place content after \chapter{}

2008-11-20 Thread Bart C. Wise
The code below displays the Contents chapter header; however, the table of 
contents is not shown.  If I remove the \chapter{Contents}, then the table of 
contents is displayed.  What's wrong?

\starttext
\chapter{Contents}
\placecontent

\chapter{One}\input tufte
\chapter{Two}\input tufte
\chapter{Three}\input tufte
\stoptext

Thanks,
Bart
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \placecontent doesn't place content after \chapter{}

2008-11-20 Thread Hans Hagen
Bart C. Wise wrote:
 The code below displays the Contents chapter header; however, the table of 
 contents is not shown.  If I remove the \chapter{Contents}, then the table of 
 contents is displayed.  What's wrong?

by default you will get a local table of contents (add some section and 
you will see it)

 \starttext
 \chapter{Contents}
 \placecontent

\placelist[criterium=text]

 \chapter{One}\input tufte
 \chapter{Two}\input tufte
 \chapter{Three}\input tufte
 \stoptext
 
 Thanks,
 Bart
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!
 
 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___


-- 

-
   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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] bug: \bot and \top in markiv

2008-11-20 Thread Hans Hagen
Aditya Mahajan wrote:
 On Thu, 20 Nov 2008, Chen Shen wrote:
 
 Hi,

 A small problem: the definition of \bot and \top in math mode should
 be interchanged. Thanks.
 
 Thanks for reporting this.
 
 Hans, in math-ini.lua the unicode slots for top and bot are interchanged
 (char-ini.lua is correct). top is 0x22A5 (Unicode DOWN TACK) and bot is 
 0x22A4 (Unicode TOP TACK). Who came up with these unicode names.

ok, done

-
   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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \placecontent doesn't place content after \chapter{}

2008-11-20 Thread Bart C. Wise
On Thursday 20 November 2008 03:05:20 pm Hans Hagen wrote:
 Bart C. Wise wrote:
  The code below displays the Contents chapter header; however, the table
  of contents is not shown.  If I remove the \chapter{Contents}, then the
  table of contents is displayed.  What's wrong?

 by default you will get a local table of contents (add some section and
 you will see it)

  \starttext
  \chapter{Contents}
  \placecontent

 \placelist[criterium=text]

I had to do this:
\placelist[chapter][criterium=text]

Thanks for the hint!
Bart


  \chapter{One}\input tufte
  \chapter{Two}\input tufte
  \chapter{Three}\input tufte
  \stoptext
 
  Thanks,
  Bart
  _
 __ If your question is of interest to others as well, please add
  an entry to the Wiki!
 
  maillist : ntg-context@ntg.nl /
  http://www.ntg.nl/mailman/listinfo/ntg-context webpage  :
  http://www.pragma-ade.nl / http://tex.aanhet.net
  archive  : https://foundry.supelec.fr/projects/contextrev/
  wiki : http://contextgarden.net
  _
 __

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modifying URL wrapping rules

2008-11-20 Thread Lars Huttar
On 11/19/2008 2:35 PM, Lars Huttar wrote:
 2) Even though I have \sethyphenatedurlafter / instead of
 \sethyphenatedurlbefore /, there are four cases where a URL is broken
 before a slash, e.g.:
 http://www.sil.org/.../009
 /YAMBASSA.html.
 and no cases where a URL is broken after a slash (except when it's also
 before a slash -- see 1).
 
 I wonder if my modifications are actually taking effect?
 Do I need to compile the changes to the .mkii file or something? I tried
 texexec.bat --make --all, but that didn't seem to change the outcome.

Can someone tell me if there's a compile command necessary for mkii?

 3) Conversely, even though I have \sethyphenatedurlbefore - and not
 \sethyphenatedurlafter -, there is a case where a URL is broken after
 a hyphen (a hyphen that was already present in the URL):
 http://www/Niger-
 Congo/...
 and no case where a URL is broken before a hyphen.
 Note that the \sethyphenatedurlbefore - setting is unchanged from the
 original lang-url.mkii, so this is not an issue of needing to recompile.
 
 Maybe the general tex hyphenation mechanism is operating here, in spite
 of the URL breaking settings. How do I override that (only for the URL)?

Maybe it would help if someone could explain to me what 'normal' means
in lang-url.mkii:

\def\dohyphenatedurlnormal#1{\char#1\relax}%
\def\dohyphenatedurlafter
#1{\char#1\discretionary{}{\hyphenatedurlseparator}{}}%
\def\dohyphenatedurlbefore#1{\discretionary{\hyphenatedurlseparator}{}{}\char#1\relax}%

% 0=normal 1=before 2=after

\def\sethyphenatedurlnormal#1{\expandafter\chardef\csname url @
#1\endcsname\zerocount}
\def\sethyphenatedurlbefore#1{\expandafter\chardef\csname url @
#1\endcsname\plusone  }
\def\sethyphenatedurlafter #1{\expandafter\chardef\csname url @
#1\endcsname\plustwo  }

It looks like 'normal' means don't put a discretionary
hyphenatedurlseparator before/after the character. Which would mean
either (a) the url cannot be separated there (unless an adjacent
character has hyphenatedurlbefore/after specified on it); or (b) the url
will follow the same hyphenation rules as normal text (no special
url-related rules). Can anyone tell me which it is? The definition of
hyphenatedurl is:

\unexpanded \def\hyphenatedurl#1%
  {\dontleavehmode
   \begingroup
   \the\everyhyphenatedurl
   \edef\ascii{#1}%

\expanded{\handletokens{\detokenize\expandafter{\ascii}}}\with\dohyphenatedurl
   \endgroup}

and the definition of \dontleavehmode is in syst-ext.tex with some comments:

%D \macros
%D  {dontleavehmode}
%D
%D Sometimes when we enter a paragraph with some command, the
%D first token gets the whole first line. We can prevent this
%D by saying:
%D
%D \starttyping
%D \dontleavehmode
%D \stoptyping
...
\unexpanded \def\dontleavehmode
  {\ifhmode\else \ifmmode\else
 \setbox\@@dlhbox\hbox{\mathsurround\zeropoint\everymath\emptytoks$
$}\unhbox\@@dlhbox
   \fi \fi}
...
%D But, if you run a recent version of \TEX, we can use the new
%D primitive:

\ifx\normalquitvmode\undefined \else \let\dontleavehmode\normalquitvmode \fi

I am running Xetex, FWIW.
This is XeTeX, Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7)

The above makes me think that dontleavehmode should prevent any
'hyphenation' except for the types explicitly allowed in lang-url.mkii
via \sethyphenatedurlafter/before/normal.

Yet that isn't happening... it's breaking before slash instead of after,
 and after hyphen instead of before.

I wondered briefly whether I had misinterpreted (swapped) the semantics
of \sethyphenatedurlafter and \sethyphenatedurlbefore. But no,
\sethyphenatedurlbefore . is working as expected: URLs break before a
period. So I'm just puzzled.

Thanks for any help...

Lars

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Unicode Characters

2008-11-20 Thread Wolfgang Schuster

Am 20.11.2008 um 15:16 schrieb Erich R Fickel:

 This is one of the famous Zapf dingbats, available in dedicated  
 fonts;
 you don't really need Unicode fonts in order to typeset it.
 Try the instructions by Adam Lindsay

 http://web.archive.org/web/20061130021250/homepage.mac.com/atl/tex/ZapfDingbats.pdf)

 Thank you for the very quick answer. I read Mr. Lindsay's instruction.
 It worked, and quite easily. I also tried to just use the character in
 mkiv. That didn't work. However, in mkii, I tried the following:

 \usesymbols[uzd]
 \definecharacter crosssign{\uchar{39}{29}}
 \starttext

 Here is the \crosssign\ in a sentence.

 \stoptext

 That worked too, and seems easier.

 I would like to figure it out it mkiv as well. I type the character in
 VIM, but it showed up as a space in the PDF.

\def\crosssign{\utfchar{271D}}

You need only a font the symbol, if you have one there are different
ways to use it.


The simple solution:

\definefont[unicode][name:unicodesymbols*default]

\def\crosssign{\utfchar{271D}}

\starttext

text {\unicode\crosssign} text

\stoptext

You can also include the font in the defintion of \crosssign.


The advanced solution:

\def\crosssign{\utfchar{271D}}

\definefontsynonym[UnicodeSymbols][name:unicodesymbols*default]

\definefontfallback[symbols][UnicodeSymbols][dingbats]

\starttypescript [serif] [mine]
   \definefontsynonym [Serif] [TeXGyrePagella-Regular]  
[fallbacks=symbols]
\stoptypescript

\definetypeface [mine] [rm] [serif] [mine] [default]

\setupbodyfont[mine]

\starttext

text \crosssign\ text

\stoptext

You need a few more lines for the setup because you need
a new typescript.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] XeTeX, Adobe Garmond dash, quotes, etc.

2008-11-20 Thread Mojca Miklavec
On Fri, Nov 21, 2008 at 5:14 AM, Bart C. Wise wrote:
 The code below is used to load the Adobe Garmond fonts.  The problem is that
 quotes (``) produces two single quotes.  Similar with dashes: an en dash
 produces to dashes, an em dash likewise produces three dashes.  What am I
 doing wrong (again)!

Hello,

If you are using pdfTeX, then it's the fault of your fonts. (The one
that prepared the metrics forgot to add the proper ligatures to the
font. This is not trivial to make.) But then - if you are using
pdfTeX, there should be no name: in font declaration. name: is more
or less reserved for filename of otf/ttf fonts in XeTeX and LuaTeX.

If you are using XeTeX or LuaTeX, then you should remove all the [ec]
brackets and replace [encoding=ec] with [features=default].

Some clarification is needed though:

1.) You could (in theory) use some replacements for `` and  to
produce proper quotation marks, but for Unicode-aware engines that's
highly deprecated. Better use \quotation{Here's a nicely looking
quote.} or proper quotation marks. The sequence `` was a pure hack (in
my opinion), but a sensible one in that time since there were no
quotation marks neither on keyboards nor in encodings when Knuth wrote
TeX. \quotation is a cleaner way to produce quotation marks. (I'm a
bit biased though. Knuthian quotation marks never worked for my
language, so I always had to figure out how to get the proper ones,
and \quotation was the proper solution for me.)

2.) in LuaTeX and XeTeX there are three replacements left by default:
endash, emdash and apostrophe. The main reason being that it's still a
bit too difficult to:
- find endash and emdash on keyboards
- see the difference between the two, esp. in fixed width fonts
- change the habit and type proper apostrophe instead of corresponding
ascii character: '

3.) For some reason, features=default doesn't work as it should
since script=latn has been left out some time ago, so you need to
fix definition of default font features. (Or maybe someone else
knows how to handle this in a better way. This is what I do. I do not
claim that it's the right way to do it.)

\definefontfeature
  [default]
  [liga=yes,kern=yes,tlig=yes,script=latn]

 \starttypescript[serif][agaramond][ec]
  \definefontsynonym[AGaramondRegular][name:AGaramond-Regular] [encoding=ec]
  \definefontsynonym[AGaramondItalic] [name:AGaramond-Italic][encoding=ec]
  \definefontsynonym[AGaramondBold]   [name:AGaramond-Bold] [encoding=ec]
  \definefontsynonym[AGaramondBoldIt]   [name:AGaramond-BoldItalic]
 [encoding=ec]
 \stoptypescript

 \starttypescript[serif][agaramond][name]
  \definefontsynonym  [Serif]   [AGaramondRegular]
  \definefontsynonym  [SerifItalic] [AGaramondItalic]
  \definefontsynonym  [SerifBold]   [AGaramondBold]
  \definefontsynonym  [SerifBoldItalic] [AGaramondBoldIt]
 \stoptypescript

 \starttypescript[agaramond][ec]
  \definetypeface[agaramond][rm][serif][agaramond][default][encoding=ec]
 \stoptypescript

 \usetypescript[agaramond][ec]
 \setupbodyfont[agaramond, 12pt]

 \starttext
 ``Here's a lousy looking quote.''
 Here are a couple of dashes: --
 Here are three: ---
 \stoptext

 Thanks,
 Bart

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] XeTeX, Adobe Garmond dash, quotes, etc.

2008-11-20 Thread Bart C. Wise
Mojca,

Thanks for all you time in helping out.  I'm still having problems.  The 
\quote and \quotation work.  However, as you pointed out, the en, em and 
apostrophe do not work.

In addition, [features=default] did not compile, but [feature=default] did.

Here's what I'm working with:

\starttypescript[serif][agaramond]
  \definefontsynonym[AGaramondRegular][name:AGaramond-Regular] 
[feature=default]
  \definefontsynonym[AGaramondItalic] [name:AGaramond-Italic][feature=default]
  \definefontsynonym[AGaramondBold]   [name:AGaramond-Bold] [feature=default]
  \definefontsynonym[AGaramondBoldIt]   [name:AGaramond-BoldItalic] 
[feature=default]
\stoptypescript

\starttypescript[serif][agaramond][name]
  \definefontsynonym  [Serif]   [AGaramondRegular]
  \definefontsynonym  [SerifItalic] [AGaramondItalic]
  \definefontsynonym  [SerifBold]   [AGaramondBold]
  \definefontsynonym  [SerifBoldItalic] [AGaramondBoldIt]
\stoptypescript

\starttypescript[agaramond]
  \definetypeface[agaramond][rm][serif][agaramond][default][feature=default]
\stoptypescript

\usetypescript[agaramond]
\setupbodyfont[agaramond, 12pt]
\definefontfeature[default]
[liga=yes, kern=yes, tlig=yes, script=latn, mapping=tex-text]

Any more hints?

Bart

On Thursday 20 November 2008 09:44:05 pm Mojca Miklavec wrote:
 On Fri, Nov 21, 2008 at 5:14 AM, Bart C. Wise wrote:
  The code below is used to load the Adobe Garmond fonts.  The problem is
  that quotes (``) produces two single quotes.  Similar with dashes: an en
  dash produces to dashes, an em dash likewise produces three dashes.  What
  am I doing wrong (again)!

 Hello,

 If you are using pdfTeX, then it's the fault of your fonts. (The one
 that prepared the metrics forgot to add the proper ligatures to the
 font. This is not trivial to make.) But then - if you are using
 pdfTeX, there should be no name: in font declaration. name: is more
 or less reserved for filename of otf/ttf fonts in XeTeX and LuaTeX.

 If you are using XeTeX or LuaTeX, then you should remove all the [ec]
 brackets and replace [encoding=ec] with [features=default].

 Some clarification is needed though:

 1.) You could (in theory) use some replacements for `` and  to
 produce proper quotation marks, but for Unicode-aware engines that's
 highly deprecated. Better use \quotation{Here's a nicely looking
 quote.} or proper quotation marks. The sequence `` was a pure hack (in
 my opinion), but a sensible one in that time since there were no
 quotation marks neither on keyboards nor in encodings when Knuth wrote
 TeX. \quotation is a cleaner way to produce quotation marks. (I'm a
 bit biased though. Knuthian quotation marks never worked for my
 language, so I always had to figure out how to get the proper ones,
 and \quotation was the proper solution for me.)

 2.) in LuaTeX and XeTeX there are three replacements left by default:
 endash, emdash and apostrophe. The main reason being that it's still a
 bit too difficult to:
 - find endash and emdash on keyboards
 - see the difference between the two, esp. in fixed width fonts
 - change the habit and type proper apostrophe instead of corresponding
 ascii character: '

 3.) For some reason, features=default doesn't work as it should
 since script=latn has been left out some time ago, so you need to
 fix definition of default font features. (Or maybe someone else
 knows how to handle this in a better way. This is what I do. I do not
 claim that it's the right way to do it.)

 \definefontfeature
   [default]
   [liga=yes,kern=yes,tlig=yes,script=latn]

  \starttypescript[serif][agaramond][ec]
   \definefontsynonym[AGaramondRegular][name:AGaramond-Regular]
  [encoding=ec] \definefontsynonym[AGaramondItalic]
  [name:AGaramond-Italic][encoding=ec] \definefontsynonym[AGaramondBold]  
  [name:AGaramond-Bold] [encoding=ec] \definefontsynonym[AGaramondBoldIt]  
  [name:AGaramond-BoldItalic] [encoding=ec]
  \stoptypescript
 
  \starttypescript[serif][agaramond][name]
   \definefontsynonym  [Serif]   [AGaramondRegular]
   \definefontsynonym  [SerifItalic] [AGaramondItalic]
   \definefontsynonym  [SerifBold]   [AGaramondBold]
   \definefontsynonym  [SerifBoldItalic] [AGaramondBoldIt]
  \stoptypescript
 
  \starttypescript[agaramond][ec]
   \definetypeface[agaramond][rm][serif][agaramond][default][encoding=ec]
  \stoptypescript
 
  \usetypescript[agaramond][ec]
  \setupbodyfont[agaramond, 12pt]
 
  \starttext
  ``Here's a lousy looking quote.''
  Here are a couple of dashes: --
  Here are three: ---
  \stoptext
 
  Thanks,
  Bart

 Mojca
 ___
 If your question is of interest to others as well, please add an
 entry to the Wiki!

 maillist : ntg-context@ntg.nl /
 http://www.ntg.nl/mailman/listinfo/ntg-context webpage  :
 http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net