-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More explicitly document the two kinds of syntaxes #104
Comments
hmm, I think my doc revisions in #101 took the opposite approach: less explicit, sorry :) But note I did at least explicitly note the two behaviours at the end of |
I've merged #101, but let's maybe leave this issue open? Here are some possible ideas of what we could do about this bug:
|
Number 1 is a “copy” of the octave session and can be easily copied into the documentation. You could call it “diary style”, because it resembles the output of the diary command, which records your session. Number 2 uses a different markup (instead of marking the input, it marks the output and discriminates between return values and console output) and is easier to copy back into a new octave session, because you don't have to cut away the On the tutorial document: Since we would not want to have redundant style guides available, you can probably create patches for https://www.gnu.org/software/octave/doc/interpreter/Documentation-Tips.html to describe the best practice for writing documentation in more detail. Particular hints for pitfalls with doctest (ascii art in |
at least in HTML doc, I had thoughts to render +1 for "diary style" terminology. +1 for docstring of doctest.m being a bit tl;dr: I tried to shorten in my last edit but agree, a well-structured manual elsewhere (doesn't have to be long) would be good... |
I did this once for examples in the wiki. It has been a burden to maintain. In TexInfo you could use a |
I also like the "diary style" terminology.
There certainly is some correlation, as you cannot choose style 2 without Texinfo ;) At any rate: My understanding is that we support the three following options:
(and even mixtures of 2+3, as is being discussed in #107). From this perspective, "Octave Texinfo style" might not the optimal terminology for the third option, unless we decide to bunch together style 2+3 (which might actually be a good idea). However we choose to call these syntaxes, we need document these three options. For this, expanding the docstring would probably be the most straightforward option, while adding a separate tutorial document might perhaps be more appropriate, as I believe that our primary goal right now should be to make doctest as accessible as possible so that other Octave developers will adopt it. Such a document will also be mostly orthogonal to the Octave Texinfo style guide, but rather discuss the syntax accepted by Doctest. That is, it would be more in line with https://www.gnu.org/software/octave/doc/interpreter/Test-Functions.html, which is quite the tl;dr precedent... I'll leave the choice of format to whoever goes ahead and adds a first draft 😄 We can think about how to optimally merge our documentation into the Octave one when the time has come. Right now, we should strive for our package to be well-documented on its own & accessible to interested (core) developers. |
I re-read the end of But leaving open as discussion of manual etc is relevant, |
Closing this after your changes to |
It appears that the demands of the Octave project lead to two diverging syntaxes, so I think we should be more explicit in the documentation. What would be good names?
>>
/simple/basic/original/doctest syntaxThis is the one that emulates the behavior of an Octave/Matlab session.
(Octave) Texinfo syntax?
This is the Texinfo syntax that uses more semantic markup.
The text was updated successfully, but these errors were encountered: