开发者

Any latex web services with an API? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations fo开发者_Go百科r books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 3 years ago.

Improve this question

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


the Online LaTeX Equation Editor is perfect for this.

EG:

Any latex web services with an API? [closed]

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.


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


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#.


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)


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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜