About

I'm Mike Pope. I live in the Seattle area. I've been a technical writer and editor for over 30 years. I'm interested in software, language, music, movies, books, motorcycles, travel, and ... well, lots of stuff.

Read more ...

Blog Search


(Supports AND)

Google Ads

Feed

Subscribe to the RSS feed for this blog.

See this post for info on full versus truncated feeds.

Quote

You can safely assume that you've created God in your own image when it turns out that God hates all the same people you do.

— Anne Lamott



Navigation





<May 2018>
SMTWTFS
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

Categories

  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  

Contact

Email me

Blog Statistics

Dates
First entry - 6/20/2003
Most recent entry - 5/25/2018

Totals
Posts - 2499
Comments - 2574
Hits - 2,049,899

Averages
Entries/day - 0.46
Comments/entry - 1.03
Hits/day - 376

Updated every 30 minutes. Last: 1:38 PM Pacific


  08:28 AM

There are many reasons to use styles in Word, as I've noted before. One feature I find handy is using styles that have different spell-check options for different types of text. I'll explain a couple of examples: one where I set a non-default spell-check option (Spanish), and another where I disable spell check for code snippets.

Note: If you'd rather see this on video, see the links below.

Spell check for non-default languages

Suppose you're writing a document that has quotations in different languages. If you run spell check over the document, it'll barf when it gets to your citations in Spanish or French or Latin or whatever.[1]

The hard way to solve this problem is to select the text of each citation, one by one, and then to set the proofing language (Review tab > Language > Set Proofing Language).

The easier way to do it is to define a style and set the language for that style. Then you can just apply the style to your citations.

Suppose I'm writing about One Hundred Years of Solitude by Gabriel Garcia-Marquez:


I run spell check, and uh-oh: if it's going to stop on every word of Spanish, it's going to be a long night proofing this doc:


Instead, I'll create a style just for my quotations in Spanish. In this case, I'll create a paragraph style, although I can set language options for character styles also, which is useful for cites in running text.

Here's the Create New Style dialog. The new style is named Quotation in Spanish. It's a paragraph style, based on Normal, and I've set an indent.


Then in the Format options (bottom left), I choose Language:


For the language, I choose Colombian Spanish:


Now I can apply this style to any citations in the document that are in Spanish. When spell check gets to the citations, it switches to checking spelling in Spanish. (Which is handy, since I'm a bad typist in multiple languages.)


If the document contains text in several languages, you create a different style for each non-default language that you're using and apply them as needed.

Disabling spell check for selected text

I don't actually encounter a lot of Spanish citations in my work, but I do encounter a lot of snippets of program code and HTML. I also encounter filenames and URLs that are oddly spelled per English conventions. As with non-English text, this can throw spell check off. So I create a style for code and for HTML blocks and for filenames and for URLs. In those styles, I disable spell check altogether.

Skipping ahead, here's an example of what some sample text looks like when these styles have been applied:


There are 3 styles at work here. The green monospace marks a character style named Code. The blue italics mark a character style named Filename. And the indented block with gray background marks text that's styled using a paragraph style named Pre (a nod to the HTML element name for code blocks).

In addition to the various formatting settings that I defined for these styles (italics, blue, green, monospace, indented, etc.), in each case I chose the Language setting. Then in the Language dialog, I chose Do not check spelling or grammar:


When spell check runs, it skips over any text that has been styled using a style with this setting.

I should note that for code and HTML snippets, it can instead make sense to add the various keywords to your dictionary. (I do this for filenames that I encounter often.) However, defining a style that simply turns off spell check has been very handy for me in the code- and HTML-heavy documents that I work on.

Videos

I made a couple of videos about this also and put them on YouTube:
[1] I do realize that Word can be set to auto-detect languages, and that this works pretty well. But the method I describe here also covers scenarios where auto-detect doesn't work well. (Klingon? Dothraki? Etc.)

[categories]   ,

|