diff options
author | Karl Berry <karl@freefriends.org> | 2013-02-13 23:22:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-02-13 23:22:28 +0000 |
commit | 469e41303044d048cec1de7cf5d814b9f2b5e52e (patch) | |
tree | 6c5aefbb73aa821e171c8beef63723044c2c5476 /Master/texmf-dist/tex | |
parent | a19e8fc23c74d8bb5f11c0fb7c135ab7e108c36a (diff) |
spelling (13feb13)
git-svn-id: svn://tug.org/texlive/trunk@29102 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/luatex/spelling/spelling.sty (renamed from Master/texmf-dist/tex/lualatex/spelling/spelling.sty) | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/lualatex/spelling/spelling.sty b/Master/texmf-dist/tex/luatex/spelling/spelling.sty index a060002fadf..d73661ee1ea 100644 --- a/Master/texmf-dist/tex/lualatex/spelling/spelling.sty +++ b/Master/texmf-dist/tex/luatex/spelling/spelling.sty @@ -1,5 +1,5 @@ %%% spelling.sty -%%% Copyright 2012 Stephan Hennig +%%% Copyright 2012, 2013 Stephan Hennig %% %% This work may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.3 of this license @@ -11,7 +11,7 @@ %% See file README for more information. %% \ProvidesPackage{spelling} - [2012/12/04 v0.2 Aid spell-checking (SH)] + [2013/02/12 v0.3 Aid spell-checking (SH)] \NeedsTeXFormat{LaTeX2e}[1999/12/01] % Test for the LuaTeX engine. \RequirePackage{ifluatex} @@ -38,13 +38,20 @@ % Provide command for reading-in a list of bad spellings. \newcommand*{\spellingreadbad}[1]{% \directlua{ - pkg_spelling_stage[1].read_bad_strings('\luaescapestring{#1}') + pkg_spelling_stage[1].parse_bad_plain_list_file('\luaescapestring{#1}') }% } % Provide command for reading-in a list of good spellings. \newcommand*{\spellingreadgood}[1]{% \directlua{ - pkg_spelling_stage[1].read_good_strings('\luaescapestring{#1}') + pkg_spelling_stage[1].parse_good_plain_list_file('\luaescapestring{#1}') + }% +} +% Provide command for reading bad spellings from a LanguageTool XML +% file. +\newcommand*{\spellingreadLT}[1]{% + \directlua{ + pkg_spelling_stage[1].parse_XML_LanguageTool_file('\luaescapestring{#1}') }% } % Provide command for enabling/disabling visual feedback. @@ -128,16 +135,12 @@ pkg_spelling_stage[3].set_table_paragraphs(\luaescapestring{#1}) }% } -% Try to read a list of bad spellings from file `\jobname.spb'. -\IfFileExists{\jobname.spb}{% - \spellingreadbad{\jobname.spb}% -}{% -} -% Try to read a list of good spellings from file `\jobname.spg'. -\IfFileExists{\jobname.spg}{% - \spellingreadgood{\jobname.spg}% -}{% -} +% +% Read bad and good spellings from default sources. +\directlua{ + pkg_spelling_stage[1].parse_default_bad_and_good() +}% +% % Enable visual feedback. \spellinghighlight{on} % Enable text ouput at the end of the LuaTeX run. |