[IPOL discuss] Typographic problem

Pascal Getreuer getreuer at gmail.com
Tue Aug 16 10:02:11 CEST 2011


> 1- Has anyone a solution for aligning .tex formulas with text,  or is it a
> desperate situation?

I have a limited solution for aligning formulas within the body text.

1.  First, some simple formulas can be written directly as text, which
are then of course align correctly with the text.  For example
$f(x^2)$ can be written as _f_(_x_<sup>2</sup>).  HTML entities can be
used to write Greek letters and common mathematical symbols (e.g.,
α),
   http://www.w3schools.com/tags/ref_symbols.asp

You can go a long way with this, even writing integrals and
super-superscripts is possible:

$\int \varphi_n(x-t) f(t)  \, dt \rightarrow f(x)$
∫ φ<sub>_n_</sub>(_x_−_t_) _dt_ → _f_(_x_)


2.  Some symbols and expressions require using a teximg to display the
equation as a graphic.  The problem is that using it in text inline
directly produces a result that is vertically misaligned from the rest
of the text.  It appears to me that the default alignment is such that
bottom of the teximg image is aligned to the text baseline.  So
usually, the teximg is too high relative to the body text because
parenthesis ( ) and many other symbols hang below the baseline.

2a.  Some things, like \mathbb{R}^n, can be used directly as [[!teximg
code="\mathbb{R}^n"]] because they do not hang below the baseline.

2b.  On the one hand, inline equations should be simple in the first
place.  So if method #1 above is not possible for the equation, then
maybe it is complicated enough to justify placing the equation display
style on its own line.  Still, there are some simple things that need
a graphic.  The following formula would appear too high relative the
body text:

   "The best-fitting stencil [[!teximg code="\mathcal{S}^\star(k)"]]
estimates the contours in a neighborhood of _k_."

To compensate for the vertical misalignment, my solution is to place
the teximg within a span and use relative positioning to push it back
down by a small amount:

   "The best-fitting stencil <span
style="position:relative;top:4pt">[[!teximg
code="\mathcal{S}^\star(k)"]]</span> estimates the contours in a
neighborhood of _k_."

where the "top:4pt" specifies the amount of vertical adjustment
(positive means move the teximg down).  The disadvantages to doing
this are that the vertical adjustment value must be tuned for each
inline formula (though similar formulas can use the same adjustment
value) and also the adjustment becomes invalid if the user has
modified font size settings.

I think that this manual vertical adjustment is an evil hack and
should be used sparingly.  Most of the time, it is enough to use
method #1 where the math is simple and teximg on its own line
otherwise.

For examples of these methods, please check out my geometric contour
stencils and linear interpolation articles
http://www.ipol.im/pub/algo/g_interpolation_geometric_contour_stencils/
http://www.ipol.im/pub/algo/g_linear_methods_for_image_interpolation/

Best,
Pascal


On Tue, Aug 2, 2011 at 06:38, Jean-Michel Morel
<morel at cmla.ens-cachan.fr> wrote:
> Dear all,
>
> I am spending a lot of time proof-reading for IPOL and I see the typographic
> problem as the main problem that ought to be solved.
>
> Indeed, IPOL papers are  articles with mathematical content. Nevertheless,
> we are requesting authors to invent typographic tricks to avoid using .tex
> formulas in their  text.
>
> If they do, the .tex symbols are not aligned with the text.  If they don't,
> the aspect of the symbols is different in text and in .tex becomes quite
> ambiguous.
>
> I asked recently an author to find a way to  make the aspect of symbols
> equal in the text and in the .tex formulas, and he simply answered me that
> it was fine as it was.
>
> In such a situation I am at a loss to enforce this rule. Indeed you cannot
> enforce a rule as editor if you do not have a standard editing solution to
> propose to authors.
>
> Furthermore, it is not at all a negligible requirement we are doing to
> authors, to learn a new editing style just for IPOL -while all other
> scientific journals in this field are in .tex+.pdf !-
>
> Thus, at this point, should we not go back to .tex .pdf for future
> submissions? Then each article would still have a web page, but it would
> generated by the editor and only contain the header: title, authors, editor,
> abstract, bibtex, and the LINKS to the .pdf paper, the demo, the archive.
> The authors would therefore furnish a .tex file with  the images and we
> would generate the  .pdf.
>
> This would facilitate a lot the life of authors who would produce .pdf from
> text. The form would be worse in some aspects, but better in others. For
> instance, .pdf has page numbering and is printable.
>
> Clearly, most online scientific journals have opted for .pdf, so far. Thus
> why  should we innovate at the point where our papers either look
> unprofessional, or request a lot of editing tricks to look decent?
>
> Thus my question are:
>
> 1- Has anyone a solution for aligning .tex formulas with text,  or is it a
> desesperate situation?
>
> 2-Back to .tex + .pdf. My proposition would be to furnish like other
> journals (simple) style files in .tex to authors. They would retain most
> form features of the current web pages, but would of course lose some
> functionality. That's as it is!
>
>
> Best,
> Jean-Michel
>
>
> _______________________________________________
> discuss mailing list
> discuss at list.ipol.im
> http://tools.ipol.im/mailman/listinfo/discuss
>


More information about the discuss mailing list