LaTeX Exporter

Last modified by Vincent Massol on 2020/10/19 18:04

cogEntry point to export to LaTeX
TypeJAR
Developed by

Vincent Massol, Thomas Mortagne

Active Installs45
Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

Description

Provide an entry point to export a wiki page into:

  • LaTeX content (you get a zip file containing the LaTeX files)
  • 1.10+ PDF directly (the LaTeX files are converted to PDF)

See Output Filter for more details about the generated package.

Usage

Export

You will get 2 entries in the export menu for LaTeX as follows:

export.png

Note that exporting to PDF requires Docker to be installed, see the LaTeX to PDF documentation.

Alternatively you can export a page by changing the /view/ action in the browser address bar into /latexexport/. For example to export the wiki home page you can use http://myhost/xwiki/bin/latexexport/Main/. If you pass the pdf=true query string parameter, the export will generate a PDF.

Options

Then you'll get various export options that you can select/configure:

export-options.png

Progress

1.12+

Since the export can take some time (especially on the first run if you're exporting to PDF and the Docker image used to convert from LaTeX to PDF hasn't been downloaded yet - this is needed only once), the export progress is shown with a progress bar.

Convert to PDF

If you export to LaTeX and wish to manually generate a PDF from it, you can achieve this, using, for example, this LaTeX Docker image. Put yourself at the root of the unzipped ZIP and do the following (after having installed Docker if you don't have it already):

wget https://raw.githubusercontent.com/blang/latex-docker/master/latexdockercmd.sh
chmod +x latexdockercmd.sh
./latexdockercmd.sh pdflatex -shell-escape index.tex

This will generate an index.pdf file.

You'll need to call pdflatex twice to get the Table of Content generated since it requires two passes.

Example

Here's an example of the SandBox home page as a PDF.

Release Notes

All release notes

1.12

1.11

1.10.1

1.10

1.9.4

1.9.3

1.9.2

1.9.1

1.9

1.8

1.7.1

1.7

1.6

1.5

1.4

1.3

1.2

1.1

1.0

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.


Exporting to PDF requires Docker to be installed, see the LaTeX to PDF documentation.

Dependencies

Dependencies for this extension (org.xwiki.contrib.latex:latex-export 1.12):

Tags:
Created by Thomas Mortagne on 2018/02/23 16:33
    

Get Connected