cogEntry point to export to LaTeX
Recommended
TypeJAR
Category
Developed by

Vincent Massol, Thomas Mortagne

Active Installs111
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1
Compatibility

Since v1.5 requires XWiki 10.2RC1

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.18.1

1.18

The following configuration keys have been renamed and you'll need to update them if you've been using them:

  • latex.pdf.dockerImageName is now latex.pdf.docker.imageName
  • latex.pdf.dockerCommands is now latex.pdf.docker.commands

Requires XWiki 13.10+.

1.17

1.16

The template for the reference macro is not provided anymore by the Syntax 1.0.
It is now provided by Reference - Latex.

1.15

1.14

1.13.2

1.13.1

1.13

Older

Check the archives.

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).

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.


By default, the export to PDF will use Docker and thus it requires Docker to be installed, see the LaTeX to PDF documentation.

1.18+ 

However, it's possible to configure an alternate method that doesn't mandate process but that requires some local executable to be present to perform the conversion. See the LaTeX PDF Process extension for details. To configure the export to use the process-based method, configure the following in your xwiki.properties file:

latex.pdf.export.hint=process

To explicitly configure it to use the Docker-based method, either comment the property or set it to docker, as in:

latex.pdf.export.hint=docker

Dependencies

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

Tags:
    

Get Connected