Last modified: 2014-10-08 15:04:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73800, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71800 - Broken Latex content generated with OCG
Broken Latex content generated with OCG
Status: NEW
Product: OCG
Classification: Unclassified
PDF renderer (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-08 14:58 UTC by Kelson [Emmanuel Engelhart]
Modified: 2014-10-08 15:04 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kelson [Emmanuel Engelhart] 2014-10-08 14:58:55 UTC
I have installed OCG yesterday on two Ubuntu servers (precise & trusty) and the conclusion was that the generated latex was not compiling due to many errors (most of the time (/usepackage ones). To get it working on both of them (but all the errors did happen on both of them I had to:

$ git diff lib/index.js 
diff --git a/lib/index.js b/lib/index.js
index 98a1a98..b5cb769 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -70,12 +70,12 @@ var STD_HEADER = [
        "",
        "\\documentclass[10pt,twocolumn,twoside,fleqn]{article}",
        "\\pagestyle{headings}",
-       "\\usepackage{fontspec, xunicode, polyglossia, graphicx, xltxtra}",
+       "\\usepackage{fontspec, amssymb, xunicode, polyglossia, graphicx, xltxtra}",
        "\\usepackage{amsmath,amsthm,amstext,amssymb}",
        "\\usepackage[usenames]{xcolor}",
        "\\definecolor{linkcolor}{rgb}{.27,0,0}",
        "\\definecolor{citecolor}{rgb}{0,0,.27}",
-       "\\usepackage[unicode,colorlinks,breaklinks,allcolors=linkcolor,linkcolor=citecolor]{hyperref}",
+       "\\usepackage[unicode,colorlinks,breaklinks,linkcolor=citecolor]{hyperref}",
        "\\urlstyle{same}",
        // This is a documented workaround for including SVGs with RGB colors and/or
        // transparency; see:

For "allcolors=linkcolor", here is the error:
name=RendererError, message=! Package xkeyval Error: `allcolors' undefined in families `Hyp'., stack=RendererError: ! Package xkeyval Error: `allcolors' undefined in families `Hyp'.

For ammsymb which should be included before xunicode, here is the error:
name=RendererError, message=! LaTeX Error: Command `\Finv' already defined., stack=RendererError: ! LaTeX Error: Command `\Finv' already defined.
Comment 1 C. Scott Ananian 2014-10-08 15:04:48 UTC
You need to be using the latex TeX Live packages.  Our deployed configuration uses a backport.  On ubuntu, ppa:texlive-backports/ppa will have the latest bits.  See mw-ocg-latexer/.travis.yml for install instructions.

I'm not closing this bug yet: a patch to the README with this information is welcome!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links