* Enabling protruding
@ 2002-01-23 16:28 Giuseppe Bilotta
2002-01-23 17:21 ` Hans Hagen
0 siblings, 1 reply; 16+ messages in thread
From: Giuseppe Bilotta @ 2002-01-23 16:28 UTC (permalink / raw)
Quick question:
how do you enable character protruding in ConTeXt?
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Enabling protruding
2002-01-23 16:28 Enabling protruding Giuseppe Bilotta
@ 2002-01-23 17:21 ` Hans Hagen
2002-01-23 18:44 ` Re[2]: " Giuseppe Bilotta
0 siblings, 1 reply; 16+ messages in thread
From: Hans Hagen @ 2002-01-23 17:21 UTC (permalink / raw)
Cc: ntg-context
At 05:28 PM 1/23/2002 +0100, Giuseppe Bilotta wrote:
>Quick question:
>
>how do you enable character protruding in ConTeXt?
quick answer: \enableprotruding or nicer: \seteazaalinierea[suspendat]
given that you translated "hangend" ok -)
Hans
PS. Of course you need to tell context which fonts to hang, like with
\setupfontsynonym [Serif] [handling=pure]
\setupfonthandling[normal][left=.75,right=.75]
\setupalign[verytolerant,stretch,hanging]
see mfonts.pdf for details
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
fall-back web server:
www.pragma-pod.nl
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re[2]: Enabling protruding
2002-01-23 17:21 ` Hans Hagen
@ 2002-01-23 18:44 ` Giuseppe Bilotta
2002-01-24 10:32 ` Hans Hagen
0 siblings, 1 reply; 16+ messages in thread
From: Giuseppe Bilotta @ 2002-01-23 18:44 UTC (permalink / raw)
Cc: ntg-context
Wednesday, January 23, 2002 Hans Hagen wrote:
HH> At 05:28 PM 1/23/2002 +0100, Giuseppe Bilotta wrote:
>>Quick question:
>>
>>how do you enable character protruding in ConTeXt?
HH> quick answer: \enableprotruding or nicer: \seteazaalinierea[suspendat]
HH> given that you translated "hangend" ok -)
HH> Hans
HH> PS. Of course you need to tell context which fonts to hang, like with
HH> \setupfontsynonym [Serif] [handling=pure]
HH> \setupfonthandling[normal][left=.75,right=.75]
HH> \setupalign[verytolerant,stretch,hanging]
HH> see mfonts.pdf for details
Nothing doing. I tried the following small test file
\setupfontsynonym[Serif][handling=pure]
\setupfonthandling[normal][left=1,right=1]
\starttext
\def\text{This is some kind of test, to see if it hangs,
thisisaverylongwordindeed. }
\dorecurse{20}{\text}
\setupalign[hanging]
\dorecurse{20}{\text}
\stoptext
and no hanging is done.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re[2]: Enabling protruding
2002-01-23 18:44 ` Re[2]: " Giuseppe Bilotta
@ 2002-01-24 10:32 ` Hans Hagen
2002-01-24 11:10 ` Re[3]: " Giuseppe Bilotta
2002-01-25 15:38 ` Enabling protruding Bill McClain
0 siblings, 2 replies; 16+ messages in thread
From: Hans Hagen @ 2002-01-24 10:32 UTC (permalink / raw)
Cc: ntg-context
At 07:44 PM 1/23/2002 +0100, Giuseppe Bilotta wrote:
>Nothing doing. I tried the following small test file
>
>\setupfontsynonym[Serif][handling=pure]
>\setupfonthandling[normal][left=1,right=1]
>
>\starttext
>
>\def\text{This is some kind of test, to see if it hangs,
>thisisaverylongwordindeed. }
>
>\dorecurse{20}{\text}
>
>\setupalign[hanging]
>\dorecurse{20}{\text}
>
>\stoptext
>
>and no hanging is done.
interesting, took me a while to identify the problem (has to do with empty
parameter). I'll send you a new syst-gen.tex to test.
now, to the hanging: one complication is that once a font is 'defined', its
characteristics are kind of fixed; i could remove this limitation but it
would not help at all, since hanging get fixed in tex itself. this means
that for the preloaded cmr fonts, (or any preloaded font) one has to
redefine them; also, because of the design sizes, cmr's are not mapped onto
Serif, so here we need to manually set the fonts (unless one defines them
as any ps collection, ignoreing the design size)
% output=pdftex
\setupfontsynonym[cmr10][handling=pure]
\setupfontsynonym[Serif][handling=pure]
\setupfonthandling[normal][left=1,right=1]
% so here we load 'm again
\usetypescript[cmr] \setupbodyfont[10pt]
% handy for tracing the hanging
\showframe
% off we go
\starttext
\dorecurse{100}{testtest, }
\setupalign[hanging]
\dorecurse{100}{testtest, }
\setupbodyfont[pos,10pt]
\dorecurse{100}{testtest, }
\stoptext
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
fall-back web server:
www.pragma-pod.nl
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re[3]: Enabling protruding
2002-01-24 10:32 ` Hans Hagen
@ 2002-01-24 11:10 ` Giuseppe Bilotta
2002-01-24 13:45 ` Hans Hagen
2002-04-15 11:08 ` no hanging punctuation Albrecht Kauffmann
2002-01-25 15:38 ` Enabling protruding Bill McClain
1 sibling, 2 replies; 16+ messages in thread
From: Giuseppe Bilotta @ 2002-01-24 11:10 UTC (permalink / raw)
Cc: ntg-context
Thursday, January 24, 2002 Hans Hagen wrote:
HH> At 07:44 PM 1/23/2002 +0100, Giuseppe Bilotta wrote:
HH> interesting, took me a while to identify the problem (has to do with empty
HH> parameter). I'll send you a new syst-gen.tex to test.
Seems to work ...
HH> now, to the hanging: one complication is that once a font is 'defined', its
HH> characteristics are kind of fixed; i could remove this limitation but it
HH> would not help at all, since hanging get fixed in tex itself.
I thought it was possible to change the protruding by reassigning
the lp/rpcodes.
HH> this means that for the preloaded cmr fonts, (or any preloaded
HH> font) one has to redefine them; also, because of the design
HH> sizes, cmr's are not mapped onto Serif, so here we need to
HH> manually set the fonts (unless one defines them as any ps
HH> collection, ignoreing the design size)
This is a little of a pain.
About design sizes: couldn't you implement the font remapping
mechanism in such a way that cmr10 sa 12 -> cmr12 and so on, or
something like that?
Maybe something like use a flag (discrete=yes,no) so that when
discrete is on (yes), you give the base name (cmr) and ConTeXt appends
the size (10, 12, ...), and when discrete if off (no) it just
scales.
HH> % output=pdftex
HH> \setupfontsynonym[cmr10][handling=pure]
HH> \setupfontsynonym[Serif][handling=pure]
HH> \setupfonthandling[normal][left=1,right=1]
HH> % so here we load 'm again
HH> \usetypescript[cmr] \setupbodyfont[10pt]
HH> % handy for tracing the hanging
HH> \showframe
HH> % off we go
HH> \starttext
HH> \dorecurse{100}{testtest, }
HH> \setupalign[hanging]
HH> \dorecurse{100}{testtest, }
HH> \setupbodyfont[pos,10pt]
HH> \dorecurse{100}{testtest, }
HH> \stoptext
Now cmr hangs even when align is not set to hanging (you can see
this by prefixing \setupalign[nothanging] before the first
dorecurse).
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re[3]: Enabling protruding
2002-01-24 11:10 ` Re[3]: " Giuseppe Bilotta
@ 2002-01-24 13:45 ` Hans Hagen
2002-01-24 15:36 ` Taco Hoekwater
2002-04-15 11:08 ` no hanging punctuation Albrecht Kauffmann
1 sibling, 1 reply; 16+ messages in thread
From: Hans Hagen @ 2002-01-24 13:45 UTC (permalink / raw)
Cc: ntg-context
At 12:10 PM 1/24/2002 +0100, you wrote:
>I thought it was possible to change the protruding by reassigning
>the lp/rpcodes.
this is related to how tex internally handles fonts; there are limitations;
anyway, you don';t want to change them per paragraph, do you?
nb: context turns of protruding (the main switch) in the pagebuilder and
other non mvl situations
>HH> this means that for the preloaded cmr fonts, (or any preloaded
>HH> font) one has to redefine them; also, because of the design
>HH> sizes, cmr's are not mapped onto Serif, so here we need to
>HH> manually set the fonts (unless one defines them as any ps
>HH> collection, ignoreing the design size)
>
>This is a little of a pain.
no, just a little price to pay
>About design sizes: couldn't you implement the font remapping
>mechanism in such a way that cmr10 sa 12 -> cmr12 and so on, or
>something like that?
sure, but the main problem is that one cannot ask the filesystem what fonts
there are (try to open a font file from within tex); also, building this
into context only for cmr is not worth the trouble and slowing down overhead
>Maybe something like use a flag (discrete=yes,no) so that when
>discrete is on (yes), you give the base name (cmr) and ConTeXt appends
>the size (10, 12, ...), and when discrete if off (no) it just
>scales.
there is not so much logic in the 10,12,... and believe me, i have other
challenges
>Now cmr hangs even when align is not set to hanging (you can see
>this by prefixing \setupalign[nothanging] before the first
>dorecurse).
add a \par after each recurse and it will work as expected; pdftex applies
the hanging during the par break, so the last values set in the par apply
(as with left/rightskip cum suis)
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
fall-back web server:
www.pragma-pod.nl
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Re[3]: Enabling protruding
2002-01-24 13:45 ` Hans Hagen
@ 2002-01-24 15:36 ` Taco Hoekwater
2002-01-24 16:05 ` Hans Hagen
0 siblings, 1 reply; 16+ messages in thread
From: Taco Hoekwater @ 2002-01-24 15:36 UTC (permalink / raw)
Cc: bourbaki, ntg-context
On Thu, 24 Jan 2002 14:45:25 +0100
"Hans Hagen" <pragma@wxs.nl> wrote:
> sure, but the main problem is that one cannot ask the filesystem what fonts
> there are (try to open a font file from within tex); also, building this
> into context only for cmr is not worth the trouble and slowing down overhead
Well, actually, this works ...
\newif\iffontexists
\def\testfont#1{{\batchmode
\global\fontexistsfalse
\font\junk=#1\junk
\ifdim\fontdimen5\junk>0pt
\global\fontexiststrue
\fi }}
\testfont{cmr10 }
\testfont{cmmmr10 }
:)
--
groeten,
Taco
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Re[3]: Enabling protruding
2002-01-24 15:36 ` Taco Hoekwater
@ 2002-01-24 16:05 ` Hans Hagen
2002-01-25 14:47 ` Re[5]: " Giuseppe Bilotta
0 siblings, 1 reply; 16+ messages in thread
From: Hans Hagen @ 2002-01-24 16:05 UTC (permalink / raw)
Cc: bourbaki, ntg-context
At 04:36 PM 1/24/2002 +0100, Taco Hoekwater wrote:
>On Thu, 24 Jan 2002 14:45:25 +0100
>"Hans Hagen" <pragma@wxs.nl> wrote:
>
> > sure, but the main problem is that one cannot ask the filesystem what
> fonts
> > there are (try to open a font file from within tex); also, building this
> > into context only for cmr is not worth the trouble and slowing down
> overhead
>
>Well, actually, this works ...
>
>\newif\iffontexists
>
>\def\testfont#1{{\batchmode
> \global\fontexistsfalse
> \font\junk=#1\junk
> \ifdim\fontdimen5\junk>0pt
> \global\fontexiststrue
> \fi }}
>
>\testfont{cmr10 }
>\testfont{cmmmr10 }
i know -)
actually i had this for some time (and in font-ini.tex there is still the
leftover:)
% safer but sometimes introducing newlines in the log
%
% \batchmode
% \font\lastloadedfont\fontfile\somefontspec\relax
% \errorstopmode
% \edef\lastfontname{\fontname\lastloadedfont}%
% \ifx\lastfontname\nullfontname
% \showmessage{\m!fonts}{10}{\fontfile}%
% \expandafter\font\csname#1\endcsname=\defaultfontfile\somefontspec\relax
% \else
% \expandafter\let\csname#1\endcsname\lastloadedfont
% \fi
as commented: newlines in th elog, and i hate an ungly log
a pitty that a decent test didn't make it into etex
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
fall-back web server:
www.pragma-pod.nl
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re[5]: Enabling protruding
2002-01-24 16:05 ` Hans Hagen
@ 2002-01-25 14:47 ` Giuseppe Bilotta
0 siblings, 0 replies; 16+ messages in thread
From: Giuseppe Bilotta @ 2002-01-25 14:47 UTC (permalink / raw)
Cc: ntg-context
Thursday, January 24, 2002 Hans Hagen wrote:
HH> i know -)
HH> actually i had this for some time (and in font-ini.tex there is still the
HH> leftover:)
HH> as commented: newlines in th elog, and i hate an ungly log
HH> a pitty that a decent test didn't make it into etex
Ok, I'll put one in TeXlib ...
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Enabling protruding
2002-01-24 10:32 ` Hans Hagen
2002-01-24 11:10 ` Re[3]: " Giuseppe Bilotta
@ 2002-01-25 15:38 ` Bill McClain
2002-01-25 16:15 ` Hans Hagen
1 sibling, 1 reply; 16+ messages in thread
From: Bill McClain @ 2002-01-25 15:38 UTC (permalink / raw)
Cc: ntg-context
Hans Hagen wrote:
> interesting, took me a while to identify the problem (has to do with empty
> parameter). I'll send you a new syst-gen.tex to test.
I'm interested in this, too. Will it be released soon? (When?)
-Bill
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Enabling protruding
2002-01-25 15:38 ` Enabling protruding Bill McClain
@ 2002-01-25 16:15 ` Hans Hagen
0 siblings, 0 replies; 16+ messages in thread
From: Hans Hagen @ 2002-01-25 16:15 UTC (permalink / raw)
Cc: ntg-context
At 09:38 AM 1/25/2002 -0600, Bill McClain wrote:
>Hans Hagen wrote:
>
> > interesting, took me a while to identify the problem (has to do with empty
> > parameter). I'll send you a new syst-gen.tex to test.
>
>I'm interested in this, too. Will it be released soon? (When?)
it's in the current beta (uploaded yesterday)
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
fall-back web server:
www.pragma-pod.nl
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 16+ messages in thread
* no hanging punctuation
2002-01-24 11:10 ` Re[3]: " Giuseppe Bilotta
2002-01-24 13:45 ` Hans Hagen
@ 2002-04-15 11:08 ` Albrecht Kauffmann
2002-04-18 9:05 ` Lutz Haseloff
1 sibling, 1 reply; 16+ messages in thread
From: Albrecht Kauffmann @ 2002-04-15 11:08 UTC (permalink / raw)
Hi all,
If I run the following test:
\setupoutput[pdftex]
\setupfontsynonym [Serif] [handling=pure]
\usetypescript [serif,sans,mono] [hanging] [pure]
\setupalign[hanging]
\starttext
\startcolumns[n=3]
\input zapf
\stopcolumns
\stoptext
then I get a pdf-output without hanging punctuation. I use
pdfeTeX, Version 3.14159-1.00b-pretest-20020204-2.1 and
cont-en 2002.3.4. Is this a bug in ConTeXt, or did I forget
something?
With many thanks
Albrecht
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: no hanging punctuation
2002-04-15 11:08 ` no hanging punctuation Albrecht Kauffmann
@ 2002-04-18 9:05 ` Lutz Haseloff
2002-04-18 10:19 ` Patrick Gundlach
0 siblings, 1 reply; 16+ messages in thread
From: Lutz Haseloff @ 2002-04-18 9:05 UTC (permalink / raw)
> Hi all,
>
> If I run the following test:
>
> \setupoutput[pdftex]
> \setupfontsynonym [Serif] [handling=pure]
> \usetypescript [serif,sans,mono] [hanging] [pure]
> \setupalign[hanging] \starttext \startcolumns[n=3] \input
> zapf \stopcolumns \stoptext
>
> then I get a pdf-output without hanging punctuation. I use
> pdfeTeX, Version 3.14159-1.00b-pretest-20020204-2.1 and
> cont-en 2002.3.4. Is this a bug in ConTeXt, or did I forget something?
>
> With many thanks
> Albrecht
>
I have the same problem with the newest ConTeXt, nobody else?
Greetings
Lutz
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: no hanging punctuation
2002-04-18 9:05 ` Lutz Haseloff
@ 2002-04-18 10:19 ` Patrick Gundlach
2002-04-18 10:33 ` Lutz Haseloff
0 siblings, 1 reply; 16+ messages in thread
From: Patrick Gundlach @ 2002-04-18 10:19 UTC (permalink / raw)
Cc: Lutz Haseloff, Albrecht Kauffmann
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 917 bytes --]
Hi Lutz and Albrecht,
[...]
> > then I get a pdf-output without hanging punctuation. I use
> > pdfeTeX, Version 3.14159-1.00b-pretest-20020204-2.1 and
> > cont-en 2002.3.4. Is this a bug in ConTeXt, or did I forget something?
> I have the same problem with the newest ConTeXt, nobody else?
well, I've tried your file with different context versions:
context/2001.07.11
context/2002.02.24
context/2002.03.04
context/2002.04.17
always the same result. Is this only a problem with the newest context?
This works for me:
\setuppapersize[S4]
\usetypescript [serif,sans,mono] [hanging] [pure]
\definetypeface [modern][rm][serif][computer-modern][default][handling=pure]
\definetypeface [modern][ss][sans][computer-modern][default][handling=pure]
\setupalign[hanging,tolerant]
\starttext
\modern
\input zapf
\stoptext
Hans: the \startcolumns is broken in the newest beta
--
Viele Grüße,
Patrick Gundlach
^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: no hanging punctuation
2002-04-18 10:19 ` Patrick Gundlach
@ 2002-04-18 10:33 ` Lutz Haseloff
2002-04-18 12:10 ` Bill McClain
0 siblings, 1 reply; 16+ messages in thread
From: Lutz Haseloff @ 2002-04-18 10:33 UTC (permalink / raw)
Hi Patrick,
> Hi Lutz and Albrecht,
>
> [...]
>
>
> > > then I get a pdf-output without hanging punctuation. I
> use pdfeTeX,
> > > Version 3.14159-1.00b-pretest-20020204-2.1 and cont-en
> 2002.3.4. Is
> > > this a bug in ConTeXt, or did I forget something?
>
> > I have the same problem with the newest ConTeXt, nobody else?
>
>
> well, I've tried your file with different context versions:
> context/2001.07.11
> context/2002.02.24
> context/2002.03.04
> context/2002.04.17
>
> always the same result. Is this only a problem with the
> newest context?
>
> This works for me:
>
> \setuppapersize[S4]
> \usetypescript [serif,sans,mono] [hanging] [pure]
> \definetypeface
> [modern][rm][serif][computer-modern][default][handling=pure]
> \definetypeface
> [modern][ss][sans][computer-modern][default][handling=pure]
> \setupalign[hanging,tolerant]
> \starttext
> \modern
> \input zapf
> \stoptext
Thanks, this works.
But what is wrong with this code as seen in mfonts.pdf?
> \setupfontsynonym [Serif] [handling=pure]
> \usetypescript [serif,sans,mono] [hanging] [pure]
> \setupalign[hanging]
Groetjes
Lutz
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: no hanging punctuation
2002-04-18 10:33 ` Lutz Haseloff
@ 2002-04-18 12:10 ` Bill McClain
0 siblings, 0 replies; 16+ messages in thread
From: Bill McClain @ 2002-04-18 12:10 UTC (permalink / raw)
Cc: ntg-context
On Thu, 18 Apr 2002 12:33:05 +0200
"Lutz Haseloff" <Lutz.Haseloff@lbapdm.brandenburg.de> wrote:
> Thanks, this works.
> But what is wrong with this code as seen in mfonts.pdf?
It works with a defined font that is loaded after startup, but not with
a default font like Computer Modern, which is loaded before the hanging
settings are set. You have to reinitialize the modern font as shown in
the previous message.
At least, that is how Hans explained it once before.
-Bill
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2002-04-18 12:10 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-23 16:28 Enabling protruding Giuseppe Bilotta
2002-01-23 17:21 ` Hans Hagen
2002-01-23 18:44 ` Re[2]: " Giuseppe Bilotta
2002-01-24 10:32 ` Hans Hagen
2002-01-24 11:10 ` Re[3]: " Giuseppe Bilotta
2002-01-24 13:45 ` Hans Hagen
2002-01-24 15:36 ` Taco Hoekwater
2002-01-24 16:05 ` Hans Hagen
2002-01-25 14:47 ` Re[5]: " Giuseppe Bilotta
2002-04-15 11:08 ` no hanging punctuation Albrecht Kauffmann
2002-04-18 9:05 ` Lutz Haseloff
2002-04-18 10:19 ` Patrick Gundlach
2002-04-18 10:33 ` Lutz Haseloff
2002-04-18 12:10 ` Bill McClain
2002-01-25 15:38 ` Enabling protruding Bill McClain
2002-01-25 16:15 ` Hans Hagen
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).