13 ms·
Writing my PhD using groff
- dmd 4y agoI wrote my Masters thesis in LaTeX, which is why I wrote my PhD thesis in Word.
- otherme123 4y agoI've seen people crying over Word for not being able to work with proper styles or dealing correctly with cross references, bibliography included, all of which is relatively easy for Latex. Bibliographies in Word is almost impossible without a third party plugin like Zotero, and less able people doesn't even know they exist. There's a well working line of business in my Uni that consist on properly final-formatting thesis with Word. Luckily for Microsoft "easy" products, there are a legion of people that work for free as technical support.
- wazoox 4y agoWow, that looks nice :)
- toastal 4y agoSpeaking of typesetting… This article is incorrectly scaled for mobile. There's no padding around the text so it butts up against the edge of my display. The line widths are way too long for comfortable reading. The blog entry also starts off with an unsemantic blockquote element that quotes nothing from a source. But yes, Pandoc is a cool piece of software.
- zichy 4y agoThis together with some padding could help: <meta name="viewport" content="width=device-width, initial-scale=1">
- yockyrr 4y agoOP here: thanks for the feedback, added padding and correct scale. Should look better now!
- toastal 4y ago+1 for using `ch` as your max-width unit and `rem` for your font size. Pixels is definitely the wrong value. I have my user agent set up with slightly larger default font size to be easier for me to read. I appreciate that you respect my settings using these relative values.
- mrweasel 4y agoAlso weirdly enough, browsers also can seem to go into reader-mode, to compensate. I've seen this before, but in this case it seems a little weird that reader mode wouldn't work.
- kbr- 4y agoAhh the procrastination when writing a PhD. Instead of actually writing it, you research a million different ways how to render it, and then you write a blog post on it :)
- passerine 4y agoI can relate all too well the procrastination involved in fiddling with the typesetting engine! When I was writing my bachelor's thesis (in Philosophy, nonetheless!), I spent an inordinate amount of time on tweaking my LaTeX template and workflow. I ended up falling way too deep into the Rabbit hole, and started using NixOS just to write the thesis itself. It did eventually result in a fun blog post, though! https://shen.hong.io/nixos-for-philosophy-installing-firefox-latex-vscodium/ https://shen.hong.io/nixos-for-philosophy-installing-firefox...
- FRidh 4y agoHa, familiar. I decided I wanted the pdf of my dissertation to be reproducible and hence packaged it with Nix.
- jonnydubowsky 4y agoGreat blog post! "Plato didn't write his dialogues on Microsoft Word, and neither should you".
- unixhero 4y agoI did exactly the same for my master thesis. This is why so am so not interested in doing a PhD.
- messe 4y agoSame for my undergrad thesis. I learned so much more about the art of typesetting that year than I did about Hypergeometric Integrals or String Amplitudes: the topics of the thesis. That's why I left before doing a masters.
- 4y ago
- passerine 4y agoI can relate quite well to the author's pursuit in tinkering with their typesetting workflow. When I wrote my bachelor's thesis, I also spent a great deal of time coming up with a custom LaTeX template and workflow. Like the author, one of the pain-points was the relatively slow edit-compile-review cycle of modern LaTeX engines like LuaLaTex. In my case, I was mainly concerned with making the resulting thesis.pdf PDF/A compliant. PDF/A is a archival compliance standard that's dedicated to the long term digital preservation of PDF files. Predictably, I got way too carried away as well, and ended up trying to create fully-reproducible LaTeX PDFs as well. It was probably overkill for my use-case, but it did result in a fun blog post where I documented the process [1] [1] https://shen.hong.io/reproducible-pdfa-compliant-latex/ https://shen.hong.io/reproducible-pdfa-compliant-latex/
- yockyrr 4y agoSurely PDF/A can be created just by passing any PDF through Ghostscript with the right flags such as -dPDFA and -sPDFACompatibilityPolicy=1 ?
- passerine 4y agoI don't have any experience with using Ghostscript as a post-processing step, and I am curious to know if it works well for complex documents. LaTeX does have a native way of generating PDF-A compliant documents, using the pdf-x package. It's still in beta, but it is quite stable and works very well. The advantage of enforcing PDF-A compliance using native LaTeX is that it allows you to take the further step of implementing reproducible builds. Once that is done, you can be certain that given a LaTeX source file, you will be able to generate a bit-for-bit identical document. Additional post-processing steps will have to be at least documented, and will probably tie the output on the specific version of your post-processor.
- nicce 4y ago> Like the author, one of the pain-points was the relatively slow edit-compile-review cycle of modern LaTeX engines like LuaLaTex. This depends a lot. In most of the cases delay is only about 1 second on modern PCs. A bit more when you cite and build the document twice. You can use LaTeX in many different ways. There are built-in editors and web services such as Overleaf. In the end, they all use the same workflow or dependencies for building the document, but might add an additonal delay. I too have ended up tweaking my environment a lot. I ended up testing almost every LaTeX workflow. I finally ended up for just using vim and zathura. Optimised docker image with LuaLatex builds the document. Second favorite would be LaTeX plugin for Jetbrains products. Overleaf is only good for collaborating. On my desktop pc which has 16 CPU cores, there is only very little latency when compiling. But for text editing, it is a bit rare that you need such PC…
- noisy_boy 4y agoAfter years of using hacks in MS Word trying to make my CV look the way I wanted, one day I bit the bullet and wrote it in LaTeX. The amount of 3+ hours spent to learn LaTeX basics and doing the re-write were disproportionately low compared to the huge jump in the quality of the output. Having used troff for writing man pages eons ago, this blog makes me interested in learning groff to re-write my CV in it and compare the experience with that of LaTeX.
- scrlk 4y agoAs a counterpoint, I had to ditch my LaTeX CV when I realised that applicant tracking systems were struggling to properly parse the PDF. Switching back to a simple Word template (no use of tables; just heading styles and bullet points) and submitting the .docx resolved these issues.
- ant6n 4y agoThe article is making me want to try it, but it’s a bit light on technical details and I’m concerned of having to go down a rabbit hole of learning a bunch of new tech. Perhaps posting a git repository of a sample phd thesis (with a couple of empty chapters, sample figures/images, tables) could be something that others would really benefit from.
- amtamt 4y agotry this https://raw.githubusercontent.com/amit-tewari/random/master/templates/pdfmomtemplate.mom https://raw.githubusercontent.com/amit-tewari/random/master/...
- nonrandomstring 4y agoNice tour of student typesetting today. Not surprising to find roff still in service too. My thesis in the late 80s was set using nroff, fig and eqn, all of which I've fond memories. Surely WYSIWYG and "office" suites were a disaster for writing. Students seem to spend lost weeks and months fiddling with MS-Word only to create mediocre looking output. Personally I's say it's hard to beat Org-mode, separate plain text files, then adding the desired exporter and style files at the last minute.
- GiovanniP 4y ago> Students seem to spend lost weeks and months fiddling with MS-Word only to create mediocre looking output. I am suprised, and keep being surprised, that people haven't yet figured out that there is an excellent tool, that is TeXmacs, that manages to make WYSIWYG the best way to write structured documents while having complete control on the output and never having to fiddle with details.
- copperx 4y agoIt's always been a mystery to me why TeXmacs is so good yet obscure. I've stayed away from it because I feared there was a caveat that I didn't know about.
- GiovanniP 4y agoI am using it since several years and I have yet to find the caveat :-) It has low discoverability, so you have to go through the manuals, the mailing list and the forum (and maybe the blog too, at https://texmacs.gitee.io/notes/docs/main.html https://texmacs.gitee.io/notes/docs/main.html) to figure out all that it can do, and to have complete control. On the other hand, it is quite usable with default settings.
- kryptiskt 4y agoIt has a terrible name, conflating TeX and Emacs signals something arcane, doubly so.
- 4y ago
- vlovich123 4y agoI found that those who can’t get consistent styling and have laggy behavior on large documents don’t know how to configure it. I regularly wrote hundred page reports with embedded excel and images all embedded in Word with Math and got pretty proficient. There’s basically several things you need to do: * Actually set up a named style for every type of content you have. Creating shortcuts for the common ones doesn’t hurt * use whatever the paid version that powers the free equation editor. It was miles better about 10 years ago * use a master document sub document approach for categorizing things. You wouldn’t have a single text file that’s 100 pages long. Split up Word that way too I’m pretty sure I got to a state where I was using the tooling as intended because I wasn’t actually fighting the wysiwyg. Now I did switch to LateX at the end because I was tired of not having easy version control. Word has it if you enable change tracking but it can’t beat normal tooling. Also I wanted to learn latek because it felt like a worthwhile investment (it was - writing formulas in latek is wayyy faster to write and easier to maintain). So I liked LateX just fine. Prefer Markdown / wiki these days because I don’t work with math formulas. Disclaimer: I have zero experience with the web version and have no idea how it scales. I imagine it still does quite well on large documents but maybe browser rendering is not so good.
- ramraj07 4y agoI wrote multiple papers during my PhD. The theoretical one with lots of equations I wrote with latex. It’d be stupid not to. Overleaf helped though I wrote the paper over 6 years so it only helped in the end. Then I wrote two bio heavy papers. Using word. My thesis was in word too. If you have a ton of figures and not a ton of equations it’s not the best choice to use latex.
- seanhunter 4y agoGroff is great. I went through a phase of doing reports for work using groff and one of the cool things is that on W Richard Stevens' website there were all his groff macros he used to produce all the beautiful diagrams in TCP/IP Illustrated etc. So I used to have lovely diagrams with spline curves etc thanks to W Richard Stevens. The great thing about groff (compared in my experience with latex) is that you spend basically zero time on formatting/messing about once you have a set of macros you like, and the document production cycle is really fast so you edit with zero distractions using basically plain text (a lot like markdown) and then any time you want to see the finished product it's very quick to see it.
- anthk 4y agogroff -step -k file.groff > file.pdf For mom, there's pdfmom -step -k. No need to waste time and ssd space with pandoc.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- verytrivial 4y agoNitpick here, but this should really be titled "Using groff to render markdown to PDF faster".
- uneekname 4y agoI may have misunderstood the article, but by the end I think they were writing directly in groff.
- lizknope 4y agoW. Richard Stevens wrote some excellent Unix and TCP/IP books in the 1990s. He used troff / groff RIP Richard, your books were amazing and his son thought he was cool because his book was in Wayne's World 2 http://www.kohala.com/start/ http://www.kohala.com/start/ https://www.salon.com/2000/09/01/rich_stevens/ https://www.salon.com/2000/09/01/rich_stevens/
- PopAlongKid 4y agoI wrote my masters thesis using troff in the early 1980s. Later that decade, I used a version of nroff on PC-DOS for my job. It seems, viewed from a sufficient distance, that this wheel has been re-invented a number of times since then.
- fegu 4y agoWill definitely try this. I sometimes used latex at work for things like contracts and other documents that should look formal. But occasionally you need to share it with someone to get their input before it is final. Lots of people are unfamiliar with latex. So I switched to markdown. Markdown does not get in your way, so even those unfamiliar with it get the hang of it.
- reknih 4y agoThe LaTeX criticisms of the article really resonated with me. Long compile times and a narrow "happy path" are the things where I feel LaTeX makes me less productive. This is a pity because, otherwise, it is a great tool with its focus on document structure and output quality. I'm currently working on a LaTeX successor which seeks to address these issues, but it is really hard to make the right design compromises here -- what can be programmed? What is accessible through dedicated syntax? How does the structure drive presentation? Computer typesetting is a rabbit hole, but a fascinating one. And I'm sure the last word on it has not been spoken yet :)
- AB1908 4y agoDoes pandoc help at all?
- reknih 4y agoIn use cases like the Markdown to PDF pipeline described in the article, sure! Documents there are also simple enough so that compile times aren't too much of a problem. However, many of the documents we like to set in TeX are more complex than that: bibliographies, figure placement, special typographical flourishes.... And here is where the complexity of LaTeX and its macros adds to the inherent complexity of what we are trying to accomplish (and compile times quickly ballon again). So, sometimes it helps...?
- singingfish 4y agoI had a go at pandoc when I was writing my (social science) PhD, but I gave up and went back to just doing it all in LaTeX fairly quickly. From memory the compile times didn't worry me at all. What did worry me was making it look like I'd put far more effort into documentation presentation than I actually had. Which worked well for me, especially big shout out to the hyperref package to get my far-too-many acronyms linked back to the acronym definition table for every mention), links to every citation, and proper links inside the document to each section /page reference. Then on top of that my hacked together proofreading tools in emacs, and a torturous 10k word chapter 2 to sideline a difficult politicical problem, and I passed first time!
- 4y ago
- zvr 4y agoHaving used many *roff variants (e.g., troff, nroff, ditroff, groff) over decades and also having rather extensive experience with LaTeX, I'd now definitely choose the latter for any serious typesetting task. Pain points include many customization points: re-creating exact document specifications provided externally, using specific typefaces, creating your own macros... Oh, and leaving ASCII (or ISO-8859-1) for multi-script characters. Today's groff is a very fine software, if you are satisfied with its default settings and your task is in the domain it handles.
- ncphil 4y agoIn the mid-70s, I typed my senior thesis on a reconditioned manual (Underwood) and a borrowed electric typewriter. By the time I did my masters in the late 80s, all my papers were composed in vde on CP/M and formatted with TeX.
- balddenimhero 4y agoSimilar to the experiences of other commenters, I find the LaTeX edit-compile-review cycle to only grow unreasonably slow when none of the incremental compilation features are used. For larger documents I recommend (i) splitting the document to leverage the \include and \includeonly commands, and (ii) using the Tikz library "external" to avoid the unnecessary recompilation of unchanged graphics. PGF/TikZ is often a bottleneck. I agree though that it would be nice if the compilation (esp. from scratch) were generally faster.
- gnatolf 4y agoStill even using all of that, my thesis with heavy inline tikz took about 5 minutes per run (about 120 pages). And a full rerun with all tikz graphs redone (about 20), it took just shy of 20 minutes if the indexes existed already. That was all on a surface 4 pro from ~2015.
- yakubin 4y agoWow. That's competing with some C++ projects.
- 41b696ef1113 4y agoThe number one reason to lean heavily on sectioning via \include is for debugging. Debugging Latex is a disaster, and it is only by compartmentalizing code into smaller sections do you have a hope of isolating the problem.
- ModernMech 4y agoI wrote my dissertation in Word, and I found it more than sufficient. WYSIWYG is still the best way to edit documents, but it’s not great for version control. Word’s equation editor is great though, and I enjoyed the ability to precisely place figures. Although resolving references can take a while with hundreds, I think they could serve to improve that.
- mgaunard 4y agoWriting a PhD is much easier than writing a book. To begin with, it has a very simple and constrained structure: abstract, problem description, state of the art, interesting subtopic 1, interesting subtopic 2, interesting subtopic 3, results and perspectives. Interesting subtopics are also just previous articles that you can just recycle.
- jszymborski 4y ago> Writing a PhD is much easier than writing a book. IMHO, I think that's a pretty broad statement that's wrong as often as it's true. Surely it depends on the book, the thesis, and the discipline/genre. Firstly, not all disciplines have theses broken down in the way you've outline. Theses in certain humanities often more resemble non-fiction than those of other disciplines. Of course, some disciplines or departments or schools or supervisors will have you write a "thesis by manuscript" in which you present manuscripts you've written as chapter and write little interludes connecting them as well as a unifying intro and conclusion. This on the face of it might seem like "just recycling" previous articles, but I think it overlooks the fact that those manuscripts must be written, at least in majority, by you. Even when you aren't writing a "thesis by manuscript", most people I know write chapters as they go along their PhD. And finally, a bit of digression, but I don't think it's reasonable to exclude the amount of research it takes to write "books" or theses from the estimation of effort it takes to write them. It's an integral part of the process.
- jszymborski 4y agoI first tried writing my MSc theses as a set of AsciiDoc(tor) files. I really enjoyed how much more flexibility AsciiDoc gave me over MD so I was pretty set on it. I _really_ hated the equations it generated and AsciiDoc isn't a Pandoc source, sadly. Even worse, the tooling was monstrous. I had entire build scripts that were getting more and more convoluted. I relented and went to LaTeX, and while the limitations mentioned here resonate with me, I've found it totally doable.
- baruchel 4y agoFond of Heirloom Troff (rather than GNU Troff). See https://n-t-roff.github.io/heirloom/doctools.html https://n-t-roff.github.io/heirloom/doctools.html Native support for TTF and OTF fonts. Knuth's algorithm for formatting paragraphs.
- kepler1 4y agoYeah there was a time when I thought my speed of typing was the thing slowing down my thesis writing. So I spent a week training Dragon Naturally Speaking to be able to transcribe my voice. Turns out that really wasn't the bottleneck, and I had just spent another week distracting myself with technology to avoid writing.
- tpoacher 4y ago> I wrote my PhD thesis using groff I was hoping it would be via gnu ed too, but they used vim. Shame.
- tpoacher 4y ago@OP: incidentally, i'd love to see examples (thesis or otherwise) of your groff documents and related makefiles if you have any publically available
- yockyrr 4y agoArchive: https://archive.ph/nuJjA https://archive.ph/nuJjA
- i_don_t_know 4y agoHere's an old but good book on Unix Text Processing with nroff/troff and its companion tools eqn, pic, tbl. It explains how to use the tools and how to write your own macro packages for them: https://www.oreilly.com/openbook/utp/ https://www.oreilly.com/openbook/utp/