Hi, After some discussion with Karl Berry on math-font-discuss: At Bachotek2005 there was a talk about the Latin Modern fonts, and there was a small math example included, of course. The presentation was shown using Adobe's PDF reader, and as you probably know, it displays the rules TeX draws for fractions and the radical bar horribly. The same is, in fact, true for xpdf and ghostview. The general problem is that rendering graphics and rendering text are not the same thing in PDF (nor PostScript), and that makes it hard for a viewer to align the two objects correctly. Our 'problem' is that people in general believe this is a bug in pdftex :-( An example file is at http://tex.aanhet.net/temp/mathtest.pdf Especially look at the top left of the sqrt signs. The source code is trivial: $$\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{x+1}}+1}+1}+1}+1}$$ I volunteered to write a patch for pdftex to try to remove the problem by making pdftex use a repeated character instead of a rule, but I am still a bit unsure about the best solution. Also, I vaguely remember that possibly somebody had done something with \radical a long time ago already, so I thought I'd ask feedback before doing any actual coding. Here is what I propose: The creation of a new primitive called \mathrulechar, with the following semantics. Adding \mathrulechar="0130 somewhere in the TeX source would make subsequent \radical commands use a suitable number of repetitions of the character "30 in math family 1 instead of the horizontal rule pdfTeX draws currently. No additional macros are involved in the process. (A suitable character has to be available, of course. It should be a dash, positioned flat on top of the baseline, no sidebearings) Greetings, Taco
On 2005-05-17 12:02:41 +0200, Taco Hoekwater wrote:
(A suitable character has to be available, of course. It should be a dash, positioned flat on top of the baseline, no sidebearings)
Maybe line10 already has it? Best regards Martin -- http://www.tm.oneiros.de
Hi Taco, On Tue, 17 May 2005, Taco Hoekwater wrote:
After some discussion with Karl Berry on math-font-discuss:
At Bachotek2005 there was a talk about the Latin Modern fonts, and there was a small math example included, of course. The presentation was shown using Adobe's PDF reader, and as you probably know, it displays the rules TeX draws for fractions and the radical bar horribly.
not to forget braces, so maybe also vertical lines are needed?
[...] Here is what I propose:
The creation of a new primitive called \mathrulechar, with the following semantics. Adding
\mathrulechar="0130
somewhere in the TeX source would make subsequent \radical commands use a suitable number of repetitions of the character "30 in math family 1 instead of the horizontal rule pdfTeX draws currently.
No additional macros are involved in the process.
(A suitable character has to be available, of course. It should be a dash, positioned flat on top of the baseline, no sidebearings)
Maybe instead of these repetitions you also could use the Tz operator together with font size scaling for stretching a single e.g. 1bp*1bp square pad to the wanted width/height? And what if this char. even came from an artificial one-character-only Type-1 font, produced (with proper hinting :-) inside pdftex? Regards, Hartmut
"Hartmut" == Hartmut Henkel
writes:
At Bachotek2005 there was a talk about the Latin Modern fonts, and there was a small math example included, of course. The presentation was shown using Adobe's PDF reader, and as you probably know, it displays the rules TeX draws for fractions and the radical bar horribly.
not to forget braces, so maybe also vertical lines are needed?
There are vertical rules in Computer Modern already. But you are right, \underbrace looks very ugly in PDF and maybe people need normal braces with arbitrary height.
(A suitable character has to be available, of course. It should be a dash, positioned flat on top of the baseline, no sidebearings)
Maybe instead of these repetitions you also could use the Tz operator together with font size scaling for stretching a single e.g. 1bp*1bp square pad to the wanted width/height? And what if this char. even came from an artificial one-character-only Type-1 font, produced (with proper hinting :-) inside pdftex?
That was my first thought when I saw that at BachoTeX. It was really horrible, the beamer had a pretty low resolution, BTW. But what happens if \pdfoutput=0 ? PostScript \specials are not portable. So there are three possibilities: 1. An internal font is used for PDF output and a rule for dvi. 2. An external font is used always which can be used by a dvi->ps converter as well. A rule is inserted if the font is not found. 3. An internal font is used for PDF output and a rule is inserted for dvi output unless an external font is found. The latter is probably the best. Scaling one character is IMHO the best solution. Hans already mentioned PicTeX. It might be obsolete, but for testing what Taco proposed, it's great. Regards, Reinhard -- ---------------------------------------------------------------------------- Reinhard Kotucha Phone: +49-511-4592165 Marschnerstr. 25 D-30167 Hannover mailto:reinhard.kotucha@web.de ---------------------------------------------------------------------------- Microsoft isn't the answer. Microsoft is the question, and the answer is NO. ----------------------------------------------------------------------------
I've read through the follow-up messages to this, and looked at the original demo. in Acrobat V5.0.5 under Windows/XP at 1152 x 854 on a 19" monitor. With Acrobat options "Smooth Text" and "Smooth Line Art" both selected, the blend between the two is /almost/ invisible even at 1600% magnification. Before investing effort in a PdfTeX-level solution, I would ask if there are current versions/implementations of Acrobat that do /not/ yield an "almost perfect blend". If there are, then I would agree with other posters that we need to identify /all/ places in TeX where an on-screen glyph is composed of both font-based glyphs and rules, and then devise a solution which will accommodate all of these without the overhead of a full PicTeX-like approach. Philip Taylor -------- Taco Hoekwater wrote:
Hi,
After some discussion with Karl Berry on math-font-discuss:
At Bachotek2005 there was a talk about the Latin Modern fonts, and there was a small math example included, of course. The presentation was shown using Adobe's PDF reader, and as you probably know, it displays the rules TeX draws for fractions and the radical bar horribly.
The same is, in fact, true for xpdf and ghostview. The general problem is that rendering graphics and rendering text are not the same thing in PDF (nor PostScript), and that makes it hard for a viewer to align the two objects correctly. Our 'problem' is that people in general believe this is a bug in pdftex :-(
An example file is at http://tex.aanhet.net/temp/mathtest.pdf Especially look at the top left of the sqrt signs. The source code is trivial: $$\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{x+1}}+1}+1}+1}+1}$$
I volunteered to write a patch for pdftex to try to remove the problem by making pdftex use a repeated character instead of a rule, but I am still a bit unsure about the best solution. Also, I vaguely remember that possibly somebody had done something with \radical a long time ago already, so I thought I'd ask feedback before doing any actual coding.
Here is what I propose:
The creation of a new primitive called \mathrulechar, with the following semantics. Adding
\mathrulechar="0130
somewhere in the TeX source would make subsequent \radical commands use a suitable number of repetitions of the character "30 in math family 1 instead of the horizontal rule pdfTeX draws currently.
No additional macros are involved in the process.
(A suitable character has to be available, of course. It should be a dash, positioned flat on top of the baseline, no sidebearings)
Greetings, Taco
_______________________________________________ tex-implementors mailing list http://tug.org/mailman/listinfo/tex-implementors
participants (5)
-
Hartmut Henkel
-
Martin Schröder
-
Philip TAYLOR
-
Reinhard Kotucha
-
Taco Hoekwater