A fine piece of work!  I hope it becomes *the* reference work for updating
LyX in this area.

Best regards
-- 
Larry S. Marso
[EMAIL PROTECTED]



On Sat, Jan 30, 1999 at 10:24:17PM -0500, John Weiss wrote:
> On Sat, Jan 30, 1999 at 12:18:36AM -0500, Larry S. Marso wrote:
> > I received an answer to my question (thank you!) about the right latex for
> > an period *not* at the end of a sentance.
> > 
> > I don't understand why we have "end of sentance period" built into the
> > Insert -> Special Character menu.  We get that by typing "." don't we?
> > Shouldn't the special character instead be "not end of sentance period"
> > (described more eloquently than this, of course) -- which would correspond
> > to a ".\ " in raw LaTeX?  Any document with lots of "Mr." notations, names
> > including "Inc." (sorry, we don't use Aktiengesselchaft here) needs this
> > function.  Hard spaces mess up line breaks badly.
> 
> Yes, we do need the "abbreviation period" IMO.  However, your question
> points out that we also need the "end of sentence period" --- can you
> name the esoteric LaTeX code that forces inter-sentence space after a
> period?  Didn't think so.  Again, for some odd reason, no one wanted
> to add one of these.
> 
> Now that I write C++ for a living, I'll take a gander at adding this
> to 1.0.1/1.1 at some point.
> 
> What follows is only a suggestion, so take it with a grain of NaCl.
> 
> After I finally grasped when LaTeX uses what sort of spacing after a
> ".", the algorithm struck me as odd.  After all, it's not hard to look
> at the next non-whitespace character after a "." and see if it's
> uppercase.  If so, that "." ends a sentence.  If not, it's an
> abbreviation.  That kind of algorithm would be fairly easy to add to
> the LyX LaTeX export.  On re-importing, we'd have to put in the
> distinction between abbreviation and sentence-ending periods that we
> wrote to the LaTeX file.  Yes, the resulting LyX doc would look like
> an xmas tree with all of the multicolored dots, but that's the price
> of import.
> 
> There are several ways we can implement "intelligent dots".  Here are
> some of my ideas:
> 
> Algorithm #0:  Existing LaTeX
>     Not a suggestion per-se, but a statement of what we get right now.
> 
>     Inter-Word Spacing:
>           "." follows any uppercase *letter*
> 
>     Inter-Sentence Spacing:
>           Anywhere else
> 
> Customization Needed:
>     [x] Latinate Abbreviations:  "e. g. ", "i. e. "
>     [x] Title Abbreviations:     "Mr. Jones", "Dr. Smith", "Mrs. Peale"
>     [x] Name Descriptors:        "Richard Hawkins, Esq. knows [...]"
>     [x] Sentence Ending in a Capitalized Word:
>         "[...] on Fiji.  If you are [...]"
>     [x] Sentence Ending in a Capitalized Letter:
>         "[...] at NASA.  Experts say [...]"
> 
> ====================================================================
> The remainder are things LyX would forcibly do "i. e. add the "@"
> or "\ " upon LaTeX output.  Each of the suggestions is
> semi-orthogonal; I'm not considering combinations just yet.
> ====================================================================
> 
> Algorithm #1:
>     Inter-Word Spacing:
>          Anyplace except...
>     Inter-Sentence Spacing:
>          "." followed by any whitespace followed by an uppercase
>          letter.
> 
> Customization Needed:
>     [ ] Latinate Abbreviations:  "e. g. ", "i. e. "
>     [x] Title Abbreviations:     "Mr. Jones", "Dr. Smith", "Mrs. Peale"
>     [ ] Name Descriptors:        "Richard Hawkins, Esq. knows [...]"
>     [ ] Sentence Ending in a Capitalized Word:
>         "[...] on Fiji.  If you are [...]"
>     [ ] Sentence Ending in a Capitalized Letter:
>         "[...] at NASA.  Experts say [...]"
> 
> 
> Algorithm #2:
>     Inter-Word Spacing:
>          "." follows a capitalized *word*
>     Inter-Sentence Spacing:
>          Anywhere else
> 
> Customization Needed:
>     [x] Latinate Abbreviations:  "e. g. ", "i. e. "
>     [ ] Title Abbreviations:     "Mr. Jones", "Dr. Smith", "Mrs. Peale"
>     [ ] Name Descriptors:        "Richard Hawkins, Esq. knows [...]"
>     [x] Sentence Ending in a Capitalized Word:
>         "[...] on Fiji.  If you are [...]"
>     [x] Sentence Ending in a Capitalized Letter:
>         "[...] at NASA.  Experts say [...]"
> 
> 
> Algorithm #3:
>     Inter-Word Spacing:
>          Anyplace except...
>     Inter-Sentence Spacing:
>          "." follows a lowercase word
> 
> Customization Needed:  Same as #3
> 
> 
> Algorithm #4:
>     Inter-Word Spacing:
>          "." follows a "word" that is only 1 character long.
>     Inter-Sentence Spacing:
>          Anywhere else
> 
> Customization Needed:
>     [ ] Latinate Abbreviations:  "e. g. ", "i. e. "
>     [x] Title Abbreviations:     "Mr. Jones", "Dr. Smith", "Mrs. Peale"
>     [x] Name Descriptors:        "Richard Hawkins, Esq. knows [...]"
>     [ ] Sentence Ending in a Capitalized Word:
>         "[...] on Fiji.  If you are [...]"
>     [ ] Sentence Ending in a Capitalized Letter:
>         "[...] at NASA.  Experts say [...]"
> 
> 
> Algorithm #5:
>     Inter-Word Spacing:
>          "." follows any word that is shorter than 4 characters.
>     Inter-Sentence Spacing:
>          Anywhere else
> 
> Customization Needed:
>     [ ] Latinate Abbreviations:  "e. g. ", "i. e. "
>     [ ] Title Abbreviations:     "Mr. Jones", "Dr. Smith", "Mrs. Peale"
>     [ ] Name Descriptors:        "Richard Hawkins, Esq. knows [...]"
>     [ ] Sentence Ending in a Capitalized Word:
>         "[...] on Fiji.  If you are [...]"
>     [ ] Sentence Ending in a Capitalized Letter:
>         "[...] at NASA.  Experts say [...]"
>     [x] Sentence Ending in a Short Word:
>         "[...] the place we went to.  I thought [...]"
> 
> 
> #1 is probably the easiest to implement, and would also execute the
> fastest.  Its downside is that it forces customization for the most
> common form of abbreviation:  titles on names.  #4 has the same
> drawback.  #5 has a different fatal flaw:  it will fail on some pretty
> common sentences.  #2 doesn't fail on name titles, but fails on many
> other cases.  We'd want this "magic period" to work properly with the
> sorts of abbreviations and sentences that people use most often.  None
> of the ideas I've had fit that description perfectly.  So, it boils
> down to where do we want to force the user to add a special period?
> 
> Thoughts?  Comments?
> 
> -- 
> John Weiss
> 

Reply via email to