Dear partners in crime, I mentioned this some time ago, can't find the answer right now... I need a \=i where the bar over the <i> is the width of the box. In computer modern the bar over the <i> is much too large and looks ugly and buts into other letters when used frequently. In good quality typesetting the bar in the \=i is always smaller than for, say, \=a and \=u. (Of course, ConTeXt already incorporates the \i in its def. of \=i and I don't want to lose that feature;->) Also, Hoenig helped me make a complete old style computer modern virtual font. Where can I upload this package (with all Context-related typescripts) for people to look at and maybe improve? Best Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
At 01:50 20/05/2004, you wrote:
Dear partners in crime,
I mentioned this some time ago, can't find the answer right now...
I need a \=i where the bar over the <i> is the width of the box. In computer modern the bar over the <i> is much too large and looks ugly and buts into other letters when used frequently. In good quality typesetting the bar in the \=i is always smaller than for, say, \=a and \=u. (Of course, ConTeXt already incorporates the \i in its def. of \=i and I don't want to lose that feature;->)
Also, Hoenig helped me make a complete old style computer modern virtual font. Where can I upload this package (with all Context-related typescripts) for people to look at and maybe improve?
did you try the latin modern fonts? they have many composed characters as well as more/better accents Hans
On Fri, 21 May 2004 12:28:41 +0200, Hans Hagen
did you try the latin modern fonts? they have many composed characters as well as more/better accents
No, I've never tried them... Ok, I found them; where are the typescripts for them? http://dante.ctan.org/CTAN/fonts/ps-type1/lm/tex/ only has latex support files. Does lm support oldstyle numerals by default? Anyway, I have spent soo many hours tweaking cm for my projects I am a bit afraid to switch at the moment; have a huge project due next week... Is there anything quick and dirty I can do till I have time to experiment with lm? Best Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
On Fri, 21 May 2004 12:28:41 +0200, Hans Hagen
did you try the latin modern fonts? they have many composed characters as well as more/better accents
I just checked lmr12.pfb in Fontlab; the accent on hex charachter 1BA (imacron) is just as wide as in the plain.tex definition (and is thus useless)! If Hans or anyone else has any influence with the author they should convince him to change that asap... (Also, it does not seem to have an old-style option for numerals; indispensable for work in the humanities (i.e., my work;->)) Anyway, lm certainly looks promising; it will probably take some work to adapt it so that it can replace all the tweaking I've done to get cmr to work for me. Are typescripts available for lm? I looked in the archives; I did have one very long letter (Tue, 23 Sep 2003) with suggestions for lm if anyone is interested in reading them again... I just sent a letter to comp.text.tex about that \=i business; since it's a little more clear & precise than what I wrote here I repeat it: ============================================= This is a job/challenge for a real TeXnician;-) For Computer modern, I need to redefine \=i so that it does the following: the bar over the <\i> must be the width of the i-box. In plain.tex the bar over the <i> or <\i> is much too wide, looks ugly and sometimes butts into other letters/diacritics when used frequently (as in frequent Arabic transliteration). In good quality typesetting the bar in the \=i is always smaller than for, say, \=a and \=u. (ConTeXt is nice in that it already incorporates the \i in its def. of \=i and I don't want to lose that feature;->) Note that the solution must work for both slanted and non-slanted styles. I've played around with the plain.tex definitions for manipulating accents, but this one is way out of my league, I think. The main problem of course lies in defining a \rule with the same relative height as the usual bar in cm (\char'26), but whose relative width is always that of the i-box as defined in the tfm file. Once such a chameleon bar is defined it should be relatively easy to define it as an accent such that we can redefine \=i to give us dotless-i with a thinner bar. Also note that \= should maintain its usual definition for other letters. Is anyone up to this challenge? I really hope so... (I don't know how complicated this is but maybe a solution is worth publishing in Tugboat? Or maybe it's trivial which is fine by me...) Best 2 all Idris ============================================= -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
Could not interest anyone in the \=i problem, I guess. Anyway, could
someone tell me how ConTeXt defines \=i (so as to always get plain \=\i)?
Best
Idris
On Mon, 24 May 2004 12:42:00 -0600, Idris Samawi Hamid
On Fri, 21 May 2004 12:28:41 +0200, Hans Hagen
wrote: did you try the latin modern fonts? they have many composed characters as well as more/better accents
-- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
Wednesday, May 26, 2004 Idris Samawi Hamid wrote:
Could not interest anyone in the \=i problem, I guess. Anyway, could someone tell me how ConTeXt defines \=i (so as to always get plain \=\i)?
Very funky stuff, accents in ConTeXt. You'd have to dig up in enco-acc plus the other enco-* files. \=i becomes \imacron which by default (enco-def) becomes \definecharacter imacron {\buildtextaccent\textmacron \dotlessi} which you can study in enco-ini :) -- Giuseppe "Oblomov" Bilotta
On Thu, 27 May 2004 12:31:10 +0200, Giuseppe Bilotta
Wednesday, May 26, 2004 Idris Samawi Hamid wrote:
Could not interest anyone in the \=i problem, I guess. Anyway, could someone tell me how ConTeXt defines \=i (so as to always get plain \=\i)?
Very funky stuff, accents in ConTeXt. You'd have to dig up in enco-acc plus the other enco-* files.
I actually found this last night, digging in the ConTeXt code. U're right: VERY funky stuff;-) But it's really nice, since, thnx 2 the way Hans has abstracted things, the solution for \=i has no effect on \=I or anything else:-) Anyway, I now have a working proper accent now for \tf and \it; =============imacron.tex================== \setupoutput[pdftex] \setupbodyfontenvironment[default][em=italic] \def\SHIFT#1{\dimen0=.00#1ex \multiply\dimen0 by\fontdimen1\font \kern-.0156\dimen0} % compensate for slant/italic in lower accents \def\USHIFT#1{\dimen0=.00#1ex \multiply\dimen0 by\fontdimen1\font \kern.0156\dimen0} % compensate for slant/italic in upper accents \def\IBAR% {\leavevmode\vbox{\offinterlineskip\lineskip0.295ex% %\ialign{##\cr\USHIFT{120}\hbox to .27777em% %% for width of i-box %{\leaders\hrule height .067354ex\hfill}% %\SHIFT{1}\cr\i\cr}}} \ialign{##\cr\USHIFT{120}\hfill\hbox to .21243em% %% for width of i-glyph base {\leaders\hrule height .067354ex\hfill}% \hfill\SHIFT{1}\cr\i\cr}}} \starttext \definecharacter imacron % {\buildtextaccent\textmacron \dotlessi} % original def from enco-def.tex \=i \=I {\em b\=in\=ary} f\=i\high{\txx c}\=i % {\bi b\=in\=ary} % need conditionals for bold and small caps \blank[big] \definecharacter imacron {\IBAR} % new imacron \=i \=I {\em b\=in\=ary} f\=i\high{\txx c}\=i % {\bi b\=in\=ary} \stoptext ================================================================== A word on the parameters: I ran tftopl on cmr12.tfm, made a note of the QUAD and X-HEIGHT values, as well as the width of the i-box. I opened \cmr12.pfb in FontLab and made some measurements of the i-glyph and the macron bar; dividing a given width by the QUAD-value gives the rlative em values used above (similarly for the lineskip calculation, dividing heights by X-HEIGHT). The definition of \IBAR has two possibilities: macron is width of the i-box, or it's the width of the base of the i-glyph. Upon experimentation, I found the latter width more aesthetically pleasing, but I have kept the other as an option (commented). In fact, making the macron the width of the i-box may make better sense for \sc. PROBLEM: Now I need to learn more about \TeX conditionals, because this solution does not work for \bf, \bi, and the like. The height of the imacron bar needs to be greater for bold fonts. How can I make a set of three conditionals such that the definition of \IBAR has a different expansion for \tf, \it, \sl etc. \bf, \bi, \bs etc. \sc ??? That is, when \bf is on, the definition of \IBAR should expand a conditional that is based on the bold-dependent parameters. Anyway, for \tf and \it this looks soooo much better than the plain.tex imacron; Please try it out! And I'm open to suggestions on tweaking the parameters to make this look better. Best Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
At 12:31 27/05/2004, Giuseppe Bilotta wrote:
Wednesday, May 26, 2004 Idris Samawi Hamid wrote:
Could not interest anyone in the \=i problem, I guess. Anyway, could someone tell me how ConTeXt defines \=i (so as to always get plain \=\i)?
ah, we stand you sitting there crying over tex, can we? in addition to gb's solution:
Very funky stuff, accents in ConTeXt. You'd have to dig up in enco-acc plus the other enco-* files.
\=i becomes \imacron
which by default (enco-def) becomes
\definecharacter imacron {\buildtextaccent\textmacron \dotlessi}
which you can study in enco-ini :)
you can play with: \starttext % \startencoding[...] \defineaccent = {idris} {\idris} \definecharacter idris {sirdi} % \stopencoding he \={idris}! \stoptext
On Thu, 27 May 2004 23:47:07 +0200, Hans Hagen
ah, we stand you sitting there crying over tex, can we?
Sometimes I want to curse TeX, believe me... Seriously though, I have a real phobia for all that low low-level stuff... Did u have a chance 2 look at my general solution 4 medium fonts? I would like to generalize it to bold and small caps but I don't understand how to set up a conditionals macro that expands in accordance with the surrounding font. I need sthing like \ifboldtrue \IBARA % parameterized for bold fonts \else \ifsctrue \IBARB % parameterized for sc fonts \else \IBAR % parameterized for medium fonts \fi\fi
you can play with:
\starttext
% \startencoding[...]
\defineaccent = {idris} {\idris}
\definecharacter idris {sirdi}
% \stopencoding
he \={idris}!
\stoptext
I don't get it; when I run this as given I don't get any accents; I just
get
At 05:24 29/05/2004, you wrote:
On Thu, 27 May 2004 23:47:07 +0200, Hans Hagen
wrote: ah, we stand you sitting there crying over tex, can we?
Sometimes I want to curse TeX, believe me... Seriously though, I have a real phobia for all that low low-level stuff...
Did u have a chance 2 look at my general solution 4 medium fonts? I would like to generalize it to bold and small caps but I don't understand how to set up a conditionals macro that expands in accordance with the surrounding font. I need sthing like
\ifboldtrue \IBARA % parameterized for bold fonts \else \ifsctrue \IBARB % parameterized for sc fonts \else \IBAR % parameterized for medium fonts \fi\fi
take a look at font-ini and search for the definition of \em; but since you suffered already a lot: \unprotect \definesystemvariable{sx} \def\definestylecollection {\dotripleargument\dodefinestylecollection} \def\dodefinestylecollection[#1][#2][#3]% {\unexpanded\setvalue{#1}{\styleinstance[#1]}% \setvalue{\??sx#1:#2}{#3}} \unexpanded\def\styleinstance[#1]% {\executeifdefined{\??sx#1:\fontalternative}{\getvalue{\??sx#1:\s!default}}} \protect \definestylecollection[mine][default][sorry] \definestylecollection[mine][bf][\sl] \definestylecollection[mine][sl][\tt] {\bf test \mine test \sl test \mine test \bs oeps \mine oeps} let me know if this works ok, maybe i can add it to the kernel then Hans
Hans Hagen said this at Tue, 1 Jun 2004 21:04:49 +0200:
take a look at font-ini and search for the definition of \em; but since you suffered already a lot:
Hey Hans, I like this one a lot. It's more of what I imaged when you mentioned "fonts" and "parameters". (But I managed something interesting there... need to write it up.) I'd prefer (at least a variant) that does it based on fontstyle as well: \unprotect \definesystemvariable{sx} \def\definestylecollection {\dotripleargument\dodefinestylecollection} \def\dodefinestylecollection[#1][#2][#3][#4]% {\unexpanded\setvalue{#1}{\styleinstance[#1]}% \setvalue{\??sx#1:#2:#3}{#4}} \unexpanded\def\styleinstance[#1]% {\executeifdefined{\??sx#1:\fontstyle:\fontalternative}{\getvalue{\? ?sx#1:\fontstyle:\s!default}}} \protect \definestylecollection[caps][ss][default][\sc] \definestylecollection[caps][ss][bf][\bc] \definestylecollection[caps][ss][bi][\bc] \definestylecollection[caps][ss][bs][\bc]
let me know if this works ok, maybe i can add it to the kernel then
Works fine here. So. Now that we can parameterise font alternatives much more easily, can there be some sort of agreement on other, expanded names for font alternatives that go beyond the ones that cmr offers? I'm currently playing with these names (some grabbed from Hans's draft of Utopia support in type-siz). Do any of them look grossly wrong? \definebodyfont [default] [rm] [tf=Serif sa 1, it=SerifItalic sa 1, sl=SerifSlanted sa 1, sc=SerifCaps sa 1, % iy=SerifItalicCaps sa 1, % ?? bf=SerifBold sa 1, bi=SerifBoldItalic sa 1, bs=SerifBoldSlanted sa 1, bc=SerifBoldCaps sa 1, % by=SerifBoldItalicCaps sa 1, % ?? db=SerifSemi sa 1, di=SerifSemiItalic sa 1, ds=SerifSemiSlanted sa 1, dc=SerifSemiCaps sa 1, % dy=SerifSemiItalicCaps sa 1, % ?? eb=SerifBlack sa 1, ei=SerifBlackItalic sa 1, es=SerifBlackSlanted sa 1, ec=SerifBlackCaps sa 1, % ey=SerifBlackItalicCaps sa 1, % ?? lf=SerifLight sa 1, li=SerifLightItalic sa 1, ls=SerifLightSlanted sa 1, lc=SerifLightCaps sa 1, % ly=SerifLightItalicCaps sa 1 % ?? ] -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay atl@comp.lancs.ac.uk Computing Dept, Lancaster University +44(0)1524/594.537 Lancaster, LA1 4YR, UK Fax:+44(0)1524/593.608 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
At 21:45 02/06/2004, you wrote:
I'd prefer (at least a variant) that does it based on fontstyle as well:
\unprotect
\definesystemvariable{sx}
\def\definestylecollection {\dotripleargument\dodefinestylecollection}
\def\dodefinestylecollection[#1][#2][#3][#4]% {\unexpanded\setvalue{#1}{\styleinstance[#1]}% \setvalue{\??sx#1:#2:#3}{#4}}
\unexpanded\def\styleinstance[#1]% {\executeifdefined{\??sx#1:\fontstyle:\fontalternative}{\getvalue{\? ?sx#1:\fontstyle:\s!default}}}
\protect \definestylecollection[caps][ss][default][\sc] \definestylecollection[caps][ss][bf][\bc] \definestylecollection[caps][ss][bi][\bc] \definestylecollection[caps][ss][bs][\bc]
% \definestylecollection[mine] % \definestyleinstance[mine][default][sorry] % \definestyleinstance[mine][tt][bs][ttbs:\rm\sl] % \definestyleinstance[mine][tt][bf][ttbf:\rm\sl] % \definestyleinstance[mine][bf][\sl] % \definestyleinstance[mine][sl][\tt] % {\bf test \mine test \sl test \mine test \bs oeps \mine oeps {\tt test \mine \bf test}} \definesystemvariable{sx} \def\definestylecollection {\dosingleargument\dodefinestylecollection} \def\dodefinestylecollection[#1]% {\iffirstargument \unexpanded\setvalue{#1}{\styleinstance[#1]}% \def\docommand##1% {\def\dodocommand####1{\letbeundefined{\??sx##1:####1:\commalistelement}}% \processcommacommand[\alternativelist,\s!default]\dodocommand}% \processcommacommand[\stylelist,\s!default]\docommand \fi} \def\definestyleinstance {\doquadrupleargument\dodefinestyleinstance} \def\dodefinestyleinstance[#1][#2][#3][#4]% [name] [rm|ss|tt|..] [sl|bf|...] [whatever] {\iffirstargument \doifundefined{#1}{\definestylecollection[#1]}% \fi \iffourthargument \setvalue{\??sx#1:#2:#3}{#4}% \else\ifthirdargument \setvalue{\??sx#1::#2}{#3}% \else\ifsecondargument \letvalue{\??sx#1::#2}\empty \fi\fi\fi} \unexpanded\def\styleinstance[#1]% will be faster {%\begingroup\expanded{\infofont[#1:\fontstyle:\fontalternative]}\endgroup \executeifdefined{\??sx#1:\fontstyle:\fontalternative}% {\executeifdefined{\??sx#1:\fontstyle:\s!default}% {\executeifdefined{\??sx#1::\fontalternative} {\getvalue {\??sx#1::\s!default}}}}}
participants (4)
-
Adam Lindsay
-
Giuseppe Bilotta
-
Hans Hagen
-
Idris Samawi Hamid