Uwe Stöhr wrote:
Richard Heck schrieb:

There's a different solution for this now. First of all, URL now exists as a charstyle, importable via the URL module.
But what LaTeX-code does it use?
\url{whatever's in the inset}.
So support for \url is no longer needed as an inset, and it really shouldn't be an inset. It's semantic markup. The URL inset can therefore be converted to \href only (and probably renamed InsetHref or something), and support for docbook need not be touched. The menu item should then be changed, too,
OK I'll do it this way then.
obviously, and lyx2lyx written to convert the old URL insets into URL charstyles for LaTeX documents only.
How would this be?
Pseudo code would be something like:
   Make sure we're in a LaTeX doc:
      if document.backend == "docbook":
           return
   foreach urlinset:
      extract its arguments
      replace it with a URL charstyle
   Add the URL module to the document.headers if it isn't already there
I can do this part if you like. It shouldn't be too bad.
But InsetCommandParams is buggy anyway. Because why shouldn't it be allowed to switch the name of an inset. We will need this e.g. later when we merge the float types to one inset.
As I said in the other thread, switching the command is allowed and always has been. The crash you got was due to a missed change elsewhere. Switching the inset type---e.g., from an InsetCitation to an InsetURL---isn't allowed and never has been. Trying to do so will crash 1.5.x, and it's easy to do it from the mini-buffer.

Richard

--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Reply via email to