Implement the witiko/graphicx/http
LaTeX user theme in Lua
#82
Labels
feature request
help wanted
latex
Related to the LaTeX interface and implementation
tug 2021
Related to the TUG 2021 conference
Since version 2.10.0, the Markdown package has supported the
witiko/graphicx/http
theme. Currently, thewitiko/graphicx/http
LaTeX user theme requires shell access and either GNU Wget or cURL to download images, which reduces security and portability. At BachoTeX 2017, Hans Hagen suggested to use the Luasocket library, which would solve both problems. An example implementation is as follows:Here are the issues with the implementation:
http.request
function does not handle redirects well. For example, it is unable to resolve the URL https://github.com/witiko/markdown/raw/master/banner.png and will always return the 301 HTTP code. Both GNU Wget and cURL can correctly resolve redirects.\directlua
command is unavailable outside LuaTeX. We would like to use an equivalent of the\markdownLuaExecute
command that would not produce any output. Instead, it would just run the Lua code, either using\directlua
, or by executingtexlua
in shell. We can easily solve this one.The text was updated successfully, but these errors were encountered: