Wednesday, December 2, 2009

Salon Letters Beta — The Whole Enchilada

[(27/06/10) Salon has randomly changed the message header format on some letter pages causing the reformatting script to crash on those pages. I have written a patch that will fix this and incorporated it in the script posted below. To install, follow the instructions below for installing the script. Don't forget to uninstall the old version before installing the new; otherwise the new version won't be installed.]
It has now been about three weeks since Salon unveiled its “beta” pages, obviously designed by someone nostalgic for the red, white, and black color scheme so popular at the Nuremberg rallies. While the main pages at Salon are bad enough, the Letters pages were particularly hideous, with the previous more or less uncluttered format replaced with a page design where the letters are crammed into a space half the width of the page or less in order to make room for two additional columns, links were not marked in any way, and HTML tags that had previously been functional no longer worked.

I offered an update to the Salon Letter Filter that would work on the beta pages and also provided snippets of code that could be integrated into the Letter Filter script to relieve some of the clutter and the the poor design features that made trying to read the letters pages stressful as I developed them.

Now, by popular demand, a full Greasemonkey script that embodies both the Salon Letter Filter and the Salon Beta letter page reformatter is provided here. I have added some tweaks that let the script run on all Salon letters pages, including the letter posting page and individual author archive pages. The letter filter does not run on these pages as it is unneeded. The Letter Filter also will not run if the ‘killfile’ variable is not configured (i.e., it is empty or contains only the word “authors”). I have also added a switch to disable the Letter Filter even if the ‘killfile’ variable is configured. In short, if you do absolutely nothing after installing the script the Letter Filter will not operate — only the reformatting part of the script will run.

I have also added some bells and whistles that weren't part of the earlier scripts, including a “linkifier” that makes any properly formulated URL in the letter body into a clickable link. I have added commentary to the script that identifies the purpose of each block of code so that it will be easier for users to modify values or disable unwanted features. Here I give a brief summary of the features of the new script and how to manipulate it to suit the individual user's preferences.

First, however, and in keeping with the nature of this blog as a forum for language and grammar, a few remarks on the use of the term “comment” by programmers will be useful. All programming and scripting languages have a device that allows the compiler or interpreter to ignore lines in a program. In JavaScript (which is what Greasemonkey uses), the comment marker for an individual line is two slashes (‘//’). Programmers use comment (usually with “out”) as a verb meaning “to provide with comment markers” and any line with comment markers is said to be “commented out”. To uncomment a line is to remove the comment markers. I will be using these terms extensively in what follows.

  1. The Letter Filter

  2. The Letter Filter itself is essentially unchanged from the previous version. Instructions for configuring the ‘killfile’ variable are included in the script. I have added some tests so that the Filter does not run if the ‘killfile’ variable is not configured or if it is empty. I have also added a switch to disable the Letter Filter even if the ‘killfile’ variable is configured. The switch is found in the line //LetterFilterOn = "false";. To disable the Letter Filter, simply uncomment this line.

  3. Reformat the name of the author of the letter

  4. For each letter the author’s name is reformatted to make it a) visible and b) legible. The color is changed from gray to black and the font size is increased slightly. If the Letter Filter runs, this is done within the Filter. If not, it is done with a separate block of code. If you want to change the color or font size, the parameters are in <span style='font-size:110%;color:black'> and are self-explanatory.
    [Salon beta has now modified the format of authors’ names on letter pages. However, true to form, the name is now too large rather than too small. The size of the author’s name is now the same as the letter subject. To counter this, I have changed the earlier setting of 110% to 90%. The code is left in the script for those who may wish to further modify the format of the author’s name.]

  5. Ad Remover

  6. If you really want to see the ads, you can comment out this block of code. If you do, be sure to comment out the entire block, not just a line or two.

  7. Letters Help

  8. This section of the Salon letters page, located at the bottom of the second column, is actually useful and is worth saving before trashing the mostly useless second and third columns. This block of code saves the Letters Help and places it, very unobtrusively, at the beginning of the letter archive for the page.

  9. Remove columns two and three

  10. Now that the Letters Help has been salvaged, it is possible to remove column two containing the scoreboard (“Most Active Letters Threads”), telling which of Salon’s authors is ahead in the battle for clicks and column three containing innumerable shiny objects all begging to be clicked on (“Currently in Salon”). If you want to retain these columns, comment out this block of code. If you do, you won't be able to spread the text of the letters across the page. The letters have been crowded into the small space allotted to them in order to make room for these additional columns of click generators.

  11. Function to make global style changes

  12. Unless you are an experienced programmer, do not mess with this function. Even if you are an experienced programmer, don't mess with it. It falls into the “if it ain’t broke, don’t fix it” category.

  13. Change link colors

  14. One of the most disgusting things about the Salon beta design is that it does not identify links unless your pointing device hovers over them. From looking at the page there is no way to tell what is a link and what is normal text. Further, visited links are not marked so that there is no difference between visited links and any other links. Presumably, if you can’t see that you’ve already visited a link it’s more likely that you’ll click on it again. What is particularly egregious about this policy is that it means that you cannot tell which letter pages you have already read. You can see what page you’re on and presumably you know that pages on one side of the current page have been read and pages on the other haven’t. But if you have to close the browser or navigate away from the letter page, there is no way to tell when you return which pages of letters have been read and which not. The only way to tell is to write down what page you were on before you leave. This is not just poor web page design; it is outright bad manners and lack of consideration. [Salon beta has now apparently grudgingly changed the formatting so that letter pages that have been read are now marked. Other visited links, however, seem to be unaffected.]

    To rectify this, I have added three lines of code that provide colors for links:

    1. Links

    2. The first line of code changes the color of links so that they stand out from the default text color.

    3. Visited Links

    4. The second line of code sets the color of a link that has been visited. This allows you to see at a glance which pages you have already read.

    5. Hover Color

    6. The third line of code changes the color of a link when the mouse is held over it.

    The colors have been chosen on the basis of my own preferences and can be changed by the user to suit his or her own preferences. Colors can be defined in three ways: 1) by name; 2) by a hex number (00 to FF) indicating the Red, Green, and Blue components of the color; or 3) by the rgb() function, which specifies the RGB components as either a decimal number (0 to 255) or a percentage (0% to 100%). I have used each of these methods in one line of code but the user can change them ad libitum: color:blue, color:#0000FF, and color:rgb(0,0,255) all produce the same color. A list of named colors can be found here and you can quickly test your colors here if you have JavaScript enabled in your browser (or on the page if you use NoScript).

  15. Change width of letter components

  16. Now that the second and third columns are gone, it is possible to expand the text of the letters to utilize some of the empty space. The next block of code resets the width of each letter component except the signature to an absolute width of 650 pixels. This is the width that I find most comfortable for the browser width that I like to use. The user can change the numbers in these lines to suit his or her own preference. Remember, however, that it can be as difficult to read lines that are too long as it is to read those that are too short.

  17. Reformat the <li> HTML tag to display bullet points

  18. Salon letters beta still allows the <ul> (unordered list) and <li> (list item) HTML tags. However, there is no formatting associated with the tags so they have no effect other than allowing a single-spaced list. This block of code sets the parameters of the <li> element so that it displays bullet points and indents the text. Most posters probably will not use the <li> tag because a) they are unfamiliar with HTML and don't know what it is supposed to do and b) it doesn't work properly so even if they know what it is supposed to do, it doesn't do it. But with the Greasemonkey script working the <li> element will display correctly. There is no point in using the <ul> tag because Salon's HTML parser inserts a pair of <ul>/</ul> tags around every <li> element.

  19. Remove the huge navigation panels at the top and bottom of the page

  20. The next line of code removes the gigantic navigation panel (which essentially duplicates the one at the top of the page) at the bottom of the page. Since we know where the panel is and there is only one of it, there is no need to search for it and this task can be handled with a single line of code. The next two lines remove the large cumbersome navigation panel at the top of the page. If you want the navigation panels, simply comment out these lines of code (or turn off Greasemonkey by clicking on the icon in the status bar of your browser and then reload the page).

  21. Change the harsh red background color of the copyright notices at the bottom of the page

  22. I find the red used as background for the copyright notices at the bottom of the page to be both harsh and stressful. In addition, the black text of the notices is very difficult to read against the red background. Trying to do so gives me a headache. I have simply changed the background color to white to match the rest of the page. If you would like some other color, you can change the color in the line foot.style.backgroundColor = 'white'; as described above in item 7. The method is slightly different in this case, however. The color name, hex number color code, or the rgb() function should replace the word ‘white’ inside the quotation marks.

  23. Reformat the letter posting page

  24. All of the foregoing will also run on the page that posts letters. Now that there is more space on that page it is possible to expand the area allotted to the composition of your letter. The following blocks of code accomplish this.

    1. Expand the space for the letter subject

    2. The first block of code in this section expands the size of the area provided for the subject of the letter. The part that does this is in the line newSize.setAttribute('size','70');. You can change the size by changing the number in this line. The remainder of the block is very important as it makes sure that the new element you are inserting has the same properties and content as the element you are replacing. This is important because the page has a verification script that looks for these properties and won't post the letter if they aren't there.

    3. Expand the space for the letter text

    4. The next block of code increases the size of the “textarea” element for the body of the letter. The numbers that do this are in the newTextarea.setAttribute('rows','20'); and newTextarea.setAttribute('cols','70'); lines. The “rows” number adjusts the height of the box and the “cols” adjusts the width. These numbers can be changed to suit the individual user. Again, the remainder of the block of code is very important for the same reasons as in i above and should not be changed.

    5. Remove the gray background for the letter preview

    6. There is a light gray background that is configured to the original size of the letter preview. This is distracting if the letter preview now extends outside this block. I found that the simplest solution to this was simply to remove the gray background rather than try to resize it. The final block of code in this section changes the gray background to white in the same manner as in item 11 above.

    These changes are, needless to say, specific to the letter posting page and do not affect other Salon letter pages. But what is more important is that they work. I have posted numerous letters using the reformatted pages and they can be used with confidence.

  25. Linkification

  26. The last block of code in this instantiation of the Letter Filter and Reformatter is a routine to convert any properly formulated URL in the body of a letter into a clickable link. There are Firefox add-ons that provide this capability (in fact I use one myself), but for those who are distrustful of add-ons I decided to add this to the Reformatter. This is by way of atonement for the fact that I haven't be able to find a way to sneak a link tag past Salon's HTML parser.

INSTRUCTIONS: General instructions are given in the script. To create the Greasemonky user script, copy everything below from //BEGIN CODE to //END CODE (you do not need to copy the BEGIN CODE and END CODE lines, but since they are comment lines it won't hurt anything if you do) into a new text file. Do not panic if it appears that the lines of code end in midair on the blog page. It is all there even if it doesn't display because of the Blogger page layout. Simply select the code, copy it, and paste it into a new text file.

IMPORTANT: DO NOT USE A WORD PROCESSOR TO CREATE THIS FILE. Word processors insert formatting codes into files. Scripts must contain nothing but text. If you do use a word processor (such as Wordpad), be sure to save the file as TEXT ONLY. It is recommended to use Notepad or some equivalent text editor (note: a text editor is fundamentally different from a word processor).

Once you have created the file, chose “Save As” and save the file with the extension .user.js. It doesn't matter what you name the file since Greasemonkey takes the name of the script from the “@name” element in the script itself, but it is essential that it have the extension .user.js otherwise Greasemonkey will not recognize it as a Greasemonkey user script.

When you have the file saved and Greasemonkey enabled on your browser, simply drag the file and drop it on the browser. Greasemonkey will recognize it as a user script and ask if you want to install it. Say yes.

IMPORTANT AGAIN: Once you have installed the script, you can no longer edit it from the original file. Well, you can edit it of course — it just won't have any effect on the script itself. When Greasemonkey installs the script it copies it to a directory far, far away, and that becomes the working copy of the script as far as Greasemonkey is concerned. You can edit this file with the “Edit” function in the “Manage User Scripts” dialog panel provided by Greasemonkey. If you want to edit the original script file, you can, but you will then have to uninstall the script and install it anew for your edits to have any effect.




//BEGIN CODE
//
var LetterFilterOn;
//
// MANUAL CONFIGURATION REQUIRED FOR LETTER FILTER
//
// To configure the letter filter, you must have a "killfile" variable configured.
// A template for this variable is given below. The "killfile" varable includes a
// comma-delimited string of the nyms of the authors that you wish to filter out.
// A sample "killfile variable configuration looks like:
//
// new String(killfile = 'author1,author2,author3');
// or
// new String(killfile = 'author');
//
// Simply replace the word "authors" in the template below with the nyms of the authors you
// wish to expunge, each one separated by a comma, and save the file.
// Entries are case insensitive. Since the "killfile" will become a regular expression,
// regular expression metacharacters (such as "." or "+") appearing in a nym should be
// preceded by two backslashes ("\\"; e.g., 'L\\.W\\.M\\.') in order to work properly.
// If you do not wish to use the Letter Filter function, no configuration is necessary,
// although reformatting parameters may be reconfigured by the user if desired.
//
new String(killfile = 'authors');

// Remove the "//" in front of the following line if you wish to disable the Letter
// Filter in all circumstances:
//
//LetterFilterOn = "false";
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.
//
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
// After installing Greasemonkey, restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "Salon Letter Filter and Reformatter", and click Uninstall.
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name Salon Letter Filter and Reformatter
// @author Frankly, my dear, ...
// @namespace http://language-grammar.blogspot.com/2009/01/salon-letters-beta-whole-enchilada.html
// @description Filter and reformat letters from Salon. WARNING: manual configuration required. If you wish to use the Letter Filter you must edit the script and enter your "killfile" in the string variable near the top of the script. If you wish to use only the reformatting features, no configuration is necessary.
// @include http://letters.salon.com/*
// @version 0.0.1
// ==/UserScript==
//
// Shortcut function to evalute an XPath in the document
//
function xpath(query, sourceDoc) {
return document.evaluate(query, sourceDoc, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
}

// *BEGIN LETTER FILTER*
//
if (! LetterFilterOn) LetterFilterOn = true;
if (! document.getElementById('letter_source_container') && ! document.getElementById('letters_send_msg') && LetterFilterOn != 'false' && killfile.length != 0 && killfile.search(/^authors$/) == -1) LetterFilterOn = true;
else LetterFilterOn = false;
if (LetterFilterOn) {
myregexp = new RegExp(killfile.replace(/, */g, "|"), "i");
//alert(myregexp);
var allLets, thisLet, allAuthors, thisAuthor, allFooters, thisFooter, allHeads, thisHead;
allHeads = xpath("//div[@class='posts']/div[@class='letter']/h2[@class='headline md'] | //div[@class='posts']/div[@class='letter']/h3[@class='headline md']",document);
allLets = xpath("//div[@class='posts']/div[@class='letter']/div[@class='deck md']",document);
allAuthors = xpath("//div[@class='posts']/div[@class='letter']/div[@class='byline'] | //div[@class='posts']/div[@class='letter']/div[@class='byline premium']",document);
allFooters = xpath("//div[@class='letter_entry_footer']",document);
for (var i = 0; i < allLets.snapshotLength; i++) {
thisHead = allHeads.snapshotItem(i);
thisLet = allLets.snapshotItem(i);
thisAuthor = allAuthors.snapshotItem(i);
thisFooter = allFooters.snapshotItem(i);
var author = thisAuthor.innerHTML;
thisAuthor.innerHTML = "<span style='font-size:90%;color:black'>" + thisAuthor.innerHTML + "</span>";
if (myregexp.test(author)) {
mymatch = myregexp.exec(author);
thisLet.innerHTML = "<h2><b>Letter from " + mymatch + " deleted</h2></b>" + thisFooter.innerHTML;
thisHead.innerHTML = "";
thisFooter.innerHTML = "";
thisAuthor.innerHTML = "";
//thisLet.innerHTML = "";
}
}
}

// *BEGIN REFORMATTING*
//
// change color and increase size of author's name if Letter Filter didn't run
if (! LetterFilterOn) {
allAuthors = xpath("//div[@class='posts']/div[@class='letter']/div[@class='byline'] | //div[@class='posts']/div[@class='letter']/div[@class='byline premium']",document);
for (var i = 0; i < allAuthors.snapshotLength; i++) {
thisAuthor = allAuthors.snapshotItem(i);
thisAuthor.innerHTML = "<span style='font-size:90%;color:black'>" + thisAuthor.innerHTML + "</span>";
}
}

// ad remover
var allAds, thisAd;
allAds = xpath("//div[@class='ad_content'] | //div[@id='ad_Top']",document);
for (var j = 0; j < allAds.snapshotLength; j++) {
thisAd = allAds.snapshotItem(j);
thisAd.innerHTML = "";
}

// save the letters help section and place it before the letters
var allBoxes, helplist,helpbox, letters;
allBoxes = xpath("//div[@class='box']",document);
helplist = allBoxes.snapshotItem(1).innerHTML;
helpbox = document.createElement('div');
helpbox.class = "box";
helpbox.innerHTML = helplist
letters = document.getElementById('letters_archive');
if (letters) {
letters.parentNode.insertBefore(helpbox, letters);
}

// remove the irrelevant second and third columns
var allCols, thisCol;
allCols = xpath("//div[@id='col2'] | //div[@id='col3']",document);
for (var k = 0; k < allCols.snapshotLength; k++) {
thisCol = allCols.snapshotItem(k);
thisCol.innerHTML = "";
}

// Function to make global changes in style
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}

// change link colors
addGlobalStyle('a:link {color:#0088FF ! important; }');
addGlobalStyle('a:visited {color:orange ! important; }');
addGlobalStyle('a:hover {color:rgb(0,0,255) ! important; }');

// change width of letter components
addGlobalStyle('p {width:650px ! important; }');
addGlobalStyle('blockquote {width:650px ! important; }');
addGlobalStyle('h2 {width:650px ! important; }');
addGlobalStyle('h3 {width:650px ! important; }');
addGlobalStyle('li {width:650px ! important; }');

// format the <li> HTML tag so it gives bullet points instead of garbage
var thisList, allLists;
allLists = xpath("//div[@class='posts preview']/div[@class='letter clearfix']/div[@class='deck md']/ul/li | //div[@class='posts']/div[@class='letter']/div[@class='deck md']/ul/li",document);
if (allLists.snapshotItem(0)) {
for (var m = 0; m < allLists.snapshotLength; m++) {
thisList = allLists.snapshotItem(m);
thisList.style.marginLeft = "25px";
thisList.style.listStyleType = "disc";
thisList.style.listStylePosition = "outside";
}
}

// remove huge navigation panel at top and bottom of page
xpath("//div[@class='sitemap_wrap']",document).snapshotItem(1).innerHTML = "";

var header = document.getElementById('header');
header.innerHTML = "";

// remove the harsh red background from the copyright section at the bottom of the page
var foot = document.getElementById('footer_inner');
foot.style.backgroundColor = 'white';

// *Reformat the letter posting page
// expand the space for the letter subject
var theSize, newSize;
theSize = document.getElementById('letter_subject');
if (theSize) {
newSize = document.createElement("input");
newSize.type = 'text';
newSize.setAttribute('size','70');
newSize.value = theSize.value;
newSize.id = 'letter_subject';
newSize.name = 'subject';
theSize.parentNode.replaceChild(newSize, theSize);
}

// expand the area for the letter body
var theTextarea, newTextarea;
theTextarea = document.getElementById('letter_body');
if (theTextarea) {
newTextarea = document.createElement("textarea");
newTextarea.setAttribute('rows','20');
newTextarea.setAttribute('cols','70');
newTextarea.value = theTextarea.value;
newTextarea.id = 'letter_body';
newTextarea.name = 'body';
theTextarea.parentNode.replaceChild(newTextarea, theTextarea);
}

// remove the gray background from the letter preview
pre = document.getElementById('letters_archive');
if(pre) pre.style.backgroundColor = 'white';

// make all URLs in letter body clickable links
var isURL = new RegExp("[a-z]+://[a-z0-9_-]+\\.[a-z0-9_#%&\?\/.,;:!'~=+-]+", "ig");
var isLink = new RegExp("http://static\\.open\\.salon\\.com", "i");
var allTexts, thisText, p;
allTexts = xpath("//div[@class='posts']/div[@class='letter']/div[@class='deck md']/* | //div[@class='posts preview']/div[@class='letter clearfix']/div[@class='deck md']/*",document);
if (allTexts.snapshotItem(0)) {
for (var n = 0; n < allTexts.snapshotLength; n++) {
thisText = allTexts.snapshotItem(n);
if (isURL.test(thisText.innerHTML)) {
myURLs = thisText.innerHTML.match(isURL);
for (p = 0; p < myURLs.length; p++) {
myURL = new String(myURLs[p]);
if (isLink.test(myURL)) break;
myURL = myURL.replace(/(\&gt;.?|[.,:;'!]+)$/,"");
newURL = myURL.replace(/([.?])/g,"\\$1");
var oldURL = new RegExp(newURL,"i");
thisText.innerHTML = thisText.innerHTML.replace(oldURL,'<a href="' + myURL + '">' + myURL + '</a>');
}
}
}
}

//
//END CODE

Tuesday, November 10, 2009

Optional Additional Code for Salon Letter Filter beta

The following additional code can be added to the Salon Letter Filter beta greasemonkey script to correct deficiencies in the Salon formatting:

1) Mark visited links — The letter page formatting does not mark links that have been visited. This means that you cannot tell which pages of the letter commentary you have read and which you haven't. If you navigate away from the page or close your browser you have to remember which page you were on when you come back. This can be fixed with the following code, which can simply be copied and pasted at the end of the Salon Letter Filter beta script:

function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle('a:link {color:blue ! important; }');
addGlobalStyle('a:visited {color:orange ! important; }');


2) Remove Navigation panel at the bottom of letter pages — A huge amount of space at the bottom of each letter page is taken up with a navigation panel that will take you almost anywhere in Salon. For most people it is simply a distraction. It can be removed by adding the following line of code to the Salon Letter Filter beta script:

xpath("//div[@class='sitemap_wrap']",document).snapshotItem(1).innerHTML = "";

Be sure to copy the entire line of code since you can't see the end of it because of blogger's page layout.

3) Remove the second and third columns containing “Most Active Letter Threads” (the scoreboard) and “Currently in Salon” — The size of the letter area has been considerably reduced by the need of the “business model” to include graphic links to everything else on Salon. You can get rid of these two additional columns that are mostly merely distracting from the letters by adding the following code to the greasemonkey script:

var allCols, thisCol;
allCols = xpath("//div[@id='col2'] | //div[@id='col3']",document);
for (var k = 0; k < allCols.snapshotLength; k++) {
thisCol = allCols.snapshotItem(k);
thisCol.innerHTML = "";
}

Unfortunately, this will also remove the “Letters Help” box in the second column, which might actually prove useful, but you can't have everything. I'll try to find a way to put the “Letters Help” back somewhere unobtrusive.

4) Preserve the “Letters Help” box — the following code will preserve the help box for letters and place it unobtrusively before the letter archive:

var allBoxes, helplist,helpbox, letters;
allBoxes = xpath("//div[@class='box']",document);
helplist = allBoxes.snapshotItem(1).innerHTML;
helpbox = document.createElement('div');
helpbox.class = "box";
helpbox.innerHTML = helplist
letters = document.getElementById('letters_archive');
if (letters) {
letters.parentNode.insertBefore(helpbox, letters);
}

WARNING: This code must be placed before the code given in section 3) above. You have to snarf the letters help box before you trash column 2.

5) Remove the red background from the copyright notices at the bottom of the page — The hideous and stressful red background to the copyright notice at the bottom of the letter pages can be removed with the following two lines of code:

var foot = document.getElementById('footer_inner');
foot.style.backgroundColor = 'white';


6) Spread the letter text across the page — Now that columns 2 and 3 have been removed it is possible to spread the letters across the page to make them more readable. The following code will accomplish this:

addGlobalStyle('p {width:700px ! important; }');
addGlobalStyle('blockquote {width:700px ! important; }');
addGlobalStyle('h2 {width:700px ! important; }');

These lines will work only if the addGlobalStyle() function defined above in 1) has been included. Otherwise you will have to copy the function from 1) and paste it into the script before these lines will work.

I have set the width in pixels at 700. This is the width I find most comfortable for the browser width that I use. You can make the lines longer or shorter just by changing the number to suit your own preference.


That's all for now, but stay tuned for further developments.

Tuesday, September 15, 2009

Salon Letter Filter Script beta

[(11/10/09) Salon has again changed its Letter format in conformance with its new beta page layout. Presumably this change will be permanent]

Salon has changed the format of their letters pages, obviously in order to make them even less readable than they were before, and the earlier Salon Letter Filter Greasemonkey script no longer works. Here is the text of a revised script that should function until Salon changes the format again. To install, copy everything between //BEGIN CODE and //END CODE into a text file (do not copy //BEGIN CODE and //END CODE). Name the text file salonletterfilterbeta.user.js and save it. If you already have Salon Letter Filter installed, you do not need to uninstall it before installing the new file. Simply open the new file in your browser (you can drag and drop). If Greasemonkey is installed and active, when you open the file a Greasemonkey dialog will appear asking if you want to install the script. Click on install.
Alternatively, if you think you know what you are doing, you can simply edit the installed script and replace those lines of code that have been changed with the new ones.

IMPORTANT: Your file name must end with .user.js for Greasemonkey to recognize it as a user script.

Do not panic if it appears that the lines of code end in midair on the blog page. It is all there even if it doesn't display because of the Blogger page layout. Simply select the code, copy it, and paste it into a new text file. Notepad or some other fairly simple text editor is recommended for this.
This version also removes ads from Salon Letter pages. If you actually prefer to see the ads, simply remove the code at the end that begins with “// ad remover”.
There is also an enhancement that increases the size of the poster's name slightly to make it easier to see. If you prefer the original setting, edit the file and put “//” at the beginning of the line that begins “thisAuthor.innerHTML = "<span style=”.
The greasemonkey script for the letter filter is no longer available as a download. To install it, you must copy the code from here into a file on your own computer. We regret the inconvenience.

//BEGIN CODE
//
// MANUAL CONFIGURATION REQUIRED
//
// To configure the letters filter, you must have a "killfile" variable configured.
// A template for this variable is given below. The "killfile" varable includes a
// comma-delimited string of the nyms of the authors that you wish to filter out.
// A sample "killfile variable configuration looks like:
//
// new String(killfile = 'author1,author2,author3');
// or
// new String(killfile = 'author');
//
// Simply replace the word "authors" in the template below with the nyms of the authors you
// wish to expunge, each one separated by a comma, and save the file.
// Entries are case insensitive. Since the "killfile" will become a regular expression,
// regular expression metacharacters (such as "." or "+") appearing in a nym should be
// preceded by a backslash ("\"; e.g., 'L\.W\.M\.') in order to work properly.
//
new String(killfile = 'authors');
if (killfile.length == 0) exit;
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.
//
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "Letter_Filter", and click Uninstall.
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name Salon Letter filter beta
// @author Frankly, my dear, ...
// @namespace http://language-grammar.blogspot.com/2009/09/salon-letter-filter-script-version-002.html
// @description Filter letters from Salon. WARNING: manual configuration required. Before use you must edit the script and enter your "killfile" in the string variable near the top of the script.
// @include http://letters.salon.com/*
// @version 0.0.1
// ==/UserScript==

//
// Set debug to 1 to see debug output in Javascript console
//
var debug = 1;
//
// Only print information to console if debug is on
//
//function myGM_log(args) {
// if (debug == 1) {
// GM_log(args);
// }
//}

//
// Shortcut function to evalute an XPath in the document
//
function xpath(query, sourceDoc) {
return document.evaluate(query, sourceDoc, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
}

myregexp = new RegExp(killfile.replace(/, */g, "|"), "i");
//alert(myregexp);
var allLets, thisLet, allAuthors, thisAuthor, allFooters, thisFooter, allHeads, thisHead;
allHeads = xpath("//div[@class='posts']/div[@class='letter']/h2[@class='headline md']",document);
allLets = xpath("//div[@class='posts']/div[@class='letter']/div[@class='deck md']",document);
allAuthors = xpath("//div[@class='posts']/div[@class='letter']/div[@class='byline'] | //div[@class='posts']/div[@class='letter']/div[@class='byline premium']",document);
allFooters = xpath("//div[@class='letter_entry_footer']",document);
for (var i = 0; i < allLets.snapshotLength; i++) {
thisHead = allHeads.snapshotItem(i);
thisLet = allLets.snapshotItem(i);
thisAuthor = allAuthors.snapshotItem(i);
thisFooter = allFooters.snapshotItem(i);
var author = thisAuthor.innerHTML;
thisAuthor.innerHTML = "<span style='font-size:90%;color:black'>" + thisAuthor.innerHTML + "</span>";
if (myregexp.test(author)) {
mymatch = myregexp.exec(author);
thisLet.innerHTML = "<h2><b>Letter from " + mymatch + " deleted</h2></b>" + thisFooter.innerHTML;
thisHead.innerHTML = "";
thisFooter.innerHTML = "";
thisAuthor.innerHTML = "";
//thisLet.innerHTML = "";
}
}
// ad remover
var allAds, thisAd;
allAds = xpath("//div[@class='ad_content' | //div[@id='ad_Top']",document);
for (var j = 0; j < allAds.snapshotLength; j++) {
thisAd = allAds.snapshotItem(j);
thisAd.innerHTML = "";
}
//END CODE

Sunday, September 13, 2009

Latin for Bloggers


[Author’s note: I started this contribution more than two years ago, but had to set it aside for more urgent undertakings (like a filter for Salon letters), but the recent posting by Joe Klein on Time’s Swampland blog in which he casually inserted what he apparently thought was a Latin phrase, *ad nauseum (I say apparently because he put the phrase in italics, indicating that he didn't consider it English). Since this solecism, while extremely common on blogs, now has the imprimatur of Time Magazine (presumably Swampland doesn’t have an editor, or at least not one familiar with Latin), it is clearly time to dust off this little excursus on the misuse of Latin by bloggers in hopes of, if not encouraging the miscreants to mend their ways and look up things that they don't know (after all it is hard to change the habits of a lifetime), at least heaping well-deserved ridicule and scorn on their pretentiousness.]

Yeah, I know — this blog is supposed to be about English. But English is a voracious language that accepts not only unlimited loan words but also takes over foreign words and phrases wholesale. In fact, according to James D. Nicoll:
We don’t just borrow words; on occasion, English has pursued other languages down alleyways to beat them unconscious and rifle their pockets for new vocabulary.
— James D. Nicoll


But I digress. Not only was English syntax consciously remodeled after Latin in the 17th and 18th centuries, but the prestige of the classical languages led to a great number of neologisms based on Latin and Greek roots as well as many loanwords taken directly from the classical languages. Indeed, many common abbreviations used in writing were based on Latin phrases (i.e., e.g., loc. cit., etc.). By contrast, English's sister language rejected most of the Latin/Greek etymologies and instead calqued (loan translated) the English into German (E. rhinoceros [‘nose horn’], G. Näshorn; E. exposition, G. Ausstellung; E. television, G. Fernseher, and so on) and uses German abbreviations rather than abbreviations of Latin (d.h., z.B., a.a.O., usw.).

The prestige of the classical languages has also ensured that many Latin phrases and expressions are used in English prose to give status to the author as an educated person (there was a time, not all that long ago, when a knowledge of Latin and Greek was simply the mark of an educated person; no one went to university without knowing Latin and Greek). Indeed, in many European universities dissertations were still written in Latin well into the twentieth century.

Latin (and to a considerably lesser extent Greek) expressions thus find their way into English prose, either because they are well known and familiar, or because writers wish to show, by their knowledge of Latin, that they are educated persons. What then of those who misuse Latin expressions in their writing? — get the wrong expression, misspell them, use the wrong case, or just generally demonstrate a complete lack of knowledge of Latin vocabulary, grammar, and syntax? If one is generous, one could just say that they made a mistake — everyone makes mistakes; if one is less generous, one might be inclined to say that they are trying to capitalize on the prestige generated by the use of Latin and mark themselves as knowledgeable and educated when, in fact, they lack the knowledge and education that they are implicitly claiming.

Here then are some of the most common mistakes to be found in the use of Latin by bloggers (and by blog commenters):

Habeas Corpus

  • Most common mistake: habeus corpus (Google gets about 112,000 hits for “habeus”, but is self-correcting in that a search for “habeus corpus” returns habeas corpus as well)
  • Reasons for the mistake:
    • Lack of knowledge of Latin plus a general belief that all Latin words end in -us or -um.
    • There is a natural linguistic tendency for making word pairs, especially when the words are foreign/not understood (i.e., nonsense), phonetically congruent. Thus ‘hocus pocus’, ‘abra cadabra’, ‘jibber-jabber’, and so on.
    • A pronunciation spelling since the final a of habeas is unstressed and hence pronounced as shwa (an uh-sound; [ə]) and thus phonetically matches the final syllable of corpus triggering the spelling of habeas as *habeus.
  • The correct form and interpretation:
    • The expression ‘habeas corpus’ is now fully English. There is no need to italicize it (although it frequently is) and it will be found in practically any dictionary of English. It represents the Latin habeās corpus, “produce the body,”, from habeās, second person sing. present subjunctive of habēre, ‘to have’ + corpus, ‘body.’
    • Using this expression cannot be considered a bid for prestige, since it has no English equivalent, there is no simple English phrase that expresses the concept; for the reason for this, see here. There is, however, no excuse for misspelling it if one is at all familiar with Latin.

Casus Belli

  • Most common mistakes: cassus belli, causus belli
  • Reasons for the mistakes:
    • It is difficult to characterize cassus belli as a mistake because the form cassus does occur in Latin. This is the result of a process that is fairly common cross-linguistically, usually known as metathesis of length or quantitative metathesis. This often involves two consecutive vowel sounds, one short and one long, where the length is transferred from one vowel to the other, but it also occurs between a long vowel and a following consonant so that the vowel is shortened and the consonant is lengthened (doubled). The basic form is cāsus so in living Latin the form cassus is a natural variant. As for English, it has no long vowels (although most speakers don't realize this), so if the pronunciation given by the OED is followed ([keɪsəs], i.e., with the same vowel sound as in English ‘case, cases’), then the spelling <casus> is likely. However, if the more common value of written a ([æ]) is used in imitation of Latin a then the spelling <cassus> is natural (compare the a-sounds in ‘plate’ and ‘platter’) and “cassus” is again a pronunciation spelling.
    • A secondary reason for the use of “cassus belli” is name recognition: Cassus Belli is a well-known rapper from Lyon.
    • The error “causus belli” comes from confusing Latin causa, “cause,” with Latin cāsus, “case,” and then making causa into *causus, again in the mistaken belief that all Latin words end in -us or -um, perhaps abetted by a faint memory of “casus belli.” This mistake is perhaps natural because cāsus bellī is frequently translated, or at least thought of, as “cause of war” rather than the more appropriate “case for war.” There is nothing wrong with causa bellī, “cause of war”; it is perfectly good Latin. But *“causus belli” is not.
  • The correct form and interpretation:
    • The correct English form is casus belli, representing the Latin cāsus bellī, “case for war.” It is usually italicized as a foreign phrase. The phrase came into use in the 17th and 18th centuries as as a technical term as part of the political “just war” doctrine. Anyone intending to wage a “just war” was expected to provide a cāsus bellī or a “case for war.” Thus the term comes from New Latin, rather than from the living language of the classical period and hence “cassus belli” is not a natural variant. The technical term chosen was cāsus bellī and that is what the correct term is. While causa bellī is good Latin, it also is not the technical term used in connection with the “just war” doctrine. And *“causus belli” is nothing but a mistake, pure and simple.

Ad Nauseam

  • Most common mistake: ad nauseum (although I confess to having seen ad nauseaum at least once)
  • Reasons for the mistake:
    • Lack of knowledge of Latin plus a general belief that all Latin words end in -us or -um plus analogy to similar phrases, such as ad infinitum, that properly have the case ending -um.
  • The correct form and interpretation:
    • This one is really a no-brainer. The Latin word for ‘nausea’ is — surprise, surprise — nausea; the preposition ad when it expresses motion governs the accusative case; the accusative singular of nausea is nauseam. Therefore, the correct expression is ad nauseam, “to the point of disgust/revulsion/nausea.”
    • The expression is actually a shortening of a term from logic, argumentum ad nauseam, in which an argument is repeated over and over until your opponent just gets sick of hearing it. There are many such terms based on the argumentum ad … format, and, since many Latin nouns are second declension masculines or neuters and since the accusative singular of both masculine and neuter second declension nouns is -um, those who are unfamiliar with Latin may be led to believe that the object noun in this construction always ends in -um. However, everyone is familiar with the expression argumentum ad hominem (often shortened to ad hominem, but, interestingly enough, never seen as *“ad hominum”) so everyone has the means at their disposal to disprove this belief and realize that the -um ending in this formula is not invariant. Moreover, there are a sufficient number of first declension feminines used in this formula (argumentum ad consequentiam “to the consequence”, ad crumenam “to the purse”, ad ignorantiam “to ignorance”, ad logicam “to logic”, ad misericordiam “to pity”, etc.) that it should be obvious to anyone with any familiarity with Latin or logic or even English that there are more endings than -um possible in the argumentum ad … formula.

I'll call a halt to this here, but there are, needless to say, many other Latin phrases that can be, and are, abused regularly. These are just three of the most common abuses, seen on an almost daily basis and done by those who ought to know better. There is no excuse for this, especially when there are numerous lists of common Latin phrases available on the intertubes. Wikipedia has one and while Wikipedia may not alway be reliable on controversial issues, for straightforward matters of fact they are pretty good. If you don't want to use Wikipedia, there is always “The Google” and you can simply Google “list of Latin phrases” and take your choice.

A writer's use of Latin phrases here and there is expected to give his or her work a certain cachet and accord the writer a certain amount of respect for his or her knowledge and education. But nothing screams ignorance and incompetence more loudly than misusing the very devices meant to demonstrate knowledge and competence.


###

Tuesday, July 21, 2009

Joseph K. meets Alice

...in Wonderland [sic] where they exchange "war" [sic] stories about their own experiences with authority run amok. (Anonymust)

One trial makes you larger,
And one trial makes you small,
And the ones that Obama ordered,
Isn't really a trial at all,
Go ask Ali, when he was just small.

And if you go chasing terrorists,
And you know you're going to fall,
Tell them a Yoo-bah written memo,
Has given you the call,
Call Khalid, when he was ten feet tall.

When the Uighurs in the prison,
Get up and tell you where to go,
And you've just tried to stop due process,
And your court date is moving slow.
Go ask Al Marri, I think he'll know.

When law and due process,
Have all fallen slowly dead,
And the Audacity of Hope is talking backwards,
And the OLC has lost it's head,
Remember, what the AG said,

Reason has fled,
The law is dead.

Wednesday, July 8, 2009

Let the government define?

It's up the Bush Administration,and now the Obama Administration to define words, and NPR's ( & other "journalists") job to adopt those definitions unchallenged? Sheez!!! She actually said that!? Had to listen to it twice, to make sure I heard that.

Re the latest proposed travesty, (as I said back in '01) somebody should inform these depraved a-holes that Kafka didn't intend to write a #!&^#@!!! how-to manual.

-- mikeinportc

Wednesday, July 8, 2009 12:11 PM

The above comment appeared in a comment thread which accompanies a typically hard-hitting Greenwald post. I was inspired to respond that perhaps we should parody an "official" government-sponsored dictionary.

Please feel free to add the most odious and officious definitions and euphemisms that you have heard of-- or are willing to invent-- in the comments here.

Saturday, April 4, 2009

Salon Letter Filter Script

[WARNING: This script can no longer be used due to changes in Salon's Letter format. The new script is here.]
[On 11/10/09 Salon again changed the format of their letter pages. A new script to filter Salon letters is again available here. The old code is left here in case Salon changes the format back again.]
For those who have been unable to install the Salon Letter Filter Greasemonkey script from the link to the file, here is the text of the script. To install, copy everything between //BEGIN CODE and //END CODE into a text file (do not copy //BEGIN CODE and //END CODE). Name the text file salonletterfilter.user.js and save it. Open the file in your browser (you can drag and drop). If Greasemonkey is installed and active, when you open the file a Greasemonkey dialog will appear asking if you want to install the script. Click on install.

IMPORTANT: Your file name must end with .user.js for Greasemonkey to recognize it as a user script.

Do not panic if it appears that the lines of code end in midair on the blog page. It is all there even if it doesn't display because of the Blogger page layout. Simply select the code, copy it, and paste it into a new text file. Notepad or some other fairly simple text editor is recommended for this.
//BEGIN CODE
//
// MANUAL CONFIGURATION REQUIRED
//
// To configure the letters filter, you must have a "killfile" variable configured.
// A template for this variable is given below. The "killfile" varable includes a
// comma-delimited string of the nyms of the authors that you wish to filter out.
// A sample "killfile variable configuration looks like:
//
// new String(killfile = 'author1,author2,author3');
// or
// new String(killfile = 'author');
//
// Simply replace the word "authors" in the template below with the nyms of the authors you
// wish to expunge, each one separated by a comma, and save the file.
// Entries are case insensitive. Since the "killfile" will become a regular expression,
// regular expression metacharacters (such as "." or "+") appearing in a nym should be
// preceded by a backslash ("\"; e.g., 'L\.W\.M\.') in order to work properly.
//
new String(killfile = 'authors');
if (killfile.length == 0) exit;
//
// --------------------------------------------------------------------
//
// This is a Greasemonkey user script.
//
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/
// Then restart Firefox and revisit this script.
// Under Tools, there will be a new menu item to "Install User Script".
// Accept the default configuration and install.
//
// To uninstall, go to Tools/Manage User Scripts,
// select "Letter_Filter", and click Uninstall.
//
// --------------------------------------------------------------------
//
// ==UserScript==
// @name Salon Letter filter
// @author Frankly, my dear, ...
// @namespace http://language-grammar.blogspot.com/2009/04/filter-for-salon-letters.html
// @description Filter letters from Salon. WARNING: manual configuration required. Before use you must edit the script and enter your "killfile" in the string variable near the top of the script.
// @include http://letters.salon.com/*
// @version 0.0.1
// ==/UserScript==

//
// Set debug to 1 to see debug output in Javascript console
//
var debug = 1;


//
// Only print information to console if debug is on
//
function myGM_log(args) {
if (debug == 1) {
GM_log(args);
}
}


//
// Shortcut function to evalute an XPath in the document
//
function xpath(query, sourceDoc) {
return document.evaluate(query, sourceDoc, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
}

myregexp = new RegExp(killfile.replace(/, */g, "|"), "i");
myGM_log(myregexp);
var allLets, thisLet, allAuthors, thisAuthor, allFooters, thisFooter;
allLets = xpath("//li[@class='letter_node']",document);
allAuthors = xpath("//div[@class='letter_entry_author'] | //div[@class='letter_entry_author premium']",document);
allFooters = xpath("//div[@class='letter_entry_footer']",document);
for (var i = 0; i < allLets.snapshotLength; i++) {
thisLet = allLets.snapshotItem(i);
thisAuthor = allAuthors.snapshotItem(i);
thisFooter = allFooters.snapshotItem(i);
var author = thisAuthor.innerHTML;
if (myregexp.test(author)) {
mymatch = myregexp.exec(author);
thisLet.innerHTML = "<h3><b>Letter from " + mymatch + " deleted</h3></b>" + thisFooter.innerHTML +"<hr>";
//thisLet.innerHTML = "";
}
}
//END CODE

Friday, April 3, 2009

A Filter for Salon Letters (Important Update below — 9/15/09) (Updated again — 11/10/09)

In view of the vitriolic and acerbic nature of the comment section of Glenn's recent postings at UT, many commenters have asked for a filter to remove certain authors' letters from the comment thread. It got so bad, that one commenter was ready to kill:
Baring that, I'd kill for a "ignore" or "filter" option. At least that way I can completely skip the crap and not waste the time and bytes downloading text I'm not going to read.
KB4Hire

At the time, I said that I was too busy to take the necessary steps to produce such a filter, but this is the kind of simple programming task that I just can't pass up. So I brushed up my javascript and read a book on Greasemonkey and then wasted a day of my life writing a Q&D® filter to remove letters from specified authors from comments pages. It turns out it was about as simple as I predicted. And while it doesn't save on downloading, because you have to download the letters before you check and eliminate them, it does mean that you don't have to read the vitriol and invective that some people seem to be incapable of excluding from their writing. This will be a boon to those with peptic ulcers and high blood pressure.

The file is salonletterfilter.user.js, and, if you already have the Greasemonkey add-on for Firefox installed and active, it can be installed simply by clicking on the file name and selecting "Install" when the Greasemonkey dialog panel appears. If you don't already have Greasemonkey, install it by clicking on the link. If you're using Internet Explorer, eat your heart out.

Note that there is some manual configuration necessary to make the script functional. After installing the script, open the Greasemonkey "Manage User Scripts" dialog either by right-clicking on the Greasemonkey icon in the status bar at the bottom of your browser window or from the browser's "Tools" menu. Once the dialog panel is open, select "Salon Letter Filter" and click on "Edit". This will open the script in your designated text editor. Then go to the first line of the script that is not a comment (i.e., does not begin with "//") and replace the word "authors" with your kill list. Use a comma to separate individual authors if you want to exclude more than one author. Save the file, and the next time you open a Salon letters page, letters from the authors listed in "killfile" will be deleted.

The configured version is fairly "polite" in that it leaves behind a notice that a letter from a particular author has been deleted, the permalink to the message (as an icon) and the datestamp. As a less polite option, there is also a more vicious version that removes letters completely. To implement this, edit the script and in the last line of the code (//thisLet.innerHTML = "";) delete the "//" at the beginning. Unwanted letters will disappear without a trace.

You can, of course, retrieve deleted letters by editing the "killfile" variable at any time. And there is no need to uninstall the script if you no longer wish to have a killfile. Simply set the variable "killfile" to an empty string ('') and the script will stop. The only thing to keep in mind is that the "killfile" variable is used to create a regular expression so regular expression metacharacters have to have a backslash ("\") in front of them for the script to work properly.

[Disclaimer: No warranty, expressed or implied, is associated with this script. The use of this script is entirely at the user's risk. This offer void where prohibited by law.]

UPDATE: While we were sleeping, Salon changed the format of their letters pages (obviously to make them less readable than they were before). This means that the old version of the Salon Letters Filter no longer works. I have revised the Greasemonkey script and it is still available through the link above in this posting. In order to install the new version you will have to first delete the old one. For those who are unable to access the script through the link, the text of the new script is now available.

LATER UPDATE: Salon has mercifully restored the previous letters settings. There is now no need for version 0.0.2 of the Salon Letter Filter and the original version works fine. That is all.

STILL LATER UPDATE: Salon has now changed the format of their letter pages in conformance with their new beta "business model". This change is likely to be permanent. The text of the new script for the beta layout is now available. The link to a downloadable version of the script no longer works.

Thursday, March 19, 2009

The Earnestness of being Important

Twice in the current month a poster at UT has criticized Glenn's use of sentence initial "most importantly", insisting, rather pedantically, that the "correct" form is "most important":
Usage

"Importantly" means "in an important manner." Thus, the phrase "most important" should replace your frequent "most importantly."
Monday, March 9, 2009 11:00 AM

and
Usage

Glenn writes:

UPDATE II: Rather oddly, the NYT article I quoted above, by David Herzsenhorn, has been moved on the NYT site and is now at this link (see here). Most importantly, it has been re-written to reflect that fact that it was not Dodd who inserted the exception for past contracts:

"Importantly" means "in an important manner." The correct form is: "Most important, it has been rewritten..."
Wednesday, March 18, 2009 02:38 AM

However, despite the poster's certainty about the "correct" usage, the issue is not so clear-cut:
Usage note:
Both more important and more importantly occur at the beginning of a sentence in all varieties of standard English: More important (or More importantly), her record as an administrator is unmatched. Today, more importantly is the more common, even though some object to its use on the grounds that more important is an elliptical form of “What is more important” and that the adverb importantly could not occur in such a construction. More importantly probably developed by analogy with other sentence-modifying adverbs, as curiously, fortunately, and regrettably.
Based on the Random House Dictionary
Dictionary.com

Usage Note: Some critics have objected to the use of the phrase more importantly in place of more important when one introduces an assertion, as in More importantly, no one is ready to step into the vacuum left by the retiring senator. But both forms are widely used by reputable writers, and there is no obvious reason for preferring one or the other.
The American Heritage® Dictionary of the English Language
Dictionary.com

importantly, adv.
1. In an important manner or degree; weightily, momentously.
Now esp. common as a kind of sentence adverb preceded by more or most; in some contexts it is interchangeable with important and so has the function of a quasi-adj. Cf. IMPORTANT a. 4.

Oxford English Dictionary (subscription required)

important, a.
4. Preceded by more or most: used as a kind of sentence adjective. Cf. IMPORTANTLY adv. 1.
This construction is discussed in R. Quirk et al. Gram. Contemp. Eng. (1972) §5.26 (p. 255).

Oxford English Dictionary (subscription required)

Either the adjectival more/most important or the adverbial more/most importantly may serve as a sentence adverb; both are Standard in this use: More [Most] important [importantly], we now have the right answer.
Bartleby.com

A nice analysis of the usage was written by Evan Jenkins for the Language Corner blog of the Columbia Journalism Review, which is worth quoting extensively here:
Important/Importantly
Important ? Well, Interesting

By Evan Jenkins

Steve Parrott, associate director (later director) for university relations at the University of Iowa, e-mailed to ask, “Please consider a few words on ‘more important / more importantly.’ ”

Okay. Mr. Parrott had in mind sentences or clauses that begin with one of those phrases, like “Most importantly, the charges are tied directly to the original topic Mr. Starr was supposed to investigate.”

The short answer is that either form of the word is acceptable. Merriam-Webster’s Dictionary of English Usage (1994) has a lengthy and interesting (really) discussion of the longstanding argument (really) over important vs. importantly, with many citations, and concludes that “both are defensible grammatically and both are in respectable use.”

The tilt here, though, is toward “importantly.” The adverb can stand alone at the start of a sentence or clause — without “more” or “most” or any other modifier — and the adjective can’t.

Try it. Drop the “most” from the example quoted above; the sentence still works. Then, with “most” gone, drop the “ly” from “importantly”; the sentence no longer works.

(Some mindless aversion to “ly” adverbs at the start of a sentence — an extension of misguided rigidity about “importantly”? — must have been at work in the following sentence, since no human being ever spoke this way: “Not surprising, a variety of polls indicate...”)

The arguments for “most important” are strained, as an e-mail discussion with the freelance copy editor Christy Goldfinch of Fort Worth made clear.

“Important” commonly fails to modify any specific part of its sentence, so the adjective advocates contend that it can be understood to modify the whole thing — a “sentence adjective.” Well, “importantly” can certainly be called a “sentence adverb.”

But with “importantly” there’s no need for that dance. The adverb has an element to grab hold of within its sentence, the verb or the overall predicate. (And that, quite apart from any “sentence adverb” justification, makes the literalists’ objection to “hopefully” at the start of a sentence fallacious, as well as outmoded.)

Another argument for “most important” is that the phrase “What is” is understood to precede it. If that were a natural supposition, all sorts of adjectives (with modifiers) could start sentences. But “Most happy, the storm ended,” just doesn’t make it.

The “most” approach is acceptable (not preferable) with the one adjective “important” not on logical grounds but because it is widely used and well established. And in passages that start with modifiers ending in “ly” — “equally” comes to mind — using “important” is handy.

So the consensus is clear. Either more/most importantly or more/most important is acceptable, but it is fairly clear that more/most important is the interloper here. Sentence initials are frequently used as absolutes (i.e., they modify the entire sentence rather than any particular part of the sentence). Generally speaking, such absolutes are usually adverbial (in what manner, by what means). To use more/most important as a sentence initial it must be considered elliptical for (What is) more/most important (is the fact that) ....

Furthermore, 'importantly' is a synonym of 'significantly'. It is quite natural to say "More significantly, there is no other choice available" — considerably more natural than saying "More significant, there is no other choice available." Initial adverbials used as absolutes are quite common (e.g., "regrettably, curiously, surprisingly). One would never think of replacing them with an adjective:

Regrettably, his attempt failed.
*Regrettable, his attempt failed.
Curiously, no one was bothered by this.
*Curious, no one was bothered by this.
Surprisingly, the meeting was well attended.
*Surprising, the meeting was well attended.


even though doing so could be considered elliptical for (What is) regrettable/curious/surprising (is the fact that) ....

Extending this to more/most expressions completes the analogy:

Regrettably, his attempt failed. More regrettably, he died in the attempt.
*Regrettable, his attempt failed. *More regrettable, he died in the attempt.
Curiously, no one was bothered by this. More curiously, some were even pleased by it.
*Curious, no one was bothered by this. *More curious, some were even pleased by it.
Surprisingly, the meeting was well attended. More surprisingly, no one left before the end.
*Surprising, the meeting was well attended. *More surprising, no one left before the end.

Thus the elliptical "(What is) {adjective} (is the fact that)..." model is unnatural and there is no doubt that more/most importantly is the original usage and that more/most important is no more than an accepted interloper.

Wednesday, February 18, 2009

At last! A president whose sentences might be diagrammed....





























From Jason Linkins at the Huffington Post...

Something that most people - even his political opponents - agree on is that President Barack Obama is a fairly gifted orator. On those occasions when he speaks extemporaneously, he still struggles with vocalized pauses - those lengthy "Uhhmmms" and "Errrrrs" - but in general, he can compose articulate sentences and typically does fine work with a prepared speech.

But is GRAMMAR, itself, in the tank for Obama? Apparently so, and all it takes to reveal this truth is a trip back to the most hated part of your middle school education: sentence diagramming. [At left], blogger Garth Risk Hallberg diagrammed a sentence from Obama's recent press conference - coincidentally, his response to the question put to him by our own Sam Stein:

My view is also that nobody's above the law, and, if there are clear instances of wrongdoing, that people should be prosecuted just like any ordinary citizen, but that, generally speaking, I'm more interested in looking forward than I am in looking backwards.


You can read the rest of Linkin's post here, including some of Hallberg's analysis... the rest of Hallberg's post may be found here.

Wednesday, February 11, 2009

a new GOP-specific form of aphasia?

The inimitable Bob Cesa, at the Huffington Post, has published a litany of examples of how the Republican Party is losing its mind, its logic, sense of syntax, etc. Of course, this should not be a surprise, given the past eight years, when their party's leader was one of the most linguistically challenged politicians within memory.

After giving dozens of examples of plain lunacy-- including a very strange Bushism that was completely new to me and I thought I'd heard them all-- Cesca concludes with the following:

They have indeed totally lost their shpadoinkle and despite purely involuntary spikes in my blood pressure, it's so much fun to watch. By successfully debunking their lies, rising above their bait and merely presenting a contrast of character, President Obama is making the Republican A-listers appear small, petty and absolutely befuddled. They're frantically struggling to figure out how to counterpunch, so they're grabbing, borrowing or downright plagiarizing ideas from anywhere, irrespective of the general quality of the idea. And if the Republicans are at all interested in continued survival, someone they respect should probably smack their hands and scold: Drop that filthy Limbaugh quote! You don't know where it's been! [emphasis is mine]

But if this is their "voice" and they're satisfied with it, I for one welcome the new Republican "voice" and wish them a hearty and very sincere: Good luck with that.

Friday, January 23, 2009

Proof in Japan that we have truly entered a new phase...

We never could have expected to see a headline similar to this one during the Bush Years...

Japanese Use Obama's Speeches To Learn English

TOKYO — Aspiring English speakers in Japan have made President Barack Obama's book of speeches and accompanying CD a national best-seller.

In Aichi, central Japan, a Buddhist monk has reportedly been playing the president's speeches during his temple service. And dozens of students in an English-language class in Tokyo have been memorizing his 2004 Democratic Convention speech to improve their understanding and pronunciation.

Click here to read more.