Any latex web services with an API? [closed]
Asked Answered
T

7

16

Is there a web service API that takes this type of a latex http-request:

http://some_web_service/texfile?texfile=

\new\documentclass[12pt]{article}
\begin{document}
  bla  
\end{document}

and returns:

bla.pdf
Templar answered 30/11, 2010 at 4:23 Comment(1)
See this question on the TeX StackExchange.Mazdaism
T
5

ScribTeX has a CLSI API, you can send CLSI requests from any platform to compile LaTeX.

I blogged some time ago about this along with a CLSI client written in F#.

Tearoom answered 7/6, 2011 at 14:41 Comment(2)
ScribTeX no longer exists :(Threescore
@RadonRosborough sharelatex.com github.com/sharelatex/clsi-sharelatexTearoom
F
9

the Online LaTeX Equation Editor is perfect for this.

EG:

equation using Online Equation Editor

uses the following markup:

![equation using Online Equation Editor]
(https://latex.codecogs.com/gif.latex?x&space;=&space;\frac{4}{5}+\pi\Omega\int_{2\pi}^{\infty}{5\left\(\frac{\tau+3}{2}\right\)d\omega})

note that you will need to escape parentheses with a backslash, eg: \left\( stuff \right\)

If you look through the editor API documentation you might figure out that you can change the format from gif to png by changing the api url endpoint from /gif.latex to /png.latex.

There's also options to set a white background by using \bg_white:

![equation using Online Equation Editor] 
(https://latex.codecogs.com/gif.latex?\bg_white&space;x&space;=&space;\frac{4}{5}+\pi\Omega\int_{2\pi}^{\infty}{5\left\(\frac{\tau+3}{2}\right\)d\omega})

See also this meta.stackexchange answer and this tex.stackexchange answer. I'm sure there are many more answers that point to this tool and implement it in different ways. IE: instead of using the url to generate a gif or png using markdown notation, or you could use html markup and bypass markdown or you could just drag the image over to your post.

Franklin answered 23/9, 2015 at 22:57 Comment(2)
Unfortunately the image posted here looks quite terrible with SO's dark theme...Brainard
You can change latexcogs to render the background as white using \bg_white. If you go to latex.codecogs.com it looks like there might be some options to change. Good luck!Franklin
D
6

I'm looking for the same thing and Latex Online seems to be the closest thing to what we need.

You just need to setup the server by yourself.

EDIT

I've written my own little Sinatra app for this: https://github.com/codegestalt/sinatratex

Depth answered 6/12, 2013 at 18:27 Comment(0)
T
5

ScribTeX has a CLSI API, you can send CLSI requests from any platform to compile LaTeX.

I blogged some time ago about this along with a CLSI client written in F#.

Tearoom answered 7/6, 2011 at 14:41 Comment(2)
ScribTeX no longer exists :(Threescore
@RadonRosborough sharelatex.com github.com/sharelatex/clsi-sharelatexTearoom
A
1

The Common LaTeX Service Interface (CLSI) is a web service interface and implementation that exposes common LaTeX related capabilities (such as compiling LaTeX documents to different formats):

http://code.google.com/p/common-latex-service-interface/

(This interface is one of the ways that latexlab.org can compile latex)

Ariose answered 6/1, 2011 at 15:59 Comment(1)
OK thanks---so it looks like I would have to setup my own server --- i was hoping someone else setup a web service of this sort with an API and I would just focus on making UI and template forms to post .tex and recieve .pdf. Hopefully it will not be too complex to try setting up this CLSI server ...cheersTemplar
L
0

Fundamentally, this shouldn't be any different than a build server like you see for lots of open source projects (along the lines of Koji for example). Ultimately, you would just hook into pdflatex instead of gcc.

Longways answered 30/11, 2010 at 4:50 Comment(0)
B
0

Were you to be able to install software on your local server this wouldn't be too hard. Some combination of Perl / TT / latexmk along with a LaTeX system (e.g. TeXLive or MiKTeX).

I don't know about latexlab mentioned above. The closest thing I know of is http://www.tlhiv.org/ltxpreview/ , which perhaps you could wrap to do what you need (or even write a howto for your users).

Beltz answered 30/11, 2010 at 12:42 Comment(0)
D
0

Just for completeness:

GitHub or docker might do the trick.

It's basically a micro service implemented in java/spring boot, which is wrapping pdflatex. Urls are immutable and the pdfs are stored on disk/distributed storage. You'll have to host it on your own though. The code is pretty simple and you're able/allowed to customize it to your needs. See the "Scaling the service" section in readme for more details about setting up a production environment.

Dirham answered 15/2, 2019 at 12:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.