User:Austin J. Che/Extensions/LatexDoc

From OpenWetWare
Jump to navigationJump to search

The LatexDoc extension in MediaWiki SVN has been modified as follows:

  • The biggest change is to allow use of other files on the wiki so that bibtex and graphics works.
  • Requires latexmk
  • Removed DVI output (not useful on web)
  • Removed filter for "obviously dangerous control words" as it isn't a good security mechanism. Instead, change texmf.cnf so that shell_escape=f, openout_any=p, and openin_any=p. You may also want to run latex under a chroot jail.
  • Added link to get the log file

Usage:

Any wiki page that looks like a latex document will automatically have links for added to the top. The Get PDF link will generate a PDF or grab it from the cache if it exists and the Regenerate PDF forces the PDF file to be regenerated.

The special command \usewikifile{Wiki Page Name}{texfilename} can be used. All such commands are stripped before being passed to latexmk for generation of pdf. In addition, the contents of Wiki Page Name are saved as texfilename in the same directory as the page. Thus, you can include graphics or use bibtex where the graphics and .bib file are stored on the wiki.

See an example.


Send bugs and comments to Austin Che. Other extensions including sources can be found at User:Austin J. Che/Extensions.