Author Topic: Missplaced LaTeX text  (Read 5147 times)

earnt

  • Newbie
  • *
  • Posts: 9
    • View Profile
Missplaced LaTeX text
« on: October 12, 2009, 01:24:21 PM »
When including some math latex text (e.g. $\bigl\{ C \bigr\}$) the placement of the preview in WinFIG and the placement in the final tex document differ. Because of the \smash statement in the .pdftex_t file latex uses the capital ground line as reference vertical coordinate in contrast to WinFIG which takes the lowes point of the generated latex text.

Is the \smash statement unconditionally necessary for other purposes? Is it possible to remove this command by default?
(A precice preview would be very important for efficiant work...)

PS: After removing the smash statement there remains a displacement of ca. 1 dot (preview ist higher than latex final graphic). I have no explanation for this. :(

Andreas

  • Administrator
  • Full Member
  • *****
  • Posts: 140
    • View Profile
Re: Missplaced LaTeX text
« Reply #1 on: October 12, 2009, 10:23:15 PM »
When including some math latex text (e.g. $\bigl\{ C \bigr\}$) the placement of the preview in WinFIG and the placement in the final tex document differ. Because of the \smash statement in the .pdftex_t file latex uses the capital ground line as reference vertical coordinate in contrast to WinFIG which takes the lowes point of the generated latex text.

The source code from fig2dev (file genlatex.c) says:

   /* smash is used to position text at baseline */

I don't really want to change this, because it would be insistent with Unix Xfig. BUt I found that WinFIG 4 places the text with a wrong offset. WinFIG 3 is doing that better. I will correct this, but it will never be pixel perfect, because WinFIG can only read the bitmap from the TeX->DVI->PNG chain and so it doesn't know the precise font metrics, ascent, descent etc.
This forum belongs to www.schmidt-web-berlin.de/winfig