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:

Status badges

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.

Apply on top of #8675 and #8682.

Attachments (3)

schemes_output_before.pdf (58.3 KB) - added by novoselt 12 years ago.
schemes_output_after.pdf (72.5 KB) - added by novoselt 12 years ago.
trac_8694_improve_schemes_printing_and_latexing.patch (20.1 KB) - added by novoselt 12 years ago.

Download all attachments as: .zip

Change History (10)

Changed 12 years ago by novoselt

Changed 12 years ago by novoselt

comment:1 Changed 12 years ago by novoselt

  • Status changed from new to needs_review

comment:2 Changed 12 years ago by AlexGhitza

  • Reviewers set to Alex Ghitza
  • Status changed from needs_review to positive_review

This is a very nice improvement!

comment:3 Changed 12 years ago by leif

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 novoselt

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.

comment:5 follow-up: Changed 12 years ago by novoselt

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 leif

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 mhansen

  • Merged in set to sage-4.4.4.alpha0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.