Post AkXKLL2iNBidOWIN60 by kalvotom@mathstodon.xyz
(DIR) More posts by kalvotom@mathstodon.xyz
(DIR) Post #AkSCWOzgFixvPUqD3o by fuxoft@kompost.cz
2024-07-30T10:51:25Z
0 likes, 0 repeats
What is the best way to write a ebook that contains text, math formulas and also simple graphs (lots of them)? Markdown is great, I know I can include images in it but I was wondering if there was any software that allowed me to enter text, formulas AND GRAPHS into a single TEXT FILE from which the actual layout is rendered. E.g. when I'd want to include a graph of the sum of two waveforms, I'd enter something like this: [graph:begin]y=sin(t)+sin(t*1.1)[graph:end] directly into the MD file.
(DIR) Post #AkSFHmDBwjxiwDsWjw by tritol128@mastodon.arch-linux.cz
2024-07-30T11:22:26Z
0 likes, 0 repeats
@fuxoft https://en.m.wikipedia.org/wiki/TeX
(DIR) Post #AkSFjTeAZ0klT6hofY by fuxoft@kompost.cz
2024-07-30T11:27:23Z
0 likes, 0 repeats
@tritol128 I am not saying you are wrong but I was unable to find the word "graph" or "plot" anywhere on that page.
(DIR) Post #AkSGbFeonCHDiaePYW by yindrik@f.cz
2024-07-30T11:37:08Z
0 likes, 0 repeats
@fuxoft @tritol128 https://en.m.wikipedia.org/wiki/LaTeX
(DIR) Post #AkSHwQws6huulxl9AO by algebraicterror@witter.cz
2024-07-30T11:52:05Z
0 likes, 0 repeats
@fuxoft kinda loose fit but maybe jupyter notebook/jupyterlab? can do markdown, formulas, graphs/plots, exports to pdf, html
(DIR) Post #AkSIUqz7oLhlMvE4x6 by stepan@f.cz
2024-07-30T11:58:23Z
0 likes, 0 repeats
@fuxoft https://typst.app/docs/reference/visualize/Typst is a LaTeX alternative, and it has package extending it. One of the packages: https://github.com/johannes-wolf/cetz is for plotting.
(DIR) Post #AkSJ5HPR2kPlkOtyS0 by mirek@rodina-sucha.cz
2024-07-30T12:04:58Z
0 likes, 0 repeats
@fuxoft For graphs Dot-files. Read intro https://medium.com/@jackmahoneynz/visualizing-infrastructure-with-dot-and-graphviz-3c7e627ad41e (available as Linux app or online service). For Math you can try https://www.mathjax.org/ or GitHub has Markdown Math extension https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions If you want to draw UML graphs (deployments, db, user stories) then http://www.plantuml.com (available as linux app too). But this is not single file solution. If you insist on that, then reserve lots of time to learn about LaTeX.
(DIR) Post #AkSKML3GqzMrvCEUTI by honzajavorek@mastodonczech.cz
2024-07-30T12:19:16Z
0 likes, 0 repeats
@fuxoft Markdown with extensions (e.g. Mermaid renders flow charts - I’m not into charts, but assume there’s something for them too).Or LaTeX, if the target medium is nothing else than PDF.
(DIR) Post #AkSeplkSfoSKCVkIe8 by ai@cawfee.club
2024-07-30T16:08:49.433157Z
0 likes, 0 repeats
@fuxoft @tritol128 https://www.overleaf.com/learn/latex/TikZ_package
(DIR) Post #AkSo7FdNi9DxOsqSEi by Rado1@qoto.org
2024-07-30T17:52:40Z
0 likes, 0 repeats
TeX/LaTeX is good for formulas but any image is just reference to eps file that will be rendered to final document.
(DIR) Post #AkSzGRDZ6zfdQcLwci by kalvotom@mathstodon.xyz
2024-07-30T19:57:35Z
0 likes, 0 repeats
@fuxoft What do you mean by "ebook"? EPUB (or some proprietary equivalent)? I am not aware of any tool that makes this easy (text+math+graphs)... Maybe pandoc has some markdown extension that is able to do this.
(DIR) Post #AkT7HzPCHuJhNl2oWu by fuxoft@kompost.cz
2024-07-30T21:27:29Z
0 likes, 0 repeats
@kalvotom By "ebook" I mean a digital file that people can download and read on as many devices as possible (for free). So probably PDF / ePub / maybe HTML...
(DIR) Post #AkXKLL2iNBidOWIN60 by kalvotom@mathstodon.xyz
2024-08-01T22:12:36Z
0 likes, 0 repeats
@fuxoft OK, then there is the following dichotomy: * produce PDF using La/TeX: It will look exactly you wish, you can typeset math without problem and there are a few packages for graphs. My suggestion is pgfplots (http://mirrors.ctan.org/graphics/pgf/contrib/pgfplots/doc/pgfplots.pdf). The downside is that the result is PDF, it is designed to look everywhere the same and so it is too "rigid" for smaller displays and eink readers (you can circumvent this little bit by a reasonable choice of page/font/margin sizes, or you can produce multiple versions of the same document. * Try to produce ePub. There are tools that can help you with that (scripts taking markdown and producing the ebook; I would try https://pandoc.org/epub.html). EPub is essentially zipped HTML+CSS and so the support for math formulas is poor (yes, there is MathML, but as far as I know its support by eink readers is not great; in browsers we have MathJax which is not very usable on eink readers; you will probably end up with some pictures floating in the text...). I have not seen an ebook with larger number of math formulas that looks good on Kindle, for example. As for graphs, you could have some Markdown code blocks and preprocess these... Maybe pandoc has some Markdown extension that can do that).