Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

$ in customized verbatim environment confuses Latex-mode

7 views
Skip to first unread message

Thorsten Jolitz

unread,
Aug 16, 2012, 5:28:47 PM8/16/12
to help-gn...@gnu.org

Hi List,

I have a customized verbatim environment for Latex documents, lets call
it wideverbatim, and there is a small problem:

,---------------------
| \begin{wideverbatim}
| $ foo
| \end{wideverbatim}
`---------------------

lets the buffer beyond the '$' sign look like in math mode (until
another 'free' $ is found) - no fontification anymore. However, compiling
and everything works fine, it seems only the fontification in the buffer
becomes distorted.

When I change it to

,-----------------
| \begin{verbatim}
| $ foo
| \end{verbatim}
`-----------------

everything looks alright again. But when I try something like

,---------------------
| \begin{wideverbatim}
| \$ foo
| \end{wideverbatim}
`---------------------

fontification returns to normal, but the \ backslash is printed in the
output.

Its not really a serious problem, since everything still works, but
maybe there is an easy remedy? It looks ugly and makes working in the
buffer more difficult.


--
cheers,
Thorsten



Joost Kremers

unread,
Aug 16, 2012, 5:57:40 PM8/16/12
to
Thorsten Jolitz wrote:
[$ in custom verbatim environment]
> Its not really a serious problem, since everything still works, but
> maybe there is an easy remedy? It looks ugly and makes working in the
> buffer more difficult.

assuming you use auctex, i suspect customizing the variable
LaTeX-verbatim-environments and adding "wideverbatim" to itwill get you
what you want.


--
Joost Kremers joostk...@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)

Thorsten Jolitz

unread,
Aug 17, 2012, 10:57:55 AM8/17/12
to help-gn...@gnu.org
Joost Kremers <joostk...@yahoo.com> writes:

> Thorsten Jolitz wrote:
> [$ in custom verbatim environment]
>> Its not really a serious problem, since everything still works, but
>> maybe there is an easy remedy? It looks ugly and makes working in the
>> buffer more difficult.
>
> assuming you use auctex, i suspect customizing the variable
> LaTeX-verbatim-environments and adding "wideverbatim" to itwill get you
> what you want.

That does the job, thank you.

--
cheers,
Thorsten


0 new messages