octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to format loose and compact


From: Keith Goodman
Subject: Changes to format loose and compact
Date: Sun, 1 May 2005 10:22:05 -0700

When Octave displays a multi-line row vector or matrix such as x=1:100
it inserts two blank lines after the column headings if the format is
loose and a single blank line if the format is compact.

The patch to pr-output.cc below only inserts a single blank line if
the format is loose and no blank lines if the format is compact.

The patch also removes the colon, which I think serves no purpose
since there is already a line break, at the end of the column heading.

These changes, which were motivated by a desire to tighten the Octave
UI, happen to make Octave's display of x=1:100 identical to matlab's.

I don't know how to compile the changes I made. When I do learn how,
will I have to compile all of Octave to test the changes?

*************** pr_col_num_header (std::ostream& os, int
*** 1326,1335 ****
      {
        if (col != 0)
        {
!         if (compact_format)
            os << "\n";
-         else
-           os << "\n\n";
        }

        int num_cols = lim - col;
--- 1326,1333 ----
      {
        if (col != 0)
        {
!         if (! compact_format)
            os << "\n";
        }

        int num_cols = lim - col;
*************** pr_col_num_header (std::ostream& os, int
*** 1337,1347 ****
        os << std::setw (extra_indent) << "";

        if (num_cols == 1)
!       os << " Column " << col + 1 << ":\n";
        else if (num_cols == 2)
!       os << " Columns " << col + 1 << " and " << lim << ":\n";
        else
!       os << " Columns " << col + 1 << " through " << lim << ":\n";

        if (! compact_format)
        os << "\n";
--- 1335,1345 ----
        os << std::setw (extra_indent) << "";

        if (num_cols == 1)
!       os << " Column " << col + 1 << "\n";
        else if (num_cols == 2)
!       os << " Columns " << col + 1 << " and " << lim << "\n";
        else
!       os << " Columns " << col + 1 << " through " << lim << "\n";

        if (! compact_format)
        os << "\n";



reply via email to

[Prev in Thread] Current Thread [Next in Thread]