-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa1fa83
commit 24f4916
Showing
1 changed file
with
57 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24f4916
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @davidcarlisle,
I've seen your comment on Latex-Online about
platex
anduplatex
support.You can try Latex-on-HTTP, another Latex online compiler/API (that I maintain), for which
platex
anduplatex
can be used.For eg. with
uplatex
using the json API to compile a PDF:(For encoding the Latex content to JSON, you can use
JSON.stringify
in javascript; or online tools like https://onlinetexttools.com/json-stringify-text)PS. Tell me if you have special integration needs (iframe examples, HTML embed, CLI, etc.)
24f4916
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MonsieurV Thanks for this heads up. I saw your system mentioned in some of the issues over on latexonline.
I may make some experiments and get back to you. As you may have seen I've requested platex support already from latexonline.cc (which is now using the island of tex docker image for texlive 2020 (https://gitlab.com/islandoftex/images/texlive) so I think adding platex should be fairly straightforward I think. However it would be good to have a choice of systems...
Unless I'm mistaken, since I'm starting from a DOM String (the textContent of the pre node with the example), the normal javascript serialisation would make a JSON valid string wouldn't it?
I'll set something up....
24f4916
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, using
JSON.stringify
should make a valid serialization of the Latex file content.I've just added a querystring GET API, where you can pass your Latex content to be compiler in a string like
/builds/sync?compiler=platex&content=\documentclass{article} ...
.For eg. https://latex.ytotech.com/builds/sync?compiler=platex&content=%25+%21TEX+platex%0D%0A%5Cdocumentclass%7Bjsarticle%7D%0D%0A%0D%0A%5Ctitle%7Bp%5CLaTeX%5C+%E5%AE%9F%E9%A8%93%7D%0D%0A%5Cauthor%7B%E6%9E%97%E8%93%AE%E6%9E%9D%7D%0D%0A%0D%0A%5Cbegin%7Bdocument%7D%0D%0A%0D%0A%5Cmaketitle%0D%0A%0D%0A%5Cbegin%7Babstract%7D%0D%0A%E6%9C%AC%E7%A8%BF%E3%81%A7%E3%81%AF%E3%80%81%E6%96%87%E6%9B%B8%E7%B5%84%E7%89%88%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0p%5CLaTeX%7B%7D%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9%E3%82%92%E8%A7%A3%E8%AA%AC%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%0D%0Ap%5CLaTeX%7B%7D%E3%82%92%E5%88%A9%E7%94%A8%E3%81%99%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AB%E3%81%AF%E3%80%81%E3%81%82%E3%82%89%E3%81%8B%E3%81%98%E3%82%81%E6%96%87%E7%AB%A0%E4%B8%AD%E3%81%AB%5CTeX%7B%7D%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%A8%E5%91%BC%E3%81%B0%E3%82%8C%E3%82%8B%E7%B5%84%E7%89%88%E7%94%A8%E3%81%AE%E6%8C%87%E7%A4%BA%E3%82%92%E6%B7%B7%E5%9C%A8%E3%81%95%E3%81%9B%5Cldots%0D%0A%5Cend%7Babstract%7D%0D%0A%0D%0A%5Csection%7B%E5%B0%8E%E5%85%A5%7D%0D%0A%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%E4%B8%96%E7%95%8C%0D%0A%0D%0A%5Cend%7Bdocument%7D
The Latex content is to be encoded, for eg. with
encodeURIComponent
See more examples on: https://github.com/YtoTech/latex-on-http#hello-world-get-querystring-api-experimental
24f4916
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MonsieurV actually I got it working with the json post API, see any of the examples on this site (new latex http button) , but I had some thoughts I'll send mail later see for example the 10-file upload at https://davidcarlisle.github.io/ll/en/lesson-13