I have two bugs to report, both concerning macros and both occuring in 1.04 and
in 1.1.2

Incidentally, I'm no longer on any lyx mailing list, so send any queries direct
to me.
Best wishes,
Angus

--
DR ANGUS LEEMING <[EMAIL PROTECTED]>
Department of Biological and Medical Systems
Imperial College
LONDON SW7 2BX

Tel. 0171 594 5186
Fax. 0171 584 6897



1.usability:
--------

I can define macros and use them to create equations quickly. However, when I
come to create output using view dvi, latex complains that these control
sequences are unknown. The only remedy I've found is to edit the lyx file by
hand, cut out the macros, and reinsert them in the latex preamble as straight
'newcommands'. In this case, I can't use them within lyx to create my equations
because lyx doesn't recognise that they need arguments.


I attach two files to illustrate what I mean:

bad_tex.lyx is good as lyx (I can edit my equations using the macros) but tex
then complains. 

good_tex.lyx is identical save for the macros being removed and placed in the
latex preamble. This now produces a valid tex file, but is useless as lyx.


good_tex.lyx, everything appears to work correctly BECAUSE lyx's macros are
defined for all documents. Surely, macros are document specific!!!


2. crashes
--------
both 1.04 and 1.1.2 crash A LOT. One particular instance concerns
macros. 

Running a non-stripped version of 1.1.2 under gdb on a DEC Alpha running
Digital Unix 3.2

Clicking on any of the macros in bad_tex.lyx (or indeed in the User's Guide!)
(eg to edit them) causes a segmentation fault:

Program received signal SIGSEGV, Segmentation fault.
0x12011f744 in MathParInset::Metrics (this=0x1401341d0) at math_draw.C:174
174                   p->SetStyle(size);

This is true whether or not math_draw.C was compiled optimised or not.

typing 'bt' under gdb

#0  0x12011f744 in MathParInset::Metrics (this=0x14006d510)
    at math_draw.C:174
#1  0x120115574 in InsetFormula::Edit (this=0x140114470, x=67, y=-9)
    at formula.C:480
#2  0x120118f08 in InsetFormulaMacro::Edit (this=0x140114470, x=67, y=-9)
    at formulamacro.C:182
#3  0x12003b918 in BufferView::WorkAreaButtonPress (this=0x11ffff1a0,
    ob=0x1000000000000, ev=0x11ffff1a8) at BufferView.C:962
#4  0x12003af38 in BufferView::work_area_handler (ob=0x140114440, event=0,
    xev=0x11ffff0e0) at BufferView.C:732
#5  0x12003a008 in C_BufferView_work_area_handler (ob=0x11ffff060, event=0,
    key=4, xev=0x11ffff0e0) at BufferView.C:387
#6  0x3ffbff850c0 in fl_reset_focus_object ()
#7  0x3ffbff851f8 in fl_handle_object ()
#8  0x3ffbff89b60 in fl_do_shortcut ()
#9  0x3ffbff8ab74 in fl_last_event ()
warning: Hit heuristic-fence-post without finding
warning: enclosing function for address 0x794c335f5f657372
This warning occurs if you are debugging a function without any symbols
(for example, in a stripped executable).  In that case, you may wish to
increase the size of the search with the `set heuristic-fence-post' command.

Otherwise, you told GDB there was a function where there isn't one, or
(more likely) you have encountered a bug in GDB.

typing 'info locals'

info locals
p = (class MathedInset *) 0x140146f00
cx = 7 '\a'
cxp = 87 'W'
ls = 1
asc = 17
des = 0
tb = 0
tab = 0
limits = false
data = {<MathedIter> = {flags = 0, fcode = 23, pos = 2, row = 0, col = 0,
    ncols = 1, array = 0x1400b2180, stck = {fcode = 10760, x = 65535,
      y = 12, pos = 0, row = 0, col = 1},
    _vptr$ = 0x140049330 <MathedXIter virtual table>}, size = 1, x = 18,
  y = 0, p = 0x1400abad0, sx = 0, sw = 0, limits = false, s_type = 0,
  crow = 0x0}

#This file was created by <aleem> Thu Nov 25 12:48:50 1999
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
\lyxformat 2.15
\textclass article
\begin_preamble
\end_preamble
\language default
\inputencoding latin1
\fontscheme default
\graphics default
\paperfontsize 12
\spacing single 
\papersize a4paper
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Standard
\align center 

\begin_inset FormulaMacro 
\newcommand{\domain}[1]{\Omega _{#1 }}

\end_inset 


\begin_inset FormulaMacro 
\newcommand{\del}[1]{\nabla _{#1 }}

\end_inset 


\begin_inset FormulaMacro 
\newcommand{\matrx}[1]{\left[ #1 \right] }

\end_inset 


\begin_inset FormulaMacro 
\newcommand{\dett}[1]{\left| #1 \right| }

\end_inset 


\begin_inset FormulaMacro 
\newcommand{\rthreevec}[3]{\left( #1 ,#2 ,#3 \right) }

\end_inset 


\begin_inset FormulaMacro 
\newcommand{\jacobian}[2]{J_{#1 \rightarrow #2 }}

\end_inset 


\begin_inset FormulaMacro 
\newcommand{\dd}[2]{\frac{\partial #1 }{\partial #2 }}

\end_inset 


\layout Standard

We are attempting to discretise 
\begin_inset Formula \( \nabla u \)
\end_inset 

 on a tetrahedral mesh.
 It may be approximated as 
\begin_inset Formula \( \nabla u\approx \mathbf{D}/\Omega _{\mathrm{g}} \)
\end_inset 

 where 
\begin_inset Formula \( \Omega _{\mathrm{g}} \)
\end_inset 

 is the volume of an element in the global 
\begin_inset Formula \( (x,y,z) \)
\end_inset 

 coordinate system and 
\begin_inset Formula \( \mathbf{D} \)
\end_inset 

 is: 
\layout Standard
\align center 

\begin_inset Formula \( \mathrm{D}=\int _{\domain{g}}w\: \del{g}u\; \mathrm{d}\domain{g} \)
\end_inset 


\layout Standard

Here, 
\begin_inset Formula \( w \)
\end_inset 

 is some weighting function and 
\begin_inset Formula \( \del{g}u=\rthreevec{\dd{u}{x}}{\dd{u}{y}}{\dd{u}{z}} \)
\end_inset 

.
 This integral is constructed, however, in a local, element 
\begin_inset Formula \( \rthreevec{x'}{y'}{z'} \)
\end_inset 

coordinate system, domain 
\begin_inset Formula \( \domain{l} \)
\end_inset 

, where the integration is performed.
\layout Standard
\align center 

\begin_inset Formula \( D=\int _{\domain{l}}w\: \del{l}u\; \matrx{\jacobian{g}{l}^{-1}}\dett{\jacobian{g}{l}}\; \mathrm{d}\domain{l} \)
\end_inset 


\layout Standard

where 
\begin_inset Formula \( \del{l}u=\rthreevec{\dd{u}{x}}{\dd{u}{y}}{\dd{u}{z}} \)
\end_inset 

 and 
\begin_inset Formula \( \matrx{\jacobian{g}{l}} \)
\end_inset 

 is the Jacobian matrix of this transformation.
\the_end
#This file was created by <aleem> Thu Nov 25 12:54:32 1999
#LyX 1.0 (C) 1995-1999 Matthias Ettrich and the LyX Team
\lyxformat 2.15
\textclass article
\begin_preamble

\newcommand{\domain}[1]{\Omega _{#1 }}
\newcommand{\del}[1]{\nabla _{#1 }}
\newcommand{\matrx}[1]{\left[ #1 \right] }
\newcommand{\dett}[1]{\left| #1 \right| }
\newcommand{\rthreevec}[3]{\left( #1 ,#2 ,#3 \right) }
\newcommand{\jacobian}[2]{J_{#1 \rightarrow #2 }}
\newcommand{\dd}[2]{\frac{\partial #1 }{\partial #2 }}
\end_preamble
\language default
\inputencoding latin1
\fontscheme default
\graphics default
\paperfontsize 12
\spacing single 
\papersize a4paper
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Standard

We are attempting to discretise 
\begin_inset Formula \( \nabla u \)
\end_inset 

 on a tetrahedral mesh.
 It may be approximated as 
\begin_inset Formula \( \nabla u\approx \mathbf{D}/\Omega _{\mathrm{g}} \)
\end_inset 

 where 
\begin_inset Formula \( \Omega _{\mathrm{g}} \)
\end_inset 

 is the volume of an element in the global 
\begin_inset Formula \( (x,y,z) \)
\end_inset 

 coordinate system and 
\begin_inset Formula \( \mathbf{D} \)
\end_inset 

 is: 
\layout Standard
\align center 

\begin_inset Formula \( \mathrm{D}=\int _{\domain{g}}w\: \del{g}u\; \mathrm{d}\domain{g} \)
\end_inset 


\layout Standard

Here, 
\begin_inset Formula \( w \)
\end_inset 

 is some weighting function and 
\begin_inset Formula \( \del{g}u=\rthreevec{\dd{u}{x}}{\dd{u}{y}}{\dd{u}{z}} \)
\end_inset 

.
 This integral is constructed, however, in a local, element 
\begin_inset Formula \( \rthreevec{x'}{y'}{z'} \)
\end_inset 

coordinate system, domain 
\begin_inset Formula \( \domain{l} \)
\end_inset 

, where the integration is performed.
\layout Standard
\align center 

\begin_inset Formula \( D=\int _{\domain{l}}w\: \del{l}u\; \matrx{\jacobian{g}{l}^{-1}}\dett{\jacobian{g}{l}}\; \mathrm{d}\domain{l} \)
\end_inset 


\layout Standard

where 
\begin_inset Formula \( \del{l}u=\rthreevec{\dd{u}{x}}{\dd{u}{y}}{\dd{u}{z}} \)
\end_inset 

 and 
\begin_inset Formula \( \matrx{\jacobian{g}{l}} \)
\end_inset 

 is the Jacobian matrix of this transformation.
\layout Standard


\begin_inset Formula \( \dd{}{}\matrx{\jacobian{g}{l}} \)
\end_inset 


\the_end

Reply via email to