在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):overleaf/clsi开源软件地址(OpenSource Url):https://github.com/overleaf/clsi开源编程语言(OpenSource Language):JavaScript 58.9%开源软件介绍(OpenSource Introduction):
overleaf/clsiA web api for compiling LaTeX documents in the cloud The Common LaTeX Service Interface (CLSI) provides a RESTful interface to traditional LaTeX tools (or, more generally, any command line tool for composing marked-up documents into a display format such as PDF or HTML). The CLSI listens on the following ports by default:
These defaults can be modified in The provided The CLSI can be configured through the following environment variables:
Further environment variables configure the metrics module InstallationThe CLSI can be installed and set up as part of the entire Overleaf stack (complete with front end editor and document storage), or it can be run as a standalone service. To run is as a standalone service, first checkout this repository:
Then build the Docker image:
Then pull the TeX Live image:
Then start the Docker container:
Note: if you're running the CLSI in macOS you may need to use The CLSI should then be running at http://localhost:3013 Important note for Linux usersThe Node application runs as user
If there is a user/group on your host which also happens to have LaTeX runs in the sibling containers as the user specified in the A quick fix is to give the
Another solution is to create a
This is a facet of the way docker works on Linux. See this upstream issue ConfigThe CLSI will use a SQLite database by default, but you can optionally set up a MySQL database and then fill in the database name, username and password in the config file at APIThe CLSI is based on a JSON API. Example Request(Note that valid JSON should not contain any comments like the example below).
{
"compile": {
"options": {
// Which compiler to use. Can be latex, pdflatex, xelatex or lualatex
"compiler": "lualatex",
// How many seconds to wait before killing the process. Default is 60.
"timeout": 40
},
// The main file to run LaTeX on
"rootResourcePath": "main.tex",
// An array of files to include in the compilation. May have either the content
// passed directly, or a URL where it can be downloaded.
"resources": [
{
"path": "main.tex",
"content": "\\documentclass{article}\n\\begin{document}\nHello World\n\\end{document}"
}
// ,{
// "path": "image.png",
// "url": "www.example.com/image.png",
// "modified": 123456789 // Unix time since epoch
// }
]
}
} With $ curl -X POST -H 'Content-Type: application/json' -d @data.json http://localhost:3013/project/<id>/compile You can specify any project-id in the URL, and the files and LaTeX environment will be persisted between requests. URLs will be downloaded and cached until provided with a more recent modified date. Example Response{
"compile": {
"status": "success",
"outputFiles": [{
"type": "pdf",
"url": "http://localhost:3013/project/<project-id>/output/output.pdf"
}, {
"type": "log",
"url": "http://localhost:3013/project/<project-id>/output/output.log"
}]
}
} LicenseThe code in this repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE, version 3. A copy can be found in the Copyright (c) Overleaf, 2014-2021. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论