unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
Subject: Re: Hiding references when editing LaTeX?
Date: 26 Feb 2003 20:39:17 +0100	[thread overview]
Message-ID: <x54r6q3k7u.fsf@lola.goethe.zz> (raw)
In-Reply-To: b3j3oc$4q1$1@sapa.inka.de

"Felix E. Klee" <felix.klee@inka.de> writes:

> I like to use long names for labels in my LaTeX code.

Why?  Are you using RefTeX?  It comes bundled with Emacs, creates
labels automatically and makes handling them a breeze.  For example,
in connection with AUCTeX it automatically assigns labels like
\label{eq:21} which sounds like a pretty bad idea until you realize
that C-c ) will give you a list of all relevant equations to scroll
through and hit the right one.  So no need to memorize any labels.

> However, I find the 
> corresponding long reference commands disturbing when reading the code. Is 
> it possible to hide these references? 

> An example:
>   Instead of 
>     We use equation \ref{SomeVeryVeryLongReference} to show something.
>   I want to see
>     We use equation # to show something.
>   but upon moving the cursor on top of the '#' I want to see 
>     We use equation \ref{SomeVeryVeryLongReference} to show something.
>   again.

preview-latex <URL:http://preview-latex.sourceforge.net> would do
exactly that if you created a file prauctex.cfg with the contents

\PreviewCommand[!][\#]\ref
\InputIfFileExists{preview/prauctex.cfg}{}{}

in your project directory.  You could also try
\PreviewCommand[!]\ref
to have the dereferenced label itself displayed as typeset by LaTeX,
or
\RequirePackage{url}
\PreviewCommand[!][\@firstoftwo\url#1]\ref
to have the original label text in typewriter mode and so on.

Also handy for collapsing footnotes into their respective footnote
mark.  In short, preview-latex allows you to tell LaTeX how you want
certain constructs display in your Emacs window, obviously defaulting
to their normal typeset rendition.

But for labels, I'd really recommend going with RefTeX instead.  Try
it.  Manual should be available with
C-h i d m reftex RET

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2003-02-26 19:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-26 19:15 Hiding references when editing LaTeX? Felix E. Klee
2003-02-26 19:39 ` David Kastrup [this message]
2003-02-26 19:54   ` Felix E. Klee
2003-02-26 20:21   ` Felix E. Klee
2003-02-26 20:31     ` David Kastrup
2003-02-27 11:46       ` Felix E. Klee
2003-02-27 13:20         ` David Kastrup
2003-02-27 13:39           ` Felix E. Klee
2003-02-27 13:40             ` David Kastrup
2003-02-27 14:11               ` Felix E. Klee
2003-02-27 14:34                 ` David Kastrup
2003-02-27 16:12                   ` Oliver Scholz
2003-02-27 16:40                     ` David Kastrup
2003-02-27 17:01                       ` Oliver Scholz
2003-02-28 16:23                         ` Oliver Scholz
2003-02-28 10:36                       ` Felix E. Klee
2003-02-28 11:07                         ` David Kastrup
2003-02-28 12:33                           ` Felix E. Klee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x54r6q3k7u.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).