[Docutils-users] Re: Default role

 [Docutils-users] Re: Default role From: Felix Wiemann - 2005-02-18 15:01:26 ```Beni Cherniavsky wrote: > Thinking again, I also feel that hooking existing constructs, > e.g. indented blocks, is too implicit. I felt that syntactically they > parallel single backquotes (the way ``::`` literate blocks parallel > double backquotes) but it's not precise syntactically and certainly > not precise sematically. No, but do they have to be parallel? > Indented blocks always had a well-defined meaning as block quotes > (whose closest inline parallels is simple "quoted text") and it > remains useful in all documents. In many documents you need only few block quotes, or none at all. However, in some documents you have many equations, and indentation is also natural for equations. There's often text like this: So as long as sqrt(npq) >= 9 we can safely assume that f_B(k, n, p) = 1/sigma * phi((k - mu) / sigma) and F_B(k, n, p) = Phi((k + 0.5 - mu) / sigma) with reasonable accuracy. This is often easier to calculate than f_B(k, n, p) = (n atop k) p^k q^(n-k) or f_B(k, n, p) = sum from i=0 to k ((n atop i) p^k q^(n-i)), especially for large `n`. This is perfectly well-readable and anything but confusing or implicit, and prepending each equation with a ".. ascii-math::" would clutter up things terribly. No, I don't want to add explicit hints in front of the equations (like "::" or ":::") either. I mean, it's just my choice as a document author if I want indented blocks to indicate equations (or, more precisely, equation lists) instead of block quotes. If I misuse the feature so that my document becomes confusing and unreadable, that's my own problem. It's not reStructuredText's job to prevent me from doing stupid things; and especially reST should *not* prevent me from doing useful things. The same applies to "::"-marked blocks. David Abrahams used a *lot* of parsed-literals in his book, and I could imagine that a possibility to make parsed-literal the default directive would have made the source a lot more readable. > Why is:: > > text `math` text > > less surprising/confusing/complex or gives more convenience gain than:: > > text text ::: > > math formula > > text text The latter adds yet another syntax construct. I think it's a bad idea to add more syntax. -- When replying to my email address, please ensure that the mail header contains 'Felix Wiemann'. http://www.ososo.de/ ```