2

I have written a paper using LaTeX. My supervisor wishes to use US English for our paper to submit to an American journal. However, I'm based in New Zealand and have written the entire paper in LaTeX using UK spellings. I'd rather not fix these changes manually (or one-by-one if copy pasted to MS Word).

I am looking for:

  1. A LaTeX package to spell-check or automatically substitute US spellings.

  2. A LaTeX macro that would spell-check or automatically substitute US spellings.

or,

  1. A method using my editor, kile, or another editor that would spell-check or automatically substitute US spellings.

I'm also considering a Bash (e.g., sed or awk) solution to convert all UK spellings to US spellings in a .tex document?

e.g.,

Generalise -> Generalize

Colour -> Color

Centre -> Centre

n.b. I currently compile PDFLaTeX with kile on Ubuntu 16.04 or Elementary OS 0.3 Freya but I can use another TeX compiler/package if there's a built-in fix elsewhere.

Thanks for your assistance.

A Feldman
  • 3,930
Tom Kelly
  • 417
  • Welcome! While generalise is acceptable UK spelling, so is generalize. Authour is incorrect. British spelling uses author always. Are you sure you are not using a different variant? In any case, I think you would have to write the sed yourself. There simply isn't a safe way of doing this. Note, too, that punctuation differs. So do the meanings of words. Using a certain spelling system may well cause your reader to disambiguate in accordance with the suggested form of English. That is probably not what you want. – cfr May 30 '16 at 03:22
  • 2
    Personally, I'd only Americanise my paper if it was accepted and the journal required it. Publishers typically impose house styles which don't map neatly onto any single variant of English. (At least, not one anybody else seems to recognise.) – cfr May 30 '16 at 03:25
  • Thanks I've been ghosting R/Bash/Tex forums for while, I figured time to take the plunge. I'd rather not re-invent the wheel if there's a script out there to tinker on. In NZ universities we can use both UK or US spellings as long as we're consistent when academic writing - conversationally, we've got a few quirks of our own. I’m not sure this arises so much from the journal as my previous supervisor preferring US English (he was a Fullbright scholar at Harvard for his PhD). – Tom Kelly May 30 '16 at 04:00
  • Sorry for the poor example, the paper is mathematical modeling of evolutionary genetics. Although I did google at length before using Authour (as some brits do). It doesn’t matter. I think most of the difference (one's I'll miss by eye anyway) are spellings generalise -> generalize, colour -> color, centre -> centerrather than terminology rubbish vs. trash or toilet vs. bathroom. Although the exceptions you've raise would make a sed script more complex so I'd appreciate if someone's already attempted it. I'll proof it again afterwards to check it of course :) – Tom Kelly May 30 '16 at 04:00
  • As for punctuation, let's see what the journal takes issue with, although the Oxford comma is more a matter ideology than geography here down under. Please clarify if you had other punctuation difference in mind, particularly if they are "find and replace-able". – Tom Kelly May 30 '16 at 04:04
  • Americans put punctuation within quotation marks even when not part of the quote, use double quotes for outer quotation marks and paper titles etc. Words such as quite have different meaning. So do things like moot point. These are the tricky ones because it isn't obvious you mean something else. A reader will figure out rubbish or toilet. They won't figure out moot point (probably) or quite good (almost certainly). – cfr May 30 '16 at 04:27
  • csquotes can help. – cfr May 30 '16 at 04:27
  • Thanks for the help, I don't think quotes are an issue here as most of my source material from prior work are equations/formulae. That's handy to bear in mind the future, particularly as I'm seeking future work in Japan where US English dominates. I had no idea moot point was regional, as a scientist it just strikes me as lawyer speak. As for the other case, this is rather formal writing and the kiwi variant of yeah nah pretty sweet as aye bro will be better avoided anyway :) Thanks for your assistance. Please let me know if anyone else has attempted to script or package this. – Tom Kelly May 30 '16 at 05:56
  • 4
    Please clarify the relationship of your posting to TeX, LaTeX, and friends. The way I read it, the posting is about modifying spelling and punctuation; if this impression is correct, your posting is off-topic for this site. – Mico May 30 '16 at 06:09
  • I would probably just use a good grammar checker, like Grammarly. I find this one very good, and you can select between British and American spelling. I do not have any affiliations with the site in any way, I just use it. It is free, and has a subscription for more pro feature, but I just use the free option. – Runar May 30 '16 at 06:12
  • 1
    Sorry but this is off topic here it's a general editing/spell checking issue (authour would be flagged by a UK english spell checker for example) – David Carlisle May 30 '16 at 08:27
  • @cfr -- minority report on "punctuation within quotes". i can produce legitimate examples in u.s. english where doing that is just plain wrong. and even though this question is off topic, i encourage the poster to stand firm on that point. (spelling is a different matter.) – barbara beeton May 30 '16 at 19:05
  • @barbarabeeton I just meant that, in general, it seems to be common in US punctuation - witness the csquotes/biblatex auto-punctuation options for US English. It seems illogical to me because it changes what is quoted, which is generally considered illegitimate. But it is easy to believe that parochial norms are the dictates of logic ;). – cfr May 30 '16 at 19:09
  • @cfr -- not only is the position of punctuation vs. quotes common in u.s. english, it's recommended by the *chicago manual of style". that doesn't mean they're always right. (i do feel strongly about this. i've been burned too many times by copyeditors blindly following illogical "rules". following logic is, well, more logical.) – barbara beeton May 30 '16 at 19:14
  • @Mico This document is in tex format. I welcome any LaTeX or Bash solutions as migrating to a MS Word tool would be tedious. This progressed to considering how to implement it myself. Advice or somewhere more relevant to post is welcome. – Tom Kelly May 31 '16 at 23:10
  • @barbarabeeton Thanks for considering grammar but it won't be necessary (as much as a general solution would be awesome). I've consulted a relative working in linguistics: NZ English mostly resembles American syntax and grammar. My paper quotes formulae, not quotes from previous work. I'm sure my editors can assist with this matter. Automated solution would be for spelling only. – Tom Kelly May 31 '16 at 23:14
  • There are both LaTeX and TeX ways of substituting words, and it seems the OP is asking about that. Not sure why this was closed as off topic. – A Feldman Jun 01 '16 at 00:22
  • @AFeldman Doing this with (La)TeX itself would be bonkers, wouldn't it? Possible, sure, but still bonkers. Much better to use sed/awk or similar. – cfr Jun 01 '16 at 03:11
  • 2
    You can switch the spell checker in Kile to American English and check which words need substituting to write your script or run Kile's search and replace. – cfr Jun 01 '16 at 03:12
  • Instead of spending time to invent some replacement script, save your time, turn on a US spell checker in your editor and change the words it finds, this will not be perfect, but neither will be your replacement script. And unless you are writing a few hundred pages, this should take less time than writing this question. – samcarter_is_at_topanswers.xyz Jun 01 '16 at 09:08
  • My point wasn't about whether this would be desirable to do. I'm not a linguist, and its not my TeX document. But it certainly is possible to do it with TeX, and the OP is asking about what is the TeX way to do something certain with his TeX document. I'm bewildered why it was closed as off topic. See http://tex.stackexchange.com/q/289713/90087 – A Feldman Jun 01 '16 at 13:42
  • Not to mention 742 results for spelling when searched, with almost none closed. – A Feldman Jun 01 '16 at 14:37
  • aspell, ispell, hunspell and derivatives are the way to go. There was even a en_GB-ise dictionary in aspell... – Paulo Cereda Jun 01 '16 at 15:16
  • Thanks to those who came up with TeX-specific solutions, I'll try a few out a see if I can make it work. This is precisely why I posted to a TeX forum first, I'm new to writing English LaTeX (primarily writing Math assignments in it) and unaware of existing spell-checkers. Hopefully these work larger documents as I am preparing more articles and a thesis. However, I also posted elsewhere once marked off-topic: the Bash solution is here for those interested. http://stackoverflow.com/questions/37557271/bash-script-utility-to-convert-uk-english-to-us-spellings-in-tex-document/37563989#37563989 – Tom Kelly Jun 01 '16 at 21:36

0 Answers0