CZ:Formatting mathematics/Scriptstyle

From Citizendium
< CZ:Formatting mathematics
Revision as of 13:56, 12 May 2007 by imported>Catherine Woodgold (→‎Arguments in favor of not using \scriptstyle: removing signature -- not required on this page?)
Jump to navigation Jump to search

Statement of proposed policy

To determine: Whether to use \scriptstyle to reduce the size of PNG-rendered inline math formulas.

Example with \scriptstyle: The identity is cool.

Example without \scriptstyle: The identity is cool.


Editors' opinions

  • Greg Martin 12:19, 11 May 2007 (CDT) supports a policy of not using \scriptstyle.

Arguments in favor of using \scriptstyle

  • The letters in look comically gigantic on some browsers.
Rebuttal: The appearance depends on preferences of the viewer - their chosen font size, for example - and so fixing the problem for one person might cause a problem for another.
  • \scriptstyle is almost never used for other purposes. Let's use it for this purpose, and then if the coding is ever changed to fix the problem for us, it's easy to automate the process of removing \scriptstyles from all the pages.
Rebuttal: Such an automated process could mess up "legitimate" uses of \scriptstyle.

Arguments in favor of not using \scriptstyle

  • Using \scriptstyle doesn't reflect the right structure; it's a hack. And it's a real pain to type all the time.
Rebuttal: So what? It provides the outcome we want. And math formatting in general is kind of a pain - this isn't any worse.
  • Since some math environments are rendered as HTML and others as PNG, we'd have to remember when to use \scriptstyle and when not to.
Rebuttal: Just use it every appropriate time, assuming everything will be PNG-rendered. HTML will just ignore it.
  • The problem isn't with \scriptstyle; it's with the way the coding displays the results. We should have the coding changed rather than manually inserting \scriptstyle a hundred times an article.
Rebuttal: Coding changes that we request are rare and wondrous events. We need to make things look good right now.
  • Using \scriptstyle might fix the problems on some browsing environments, but it will cause problems on others. It depends on what preferences the user has selected for math rendering, font size, and so on.
Rebuttal: Anecdotal evidence suggests that for the large majority of users, using \scriptstyle helps.
  • Accessability: When the page is displayed in larger lettering, the math formula stays the same size. People with visual impairments who use large lettering may not be able to read the tiny math formulas rendered with "scriptstyle". I tried larger lettering on my browser just now: the "scriptstyle" formula looks too small and actually I have trouble reading it at that size regardless of the size of the text; while the non-scriptstyle formula looks about right as well as being readable. It's not always as easy to lean closer to a computer screen as it is to bring a book closer to your eyes to peer at a subscript or superscript. Being able to read the information may be more important than having it look conventional.

Changing the system itself

It was suggested that global resizing of PNG-rendered formulas is possible. This would eliminate the need for \scriptstyle (or leave it for its proper use). The only question would be to determine the "right" size, as the displayed formulas will be affected too.

If this is possible, then it might also be possible to create two math environments, perhaps called <imath> and <dmath> (for inline and displayed), which would be almost exactly the same - except that <imath> would render smaller graphics while <dmath> would be like <math> is now.

An idea re baseline: Someone on the forum guessed that it would probably be difficult to get LaTeX to output information about where in the image is the baseline that should line up with the text. An easier change to the software might be to allow the user to supply the information. Thus for example <math> would display inline formulas as it does now, and <math baseline=0.2> would display the formula as if the baseline inside the formula were 0.2 from the bottom of the image in units of the total height of the image. Perhaps this would require a change in browser software. Or perhaps the image could be padded with some whitespace to help centre it; in that case perhaps the supplied information should be about how high the centre of the formula is, rather than the baseline. I'm imagining that the writer would try a few values of the parameter to see what looks OK. --Catherine Woodgold 13:29, 12 May 2007 (CDT)