I would consider it a vast personal favour if we didn't have to re-hash this never-ending argument in the quiz thread. A quick poke around Google should familiarise anyone who's interested with the basic propositions for and against using two spaces at the end of a sentence, wikipedia makes a decent start.
matthew smillie.
···
On Aug 5, 2006, at 7:40, William James wrote:
James Edward Gray, Jr., wrote:
On Aug 4, 2006, at 8:20 AM, Mike Harris wrote:
It would be nice if you could assume two spaces after a end of
sentence with puncuation. Generally I think that's correct
grammar, although my grammar stinks so I could easily be wrong. If
you have to get into parsing incorrect grammar it becomes much more
difficult.
Actually, that's an old typographical convention that we can't seem
to shake.
What sort of perversion would make anyone want to shake
an old convention that is useful?
It's not correct grammar, just a typographical convention; one which
is sort of semi-obsolete and regularly gives rise to great debate in
typographical circles over its perceived rightness, wrongness, and
pragmatic value.
That isn't to say you shouldn't use it, since it'll be very accurate
in the general case, but redefining the problem to say "anything that
doesn't use two spaces is wrong" is a bit of a dodge.
I have to add that I never ever read anything about this kind of rule ! And I am
100% sure that this rule does not exist for french typography. I suspect that
every country will have different spacing schemes according to the punctuation,
and if you intend to correct english written by foreigner (and a lot of it is)
or, even better, if you want your program to work with any latin-written
language, you'd better not rely on anything like that ! (I know that I make
loads of english typography errors because I naturally follow the french
rules... unless I make special effort)
That's why the command to disable additional space after sentences in
plain TeX is called \frenchspacing.
French differs with respect to some other conventions too, e.g. you
put a space *before* the exclamation marks, too. If you do that in a
German newsgroup or chat, everyone will laugh at you and tell you are
"plenking".
*You* talking Wikipedia, see I have memories like an elephant
Cheers
Robert
Thaught I add some useful stuff to this interesting thread
···
On 8/5/06, Matthew Smillie <M.B.Smillie@sms.ed.ac.uk> wrote:
On Aug 5, 2006, at 7:40, William James wrote:
> James Edward Gray, Jr., wrote:
>> On Aug 4, 2006, at 8:20 AM, Mike Harris wrote:
>>
>>> It would be nice if you could assume two spaces after a end of
>>> sentence with puncuation. Generally I think that's correct
>>> grammar, although my grammar stinks so I could easily be wrong. If
>>> you have to get into parsing incorrect grammar it becomes much more
>>> difficult.
>>
>> Actually, that's an old typographical convention that we can't seem
>> to shake.
>
> What sort of perversion would make anyone want to shake
> an old convention that is useful?
I would consider it a vast personal favour if we didn't have to re-
hash this never-ending argument in the quiz thread. A quick poke
around Google should familiarise anyone who's interested with the
basic propositions for and against using two spaces at the end of a
sentence, wikipedia makes a decent start.
matthew smillie.
--
Deux choses sont infinies : l'univers et la bêtise humaine ; en ce qui
concerne l'univers, je n'en ai pas acquis la certitude absolue.
> The report mentions this as well:
>
> In short, the "rivers" of whitespace, caused by using two spaces,
> invariably annoy graphic designers and typographers.
>
That sounds like a noble cause. Maybe I'll reconsider...
···
On 8/4/06, Hans Fugal <fugalh@xmission.com> wrote:
--
Rick DeNatale
The noble cause being to annoy graphic designers and typographers?
Or maybe you meant something else. <G>
Sorry for the two empty replies. Gmail went crazy on me.
···
On 8/4/06, Hans Fugal <fugalh@xmission.com> wrote:
James Edward Gray II wrote:
> The report mentions this as well:
>
> In short, the "rivers" of whitespace, caused by using two spaces,
> invariably annoy graphic designers and typographers.
>
That sounds like a noble cause. Maybe I'll reconsider...
def fix_abbreviations text
Abbreviations.each_key do |abbrev|
text = text.gsub %r[(^|(\s))#{abbrev}((\s)|[.,?!]|$)]i do |m|
m.gsub(/\w+/, "#{Abbreviations[abbrev]}")
end
end
text
end
def capitalize_proper_nouns text
if not File.exists?("proper_nouns.yaml")
make_capitalize_proper_nouns_file
end
proper_nouns = YAML.load_file "proper_nouns.yaml"
text = text.gsub /\w+/ do |word|
proper_nouns[word] || word
end
text
end
def make_capitalize_proper_nouns_file
words = File.read("/Users/curi/me/words.txt").split "\n"
lowercase_words = words.select {|w| w =~ /^[a-z]/}.map{|w| w.downcase}
words = words.map{|w| w.downcase} - lowercase_words
proper_nouns = words.inject({}) { |h, w| h[w] = w.capitalize; h }
File.open("proper_nouns.yaml", "w") {|f| YAML.dump(proper_nouns, f)}
end
def capitalize text
return "" if text.nil?
text = fix_abbreviations text
text = text.gsub /([?!.-]\s+)(\w+)/ do |m|
"#$1#{$2.capitalize}"
end
text = text.gsub /(\n)(\w+)/ do |m|
"#$1#{$2.capitalize}"
end
text = text.gsub /\A(\w+)/ do |m|
"#{$1.capitalize}"
end
text = text.gsub %r[\sHttp://] do |m|
"#{$&.downcase}"
end
text = capitalize_proper_nouns text
text
end
I thought you were trying to start on the noble cause, by adding to the cause.
···
On Aug 4, 2006, at 6:36 PM, Rick DeNatale wrote:
On 8/4/06, Hans Fugal <fugalh@xmission.com> wrote:
James Edward Gray II wrote:
> The report mentions this as well:
>
> In short, the "rivers" of whitespace, caused by using two spaces,
> invariably annoy graphic designers and typographers.
>
That sounds like a noble cause. Maybe I'll reconsider...
The noble cause being to annoy graphic designers and typographers?
Or maybe you meant something else. <G>
Sorry for the two empty replies. Gmail went crazy on me.