[prev in list] [next in list] [prev in thread] [next in thread] 

List:       aspell-user
Subject:    Re: [Aspell-user] How to create and use an additional word list ?
From:       Kevin Atkinson <kevina () gnu ! org>
Date:       2011-09-27 1:08:36
Message-ID: alpine.BSF.2.00.1109261902300.13702 () bas ! flux ! utah ! edu
[Download RAW message or body]

Hi, I consider the first problem (\href [pdfstartview={FitH 0}] ..) a bug, 
and the second (\write 18) a limitation of the current filter.  If you 
have the time please file a bug report and feature request for the two 
problems so that I don't forget about them.

If you are willing to compile from source you might want to check out this 
patch from Matthias Franz:
   https://lists.gnu.org/archive/html/aspell-devel/2011-02/msg00000.html

I hope to incorporate his changes somehow in Aspell 0.60.7.

On Mon, 26 Sep 2011, Timothy Madden wrote:

> On 23.09.2011 20:27, Kevin Atkinson wrote:
>> On Fri, 23 Sep 2011, Timothy Madden wrote:
>> 
>>> Now I have the problem that I do not know how to add a tex-command on
>>> the command line to aspell list. As embedded in my .tex document, my
>>> current command to check my text is:
>>> 
>>> \write 18
>>> {
>>> aspell
>>> --encoding=utf-8
>>> --lang=en
>>> --add-extra-dicts=./\currfilebase.rws
>>> --mode=tex
>>> --add-tex-command="autoref p"
>>> --add-tex-command="nameref p"
>>> --add-tex-command="url p"
>>> --add-tex-command="href opP"
>>> --add-tex-command="hyperdef ppP"
>>> --add-tex-command="write pp"
>>> list<\currfilepath
>>> }
>>> 
>>> However something is wrong with the arguments because the arguments to
>>> all those LaTeX commands (autoref, nameref, url, href, hyperdef,
>>> write) are still being output by aspell list as being misspelled words.
>>> 
>>> What is the proper way to add a new TeX command on the aspell command
>>> line ?
>> 
>> What you have should work. I suggest you try it manually to isolate the
>> problem. When I spot checked it, things seamed to work.
>
> Indeed it seems to work for the most part, the problems are:
> 	- blocks within an argument
> 	- the \write18 TeX primitive
>
> For the first case, if I have --add-tex-command="href opP" (which means the 
> first 2 arguments to \href should not be checked) and the following text:
>
> \href [pdfstartview={FitH 0}] {./file.html} {Link Text}
>
> than it follows that `[pdfstartview={FitH 0}]` should not be checked. However 
> I find that aspell still checks the block inside it, {FitH 0}. This may be 
> desirable in some situations, but as this example shows, it can also be a 
> problem in others.
>
> Can this please be avoided ?
>
> For the second case, \write18, in TeX a number terminates the name of a 
> backslash command, so when I say \write18, what I really say is \write 18. 
> That is the `\write` command, with the (first) argument `18`. The `\write` 
> primitive in TeX has two arguments:
> 	- the write number, which is actually the file descriptor number
> 	- the string to be written to the given file.
>
> However in the case of file descriptor 18, the descriptor is not an actual 
> file, but a command line interpreter. That is, any data written to it in the 
> normal way starts the command interpreter to to carry out the data as a 
> command.
>
> So \write18 {cmd ...} is actually \write 18 {cmd...}
>
> The problem is that in either form aspell can not understand it as such, and 
> with any of --add-tex-command="write pp" or --add-tex-command="write18 p", 
> aspell wants to spell check {cmd ...} either way.
>
> The next step would be to try `\write {18} {cmd ...}` and see what aspell can 
> do. Such a form however is not accepted by TeX, which complains that {18} is 
> not a number. The only way to get it working was
> 	\newcommand {\shellcmd} [1] {\write 18 {#1}}
> The macro in turn may some implications related to LaTeX command expansion, 
> if for example the {cmd ...} has some brace '}' or pipes '|' characters in 
> the command line.
>
> Is there some way to make aspell understand `\write 18 {cmd ...}` ? Can this 
> be fixed ? Or can this case be documented in the tex mode/filter page in the 
> documentation ?
>
> Thank you,
> Timothy Madden
>
>
> _______________________________________________
> Aspell-user mailing list
> Aspell-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/aspell-user
>
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic