9 ms·
ReStructuredText vs. Markdown for documentation
- jawns 10y agoOne point that's not really touched upon is the fact that it really does matter whether the person writing the documentation is a technical writer or a developer. If you're a tech writer, you're probably interested in using the best tool for the job, because writing documentation is what you do day in, day out. If ReStructuredText is the most powerful format, then you're going to strongly lean toward that. If you're a developer, however, writing documentation -- while you may recognize its necessity -- is a task that is often a slog. It's something you do so you can get it out of the way, and you really don't want to spend very much time thinking about the "how." You especially don't want to spend very much time learning the intricacies of a new markup format, unless you absolutely have to. I say this as a developer who is also a writer. I enjoy writing, but I know many developers don't. And if Markdown makes it easier for them to write documentation, either because they're already familiar with it or because it's just a simpler format, then I'm all for it, even if ReStructuredText might be a bit powerful overall.
- xapata 10y agoI wouldn't say Markdown is simpler. It has fewer features, but the core experience is about the same as reStructuredText. RST header markup is more readable in plain text. In Markdown, the less important a header is, the more hash marks. In RST, I am free to make less important headers have less visual weight.
- WorldMaker 10y agoMarkdown also supports non-hash mark headers, similar to RST, but it is a bit tougher to deal with its h1 -> h6 progression than RST. The RST rules are clearer and standardized, whereas Markdown's are not and especially vary between engine implementations. One more area where CommonMark standardization may help some time in the future, but doesn't quite impact today.
- masklinn 10y ago> The RST rules are clearer and standardized They're standardised but I wouldn't say they're clearer as the "level" of a specific over/under symbol only depends where it first appeared in the document, I've seen projects where two documents side by side used different underline symbols for the same depths, that gets confusing. I'd like rST/Sphinx to be stricter on this point, maybe I should open an issue/PR allowing upfront definition of the over/underline hierarchy for the project.
- 1wd 10y agoAgreed, RST headers are too "flexible". They're also IMO quite annoying to write and maintain (exactly matching the title length) or ugly (overlength).
- r0muald 10y agorst-mode in Emacs does wonders in this respect.
- _hyn3 10y agoThis is a long header.[esc]yypVr=
- a3n 10y agoCame here to say this.
- insin 10y agoGesundheit
- WorldMaker 10y agoPlus, solving inconsistencies with simple head math: $ to the end of lines to get the character counts from the two line and say, add 3 with 3i=[Esc] or subtract 5 with 5x. With over and under decoration you can . the other side to fixup both.
- shoover 10y agoHeader significance to visual weight inversion is the same deal in the lauded orgmode. In both cases, the trick is to see the hash mark weight as indentation instead of significance, or, preferably, configure your editor to weight the headers using font customization.
- samastur 10y agoAlso, there are a bunch of editors for writing Markdown for most platforms and few (any?) for ReStructuredText.
- kmike84 10y agoIDEA-based IDEs has a nice support for reStructuredText, I use this PyCharm feature almost daily.
- kevhito 10y agoYou mean like vim, emacs, nano, kate, notepad, notepad++, wordpad, or any other plain text editor? Really - I don't get this impulse at all. From my perspective, the entire point of markdown (and RST I assume, though I haven't used it) is that you can easily read and write it using any plain text editor. If you are going to need a specialized editor to write it, you might as well use html, docbook, docx, odt, troff, rtf, or any of the zillion other formats.
- chucksmash 10y agoIt's been a while since I've written rST but there were good plugins for both emacs and Sublime to boot (for e.g. filling the header under/over line or toggling between different header styles)
- aninhumer 10y agoYou certainly don't need editor support, but even for a format this simple there are still things an editor can do to make it more pleasant.
- artpepper 10y agoAt a minimum, I want support for: - Key bindings - Syntax coloring - Toggle preview within the editor I found Markdown generally had much wider support than RST.
- micah_chatt 10y agoBack to the main point, for non-developers all of those can be quite confusing especially when you're used to Word/Google docs/etc. A text-only editor where you don't get live feedback is quite an adjustment and there is a cognitive switch to the text you're writing and imagining how that text will be presented.
- marcosdumay 10y agoCompletely true, until you need a feature that the less powerful format does not support. Then you are back at the beginning, regretting spending all that time learning something that won't fill your needs. ReStructuredText is not hard. Yes, unusual features are hard to memorize, but a quick google search beats it being impossible every time.
- stinkytaco 10y agoThough this could be said for literally anything you learn how to do. I spend my time learning the tools that will give me the biggest impact most of the time, and use the easiest tools for most other things, simply dealing with their deficiencies.
- marcosdumay 10y agoThat's true. What makes this case special is that there's almost no change in difficulty between the more and the less powerful tools.
- grive 10y agoWhen working in an entity, use whatever the team is using obviously. Otherwise, if you haven't learned any of those two and are wondering which one you should pick, it's cool, because > You especially don't want to spend very much time learning the intricacies of a new markup format, unless you absolutely have to. is moot anyway. Starting to write in RST is not more complicated than starting with MD. No need to learn the minute details to write basic documents. You will have plenty of time afterward to refine the thing once you're accustomed to it and feel the need to produce more advanced outputs.
- micah_chatt 10y agoI totally agree. I actually recently introduced RST and Sphinx to our documentation team of 4 non-developers, and the most difficult hurdle was actually teaching them to use git (even with GUI SourceTree). Getting multiple non-developers (2 are remote) how to install Xcode and Docker produced more confusion then I thought it would. We've finally gotten into a flow, and better documented how to install the documentation tools, and it's been working quite well.
- jonaf 10y agoAs a developer, I would LOVE a tech writer to sit next to me and walk me through the best way to write documentation, using the best tools. And by "best," I don't mean what I think is best, I mean what the professional tech writer thinks is best. Until I have the experience to opine to the contrary, it is my responsibility as a software engineer with a mission to produce quality software to care deeply about documentation, even if it's not my full time responsibility. I would love to see more articles about the "how." I would learn a lot and be a better software engineer as a result.
- jquast 10y agoI've tried to do this in the past, but there hasn't been much interest at large. I presented this article as a workshop in santa cruz python meetup earlier this year, https://jeffquast.com/post/technical_writing_with_sphinx/ https://jeffquast.com/post/technical_writing_with_sphinx/
- jonaf 10y agoThanks for that, although I don't think those particular tools apply in a polyglot sense, the concepts establish a nice pattern to replicate in other tool chains.
- teddyh 10y agoThe GNU Coding Standards document has some advice on exactly this: https://www.gnu.org/prep/standards/standards.html#GNU-Manuals https://www.gnu.org/prep/standards/standards.html#GNU-Manual...
- krick 10y agoI don't know why this is such a common opinion. I'm reluctant to write docs exactly for the reason of not knowing the best tool for the job (or even an "ok-tool"), and I don't really have a luxury of finding it out exactly because I'm a developer and have stuff to do aside from writing docs. If I already had developed a workflow for writing docs, I assure you, writing a manual would be no different to me from writing a parser or some RPC-server or whatever. The only difference is I already have a workflow suitable to write parser, because I've written tens of them, maybe over a hundred already. I'm only thinking about the business-logic, my fingers just do the job. On the contrary, when I'm trying to write a manual larger than a few screens, say, docs for an API with more than 20 entries, I have to think about the tools to write, compile and display the documentation in a way to be comfortable for both the developer and the user. I'm not in a mood to write my own, and the Internet recommends me to use something that requires installing whole Ruby dev-stack (and I don't use Ruby) and produces something hardly even readable. That's why using markdown + pandoc, or even google docs might be something I resort to. If somebody would show me "The Way", spending a day or even a week to get fluent with the tooling I can use from now on would seem to me a minor nuisance, hardly even noticeable.
- SeaDude 10y agoUse Gitbook. It kicks all kinds of ass, is easy, and has online editor, offline editor, and cli toolchain if needed.
- krick 10y agoNo way. First, it has to be hosted in house. Second, that's basically the same markdown + pandoc I use for free already. Except it's even less flexible, and costs money. If API documentation would be just an ordinary book, I wouldn't have the urge to change anything, as pandoc + custom CSS actually does fine. Generating HTML + TOC from a bunch of .md files isn't really a problem, you know, it just isn't what makes writing API docs painful. I have a couple of sentences to say about every RPC call, maybe. It's actually mostly about providing huge (so, I guess foldable) params/result examples and making it easier to change the docs when the code changes. See Slate for example. Or even readthedocs. Both are not even remotely perfect, but are wa-ay more suitable for writing docs than gitbook.
- geerlingguy 10y agoSimilar previous discussion: https://news.ycombinator.com/item?id=11292280 https://news.ycombinator.com/item?id=11292280 And from my comment in that thread: After having written a fairly popular 400+ page book, and dozens of documentation sets in Markdown (and having worked on a few in other languages), I have to say—Markdown is _good enough_. It will take an order-of-magnitude difference to unseat Markdown as the 'simple plain text formatting syntax' default, IMO. But use what makes you productive and is most conducive to writing effortlessly!
- sevensor 10y agoI wrote my dissertation in markdown because LaTeX added so much noise to the text. In the end I had to go back and manually reformat chunks of it in LaTeX (especially the floats), but it was still worth it for all the bits I never had to write LaTeX for. In the end, it's not either-or, it's Markdown plus conversion to something with more knobs to turn. (All thanks to Pandoc!)
- aninhumer 10y agoPandoc even lets you include LaTeX in your markdown, so you can just use it inline for the few times you need more control, without having to faff around editing the output.
- copperx 10y agoWhat happens if you include LaTeX in Markdown and select a different output format, such as docx? is it just ignored?
- zzleeper 10y agoYes. Depending on what are you including, a better alternative might be to use Pandoc filters that change their output depending on the output format. So for latex you might end up with fancy figures side-by-side, but for word you just have them as figures one after an other
- lsllc 10y agoDon't forget asciidoc; Markdown-like but much more powerful. http://asciidoc.org http://asciidoc.org
- janvidar 10y agoI must add Asciidoctor. Which is mostly compatible with Asciidoc, but even more powerful. I have spent a lot of time trying to make Asciidoc create beautiful PDFs for technical documentation, but Asciidoctor makes it all a lot easier to customize its own stylesheets. The only negative thing about it is that it is hard to install since it typically isn't found in your distros package repo by default.
- rz2k 10y agoAnd perhaps, just one more standard to unify all of them!
- metasean 10y agoObligatory xkcd - https://xkcd.com/927/ https://xkcd.com/927/
- darkseas 10y agoI found installing on OSX fairly pain free. Homebrew and a bit of Ruby's gem got me everything.
- pavs 10y agoThanks to your comment I just tried out Asciidoctor and 'it's absolutely beautiful. It's insanely easy to install on OSX/Linux systems. I can see myself using on some of my pet projects.
- darkseas 10y agoI agree. For me, Asciidoc hits the sweet spot as it seems to have much of the simplicity of Markdown, and with the AsciiDoctor/DocBook toolchain it has the publishing power of RestructuredText. But its tables beat both hands down. You can include a csv file with some headers or micromanage merged cells, alignment and such.
- binarycrusader 10y agoMy choice is Markdeep: https://casual-effects.com/markdeep/ https://casual-effects.com/markdeep/
- mzs 10y agoAnyone remember that Show HN which let you create diagrams from simple text like this: A <----- B -----\ | V C Then there was a link in the discussion to a similar tool.
- dv_dt 10y agoIf you're not stuck on the text-art aspect of this, and are more willing to do graph connection list type spec, you can do this easily in graphviz.
- telotortium 10y agoDitaa? http://ditaa.sourceforge.net http://ditaa.sourceforge.net
- mafuyu 10y agohttp://asciiflow.com/ http://asciiflow.com/ ?
- mzs 10y agoFound it thanks to the two suggestions below and a search, shaky: https://news.ycombinator.com/item?id=10290073 https://news.ycombinator.com/item?id=10290073
- flarg 10y agoYou might also like to see platnuml [0] which generates UML diagrams from text files; it's muy default tool for UML at work [0] http://plantuml.com/ http://plantuml.com/
- glenndebacker 10y agoI was searching last month for a markdown for charts tool and I stumbled on mermaid (https://knsv.github.io/mermaid/ https://knsv.github.io/mermaid/) Still haven't time to play with it, but it looks nice.
- carlob 10y agoRe: 30 flavors of Markdown: did you guys know that Atlassian uses two different flavors of MD for jira and bitbucket?
- sevensor 10y agoNope, but it doesn't surprise me. I found bitbucket's markdown so limiting that I gave up on it. I suspect they'd rather have their users on Confluence instead.
- dv_dt 10y agoSince Atlassian acquired bitbucket, the products have two separate development histories, so I'm not too surprised.
- carlob 10y agoBut if one of your main selling points is integration, you'd better standardize to one, especially if (as an other commenter pointed out) the one in bitbucket is subpar.
- dv_dt 10y agoNo argument there - but no surprise either that upgrading bitbucket's markup might be something lower down on the priority list for the Atlassian engineering team either. :)
- duskwuff 10y agoThe markup Atlassian uses in Jira isn't Markdown at all. It has a few general similarities, like the use of asterisks for bold, but otherwise it's so different as to essentially be its own thing. (For instance, it uses [text|http://example.com/ http://example.com/] for links, which isn't even remotely like Markdown.)
- arjie 10y agoThis is a non-issue. Here's a simple algorithm: 1. Do you want to write something that MD is sufficient for? Write MD. 2. Do you want to write something that you need RST for? 2a. Is your document already in RST or is there no document? Write RST. 2b. Is your document in MD? Pandoc to RST. Pretty print. Write RST. The reason this is useful is that the 90% use-case is probably hit by MD. You may never need RST. And you won't spend more time deciding and discussing than actually doing because this algorithm only takes a few seconds to execute.
- snide 10y agoA couple years ago I put together one of the more popular themes for Sphinx. It's the one used by Read The Docs and you've likely seen in countless times when searching for Python libraries. I prefer Markdown. It's readable and easy to start writing by non-technical folk. More than that that, it's less flexible and isn't as likely to be destructive. At the end of the day rST is as complicated and as flexible as something like HTML. The biggest problem is its ability to nest markup. Markdown is pretty flat and you're not putting lists within tables within blockquotes. As someone making a theme, it was pretty difficult to style against the level of nesting that people end up using rST for. This is of course me bitching about how people write their rST, but there it is. I think rST by nature leads to inconsistent markup. Basically what I'm saying is. At that point, I'd rather just write HTML. rST sits in some weird middle world where it can get very verbose, but you end up losing all the simplicity that you wanted in the first place. Also want to note that rST doesn't HAVE to be so complicated. Plenty of people write clean, rST docs. However, as someone who spent a good deal of time learning the Sphinx system and the markup quirks of rST, in general I ended up seeing people use it in all sorts of crazy ways which then led to weird styling errors. When it came time to document my own projects, I just built a simple markdown system with a tree structure and added some syntax highlighting. That's gonna get most projects 95% of the way there. While you can do a lot more with rST and it is really powerful, I really think it's only for those 5% of projects or more than likely, scientific documentation that needs more context.
- vitaut 10y agoI don't think there is anything in RST that encourages deep nesting level or verbose markup, on the contrary with default roles it can be more compact than Markdown. If you look at good documentation examples, like The Python Standard Library documentation (https://docs.python.org/3/library/index.html https://docs.python.org/3/library/index.html), nesting is very limited and the documentation source is very clean and readable.
- snide 10y agoI agree with everything you say. All I'm saying is that in practice, the rST docs I saw, and the issues that came up around theming rST docs led me to believe that the flexibility of rST was its biggest problem (and strength). Markdown doesn't have that problem because you can't do much with Markdown.
- makecheck 10y agoWhile I do like simple markup, I think that all markup languages will become a lot better when text input hardware slightly evolves. We are so close to having this. We have Unicode but most of its symbols are a pain to generate on conventional keyboards. We have touch-screens but desktop computer keyboards don’t offer them and software on phones/pads still tries a bit too hard to emulate a conventional keyboard layout. Imagine if all standard keyboards had touch displays on the side to quickly flip between tables of related symbols, optionally with some context-sensitive mode? Then, instead of having to use creative ASCII tricks to make it “simple” to describe what you want, you just do it through your input device. Ultimately I think markup languages will have to distill their features down to a few structural elements, and rely on Unicode (and easier Unicode input methods) to handle what is currently being done with ASCII hacks.
- jessriedel 10y agoWould the Optimus Maximus keyboard work? https://www.google.com/search?q=Optimus+Maximus+keyboard&tbm=isch https://www.google.com/search?q=Optimus+Maximus+keyboard&tbm... https://en.wikipedia.org/wiki/Optimus_Maximus_keyboard https://en.wikipedia.org/wiki/Optimus_Maximus_keyboard It exists but hasn't taken over the world. Apparently Apple's working an OLED display above their keyboard. http://9to5mac.com/2016/05/23/apple-prepping-thinner-macbook-pros-with-oled-screen-above-keyboard-touch-id-for-q4/ http://9to5mac.com/2016/05/23/apple-prepping-thinner-macbook...
- copperx 10y agoA keyboard with OLED keycaps that change depending on the context would be reason enough to get a new laptop altogether, even though I have a brand new one. As someone who context-switches from XCode to IntelliJ to Photoshop to Emacs, sometimes I confuse the shortcuts, and I don't learn more shortcuts because I'm afraid they will not carry over to other programs. Having discoverable shortcuts would be amazing.
- jessriedel 10y agoYea, it always surprised me that Apple hadn't fully copied this idea for Mac books. Maybe it needed to wait for OLEDs?
- bediger4000 10y agoThis whole argument presupposes that anyone who cares will get a choice in the matter. We all know that most bespoke software is written for corporations. And despite the immense drawbacks of "Word" (too many to mention, but let's start with autocapitalization...), most bespoke software is documented in "Word" despite "Word" not being fit for that use. To me, this is like watching intense baseball fans argue who was better, Babe Ruth or Joe Dimaggio - neither one of them is going to play again.
- rubidium 10y agoThis! So here's a story: I work at a large engineering company building custom automated research systems. The system engineers do the the design/development/testing and documentation. I have been searching for nearly 9 months for a documentation system to replace our current documentation system (500 Word docs in an EDMS). Goal is to increase re-usability and decrease maintenance cost by something more like a wiki/markdown system. The problem is, even though formatting and maintenance of Word docs is abysmal, they make inserting images and references drop dead simple. Plus, everyone has it installed on their machine. All the markdown versions don't have good references or image support (plus the best IDE is gitbooks which is... buggy). RsT is too much of a burden to setup. These are engineers writing, not programmers. I've looked into Confluence, Gitbooks, Dozuki, Inkling, Sphinx, ... nothing is quite so friction-less to "just write the docs" than Word.
- krapht 10y agoYeah. I've played around with everything mentioned in this thread, and for documentation that needs refs/math/images, you need to use either Lyx or Word. Asciidoctor might get there if it ever gets a good, free development environment.
- copperx 10y agoI agree -- I originally wanted a markup language to do away with LaTeX for typesseting but then I realized that getting image sizing and placement right on any markup language is even more painful than with LaTeX, so I just never jumped ship. I still wish I had a publishing toolchain that produced multi-format output (HTML5, docx, ePub, Kindle, and plain text) from the same source file. It can be done with LaTeX sources but the result is sub-optimal.
- pfultz2 10y agoFirst, there is commonmark that is trying to standardize markdown. There is also recommonmark which will parse commonmark for sphinx: https://github.com/rtfd/recommonmark https://github.com/rtfd/recommonmark However, commonmark currently lack support for tables, so I fall back on rst for tables(actually I think the syntax for tables in rst is much better than tables in other markdown flavors). Also, resolving links using commonmark in sphinx is a mess, right now. I actually extended recommonmark so sphinx will properly resolve cross references(including reference to elements in a domain). However, I had to update sphinx as well, which I have a PR open with no response from them, here: https://github.com/sphinx-doc/sphinx/pull/2644 https://github.com/sphinx-doc/sphinx/pull/2644 It seems unfortunate that sphinx devs are unresponsive to contributions. The devs for mkdocs are a lot more responsive, but seem more interested in monetary contributions, unfortunately.
- bpchaps 10y agoWhat blows my mind is that every time I need to write anything in markdown (once a month or so), I can never ever figure out how to use it without doing tons of googling. Why can't sites add some easily accessible documentation? Hacker news, tumblr, reddit, github all do it. Honestly, if it didn't look fine in the editor and then throw an apeshit fit when posted, it wouldn't be that frustrating. But I'm so damn tired of hitting "preview" or editing my posts after posting because of misleading previews and text boxes.
- itazula 10y agoLeanpub promotes a superset of Markdown called Markua. It is claimed that Markua is more suited to the writing of books and documentation. See http://markua.com/ http://markua.com/ Personally, for my projects, I use rST, but that is only because the wind happened to be blowing that way the day I made my choice.
- flarg 10y agoI've always preferred RST just because there is a wonderful PDF renderer called rst2pdf [0] [0] http://rst2pdf.ralsina.me/stories/index.html http://rst2pdf.ralsina.me/stories/index.html
- abathur 10y agoI'm in the middle of converting a project's legacy plaintext documentation (emulating man page format) into RST/Sphinx. The support for semantic markup with roles and directives was attractive for my goals (without falling down the rabbit hole, being able to: 1. translate from one source to formats compatible with both presentation-markup and semantic-markup, and 2. lint the docs). I've come to rue this decision in some ways. I like what I've been able to accomplish, but I've found most customization of default Sphinx and docutils behavior to be torture. I don't mean to drag contributors to those projects through the mud--they work well if you can just write documentation without fiddling much.
- 1wd 10y agoRST has some great ideas (as mentioned in the article, roles and directives are fantastic ideas). But it also has quite a lot of unnecessary complexity built in. It's also great that it (kind of) has a specification, not just a bunch of hand waving. But even with the specification there seems to be no independent re-implementation, so I wonder if the specification is really complete. It also makes some syntax choices that just make no sense at all to me. Making the most basic and important feature (bullet lists, titles) annoying to use was not a smart move. The (only) good thing about Markdown is it's (allegedly) simple. IMO it's on the one hand not simple enough (e.g. HTML has got to go) and on the other hand it's too simplistic. Ideally I would like to have a tiny core specification with a clean and simple standardized mechanism for extensions like roles and directives. With a bunch of standardized but optional extensions. Only the most important features (90% of usage) should get special syntax (bold, bullet lists, titles, roles, directives). For everything else (90% of features) there should be a named role or directive. Trac actually uses a similar system. linkExtensionName:content, [[extensionName(content)]] or {{{#!extensionName multiline-content }}} is all you need to remember. Could be simplified a bit, but it's quite usable.
- vitaut 10y agoI've used a lot of RST and from my experience the specification is very accurate. If there is some inconsistency, it should probably be considered as a bug and reported to Python docutils. What exactly is the problem with bullet lists? AFAICS they are pretty much the same in Markdown and RST.
- 1wd 10y agoIn RST you must have a blank line between parent bullet and child bullet. This really discourages adding small child bullets. In RST you must indent child bullets exactly to the indentation level where the text starts in the parent bullet.
- slgeorge 10y agoa. In RST you must have a blank line between parent bullet and child bullet. I don't think that's correct, this works: # Remove the spaces at the start to put in a file (HN rendering) * Bullet 1 * Sub-bullet 2 * Bullet 2 # Both worked fine: $ rst2html --verbose test.rst test.html $ pandoc --output test.html test.rst b. In RST you must indent child bullets exactly to the indentation level where the text starts in the parent bullet. Also untrue as far as I can see. Vim does do automatic indents for me so they have to be consistent AFAIK, but not to the `exact` same level as where the text starts in the parent bullet.
- zzleeper 10y ago(Shameless plug) If you want to extend markdown, consider this: http://scorreia.com/software/panflute/ http://scorreia.com/software/panflute/ It's a Python package that allows you to extend markdown through pandoc filters. It allows you to easily manipulate the AST created by Pandoc to add any number of features. For instance, I wrote my dissertation in Markdown , and used this to include algorithms, CSV tables, include directives, etc.
- curiousdude99 10y agoorg-mode + pandoc let you convert org files to anything
- rcarmo 10y agoI'm still using Textile. My blog engine (https://github.com/rcarmo/sushy https://github.com/rcarmo/sushy) can cope with ReST, Markdown, Textile, raw HTML and iPython notebooks, and I still turn to Textile for complex tables and other niceties. Out of the 7000-odd pages on my site, most complex pieces are Textile (although most newer items are Markdown). I find ReST incredibly awkward to use, really, because it's anything but intuitive - both Textile and Markdown are easier to write off the cuff. More importantly, though, I really wish that Textile, Markdown, ReST, etc., were formally specified as PEG grammars or similar. There's just too much variation, and "standards" or specs defining them tend to be written in ambiguous English rather than something that could be formally validated and easily ported across to new languages (rather than the spaghetti messes of regexps that most parsers turn out to be when you look at the source).
- Animats 10y agoIn the real world, people use Microsoft Word, or even LibreOffice Write. Yet another flavor of Markdown is not helping.
- hobarrera 10y ago> In the real world, people use Microsoft Word, or even LibreOffice Write. Please point to towards an API or library documentation written in the native format of either of those. In 10 years as a developer, I've never come across such a thing. > Yet another flavor of Markdown is not helping. Agreed. That's pretty much what the article states, and RST, luckily, is not that.
- ygra 10y agoThe C# and PowerShell specifications are written in Word ;) In any case, there's a lot of things people use in-house and never bother to tell the outside world about, and you'd be surprised how far that is from what people on HN or Github habitually use.
- peatfreak 10y agoWhy is the choice between these two? Both are very limited in what they can do for documentation of any complexity.
- imron 10y agoWhen I started writing the documentation for a software product I make I went with Markdown. It was what I knew and I thought it was great. As I started writing the documentation though, Markdown's drawbacks became more apparent. Especially as the software I'm making is multi-platform and there are features that exist in one platform and not the other and I'd like to include/exclude documentation of those features based on platform, and the fact that I'd like the documentation for each platform to contain images from the program running on that platform, and so on, and this is not something that Markdown handles well. And so I switched to ReStructuredText. RST is not as clean or as simple to write compared to Markdown, however if you are producing documentation then it is much more flexible. I can live with less clean syntax in order to get the flexibility to do what I need to do.
- jdeisenberg 10y agoTables in RST are far more difficult than in Markdown; you have to essentially draw the table you want. In both, it is difficult to have a block of code with one line in bold, or italicized for emphasis. (The same seems to hold for asciidoc.) Which is why I eventually gravitate back to HTML. (See https://github.com/oreillymedia/HTMLBook https://github.com/oreillymedia/HTMLBook as well - full disclosure: I have done writing for O'Reilly.)
- dredmorbius 10y agoThere's composing in a lightweight markup language, then moving to something heavier-duty. HTML, LaTeX, DocBook, whatevs. The lightweight language is an authoring tool, but it shouldn't get in the way of full expression as needs be. (Markdown allows integrated HTML, though not all Markdown implementations / uses provide that, particularly online Web tools. Which are horribly inconsistent, IME.)
- slgeorge 10y agoFor standard RST tables I use vim-table-mode (https://github.com/dhruvasagar/vim-table-mode https://github.com/dhruvasagar/vim-table-mode) which is fantastic as it automates RST or markdown tables. There are some other RST table types: a. List table: Pretty simple to use (http://docutils.sourceforge.net/docs/ref/rst/directives.html#list-table http://docutils.sourceforge.net/docs/ref/rst/directives.html...) b. CSV table Supposed to be used for CSV imports I guess but I've never used it (http://docutils.sourceforge.net/docs/ref/rst/directives.html#id4 http://docutils.sourceforge.net/docs/ref/rst/directives.html...)
- dredmorbius 10y agoHaving authored texts in nroff, groff, HTML, DocBook, Markdown, ASCIIDoc, and LaTeX, as well as numerous proprietary formats and word processors, my considered view is this: Let authors use the fucking tools they know and prefer. Organise common text through translation tools. Pandoc is fucking amazing. Formatting for final production is a separate task. (Not without some irony, I'm reviewing a set of guides and commentaries on productivity and creativity in a few other tabs....). When you are writing your most important task is to capture the gist of what's in your head onto a tangible medium. If that means fucking Messinian marble and diamond chisels, so be it. The marginal productivity gains for someone already proficient in a tool are low in switching to something else, relative to domain knowledge. The challenge is that you're then stuck with high-level, vs. low-level definitions and tools. Which is where the whole "what do I use for creating my documents" question ends up at. Systems such as HTML5 (the semantic elements, not all the canvas and DRM crap), or LaTeX, or DocBook, are hugely useful here because their definitions are largely semantic. You write the structure, not the style. After that, so long as a tool or language can produce ingestible input given an author's output, that's fine. And, frankly, by the time you're worried about specific low-level structure, use a dedicated tool which provides that. My experience with LaTeX was that it was actually _amazingly_ simple to use for basic creation -- it gets out of the way. Paragraphs as linefeeds, rather than HTML's incessent <p> </p> pairs, helps immensely. For more complex structures, you can go back and add what's needed later. Markdown offers a wide set of capabilities with the option of fallback to HTML, which again is powerful and a good option for composing. And there's value in simplicity.
- MrBingley 10y agoAnother interesting publishing system is Pollen http://docs.racket-lang.org/pollen/ http://docs.racket-lang.org/pollen/. It integrates with Racket to give you the full power of a programming language while writing markup. The guy behind it, Matthew Butterick, is a typographer and has put a lot of work into it.
- tjl 10y agoI really wish Adobe didn't screwup FrameMaker. It was on all the major platforms and did its job. Then, they went and dropped it from everything except Windows and it's basically languishing ever since. I wrote a number of documents in FrameMaker back in the 90s and I loved it. I really wish I had something like it now.