cogEntry point to export to LaTeX
Developed by

Vincent Massol, Thomas Mortagne

Active Installs37
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager


Provide an entry point to export a wiki page into LaTeX content, see Output Filter for more details about the generated package.


You will get an entry in the export menu for LaTeX as follows:


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

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


Convert to PDF

This will generate a ZIP file that you need to unzip. Then you need to convert the LaTeX content (the generated index.tex file) into a PDF.

This can be achieved very simply, 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):

chmod +x
./ pdflatex -shell-escape index.tex

This will generate an index.pdf file.


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

Release Notes

All release notes


  • Closed LATEX-87 Labels inside wiki macros are not working


  • Closed LATEX-86 Figure Block should be handled even when not inside a MacroMarkerBlock


  • Closed LATEX-85 LaTeX Generation Broken With XWiki 11.8.1
  • Closed LATEX-83 Unwanted quote in caption when using the figure/figureCaption macros


  • Closed LATEX-82 Figure Macro rendering is fragile and fails on XWiki 10.10 when containing a Table
  • Closed LATEX-81 Info macro can have extra new lines when rendered to LaTeX


  • Closed LATEX-77 Support for small text
  • Closed LATEX-76 Correct translation of less, greater and bar symbol
  • Closed LATEX-74 Preamble 1.8 Has Syntax Error


  • Closed LATEX-65 LaTeX RawBlock should support inline elements
  • Closed LATEX-64 Translate quotes to LaTeX quotes
  • Closed LATEX-63 Allow underscore in IDs
  • Closed LATEX-62 Correct translation of backslash symbol
  • Closed LATEX-57 Horizontal line incorrectly translated


  • Closed LATEX-61 Images file may not contain non-ASCII characters
  • Closed LATEX-60 Underscores in image file names are escaped


  • Closed LATEX-56 Message macros don't support inline usage
  • Closed LATEX-55 Inline code macros not working
  • Closed LATEX-54 New line should not start a new paragraph
  • Closed LATEX-53 xcontext.action doesn't return "latexexport"
  • Closed LATEX-52 Invalid new line "\\" character after id macro
  • Closed LATEX-51 Pages with reserved latex characters in their name generate invalid latex
  • Closed LATEX-50 LaTeX export button text is not consistent with other buttons


  • Closed LATEX-48 Image path references can cause LaTeX compilation errors
  • Closed LATEX-47 Images in table cells generate invalid LaTeX
  • Closed LATEX-46 Use a more standard way to output empty lines
  • Closed LATEX-45 Images located inside {{context}} macros are not exported
  • Closed LATEX-44 Also escape the ampersand character


  • Closed LATEX-43 Add support for exporting document using sheets
  • Closed LATEX-41 Exporting a nested page should produce a zip named after the space name
  • Closed LATEX-35 Refactoring the template bindings so that they're all under the same namespace
  • Closed LATEX-34 Remove support for captions and labels as parameters for Image and Table blocks
  • Closed LATEX-33 Ignore generated numbers when the Numbered Reference transformations are used
  • Closed LATEX-32 Add support for the {{figure}}¬†and {{figureCaption}} macros
  • Closed LATEX-31 Generate chapters for top level headings when the document type is a book
  • Closed LATEX-30 Pass the document type to the Syntax Renderer
  • Closed LATEX-24 Add support for the Container macro
  • Closed LATEX-12 Provide Export options in the UI
  • Closed LATEX-11 Contribute a LaTeX export button in the page export dialog box
  • Closed LATEX-9 Allow users to customize the export's index template


  • Closed LATEX-29 Parameters in a paragraph having an extra new line
  • Closed LATEX-28 Add support for the Reference Macro
  • Closed LATEX-15 Fix attachment link embedding


  • Closed LATEX-26 The messages macro should support wiki syntax
  • Closed LATEX-25 Implement max image size
  • Closed LATEX-23 Add support for labels for captioned tables and images
  • Closed LATEX-22 Have images centered by default
  • Closed LATEX-21 Supports links to current page when there's no label
  • Closed LATEX-20 Convert any link to the current page to a local link
  • Closed LATEX-18 Ignore leading spaces in templates to make them more readable
  • Closed LATEX-13 Handle resized images
  • Closed LATEX-7 Handle Group Block


  • Closed LATEX-19 Add support for styles in footnote content


  • Closed LATEX-10 Add support for footnote macros


  • Closed LATEX-3 Export entry point for LaTex
  • Closed LATEX-2 Export Filter for LaTeX
  • Closed LATEX-1 LaTeX Syntax renderer based on templates

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.


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

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

Get Connected