cogLaTeX Output Filter
Developed by

Vincent Massol, Thomas Mortagne

Active Installs38
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager


Can be used as an output stream filter to produce a package containing:

  • Each page converted into a LaTeX file
  • Each attachment/image used in the exported pages
  • An index.tex file to group all exported documents in one

Index Template

The generation of the index.tex file can be customized using the same mechanism described in the Templates mechanism.

The template name is latex/Index.

Overriding Commands

The default Index template defines 3 LaTeX commands that you can override in latex/Preamble if you wish to customize them:

  • \xwikidate (sets the \date)
  • \xwikiauthor (sets the \author)
  • \xwikititle (sets the \title)

Override example in latex/Preamble:

\renewcommand{\xwikidate}{\date{\today \\ \vfill ~ \\    Text at bottom of page}}


The filter support the following parameters:

targetAny OutputFilter provider an OutputStreamWhere to save the package
entitiesEntityReferenceSetThe exported entities (used by the filter to know how to react for link between exported documents)

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-filter 1.9.4):

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

Get Connected