Opened 12 years ago
Closed 12 years ago
#8694 closed defect (fixed)
Improve schemes printing and LaTeXing
Reported by: | novoselt | Owned by: | AlexGhitza |
---|---|---|---|
Priority: | major | Milestone: | sage-4.4.4 |
Component: | algebraic geometry | Keywords: | |
Cc: | Merged in: | sage-4.4.4.alpha0 | |
Authors: | Andrey Novoseltsev | Reviewers: | Alex Ghitza |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
I am attaching notebook printouts with old and new output in text and typeset mode.
(In the "before" file typeset versions are for some reason on top of the last lines of text - this happens only after pressing "Print" button in the notebook, the usual editable version looks fine.)
Current situation:
- schemes don't have _latex_ methods, so typesetting just outputs the usual text representation;
- this is not only not very good looking, but actually can be confusing since polynomials that were on different lines before are now separated just by a space, which may look like an omitted multiplication.
The patch provides _latex_ methods for pretty yet compact typesetting. In addition, while working on this I made the following changes to _repr_ methods:
- put commas between polynomials: this may be important even in text mode if polynomials are long and some of them are printed on several lines;
- replaced (no equations) by (no polynomials) for schemes that do not have defining polynomials: since the output does not include "=0", this seems to be more correct;
- compactified printing of quasi-schemes: since both components are schemes in the same ambient space, there is no need to print it twice.
Attachments (3)
Change History (10)
Changed 12 years ago by
Changed 12 years ago by
comment:1 Changed 12 years ago by
- Status changed from new to needs_review
comment:2 Changed 12 years ago by
- Reviewers set to Alex Ghitza
- Status changed from needs_review to positive_review
comment:3 Changed 12 years ago by
In AlgebraicScheme_quasi
plain-text and LaTeX descriptions do not match; I think it should be subscheme in _latex_()
, too.
comment:4 Changed 12 years ago by
Good point. It looks like it used to be "scheme" in repr and I changed it to "subscheme" but didn't do it in latex. Will post a new version shortly.
Changed 12 years ago by
comment:5 follow-up: ↓ 6 Changed 12 years ago by
Made the proposed change and fixed the doctest of _latex_ for quasi-subschemes accordingly.
comment:6 in reply to: ↑ 5 Changed 12 years ago by
Replying to novoselt:
Made the proposed change and fixed the doctest of _latex_ for quasi-subschemes accordingly.
You're too fast. ;-) (I wanted to remind you changing the doctests, too.)
Updated patch looks fine. (But haven't yet applied/tested it.)
comment:7 Changed 12 years ago by
- Merged in set to sage-4.4.4.alpha0
- Resolution set to fixed
- Status changed from positive_review to closed
This is a very nice improvement!