Opened 15 years ago

Closed 13 years ago

#224 closed defect (invalid)

doc browser -- doesn't parse "notebook input notation"

Reported by: was Owned by: boothby
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: notebook Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Timothy clemens:
Why is some code just as on
http://sage.math.washington.edu:8100/doc_browser?/prog/?node43.html
non-excutable in that worksheet?

Because the doc parser doesn't know about "notebook input format", ironically.

Change History (6)

comment:1 Changed 15 years ago by was

  • Milestone set to sage-2.8.2

comment:2 Changed 15 years ago by was

  • Milestone changed from sage-2.8.3 to sage-2.9

comment:3 in reply to: ↑ description Changed 15 years ago by dorian

This ticket might actually be two questions.

First, why does the doc browser not parse notebook input formatting?

Parsing "notebook input format" by the doc browser can be implemented very easily; but should it?

In the Programming guide: 5. Writing Optimized Compiled Code: A simple loop example: Sum of Squares, the example assumes the reader is not using an interactive tutorial, thus, the explicit explanation of notebook input notation would be confusing because the { and } braces would never actually be visible to the user; also, there would be an evaluable input cell with the content "INPUT TEXT" and corresponding output cell with "OUTPUT TEXT" which would return a Syntax Error upon an actual evaluation.

Possible solutions are:

  • Re-write the relevant documentation with explanations of notebook notation removed where ever you really want the docHTMLprocessor to make an example cell.
  • OR, Leave it unevaluatable for the purpose of showing how the notebook works.

Second, why are some code block examples not converted into cells?

Code example blocks (<div class="verbatim">) that don't begin with "sage:" are not parsed into cells because sometimes these examples really should not be cells (e.g. ref/module-sage.combinat.combinat.html; the parts that start "INPUT:")

This could be fixed by refining the dochtmlprocessor rules for what should be input.

Replying to was:

Timothy clemens:
Why is some code just as on
http://sage.math.washington.edu:8100/doc_browser?/prog/?node43.html
non-excutable in that worksheet?

Because the doc parser doesn't know about "notebook input format", ironically.

comment:4 Changed 15 years ago by was

Could we do the following:

a verbatim environment with both and in it is converted to a notebook cell, unless %nocell appears in the previous line? In the vast majority of cases, in the long run, we'll want verbatim cells with {{{'s to be converted directly to notebook cells.

E.g., where below the {{ should be thought of as {{{:

This is how to write notebook mode:
%nocell
\begin{verbatim}
{{
2+2
///
4
}}
\end{verbatim}

comment:5 Changed 15 years ago by was

I think this is intentional.

comment:6 Changed 13 years ago by mhansen

  • Milestone changed from sage-3.4.1 to sage-duplicate/invalid/wontfix
  • Resolution set to invalid
  • Status changed from new to closed

I think this is intentional as well. I'm closing this as invalid.

Note: See TracTickets for help on using tickets.