math macros via LaTex preamble

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

math macros via LaTex preamble

ralston
This post has NOT been accepted by the mailing list yet.
I've got 10 years experience and 200 documents using LaTex with heavy math.
Like everyone else I paste a clot of \newcommands into my Latex preamble without looking at it.
My student has recommended Lyx, which I appreciate has many great features.
I really want to like LyX.  What a great concept.  And yet...
I find LyX math macros  an absolutely horror. Why construct LyX to ignore macros
in an imported LaTex preamble?  Why defeat the most
popular usage, and why not write something to properly automate the import? It's a
fact that exchanging LaTex with collaborators and opening old files needs to be automated.  Yet Lyx wants me
to paste macros by hand into every document, or else create subsidiary file systems
I don't understand with no examples of what to do.  Why not automate that?
 Once I create a macro it won't update (for me!) in an imported LaTeX document,
and the error messages are too non-specific to debug.  Import also seems to forget
a lot of small things like "^{}, _{}  " and matrix formats that are real work to fix.  I've only got about 10 macros
to get running, but  LyX has fought me all the way.  I hope I'm in the wrong and working with
basic concept errors someone could straighten out... and why doesn't LyX post at least one
completely running imported mathy FILE example, rather than abstract principles....while my excuse is a definite lack of interest
in working with things that create  more work than they save.  Frustrated by hours
or wasted time, I probably seem cranky.   In case I've not been too rude, here's some macros, which
LyX gurus will not find profound; I will surely either convert with enthusiasm to LyX, or forbid all
my students and contacts to ever touch it, depending on
how the importing and exporting of latex with macros can be automated.
\newcommand{\ab}{\allowbreak}
 \newcommand{\bit}{\begin{itemize}} \newcommand{\eit}{\end{itemize}}
\newcommand{\im}{\item}
\newcommand{\be}{\begin{equation}} \newcommand{\ee}{\end{equation}}
\newcommand{\ba}{\begin{eqnarray}} \newcommand{\ea}{\end{eqnarray}}
\newcommand{\nn}{\nonumber} \renewcommand{\bf}{\textbf}
\newcommand{\ra}{\rightarrow} \newcommand{\NN}{\vec \nabla}
\def\slasha#1{\setbox0=\hbox{$#1$}#1\hskip-\wd0\hbox
to\wd0{\hss\sl/\/\hss}}
\def\slashb#1{\setbox0=\hbox{$#1$}#1\hskip-\wd0\dimen0=5pt\advance
        \dimen0 by-\ht0\advance\dimen0 by\dp0\lower0.5\dimen0\hbox
          to\wd0{\hss\sl/\/\hss}}

John P