Live data from Hacker News

Pandoc

pandoc.org

111–120 of 298 posts

Re: Pandoc

#111
I mainly use Typora for markdown editing and saving as PDF

Just check pandoc installation and get started guide. Overwhelmingly detailed, like I never use command line before. Maybe it assumes many users of pandoc are writers or Information Developer, without much tech skills.

Re: Pandoc

#112
post #3

Pandoc is a great cli tool in terms of its UI and code quality. An interesting fact is that its creator is John MacFarlane, a Philosopher [0] https://en.m.wikipedia.org/wiki/John_MacFarlane_(philosopher...

[flagged]

Re: Pandoc

#113

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]…

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

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

Re: Pandoc

#114
post #35

Earlier quoted context omitted.

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…

> People (tech people at least) have lost sight of the fact that writing should happen in "word processing software"

The fact? Should? In "word processing software"? Why shouldn't it happen in "text editing software"? Writing produces text, after all.

Re: Pandoc

#115
post #35

Earlier quoted context omitted.

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…

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 ...?

Re: Pandoc

#116

Every couple of years I need pandoc for some project. And teach time I relearn the same idiosyncrasies. Some odd defaults, the sometimes annoying depths you have to do to customize HTML templates, the weird filter infrastructure. What a neat strange program it is.

I have this same issue, and the same with `jq` and `GNU Parallel`. When you need them you need them, and nothing else quite works, but I have to re-learn them every time.

Which is actually quite a strong point for guis, amidst all their problems

Re: Pandoc

#117
post #35

Earlier quoted context omitted.

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…

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.

Re: Pandoc

#118
post #3

Pandoc is a great cli tool in terms of its UI and code quality. An interesting fact is that its creator is John MacFarlane, a Philosopher [0] https://en.m.wikipedia.org/wiki/John_MacFarlane_(philosopher...

[flagged]

> It has 995 open issues in its Github repository.

This is not a sensible metric for code quality. For one thing, only about 20% of the currently open issues are tagged as bugs - more than that are suggested improvements.

> Haskell program was supposed to work right if it compiles, wasn't it?

No. Especially for tasks like string manipulation and format munging, you cannot capture the complexity of the domain into types.

Re: Pandoc

#119

Earlier quoted context omitted.

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 unw…

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.

Re: Pandoc

#120
post #108

The only issue I have with pandoc is the dependency hell it requires. It requires a lot of haskell dependencies and just eats up your storage space.

The pandoc binary I have is certainly large at 206MiB (more than I expected!), but it doesn't have any weird dependencies I can see. Just GMP, ncurses, and such. All the Haskell parts are statically linked, which is probably the reason it is so large.

Arch Linux is linking dynamically, IIRC, and there it is 'only' 64 MiB: https://archlinux.org/packages/extra/x86_64/haskell-pandoc/
Post reply on HN