mastodon.ie is one of the many independent Mastodon servers you can use to participate in the fediverse.
Irish Mastodon - run from Ireland, we welcome all who respect the community rules and members.

Administered by:

Server stats:

1.8K
active users

#pandoc

1 post1 participant0 posts today

I really like #pandoc for rendering PDF documents from #markdown. One gets to write plain text files, with all its benefits (version control, portability, etc.). Documentation on formatting syntax and extension is great; the time it would take me to format this by hand, using e.g. LibreOffice #Writer, is similar to the time it takes me to implement a template to accomplish it automatically.

Also, most #LaTex you know is applicable without hassle. Talk about rendering #math!

You can even write #Lua filters to manipulate pandoc's AST and implement custom functionality! I found a neat one to embed music scores using #Lilypond, here: github.com/pandoc/lua-filters/

A collection of lua filters for pandoc. Contribute to pandoc/lua-filters development by creating an account on GitHub.
GitHublua-filters/lilypond/lilypond.lua at master · pandoc/lua-filtersA collection of lua filters for pandoc. Contribute to pandoc/lua-filters development by creating an account on GitHub.

Hmmm, unexpected Pandoc issue: when converting from ODT to HTML, single words in italics are correctly carried over, but entire paragraphs in italics are not.

No idea why; the content.xml inside the .odt assigns each paragraph its own style inside the <office:automatic-styles> tag, and the styles for the italicised paragraphs correctly say <style:text-properties fo:font-style="italic" and all that. But Pandoc converts them into <p> elements without a style, and no <i> or <em> elements.

Okay, so here comes a hole in my "#markdown as #WordProcessor" strategy: sharing #documents.

I got .md files that I need to convert into #PDF, and it needs to be done on #Android.

Sure, the markdown editor supports printing to PDF, but it doesn't allow templating, so there is little to no margins, no font size control, or anything that's necessary to make a document readable through formatting.

Has anyone solved this problem, beyond using #pandoc with #termux?

As a book translator I spend my days working with texts. Also it means I have to deal with user-hostile file formats like docx. Because editors, designers...
My long-time friend was LibreOffice. I used it since version 5.something. It's a great alternative to Microsoft Office. But in other respects you have to put up with this huge bulky piece of legacy code that probably still has Sun engineers' souls trapped inside.
And I want to boast with my little personal victory. I have finally finished a book fully typed in #vim and #emacs (for the glory of both editors) in Markdown format and later processed via #pandoc to docx (with all required styles and formatting). I used LibreOffice only on the last stage to iron out some quirks and typos. It seems this workflow works.
Which means I don't have to use this huge and unhandy LibreOffice suite every day.
Now I want to figure out if I can use org format for my translations or should I stay with Markdown. Because it seems I like it here with Emacs.

@mguhlin

I decided to go with the landscape pdf option. Students' chromebooks can't read epubs natively, and it would take a while for IT to okay an extension (and I prefer to avoid extensions).

Also, #pandoc didn't add inter-document links when converting from #TexLatex to epub.* This is a "choose your own adventure" story, so jumping around the doc is 100% necessary.

End of day, a roughly 6x9 inch landscape pdf will probably work best.

* to be fair, I spent zero time looking for solution

Turning 80-ish (usa letter-sized) pages of reading into Google Slides so students can read more comfortably on their Chromebooks.

I really wish I could just use an HTML page, but last I looked Google Drive won't display HTML files as web pages.

I suppose I could make it 8.5x5.5 landscape PDF, but not sure how well that would work on their screens.

Any thoughts?

(Reading started in #TexLatex, so I can #pandoc it into just about anything.)

TeXLive 2024 was frozen a few days ago, and this always leads to issues with the pandoc/latex Docker images. We have pushed new images for the currently supported pandoc versions 3.5 and 3.6.3, and are in the process of updating 3.2.1, too.
#pandoc #docker

I think any large interesting program you might write could well have an embedded language within it, in which the user can write stuff that is just as good, and just as deep as built-in functionality. You want this. It’s a thing that makes programs compelling.

In #Vim, that embedded language is #VimScript. In #emacs, that’s #elisp (which in fact, I think the whole thing is written in). In a #smalltalk environment, you control the entire environment with Smalltalk, just as elisp applies to Emacs. For many, many things, that language is #lua ( #NeoVim, many games, #pandoc, #redis, this list goes on).

I used to think there were really two reasonable mainstream languages you could use here: #Python or #javascript. Between those two, for a long time I felt that JavaScript was the winner. I think that has changed as Python has gotten faster, more powerful, and better known. But also, I think the answer might actually not be either of these two. It might be Lua. Lua is simpler and faster than either JavaScript or Python. It’s more embeddable. It’s designed specifically for this purpose. It’s in much wider use as an embedded scripting language. I don’t want Lua to be the answer. I like Python better. But I think Lua actually is the right answer.

I'm happy to announce #notesbash v1.1.0 📑! New features include:
- A customizable export system to export your #markdown #notes using e.g. #pandoc
- a preview feature using the new term-open script, a #xdg-open like utility, but for the terminal
- a `.desktop` file for your favorite app-launcher
- completion scripts for #bash and #zsh
- the default extension set in the config is now used for all notes
codeberg.org/carmatani/notesba
#opensource #tui #terminal #foss

Codeberg.orgv1.1.0 - carmatani/notesbash## Changelog [notesbash v1.1.0](https://codeberg.org/carmatani/notesbash) ### New features - There is now a customizable export system to export your notes using e.g. pandoc, but you can write your own exporter if you like ([demo](https://codeberg.org/carmatani/notesbash#export-your-notes)...