> From: Tommaso Cucinotta <[email protected]>
> 
> Il 06/03/2011 21:44, Jim Oldfield ha scritto:
> > This seems to "just work"  for me, so I guess I'm missing something. What's 
>wrong
> > with the  following?
> Nothing really, except that you have to  hand-code the superscripting,
Ah fair enough, that makes sense. I was just confused because the usual 
\footnotemark stuff made it sound like a much harder problem than this, but I 
guess \labels are quite a bit of LaTeX code too if you don't have LyX to write 
it for you!

> > Choosing between \ref and \eqref automatically is  already possible in LyX, 
>using
> > formatted references. You could even put  \ref's to footnotes in 
superscripts
> > automatically using formatting  references (see code below).
> "is already possible" means that, by adding a  custom preamble and/or
> using a special latex inset with some special macros,  I can make it
> happen ?
If I understand you right, sure, see attached. Not even a special inset, just 
formatted references and the preamble code I gave. Of course you have to 
remember to use formatted reference use this instead of plain ones, but you can 
use it consistently for everything. The insert reference dialogue box remembers 
your choice of "formatted reference", which helps.

By the way, devs: now would be a good time to mention that it would be nice if 
"copy as reference" could copy a formatted reference, perhaps as a separate 
menu 
item or preference. Oh, and the hotkey for "format" in the insert reference 
dialog (alt+f) doesn't work even though it's underlined!

> > Prettyref automatically chooses between  "\eqref{eq:mylabel}", "Lemma
> > \ref{lem:mylabel}" etc. It does this using  the label's prefix, rather than
> > truely checking what the label refers  to, but since LyX automatically adds
> > (well, suggests) these prefixes  this works pretty well.
> This may actually be part of the problem
I agree that there are several possible problems here, including lack of 
awareness of formatted references, and the fact you need to use LaTeX to 
customise formats. However I think it makes more sense to live with them/ 
overcome them individually than come up with a radically different non-LaTeX 
solution (just my opinion).

Jim


      

Attachment: ref-eg.lyx
Description: Binary data

Reply via email to