Re: Zero-length Runs and show codes


Subject: Re: Zero-length Runs and show codes
From: Randy Kramer (rhkramer@fast.net)
Date: Wed Feb 14 2001 - 09:44:17 CST


Jesper,

Comments interspersed below.

Randy Kramer

Jesper Skov wrote:
>
> Hi
>
> I've taken off a couple of days and dedicated them to some serious
> AbiWord hacking.
>
> Present status is that I have removed most zero-length Runs and have
> introduced a new end-of-paragraph Run. Most of the editing logic seems
> to be working and the blocks/lines/runs work sensibly together.

Wonderful!

>
> There's still a lot to be done (redraw flaws need fixing, proper show
> modes behavior, mouse pointer selection, selection of page/line
> breaks, etc), but I think I might actually get it done this time.
>
> However, I have some (simple) questions:
>
> o how do I draw the funky q (reversed/mirrored P)?

One way is to use the ASCII DC4 character (decimal 20, 0x14). It is
among the control characters, so I don't know whether that causes a
problem. (The backwards P is the "IBM Graphic Character" representation
of ASCII 20, if that's an appropriate way to phrase that.)

> o what font should be used, and what size? If the previous text is
> 28pt should the 'q' be sized like that as well?

Word 97 does that, in fact it looks bigger than the rest of the font --
it is as tall as an uppercase letter but has a descender as well.

>
> And about followup features:
>
> o About show codes mode (presently show paragraphs mode): page/line
> breaks are shown by drawing a line with text in it.
>
> I've disliked that because it looks weird. Maybe because the only
> other place I've seen anything like this used is in WP5 where it
> would be <linebreak> or <pagebreak> instead of something drawn.
>
> Would anyone object if I made AbiWord show codes work like that?

Word uses the line with the with text in it, like:

--------------------------------Page Break-----------------------------

which seeems natural to me (it looks like a "snip here" line). I can
learn to live with an alternate, but an advantage of the page break line
is that it is very obvious. Showing a line break this way would appear
to be overkill -- see next paragraph. Would <pagebreak> be on a line
of it's own (maybe easy to see) or would it be "buried" at the end of
the last line of a paragraph?

Linebreaks (I'm used to calling them a "newline"): I don't know how to
describe this clearly: The standard unit of text in Word is a
paragraph. It ends with the backwards P (if hidden text is visible).
It wraps from line to line automatically. You can force a line to break
within a paragraph by inserting a "newline" (<shift><enter>). If hidden
text is visible, a "newline" shows as the carriage return symbol (sort
of like <-|) (I don't see the ASCII code for that symbol).

(There are advantages to being able to force a line break within a
paragraph, without creating a second paragraph.)

>
> Also, IIRC, the codes are drawn using available space and do not
> properly reserve screen estate. That needs fixing since it can
> result in some weird looking pages.
>

<you can probably ignore this>
I forgot that you are probably looking at "Page Layout" view rather than
"normal" view. OK, I just switched views. Phew! It basically does the
same thing, but I had to remember that it split my text onto two
separate pages. The "page break" line appears on the page where the
previous page ends. The next page does not have any indication of the
page break, text just starts at the top of the page like any new page.
</ignore>

> o I plan to make all special page/line/paragraph breaks
> selectable. In show codes mode they will be visible and they will
> be highlighted. In !show codes mode they will just be one pixel
> wide and invisible (but still editable).
>
> This may be post 1.0 - but more likely it's needed for completion
> of the end-of-paragraph code.
>
> o I also plan to make some changes to the use of attributes in the
> backend that should eventually allow us to show <font>, <bold> etc
> in the text and make those editable... Just like in WP5. This will
> also result in a leaner backend representation and possibly a small
> speedup.
>

I think we should gather several opinions on this. In Word, things like
font and bold do not show up in any "show codes" view. The Tools |
Options | View | Nonprinting Characters | All (View All for short) is
(AFAIK) the closest thing to it (in combination with the style
"combobox" on the toolbar) .

View All shows paragraph marks (the backwards P), newline marks (the
carriage return character), spaces (as "light" elevated dots), tabs (as
right arrows -->), and things like section, page, and column breaks.

It is usually easy to tell that a character or group of characters is
bold, italic, underlined, superscript, etc. because you can see it.
And, if you've applied the bold, italic or whatever by applying a named
character style to the characters, you will see the style name in the
style combobox when you have (only) characters selected that have that
named style applied.

I guess this is one of the fundamental differences between Word and, for
example Word Perfect. I am probably jumping the gun on sending this --
Paul will surely have some words of wisdom about how he expected to
handle this point. If the decision were to show markup like <bold>
</bold>, I think that I'd like to have a way to view paragraph and
newline marks, and page and section break indicators, without being
forced to also view any <bold> </bold> markup.

Inflation forces me to call this my $.03 worth (even though it's
probably worth much less than $.01).

> But this is post 1.0.
>
> Comments, please.
>
> Jesper



This archive was generated by hypermail 2b25 : Wed Feb 14 2001 - 09:46:16 CST