Ticket #10624 (closed defect: invalid)
Slashes disappear in docstrings
|Reported by:||novoselt||Owned by:||mvngu|
|Component:||documentation||Keywords:||notebook help docstring|
|Report Upstream:||N/A||Reviewers:||John Palmieri|
def g1(): r""" S \ E S \\ E S \\\ E S \\\\ E S \\\\\ E S \\\\\\ E S \\\\\\\ E """ pass def g2(): r""" S \ E S \\ E S \\\ E S \\\\ E S \\\\\ E S \\\\\\ E S \\\\\\\ E ``x`` """ pass
i.e. they have the same docstrings but the second one has a code block (the same happens with math blocks).
When I type g1? in the notebook, I get pretty much the docstring as it is written, except for a couple of extra blank lines on top. When I type g2?, I get
S E S E S \ E S \ E S \E S \E S \\ E x
on a single line. I don't think that the treatment of slashes should depend on the presence of extra blocks in the docstring.
While removing slashes may be done for "deLaTeXifying" purposes, it is actually done (at least partially) before LaTeX processing. The docstring of
def g3(): r""" .. MATH:: a \\ b .. MATH:: c \\\ d """ pass
in the notebook shows a and b on the same line while c and d on different. For HTML documentation the first block works as it should - a and b are on different lines.
This problem came up on #10479 in the math block of NefPartition?.
- Status changed from new to needs_review
- Milestone changed from sage-5.4 to sage-duplicate/invalid/wontfix
comment:11 Changed 8 months ago by jdemeyer
- Status changed from positive_review to closed
- Reviewers set to John Palmieri
- Resolution set to invalid