One of the things I do is teach, and part of that is providing text books to students and teachers. I’ve got a set of four text books which I built - back in the day - using Adobe InDesign. And then again Wordpress for the web. And I even exported it to Word for teachers who wanted to edit the text books before giving them to their own students. Imagine the joy.
Now I’m turning my attention more seriously to the PDF output, and wonder whether people would recommend using Quad or Latex. The layout needs I imagine will likely be simple, but there would need to be multiple versions (the teacher’s and students’ editions), and at some point I hope to be getting it printed professionally. Quad seems like the natural choice as it’s written in Racket, but given that Quad is a work in progress, am I going to be making life hard for myself by using it?
Quad is in an alpha state: even if it persists in something like its current form, it will be changing and breaking your projects in all kinds of ways between now and when it is ready. But it probably will not persist in its current state; in an email newsletter from MB Type earlier this year, Matthew said “I have started a second prototype in Racket. I would like to build this into a working system and then port it to Chez Scheme for maximum speed.” So there are maybe one or two more separate alphas of Quad before it reaches the point where you would want to start relying on it. In the same newsletter, and elsewhere on this forum he said all of that development is predicated on getting funding to the tune of $100–300k.
Latex is ugly but fully cooked, and has simple macros for things like verso/recto layout, keyword indexes, footnotes and endnotes, that would be either impossible or completely manual in Quad right now. If I had to choose between the two for a project due in the next year, I’d pick Latex.
A non-ugly option that is worth looking into is SILE. SILE is under active development and accepts an XML-like syntax as input, which makes it easy to generate from Racket/Pollen.
I have yet to try it, but if you have the budget, you could also look into Prince XML, which purports to do quality PDF layout using HTML and CSS. A single desktop license is $500 USD.
An idea I’ve had, but done nothing about—that bucket is large—is creating a compiler to go from Pollen sources to Microsoft Word docx format, or maybe more virtuously, odf (which is also supported by Word). My reasoning is that as a path to PDF, Word is more common and tractable, and does 90% of what people use LaTeX for (roughly: cause text to be broken into lines and pages with simple formatting).
As for Quad, @joel is correct—it’s a long way from being a tool I would recommend anyone depend on.
Is there any scenario where it would be more worthwhile to shift the time you would’ve spent hacking on LaTeX toward hacking on a Word compiler? I think it’s doable. I’m willing to work on it. Roping in others would add motivation, however.
Is there any scenario where it would be more worthwhile to shift the time you would’ve spent hacking on LaTeX toward hacking on a Word compiler?
That sounds good, and I’d be very happy to be able to contribute to Pollen. There are a couple of barriers though, the first being that I’m working 6 days a week on a startup, which doesn’t leave much time for other things. The second is that my knowledge of Racket and programming skills in general are patchy.
What I’d like to do is study Beautiful Racket before getting started. Doing that would be two birds with one stone: improving my skills, while also being a test of whether I can actually find the time needed to work on this.
Hi! First of all @mbutterick thank you veeery much for providing Pollen and A Beautiful Racket! These are amazing tools! I worked through both of the books (although being a Racket newbie) and try to improve my workflow in an MS Office/Windows environment via Pollen and some DSLs. I also used LaTeX for preparing some scientific documents, but if you have to collaborate with collegues who mainly use Word, LaTeX is of no use.
So my use case is: Do calculations/read data/perform research and provide a report (avoiding Word) which can be inserted into a larger project report which itself is prepared in Word. Therefore, I would appreciate if Pollen could do ODF output (since it is open and is not controlled by Microsoft directly it is maybe the more appropriate format in comparison to DOCX).
I would like to contribute to such an opportunity, but due to family and full-time job, I doubt I could do it in the necessary manner.
My own thoughts on this matter were to perform a rendering into Python and use the libraries there which can write DOCX, but this is cumbersome and stupid. I have no idea how to do it in Racket directly. (OK, one can render all the files necessary files for ODF or DOCX, zip them together, and done. But this needs serious research on the specification of those formats. Is there a better way in Racket?) I only would need a simple output, does not have to have fancy styles.
Phew, this is a wall of text. I hope that this does not bother you.
(Btw.: Sorry for my English, it is not my mother tongue.)
It seems, that there is a simpler solution for ODF than to write out all the styles, metadata, content and so on. For ODF it seems to be possible to use a single XML file. Maybe this would simplify the implementation for Pollen very much, see:
I think it is not used very often. I just generated one via Libre Office (format is “Flat XML-ODT”, extension .fodt which is in fact XML). The attached file shows an XML file sample. Hopefully, I leaked not too much personal details
I “tested” which types of LibreOffice documents could be saved as a flat XML document, too. This is possible for:
Writer text document (which I uploaded above) (extension .fodt)
Calc spreadsheets (.fods)
Impress presentation (.fodp)
Draw drawing (.fodg)
It is not possible to use this flat XML format for:
Although, I only see a use case for the Writer format together with Pollen, it may be useful to know that other media can be written in this flat XML format, too. For example, I could imagine that one can use a specific table export command to not embed the tables into a text document, but writing them into a dedicated spreadsheet. (Although I have the feeling that this is maybe against the Pollen philosophy. )
I do something very much like what you suggest in my teaching: I produce a course book, a set of slide presentations, and a handout for each class for my students with annotations to the presentations, all from a single source file.
Happy to share if you’re interested.
I use XeLaTeX and the Beamer package. I wouldn’t dream of using Word, in fact, I went to XeLaTeX because at the time Word handled bidirectional text poorly. But one shoe does not fit all, of course.
I would like to throw another software into consideration as an alternative to LaTeX: TeXmacs. I’ve only started using it, so take this with a grain of salt, but it looks fairly promising so far. It’s advertised as a combination of emacs and TeX (not based on either but inspired by both), with a WYSIWYG-ish interface. It is written in Guile Scheme (so very close to Racket), and like emacs, the editor is customizable through scheme.