all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* ispell and LaTeX
@ 2003-07-30  6:15 Stefan M. Moser
  2003-07-30  8:25 ` Holger Sparr
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan M. Moser @ 2003-07-30  6:15 UTC (permalink / raw)


Hi everybody!

I would like to enhance the ispell of my emacs in such a way that it DOES NOT 
check certain (in general not often used) LaTeX-commands. For example, in

		\eqref{eq:labelname}

I want ispell to ignore "eq" and "labelname". To this aim I have found a variable 
called "ispell-tex-skip-alists" that should do exactly this. However, when I set 
the variable in my .emacs-file nothing happens at all. Could anybody give me a 
hint what I'm doing wrong?

Thanks!

Stefan

This is the entry in my .emacs-file:

(setq ispell-tex-skip-alists
   '((("%\\[" . "%\\]")
      ;; All the standard LaTeX keywords from L. Lamport's guide:
      ;; \cite, \hspace, \hspace*, \hyphenation, \include, \includeonly, \input,
      ;; \label, \nocite, \rule (in ispell - rest included here)
      ("\\\\addcontentsline"              ispell-tex-arg-end 2)
      ("\\\\add\\(tocontents\\|vspace\\)" ispell-tex-arg-end)
      ("\\\\\\([aA]lph\\|arabic\\)"       ispell-tex-arg-end)
      ("\\\\author"                       ispell-tex-arg-end)
      ("\\\\bibliographystyle"            ispell-tex-arg-end)
      ("\\\\eqref"                        ispell-tex-arg-end)
      ("\\\\makebox"                      ispell-tex-arg-end 0)
      ;;("\\\\epsfig"            ispell-tex-arg-end)
      ("\\\\document\\(class\\|style\\)" .
       "\\\\begin[ \t\n]*{[ \t\n]*document[ \t\n]*}"))
     (;; delimited with \begin.  In ispell: displaymath, eqnarray, eqnarray*,
      ;; equation, minipage, picture, tabular, tabular* (ispell)
      ("\\(figure\\|table\\)\\*?"  ispell-tex-arg-end 0)
      ("list"                      ispell-tex-arg-end 2)
      ("IEEEeqnarray\\*?". "\\\\end[ \t\n]*{[ \t\n]*IEEEeqnarray\\*?[ \t\n]*}")
      ("program"         . "\\\\end[ \t\n]*{[ \t\n]*program[ \t\n]*}")
      ("verbatim\\*?"    . "\\\\end[ \t\n]*{[ \t\n]*verbatim\\*?[ \t\n]*}")
      ("gather\\*?"      . "\\\\end[ \t\n]*{[ \t\n]*gather\\*?[ \t\n]*}"))
))

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ispell and LaTeX
  2003-07-30  6:15 ispell and LaTeX Stefan M. Moser
@ 2003-07-30  8:25 ` Holger Sparr
  2003-07-30  9:22   ` Stefan M. Moser
  0 siblings, 1 reply; 5+ messages in thread
From: Holger Sparr @ 2003-07-30  8:25 UTC (permalink / raw)


On Wed, 30 Jul 2003, Stefan M. Moser wrote:
> I want ispell to ignore "eq" and "labelname". To this aim I have found
> a variable called "ispell-tex-skip-alists" that should do exactly
> this. However, when I set the variable in my .emacs-file nothing
> happens at all. Could anybody give me a hint what I'm doing wrong?

Have a look on your setting of:

,----[ C-h v ispell-parser RET ]
| ispell-parser's value is tex
| 
| Documentation:
| *Indicates whether ispell should parse the current buffer as TeX Code.
| Special value `use-mode-name' tries to guess using the name of `major-mode'.
| Default parser is `nroff'.
| Currently the only other valid parser is `tex'.
| 
| You can set this variable in hooks in your init file -- eg:
| 
| (add-hook 'tex-mode-hook (function (lambda () (setq ispell-parser 'tex))))
| 
| Defined in `ispell'.
`----

Be sure to use the right hook.

Additionally, the line

    (require 'ispell)

ahead of your (setq ispell-tex-skip-alists ...) statement might be necessary.

Hope this helps,
Holger

-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ispell and LaTeX
  2003-07-30  8:25 ` Holger Sparr
@ 2003-07-30  9:22   ` Stefan M. Moser
  2003-07-30 10:51     ` Holger Sparr
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan M. Moser @ 2003-07-30  9:22 UTC (permalink / raw)


Thanks for the tipps! The additional (require 'ispell) was necessary, without it 
ispell-parser wasn't defined at all. However, now it is defined with value "tex", 
but the ispell-process still asks about the "labelname" in \eqref{labelname}! 
There seems still something to be missing?!?

Stefan

Holger Sparr wrote:
> Have a look on your setting of:
> 
> ,----[ C-h v ispell-parser RET ]
> | ispell-parser's value is tex
<snip>
> 
> Be sure to use the right hook.
> 
> Additionally, the line
> 
>     (require 'ispell)
> 
> ahead of your (setq ispell-tex-skip-alists ...) statement might be necessary.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ispell and LaTeX
  2003-07-30  9:22   ` Stefan M. Moser
@ 2003-07-30 10:51     ` Holger Sparr
  2003-07-30 12:32       ` Stefan M. Moser
  0 siblings, 1 reply; 5+ messages in thread
From: Holger Sparr @ 2003-07-30 10:51 UTC (permalink / raw)


On Wed, 30 Jul 2003, Stefan M. Moser wrote:
> Thanks for the tipps! The additional (require 'ispell) was necessary,
> without it ispell-parser wasn't defined at all. However, now it is
> defined with value "tex", but the ispell-process still asks about the
> "labelname" in \eqref{labelname}! There seems still something to be
> missing?!?
> 
> Stefan

I´m using AUCTeX and it is working as suggested (with your value of
ispell-tex-skip-alists).

Holger

-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ispell and LaTeX
  2003-07-30 10:51     ` Holger Sparr
@ 2003-07-30 12:32       ` Stefan M. Moser
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan M. Moser @ 2003-07-30 12:32 UTC (permalink / raw)


You are right. I just checked it on a different system, and there it works. So the 
problem lies somewhere else... Thanks!

Stefan

Holger Sparr wrote:
> I´m using AUCTeX and it is working as suggested (with your value of
> ispell-tex-skip-alists).
> 
> Holger
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-07-30 12:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-30  6:15 ispell and LaTeX Stefan M. Moser
2003-07-30  8:25 ` Holger Sparr
2003-07-30  9:22   ` Stefan M. Moser
2003-07-30 10:51     ` Holger Sparr
2003-07-30 12:32       ` Stefan M. Moser

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.