LaTeX Export API for Glossary Application

Last modified by Admin on 2024/03/04 00:18

cogLaTeX Export API for the Glossary Application
TypeJAR
Category
Developed by

Sarthak Gupta, Vincent Massol, slauriere, Clément Aubin

Active Installs9
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

Description

Provides:

  • Custom templates overriding the default LaTeX templates, used to generate glossary entries and a glossary in the exported LaTeX content (and in the generated PDF).
  • Scripting APIs used by the custom templates (and also by the UIXP from the Glossary LaTeX Export UI extension).

Script API

@Component
@Named("latexGlossary")
@Singleton
public class LaTeXGlossaryScriptService implements ScriptService
{
   /**
     * Save the glossary data in the script context so that it can be later accessed when saving it to disk.
     *
     * @param entryId the glossary entry id to save
     * @throws GlossaryException in case an error happens to retrieve the document containing the glossary entry
     */

   public void saveGlossaryEntryInContext(String entryId) throws GlossaryException
   {
       ...
   }

   /**
     * Save glossary entries to a file ({@code glossary.tex} that is LaTeX-included in the preamble.
     *
     * @throws GlossaryException in case of an error writing to file
     */

   public void saveGlossaryEntriesToFile() throws GlossaryException
   {
       ...
   }
}

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.

Dependencies

Dependencies for this extension (org.xwiki.contrib.glossary:application-glossary-latex-api 1.4.7):

Tags:
    

Get Connected