[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-users
Subject:    Re: Re: Does LyX 1.2.0 support character styles?
From:       Guenter Milde <G.Milde () physik ! tu-dresden ! de>
Date:       2002-08-12 7:37:46
[Download RAW message or body]

On Fri, 9 Aug 2002 16:22:00 +0100 wrote John Levon <levon@movementarian.org>:

> On Fri, Aug 09, 2002 at 04:02:35PM +0200, Guenter Milde wrote:
> 
> > If the macros should be used for a whole bunch of documents, they could be
> > saved in a template file ...
>
> I think macros are a particularly awkward and ugly way to do semantic
> mark up of normal text within LyX. Why bother ? Do you see a problem in the
> solution I have been advocating ?

Yes, missing flexibility.

- *.layout file creating is at least as power-userish as macro creating. If
   lyx supported macros, they would be creatable within a LyX GUI.
   
- I have to interact with colleagues that use plain latex. Something like
   \newcommand{\LiTa}{LiTao$_3$} is quite common there. It would be nice to
   have it supported in LyX.   

 
> To a large degree such macro support is orthogonal, I think,

This is true -- my proposal would relate to the document preamble, while your
would relate to a document class. Still, things that can be done in a document
class can normally also be done in the document preamble. (And the template
feature offers a nice way to have "special class like stuff" in a self contained
document.)

> and could
> be considered a "power user feature". We simply cannot force the user to
> learn arcane runes like \textbf and the like

There is no need to learn about \textbf with the proper GUI support:

   - M-x define-macro important 1 
     (or a key-combination that pops up a dialog for name and number of
     placeholders)
     
   - In LyX fill out the macro-defining box, e.g. by 
      * inserting #1 (or whatever the convention for the placeholder is)  
      * marking the #1
      * using the character-layout dialog to make it bold

BTW, even \textbf wouldnot be more cryptic than forcing the user to learn
something like

Style Important
  Margin                First_Dynamic
  NextNoIndent                0
  LeftMargin            MM
  RightMargin           MM
  LabelFont
     Color        magenta
  EndFont
  Font
    Series              Bold
    Size                Larger
  EndFont
End



On Fri, 9 Aug 2002 16:51:59 +0200 wrote Andre Poenitz <poenitz@htwm.de>:
     
> > A drop down menu that lets you choose between all the macros in
> > the actual document is a good idea! (may be context-sensitive: all
> > math-macros when in mathed and all text-macros when in text mode)
> 
> Actually there can't be a clean destinction between "math macros" and
> "text macros" as LaTeX does not have this.

This would only be a problem for reLyX. The macros should be defined and
saved in a LyX format (as the current math-macro is).

But maybe it is really better not to separate them, so the macros can be
used in both, math and text.
 
> > And indeed it would be nice, if macros with placeholder ({#1}) would
> > "wrap" around the selection (if there is any) and open a box otherwise.

> 
> ?

I call placeholder, what in 1.1.6 is created with

    M-x math-macro-arg <number>

     BTW - this is not the user friendliest way -- maybe after doing
 
        M-x math-macro cases 4
     
     all four placeholders could already be present (for writing something
     around, cut and paste or, manipulating with >Layout>character, 

It is normally replaced with the small blue boxes one knows from \sqrt or
\frac. My proposal would be to fill it automatically with the selection, if
there is selected text. Just now (math-macro with 1.1.6), this doesnot work,
as the selection is deleted if you call the macro typing its name after a
backslash (\LiTa, say). This will not be the case if you call it via a
keybinding or a menu.

Günter

--
G.Milde at physik.tu-dresden.de

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic