MediaWiki r87284 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r87283‎ | r87284 (on ViewVC)‎ | r87285 >
Date:19:28, 2 May 2011
Author:thenub314
Status:resolved (Comments)
Tags:brion, math 
Comment:
This update fixes bug 27324 by loading the eurosym package to provide
the euro symbol. This requires the eurosym package be available in
the installed LaTeX distribution. Five new commands are now
recognized by texvc: \euro, \geneuro, \geneuronarrow, \geneurowide,
and \officialeuro. All provide varients of the euro symbol, and \euro
is simply short alias for \officialeuro. In addition some minor
changes have been introduced the html rendering of some math symbols.
The new choices provide html symbols that are higher degree of
similarity in comparison to the corresponding LaTeX symbols.
Modified paths:

Diff [purge]

Loading diff…

Sign-offs

UserFlagDate
Thelema314inspected14:06, 29 August 2011

Follow-up revisions

Rev.Commit summaryAuthorDate
r96990Revert changes to texvc that provide no test cases or examples of what they'r...brion19:00, 13 September 2011
r96993MFT r96990: provisional revert of texvc changes that don't come with any test...brion19:07, 13 September 2011
r97007* (bug 27324) \euro support for <math>...brion21:48, 13 September 2011

Comments

#Comment by Hashar (talk | contribs)   06:47, 26 August 2011

tagged 'scap-trap'. Live WMF cluster will require the 'eurosym' package.

#Comment by Reedy (talk | contribs)   10:23, 6 September 2011

rt ticket #1434 has been logged asking for the texlive-fonts-recommended [1] ubuntu package (includes eurosym) to the apaches for Math rendering


[1] http://packages.ubuntu.com/lucid/texlive-fonts-recommended

#Comment by Reedy (talk | contribs)   11:51, 7 September 2011
+              (if !modules_euro then "\\usepackage{eurosym}\n" else "") ^

Will this fallback gracefully? ie If we don't have the package, will these things just not work?

#Comment by Thelema314 (talk | contribs)   12:07, 7 September 2011

That's entirely up to LaTeX and how it's called. I think there's a way to tell it to skip over the error of a package not being available, and also the errors related to the characters needing the eurosym package, although the results will more than likely be broken in some way.

#Comment by Reedy (talk | contribs)   12:08, 7 September 2011

Cheers, shouldn't end up being an issue... It's trivial enough to add another package (especially as it exists in the ubuntu repos etc) so that this will work

#Comment by Thelema314 (talk | contribs)   14:06, 29 August 2011

The euro tweaks are straightforward. I'm not certain about what browsers will do with "&#8477" if some extended font with something resembling \mathbb{R} isn't available. There might be a backwards compatibility issue here.

#Comment by Reedy (talk | contribs)   23:25, 8 September 2011

-scaptrap, already actually installed as part of the textlive-fonts-recommended [1]

reedy@srv193:~$ dpkg -l | grep texlive-fonts-recommended
ii  texlive-fonts-recommended             2007-13ubuntu0.1              TeX Live: Recommended fonts

Fonts

 avantgar -- the URW Avantgar fonts and support for the Adobe font set.
 bookman -- the URW Bookman fonts and support for the Adobe font set.
 charter -- Charter fonts.
 cmextra --
 courier -- Adobe Type 1 "free" copies of Courier.
 euro -- Provide Euro values for national currency amounts.
 euro-ce -- Euro and CE sign font.
 eurofont -- Provides a command that prints a euro symbol.
 eurosans -- Interface to Adobe's sans-serif Euro font.
 eurosym -- MetaFont and macros for Euro sign.
 fpl -- SC and OsF fonts for URW Palladio L
 helvetic -- the URW Helvetiva fonts and support for the Adobe font set.
 marvosym -- Martin Vogel's Symbols (marvosym) font.
 mathpazo -- Fonts to typeset mathematics to match Palatino.
 ncntrsbk -- the URW New Century Schoolbook fonts and support for the Adobe
  font set.
 palatino --
 pxfonts -- Palatino-like fonts in support of mathematics.
 rsfs -- Ralph Smith's Formal Script font.
 symbol --
 times -- Select Adobe Times Roman (or equivalent) as default font.
 timesnew -- the URW Times fonts and support for the Adobe font set.
 txfonts -- Times-like fonts in support of mathematics.
 utopia -- Adobe Utopia fonts.
 wasy -- The wasy fonts (Waldi symbol fonts).
 wasysym -- LaTeX support file to use the WASY2 fonts
 zapfchan -- the URW Zapf Chancery font and support for the Adobe font.
 zapfding -- the URW Zapf Dingbat font and support for the Adobe font.

[1] http://packages.ubuntu.com/natty/texlive-fonts-recommended

#Comment by Brion VIBBER (talk | contribs)   18:45, 13 September 2011

Added needs-parsertest keyword; an example should be added to parser tests to confirm use of \euro works without failing.

#Comment by Brion VIBBER (talk | contribs)   19:04, 13 September 2011

Provisionally reverted in r96990 pending test cases.

#Comment by Brion VIBBER (talk | contribs)   21:33, 13 September 2011

The bits above indicate that \euro should be renderable as HTML, but in my testing it forces PNG output on regular settings. Is this intended?

May need to switch it to HTMLABLEC to mark it as conservative.

Phi changes look ok... varepsilon I think is ok (not sure if there's a standard for the other epsilon form, so ok to leave that as tex-only I guess?). The set number symbols as numeric char entities render ok for me in Firefox / Ubuntu 11.04, but since they're not marked conservative most people probably won't see them rendered that way anyway, so I wouldn't worry too much about compat on those.

#Comment by Brion VIBBER (talk | contribs)   21:51, 13 September 2011

Reapplied in r97007 with parser test cases and a tweak to let \euro render through to HTML in more conservative modes.

Status & tagging log