Page MenuHomePhabricator

Broken Latex content generated with OCG
Open, Needs TriagePublic

Description

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.


Version: unspecified
Severity: normal

Details

Reference
bz71800

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:54 AM
bzimport added a project: OCG-PDF-renderer.
bzimport set Reference to bz71800.
bzimport added a subscriber: Unknown Object (MLST).
Kelson created this task.Oct 8 2014, 2:58 PM
cscott added a comment.Oct 8 2014, 3:04 PM

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!

Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptNov 29 2015, 2:06 PM

As already announced in Tech News, OfflineContentGenerator (OCG) will not be used anymore after October 1st, 2017 on Wikimedia sites. OCG will be replaced by Electron. You can read more on mediawiki.org.