-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc doc2tex #727
Comments
I wonder if working on that is worth it, compared to just generating |
good question, I don't know; maybe @a-mr can comment on this?
epub to pdf
EDIT: html to pdf via pandoc:
seems to work use cases for doc2tex?The question then is whether there still is a use case for it would be nice if one could use nim sources for generating docs, slideshows, embed images, etc (and using the power of nim's macros for, say, generating tables, latex diagrams etc). A question is whether going via html can also do this too (or eventually do this too). links
see also options: |
But epub (AKA ebook) is al alternative format to PDF. is it mandatory to be specifically PDF?. Who is using PDF specifically ?. I hate pandoc, because it installs gigabytes of Haskell libs and dependencies and the virtual machine. |
so how do you convert html (generated by nim doc) to epub porgrammatically?
pdf is not dead, supporting it makes sense
on osx, |
@juancarlospaco , |
I can make it happen, but only if theres interest on merging that into stdlib or Fusion (or whatever is about to replace Fusion). |
wait, there's no cmdline tool for that? |
No but yeah, I mean is a Nim proc, you can add a cmdline, a rest api, or whatever way to use it. It must be a cmdline, why?. |
@timotheecour |
|
ok, i agree
sounds good; since it apparently also affects rst2tex, maybe that PR can be sent out independently, so as not to block on doc2tex? |
Shaded background would have been OK, but there is a problem with it in inline code: the line cannot be broken inside a shadow box in pdflatex & xelatex, it's a limitation of these traditional versions of Latex. To not introduce inconsistency i decided in nim-lang#18141 to underline inline code and draw a frame around code blocks. Underlining is not perfect in Latex either but at least lines can be broken at spaces. |
/cc @a-mr
decode_helpers.nim
, pdflatex gives error on generated tex:in
decode_helpers.nim
, the_
is not escaped, turning into a subscript:in above commands, after pressing ENTER a few times, you get:
a front page (with date) gets generated, which doesn't seem like a good default:
click on toJsonHook proc:
(it works with nim doc)
runnableExamples
should maybe have a shaded background as fornim doc
:also, in this case, a newline should've been inserted before
Example
(example from std/enumutils)
links
doc2tex
: generate docs to Latex nim-lang/Nim#17997note
for pdflatex, on osx:
then it's under: /Library/TeX/texbin/pdflatex
brew cask install mactex
?)brew install basictex
(incompatible with brew mactex: install 1 or the other)brew install basictex
(EDIT: with
basictex
i get:! LaTeX Error: File
enumitem.sty' not found.` when trying to use it, as also mentioned here: https://superuser.com/questions/1038612/where-do-i-get-the-pdflatex-program-for-mac#comment2305928_1416736)The text was updated successfully, but these errors were encountered: