Skip to content
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

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

Closed
williamstein opened this issue Jan 28, 2007 · 4 comments
Closed

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

williamstein opened this issue Jan 28, 2007 · 4 comments

Comments

@williamstein
Copy link
Contributor

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.

Component: notebook

Issue created by migration from https://trac.sagemath.org/ticket/224

@sagetrac-dorian
Copy link
Mannequin

sagetrac-dorian mannequin commented Sep 8, 2007

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 (

) 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 @williamstein:

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.

@williamstein
Copy link
Contributor Author

comment:4

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}

@williamstein
Copy link
Contributor Author

comment:5

I think this is intentional.

@mwhansen
Copy link
Contributor

comment:6

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

@mwhansen mwhansen removed this from the sage-3.4.1 milestone Jan 19, 2009
tobiasdiez pushed a commit to tobiasdiez/sage that referenced this issue Feb 22, 2024
sagemath#238)

* added scripts to merge

* changed 'scripts' warning font colour to yellow for more visibility

* improved and simplified warning message
mkoeppe added a commit to mkoeppe/sage that referenced this issue Nov 11, 2024
…dependencies

build/pkgs/sagemath_categories/dependencies: Add memory_allocator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants