-
Notifications
You must be signed in to change notification settings - Fork 8
Request Format
A request should be sent to /clsi/compile using the POST method, with the XML sent as the request body. The following command would achieve this:
wget --post-file request.xml http://clsi.scribtex.com/clsi/compile
The following is a valid request and shows most of the available features:
<?xml version="1.0" encoding="UTF-8"?>
<compile>
<token>AdWn34899sKd03S</token>
<options>
<compiler>latex</compiler>
<output-format>ps</output-format>
</options>
<resources root-resource-path='main.tex'>
<resource path="main.tex">
<![CDATA[
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\input{chapters/chapter1}
\end{document}
]]>
</resource>
<resource path='chapters/chapter1.tex'>
<![CDATA[
\chapter{Welcome to the CLSI}
I hope you enjoy your visit. Enjoy this pretty picture:
\includegraphics[width=\textwidth]{media/image}
]]>
</resource>
<resource path='media/image.jpg' url='http://map.gsfc.nasa.gov/media/060915/060915_CMB_Timeline75.jpg' modified='2010-01-16 19:28' />
</resources>
</compile>
The entire request should be wrapped in <compile>...</compile>
tags
Each request must include your developer token inside <token>...</token>
tags.
If you don’t have a developer token you can request one by emailing [email protected].
Each file that is part of the document you wish to compile should be passed as a <resource>
and this list should be wrapped in <resources>...</resources>
tags.
You can pass the content of a file either directly by including it between the <resource>...</resource>
tags or by specifying an url
attribute, giving a location to download the content from, in the <resource>
tag.
Each <resource>
tag must include a path
attribute with the name and path of the file as it should appear on disk.
If you pass the content of a resource via an URL, the Common LaTeX Service Interface will cache the content of the URL for later use. In order to tell the CLSI to refresh the cache you can pass a modified
attribute in the <resource>
tag containing an ISO 8601 formatted date. If the CLSI cache was retrieved before this date, it will be retrieved again. If no modified
attribute is passed, the CLSI will always attempt to use the cached version.
You can tell the CLSI which file is the main file that LaTeX should be run on by passing a root-resource-path
attribute in the <resources>
tag. This should be the path of one of the resources you have sent. If no root resource path is specified, the CLSI will try to compile main.tex.
The request may contain an optional options block:
<options>
<compiler>latex</compiler>
<output-format>ps</output-format>
</options
where you can specify the compiler to use, and the output format. Possible compilers are:
-
pdflatex
– possible output formats: pdf -
latex
– possible output formats: dvi, ps, pdf
If none are specified then the default compiler will be pdflatex
and the default output format pdf