cogEntry point to export a LaTex
TypeJAR
Developed by

Vincent Massol, Thomas Mortagne

Active Installs8
Rating
Rate!
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, see Output Filter for more details about the generated package.

Usage

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

export.png

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:

export-options.png

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

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.

Example

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

Release Notes

All release notes

1.7.1

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

1.7

  • 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

1.6

  • 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

1.5

  • 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

1.4

  • 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

1.3

  • 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

1.2

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

1.1

  • Closed LATEX-10 Add support for footnote macros

1.0

  • 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

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

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

Get Connected