This is one of the most useful programs that I use.
I use it for turning .md files into .html or .pdf.
I use it for creating slides with it.
I even use it for fixing the hard-wrapped text I write in vim before sending emails. When I write in vim, I prefer the text to be hard-wrapped, but for emails, I like it better when the text is not wrapped. I recommend arp242's essay explaining the problem with hard-wrapping [1], but basically the way I workaround this problem is using a local script which uses pandoc at some point [2].
Overall, pandoc is really good.
[1]: https://www.arp242.net/email-wrapping.html
[2]: https://github.com/kugurerdem/dotfiles/blob/2d68357273e1bc30...
I'll probably lose some nerd cred: I do most of my writing in MS word, I find it easier to cut and paste and add footnotes and section headers. And then I use Pandoc to convert the docx into the format I want, usually HTML*. I used to do markdown in vim but I found that for most of what I do I prefer word. I do write code in vim...
* I use this css file when converting: https://gist.github.com/killercup/5917178
I also use Word for all my writing too, so wanted to defend you. People (tech people at least) have lost sight of the fact that writing should happen in "word processing software", and Word is the best-in-class. To people who say "Word sux", I say "That just means you don't know how to use Word properly". Writing any markup or markdown syntax in an IDE is a disaster for the creative process. Jack Kerouac used to type using rolls of paper instead of sheets so he didn't have to stop is his process. He "got it".
As for pandoc, yes it's amazing, and I have been using it to convert my word documents to markdown so I can publish a technical textbook I'm working on using Quarto. I tried writing directly in Quarto for a while, but as per my point above, it really slowed me down and distracted me from actually writing, so I figured out the pandoc pipeline. My most favoritest feature so far is that it converts tables AND equations to markdown and latex perfectly. It's so seamless that I'd actually recommend Word->pandoc as the best way to write a complicated markdown table.
Most tech people who use Word know how to use it and that is exactly the problem. We don't have the benefit of ignorance. We send off drafts to someone for commenting or editing and get an inconsistently formatted mess back because others don't even know that styles exist and use manual / direct formatting instead.
We are the ones that have to suffer because people we are forced to collaborate with do not take 5 minutes out of their day to learn the basics of a tool they use professionally.
It is the equivalent of seeing somebody use right-click to copy-paste, except it tangibly makes my day worse.
So what you're saying is that the problem with Word is that it makes it easy to write unpolished and unprofessional documents? In your opinion, is that the fault of the word processor or the user? [0]
[0]: Not a rhetoric question that implies one answer to be the only "right" one.
IMO entirely user.
Word (and similar text processors) is a toolset. All it gives you are tools. Word lets you define formatting rulesets, lets you apply formatting rules and create rulesets from applied rules.
Some evangelists may say that "safe" text processor would only allow application of rulesets, because direct application of rules leads to "spaghetti formatting". However that is one of the powers of WYSIWYG text processors: you apply the rules and extract those to rulesets once you are satisfied with results, in an explorative way. Direct application of rules is a feature that makes Word what it is.
Now, if a user takes a document with predefined rulesets and still applies their own rules inconsistently that's simply misuse of the tool.
I find that question uninteresting, because no matter where the fault lies (it's probably somewhere in the middle) the end consequence is that there is no use case where it makes sense for me to use Word (unless I'm literally held at gunpoint).
I'm either working on a document for myself or with collaborators.
In the first case I'll use markdown for simple things or LaTeX for bigger things since I can work in a familiar environment where I work most efficiently (VSCode).
In the second case, I'll work with collaborators so I will never be able to trust that a document I have sent off for reading is still consistently formatted when I receive it back. This means that any benefits of the collaboration tools (eg. review history or suggesting changes) are wiped off the table. I will have to integrate any suggested changes into my own authoritative version of the document by hand anyways. At that point I may as well work where I fell comfortable and use markdown / latex, and send off Pandoc converted word files for comments by others when it is relevant.
This is of course for serious pieces of writing, not throwaway stuff like eg. meeting notes, but for those Google docs is plenty.
What would you prefer, instead? CTRL-C, CTRL-V? SHIFT-INS, CTRL-INS? some vim incantation?
As a select-to-copy/middle-click-to-paste guy, seeing people use these inferior alternatives looks extremely annoying to me.
I think that depends if your workflow is oriented around the keyboard or the mouse. For me it is keyboard oriented and I frequently use (Ctrl)+Shift+Arrows for finegrained selection anyways so Ctrl+C/V is most convenient. I also use Vimium in my browser. If my workflow was mouse oriented I'd instead use Gesturefy.
I think they're equivalent and certainly both are better than using the right-click menu.
I don't always use the mouse, but when I do, I only use the mouse, no keyboard needed at all. Using CTRL+C/V requires an unholy synchronization of mouse and keyboard. But unix-style middle-click paste is entirely mouse-controlled and very elegant. Of course, if you are inside a text file, you can use vim keyboard tricks that are even faster because you don't need to select the text.
Is there a way to lock documents in some way, so that direct formatting is disallowed and only styles work? Not that we could truly lock a document, but at least having some sort of header that lists allowed features, such that one would get a warning whenever they veered off course?
Don't think such fine grained control exists. There is read only mode[1], which (I assume) limits the reader to only comment.
[1]: https://support.microsoft.com/en-us/office/make-a-document-r...
Good point, sigh...this is so true. I have created a 45 minute tutorial of 'how to use word properly' to address this exact pain point. I send a link to my students if their first draft commits any 'sins'.
BTW, when I said tech people, I was thinking mostly about the computer savvy academics who use Latex for everything.
People use things like LaTeX exactly because of this problem. Word processing software brought the problem of inconsistent formatting and layout within the grasp of everyone and boy! ...did they grab it with both hands. Systems based on plain text allow the author to concentrate on content only, without the need to format.
Personally I find LaTeX misses the mark. Too much markup is needed and it detracts. I'm a fan of asciidoc though. I just wish the templating was a little better though.
It's a bit of a matter of perspective.
The distinction between looking at a document in markdown versus Word is a bit analogous to the distinction between looking at a movie in its textual form as a screenplay versus looking at a movie as a piece of video: Text is capable of abstraction in a way that video is not.
In the screenplay, it might say "table", but when the director translates it to video, the director will have to decide: What kind of table? What design? What period? What texture? Is there anything on the table?
None of these decisions matter to the construction of the story, so, for a screenwriter, it would be very distracting if they had to make all of those decisions just to be able to get "table" committed to the medium.
In Markdown you worry about text and nothing but text. But Word shoves a particular font in your face as soon as you're laying down the first letter, so, if you don't like Word's choice of fonts, you can either let it annoy you throughout the project, or you can start worrying about fonts right then and there, which will be a distraction. If you write Markdown in a code editor, then, presumably, you've already set up the code editor in a way that doesn't annoy you. And then your future self (or someone else entirely) can worry about the font.
I know you're just font as an example, but doesn't your markdown editor also shove a font in your face? You can adjust default behavior in Word just as well as in another editor.
Anyway, to work within your analogy, I would say that Word lets the write do a bit of a 'mockup' of the set with nearly 0 effort. Like "I want a table here", so 2-3 clicks and you have it. Then you can "let the director" take your mock up and flesh it out properly later. As a writing, it helps me to see the mock up of the product as a go, but I want that mock up to be effortless. And as I said above, I do some work up front to make sure that Word's mock up looks good (or good enough).
...and that's the problem. You can easily get distracted by the look of the words on the page. Is the heading big enough, centered, got enough white space around it. By the time you've faffed about with that, I'm onto my second or third paragraph of content.
We collaboratively write screenplays in markdown (actually fountain but its markdown plus some screenwriting stuff) and save them into Dropbox.
pandoc and some other tools turn those scenes into a full screenplay.
It's worth noting here (even though I also use vim/markdown/typst, and Word is a thing of the past) that markdown does say something more than "just the text".
It puts the header notation and style (like italic, etc) in-line. So does Typst or LaTeX, and I can't think of any typical stand-off examples for headers and such, but it does muddy the text in-line in that sense. It typically doesn't really slow down the writing, but if you're writing \# as comments for code, then don't have those wrapped in \`\`\`, you can get some problems.
Part of the reason I stopped using Word was that I absolutely abhorred 2007-and-beyond’s equation editor. I was using previous versions of Word with Mathtype for my math homework, but I found the new equation editor really hard to use. Around the same time I had coincidentally to Linux, and OpenOffice has an even worse equation editor.
Pandoc was a game changer for me. I picked up LaTeX equation editor pretty quick, and being able to write markdown was so much more pleasant in my mind.
It’s not perfect; tables are a pain still, but I have no desire to go back to Word.
You are probably the only person I've heard that liked the old mathtype editor :-) The new editor is terrific because you can use just type the equation in latex format (e.g. A_c = \pi R^2 ). Then you hit the space bar and it converts to wysiwyg style. Most of my equations are on the simpler side I guess.
I didn't know about being able to type the LaTeX stuff; that's pretty neat.
I think part of it was that I had basically memorized all the keystrokes for the MathType editor, and most of them didn't work in the MS Equation editor, which annoyed me. Also, I had issues with parentheses formatting correctly but I suspect that's been fixed in the last 15 years.
Still, I really do prefer to work with Markdown in general. The Markdown -> Pandoc -> LaTeX rendering just ends up looking prettier in my opinion, and at this point I'm pretty useless in any editor that doesn't have Vim keystrokes. Pandoc irons out the parts of LaTeX that I really hate (the `` vs " being the thing that's given me the most headaches), while letting me drop into raw LaTeX when I need it; not even getting into the fact that there's just math stuff that (as far as I know) doesn't work in Word or MathType's equation editor (e.g. bussproof trees).
I do get pretty annoyed when people try and tell me that regular LaTeX is "just as easy" as Word, because even as someone who has a reasonably good handle on LaTeX I can say that is just not true. TeX is arcane and weird and annoying and inconsistent, and I don't blame people for using Word compared to it.
The fact? Should? In "word processing software"? Why shouldn't it happen in "text editing software"? Writing produces text, after all.
This. Text editors automatically give you that exact Jack Kerouac "rolls of paper" experience. It's just text. Formatting comes later, word or tex or some other system you like.
> To people who say "Word sux", I say "That just means you don't know how to use Word properly".
Or maybe those people just have eyes which can spot the differences in spacing between documents created with different Word versions, the mediocre kerning, and a multitude of other typographical annoyances.
Even a website is easier to replicate exactly in another browser than a Word document to be replicated from scratch in a new version of Word. And if by some miracle you manage that, the end result will always look meh.
Yes, anyone who's ever learned LaTeX and why it was invented immediately sees how absolutely awful Word is at its rendering. Funny that a trillion-dollar company can't seem to figure out a better algorithm than Donald Knuth mocked up in Pascal decades ago.
I think of this as another version of enshittification -- the acceptance of poor performance as the "standard".
And don't get me started on math equations in Word ...
For me personally it's the reverse. After 15 years of writing almost exclusively with vim (or vim-like) input scheme using anything else would really break my flow. Can you even do something like ct, (delete everything between current cursor and next comma, then start insert mode) in word? Even if you could, it would be some 5-key monstrosity which makes you move from home row.
Now granted, if you're just hammering out words without any editing this doesn't matter, but I think almost every piece of good writing has had 3+ revisions.
Of course this is a personal preference, but my friends who do a lot of writing (and never used vim at all) still seem to prefer a distraction-free editor with a lot less features and a much less noisy UI for the actual writing.
Rant ahead:
So, as it must be me not knowing, can you tell me why Word won't let me change table column size ~50% of the time (for the same table from the same source). Half the time autofit works (yay!), half the time it won't let me resize columns, neither by typing the number, nor dragging the invisible off-page divider (Microsoft should just make the transparency of off-page content 50%??), nor changing to draft view and dragging the actual dividers ... wtf is going on there? If I paste it into OneNote first then it fits ... sometimes, if I drag a column wider first (which it already rendered 5x the width OneNote did) then it will let me narrow it afterwards, what's that feature called AutoNoNarrowColumnRenderedIncorrectlyFiveTimes ExpectedWidth?? I'll just search the settings to turn that off ... oh wait!
These are the times I long for markdown, or 'reveal codes' ... MS Word has a lot of problems they could probably have fixed if they hadn't put so much effort into preventing interoperability. These sorts of issues were around 20 years ago when I stopped using Word, and 5 years ago when I restarted. Same asinine poorly implemented numbering and styles that are unintuitive, opaque, and ungainly ... and don't get me started on search! Multi-highlights? Sorry best I can do is "find next" with no find previous, no regex, ... you can do find in AutoText though, right, right? ... and all the AutoText and AutoCorrect gets saved in a single sensible format that's easily modified? ... Word changes the format of all windows when you open a new one too, just in case you thought the suck was restricted to within the window chrome ... and doesn't have always-on-top, and doesn't open windows in their last position, and ...
Doesn't suck ...???!
Whilst you're here, any ideas why OneNote eliminates footnotes so you can't cut-paste between Word and OneNote? I'm sure it's not flawed and I'm just holding it wrong, right ...?
I agree with your premise of "don't be distracted" when writing, but for me Word often is the distraction. I use a live-preview markdown editor (e.g., Typora, MarkText) to let me get my thoughts onto paper (screen) with low friction. It's easier to just hit "#" rather than drag the mouse to the style bar and select heading. Or more importantly for me, it's so much easier to hit "$" and seamlessly go into LaTeX for math than it is to open the equation editor and start selecting all the template objects.
When it's time to collaborate, I use Pandoc to turn it into docx and then I send it around and the final formatting happens in Word because that's the easiest for everyone to work with, but the "get the ideas down" phase works best for me in a more "minimal" editor with little formatting.
I love the idea of Quarto, and if I had that when I was in grad school, it would have made my life so much easier. The workflow I see for Quarto is that you can write your paper while you're doing the experimentation because the code is embedded with your thoughts. But in that case, you're mostly slowed down by the research process so it can be a little more clunky to get the writing done because you have time and you're iterating over ideas more than words in that phase. I'd use it now for work in the R&D phase, but I know I won't have a critical mass of collaborators to make it worth while.
You might be interested in Texmacs [1]. It is has a wysiwyg interface, and it handles nicely tables and mathematical equations. Also you can export documents to the latex format.
[1]: https://www.texmacs.org
There are other reasons to not like Word other than 'it six's. One is availability. If you're on Linux all day, your options don't really contain word - it's not free to download and install due to needing a license. You have to go and find some other computer that runs windows, and start it up - just for that one document. Then you have a single use computer, which obviously isn't a great experience. Closest thing that I use is Google docs, sometimes. I (and many others like me) know how to use word (and excel) pretty well due to some life in that world. I still remember most of many of the hotkey combinations to step through the menus. The reason I use vim for everything now is - I use vim for everything. I live in vim/tmux/ssh/tui, so most problems go there first if they can. There are obvious benefits to the vim/git/Typst setup, if plots need to go in a document for example, but it's also strengthened by word not being easily available.
It depends on the person. The best way for me to write is on paper, on a desk with lots of empty space, with paper versions of all reference material.
I would like to quote this on a MonsterWriter landing page
If you want to use Word, then that's great, but when you start saying what other people 'should' be doing then they're going to speak up.
Writing should happen where you are comfortable editing text. I am comfortable in same editor where I write code.
To all the people who say "Writing markup in an IDE sux", I say "That just means you don't know how to use it properly". I can write in a flow and apply/change formatting easily. I can jump around and rearrange documents with ease. And it is in a format that can be opened and read by native software on almost any computer.
If you think that Jack Kerouac would prefer MS Word over a much simpler plain text editor, I don't agree.
We do the opposite of this - we write in markdown but sometimes need to get feedback in Google Docs. Pandoc doesn't convert to google docs so well, but it does to docx, so our pipeline is
markdown -> pandoc -> docx -> upload to google doc -> share
My kingdom for proper markdown support in google docs. Just let me toggle between wysiwyg vs markdown. Collaboration at a tech company using google docs is comically painful at times.
+1 strong agree. I like Google Docs’ realtime collaborative editing, but the wysiwyg formatting (even if one has memorized the keyboard shortcuts) makes it hard to be fast the way I am in a Markdown-aware editor or vim. Plus I miss my vim motions!
You know what, that's a sufficiently cursed workflow that it wraps back around to adding nerd cred
Like using a hex editor to build up a Word doc?
For documents that require a longer process, I prefer formats that I can use comments and TODO in, with a text editor that feels familiar.
Other than that, I strongly agree. Word is also de facto standard when you want others to open and edit your document.
Word has comments. They work well as todo markers if they don't need to be retained (just make a comment to mark something and then delete it when it is resolved).
you managed to find a lean way to go docx to pdf using pandoc ? last time i tried it required a whole latex stack behind it.
Process over Tools.
You might find it interesting that I never read any docx sent to me and instead run it through pandoc to convert it to markdown first.
While pandoc is certainly a very useful tool, don't you think it's overkill to call a 143MB (on my Linux system) pandoc executable to do word (un)wrapping?
Emacs has `fill-paragraph` built in and `unfill-paragraph` is a short function definition [1]. Both work across multiple paragraphs.
[1] https://www.emacswiki.org/emacs/UnfillParagraph
Nice point! I agree that it's a bloated method, however, this was the best solution I could come up with at that point of time. I am certain that there are better solutions, it's just me who could not find it. I went with this solution anyways since it was still an improvement compared to my previous method in vim which involved setting the text width to a large number like 9999, highlighting the text I wanted to unwrap and then typing 'gqq' for formatting, and then yanking it. And of course, I had to re-wrap the text if I wanted to maintain the original format of the text file.
You are absolutely right and I understand what you mean though. I am open to trying other alternatives and I should try to come up with a better method to workaround this problem.
Never tried Emacs, just went with Vim so far. Did not know that Emacs had already an elegant solution for this problem. Nice! :)
My solution would be to go to the start of each paragraph and hold J (shift + j) until the entire paragraph was joined onto one line, and then go down to the next one. I guess it depends on how long your emails are but this is pretty quick.
My problem with this method is that it's not convenient especially when there are lots of paragraphs. When you highlight all the paragraphs and press shift J, it unwraps everything into a single line. This results different paragraphs ending up on the same line. You also need to undo the changes you made to avoid disturbing the original file content.
I haven't needed it myself, but it might be easier to just keep the document in line-break-per-paragraph form and just turn on visual-line-mode...
I have almost never thought about the file size of a program (even for big games) on a daily use machine.
I am certainly not gonna be learning and switching to emac just to perform this task for unwrapping a .docx file
It is one of the most useful programs I use and the only useful program I ever used that was written in Haskell.
Never used Shellcheck?
xmonad team checking in.
Wasp team reporting to duty: https://github.com/wasp-lang/wasp
Whoa, I use Shellcheck a lot and did not even know it was written in Haskell.
Interesting. And how do you send and read emails? Mutt?
I used to use Mutt, but now I don't because my email has its own special domain, and the email hosting service I use doesn't let me export IMAP and POP3 details unless I pay them.
Currently, I just open vim in the terminal, write what I need, then copy the text. I open dmenu using a shortcut, type something like "unwr", which is sufficient for selecting the "unwrap-clipboard" script of mine, press enter, which unwraps the text on the clipboard. Finally, I paste it in the email client.
I know it might seem a bit tricky, but it's better than what I did before. I used to set the textwidth to a really large number like 9999, highlight the text I wanted to unwrap, and then type 'gqq' for formatting. And don't forget, you also have to wrap the text back if you don't want to change the original format of the text file you wrote.
You can use soft-wrapping in vim, but I don't prefer it. Soft-wrapping is not as convenient to me as hard-wrapped text when using vim shortcuts. For instance, if you are using soft-wrapping in vim and you press 'o,' the insertion mode will start at the end of the paragraph because vim will consider the entire paragraph as a single line. However, there are many situations where I only want to insert text in the middle of a paragraph. You will also most likely set j to act like gj and k to act like gk, to make the cursor move between lines that are visually separated but actually form a single line. I don't like this either.
I had a script that piped to curl to send, Mail.app for downloading via POP and Vim to read/write, but I gave up and ended up copy/pasting as well.
Someday I may try that again, if email is still relevant by then. Vim and email would be my perfect set up.
Wow, this is very interesting, and I might even try it at some point. It might have been a bit challenging to sync and read the emails though, but the sending part seems nice.
Was the reason for why you gave up related to syninc emails?
I liked that Mail.app stored every message as a single separate file, instead of the mbox that Thunderbird and others did. But at some version they started saving a hash with a multiple folder structure and that broke the setup. I had a few issues with MIME encoding as well, which were probably my fault. It was too much work and I eventually gave up, but if I find the will to do it again, I'd choose a simple POP downloader + some filter (if not in address book or previous recipients, move message to “Unknown”).
qlmanage worked great for HTML messages and attachments, though.
Quite a coincidence: I also stopped hard-wrapping my emails after reading that same essay, and I also use Pandoc to prepare my emails (or a program, invoked by a shortcut in vim, that sends the selected text to Pandoc).
A very interesting coincidence indeed. Nice to see that others have also thought about the same problem and have found solutions similar to mine. :)
I probably use it every day, without noticing, to view markdown docs in a terminal, via a `.lessfilter` invoking [my fork of] https://github.com/Orange-OpenSource/pandoc-terminal-writer
I also very much like Pandoc-markdown's ‘simple table’ syntax, because it's actually human-readable and human-writable without confusion and pain.