Iain Mac Donald wrote:
Hello Helge,

Thanks for the reply

On Thu, 2004-02-12 at 09:04, Helge Hafting wrote:


I haven't gotten this to work myself, but this is supposed to work by marking the stuff you don't want checked and changing it to some other
language than the language used in your document.
This doesn't work with ispell, but is supposed to work with aspell.


I am using a Debian binary which has a drop-down where I can select
ispell or aspell. However, I do not have a means under Layout/Paragraph
to select the language.

This is under layout->character, not paragraph. Because a paragraph may contain words in several different languages.

Maybe this is only available if, as you said,
aspell is compiled-in as an option? By the way - the users guide
suggests this feature is only possible with pspell.

It is always available, you may mark up your document with
languages all you want. But ispell will check everything with the language specified in layout->document anyway. I'm waiting for better
spellcheckers, marking up with language is wasted work as long as
it doesn't help.


I shudder at the thought of messing with the pspell/ispell/aspell again
as I was trapped in a Spellchecker Dependancies Hell for weeks last year
after upgrading Ximian Evolution!


Four ways of working around this problem:

1. Skipping code snippets manually - no changes to your documents.
When ispell find the first bad word in code, terminate spellchecking.


Yup. Do that currently.


2. Put code in separate documents
In the main document, use insert->include file
and specify "input" as the way of including the file containing lyxcode.


Ah! Thats a good idea. I shall try that. Though with a lot of ducuments
it might be tricky managing the files (particularly over many hosts).

3. Consider the listings package.  Currently, that means using
some latex, although support for this package is planned.
(Latex code isn't spellchecked)


Sounds good. What is it?
See http://www.ctan.org/tex-archive/macros/latex/contrib/listings/listings.pdf
It is a latex package that gives you pretty listings, either from source code files or from source code embedded in the document.
There are lots of examples in that pdf.



4. Take a look at the .tex file produced from a file containing lyx code.
The lyxcode part isn't that difficult. Write your code entirely in ERT
instead of using lyxcode. ERT isn't spellchecked, and you get everything in a single document.



This might just be the answer in the meantime. Copy the LyX-Code format and re-implement in ERT.

For existing documents, just open the .tex in a text editor, then cut & paste relevant parts into an ERT box in lyx. No rewriting. :-)

Helge Hafting



Reply via email to