> I don't really know whether it is worth the hassle to implement
 > especially as it does not seem to save any typing. You have to give the
 > full name once anyway (be it in that "list" or at the first 
occurence) and
 > can use the abbrevation afterwards... Or do I miss your point?
 >
 > But maybe you should just file a feature request on bugzilla just do make
 > sure that it does not get lost?

Sorry, it wasn't supposed to save, typing, rather it was supposed to 
organise things better.
I thought it could be similar to bibtex, except for acronyms instead.

There are advantages:
   .The list of acronyms can be used for multiple documents
   .When cutting and pasting text around, don't need to find first 
occurence of acronym..
   .Can include an index at the end of the documents of all the acronyms 
used within the document.

I found a package that does it all already, (called acronym) - which is 
part of the standard distro...

*****
That all aside, I was wondering, is there a way that it could be 
possible to generate box scripts. What I mean by this is, say there was 
a small feature that I wanted to add, and it consisted of some latex 
code with arguments passed to it.  A good example would be this acronym 
feature.  The box script could look something like:

newlyxfunction insert_acronym
  no_argin = 1
  \begin{argnames}
   \arg{Acronym}{/home/pmdumuid/lyx/acronym.aclst}
  \end{argnames}

  \begin{latex}
   \ac{$inarg[1]}
  \end{latex}

  \boxdisplay $inarg[1]
  \noexpandbox

This may seem confusing at first, what I mean by box script is a script 
that is developed that sits behind a box, (box being those boxes used 
for citations, references, ert, margin, figures and tables)

These scripts would be loaded into function listing, then attached to 
key bindings as appropriately desired.

Say if I attached this to the key binding C-S-A then I would press 
Control, Shift and A.  It would then run ask me at the bottom for each 
argument specified in the "argnames" section of the script above, (i.e. 
Acronym ...)  If I pressed the tab key, it would look up the file
"/home/pmdumuid/lyx/acronym.aclst" and resolve a auto-completion.

After each argument, it would lyx could then store these variables as 
raw in the .lyx file.
When it came to generating the tex file, at every occurence, it would 
replace the expression with the latex code between the \begin{latex} and 
  \end{latex}

The text appearing in the box within the lyx viewing area could defined 
by the boxdisplay line (in this case it would simply display the first 
argument.

Control could also be made over weather the box would expand (as per 
margin notes etc..) and what it displayed in the expanded box.

But using such a technique, additional small features would be easier to 
add, and a greater number of users could develop scripts for all the 
various packages, and create a library if desired.  This

Pierre






Reply via email to