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/lualatex | |
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/lualatex')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/spelling/spelling.sty | 146 |
1 files changed, 0 insertions, 146 deletions
diff --git a/Master/texmf-dist/tex/lualatex/spelling/spelling.sty b/Master/texmf-dist/tex/lualatex/spelling/spelling.sty deleted file mode 100644 index a060002fadf..00000000000 --- a/Master/texmf-dist/tex/lualatex/spelling/spelling.sty +++ /dev/null @@ -1,146 +0,0 @@ -%%% spelling.sty -%%% Copyright 2012 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 -%% or (at your option) any later version. The latest version of this -%% license is in http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% See file README for more information. -%% -\ProvidesPackage{spelling} - [2012/12/04 v0.2 Aid spell-checking (SH)] -\NeedsTeXFormat{LaTeX2e}[1999/12/01] -% Test for the LuaTeX engine. -\RequirePackage{ifluatex} -\ifluatex -\else -\PackageError{spelling}{LuaTeX engine required}{You could try with the - `lualatex' command.} -\fi -\RequirePackage{ifthen} -\RequirePackage{luatexbase} -% Load main Lua file. -\directlua name {spelling}{ - % The main Lua file is not a module, so we must pass a full path to - % `dofile`. - local f = kpse.find_file('spelling.lua', 'lua') - dofile(f) -} -% Words are extracted after pages have been built. In lack of a proper -% Lua call-back, we're hooking into shipout from the LaTeX side. -\RequirePackage{atbegshi} -\AtBeginShipout{% - \directlua name {spelling-atbeginshipout}{cb_AtBeginShipout_pkg_spelling(\the\AtBeginShipoutBox)}% -} -% Provide command for reading-in a list of bad spellings. -\newcommand*{\spellingreadbad}[1]{% - \directlua{ - pkg_spelling_stage[1].read_bad_strings('\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}') - }% -} -% Provide command for enabling/disabling visual feedback. -\newcommand*{\spellinghighlight}[1]{% - \ifthenelse{\equal{#1}{on}}{% - \directlua{ - pkg_spelling_stage[2].enable_word_highlighting() - }% - }{% - \directlua{ - pkg_spelling_stage[2].disable_word_highlighting() - }% - }% -} -% Provide command for setting visual feedback colour. -\newcommand*{\spellinghighlightcolor}[1]{% - \directlua{ - pkg_spelling_stage[2].set_highlight_color('\luaescapestring{#1}') - }% -} -% Provide command for enabling/disabling text ouput. -\newcommand*{\spellingoutput}[1]{% - \ifthenelse{\equal{#1}{on}}{% - \directlua{ - pkg_spelling_stage[4].enable_text_output() - }% - }{% - \directlua{ - pkg_spelling_stage[4].disable_text_output() - }% - }% -} -% Provide command for setting text output file name. -\newcommand*{\spellingoutputname}[1]{% - \directlua{ - pkg_spelling_stage[4].set_output_file_name('\luaescapestring{#1}') - }% -} -% Provide command for setting text output file line length. -\newcommand*{\spellingoutputlinelength}[1]{% - \directlua{ - pkg_spelling_stage[4].set_output_line_length('\luaescapestring{#1}') - }% -} -% Provide command for setting text output EOL character. -\newcommand*{\spellingoutputeol}[1]{% - \directlua{ - pkg_spelling_stage[4].set_output_eol('\luaescapestring{#1}') - }% -} -% Provide command for enabling/disabling text extraction. -\newcommand*{\spellingextract}[1]{% - \ifthenelse{\equal{#1}{on}}{% - \directlua{ - pkg_spelling_stage[2].enable_text_tagging() - }% - }{% - \directlua{ - pkg_spelling_stage[2].disable_text_tagging() - }% - }% -} -% Provide command to declare code point mappings. -\newcommand*{\spellingmapping}[2]{% - \directlua{ - local r = pkg_spelling_stage[2].set_mapping(\luaescapestring{#1}, '\luaescapestring{#2}') - if r == false then - texio.write_nl('package spelling: invalid mapping: \luaescapestring{#1} => \luaescapestring{#2}') - end - }% -} -% Provide command to clear all existing code point mappings. -\newcommand*{\spellingclearallmappings}{% - \directlua{ - pkg_spelling_stage[2].clear_all_mappings() - }% -} -% Provide command to specify table paragraph behaviour. -\newcommand*{\spellingtablepar}[1]{% - \directlua{ - 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}% -}{% -} -% Enable visual feedback. -\spellinghighlight{on} -% Enable text ouput at the end of the LuaTeX run. -\spellingoutput{on} -% Enable text extraction. -\spellingextract{on} |