Re: trouble adding figures (latex style breaks them)

2007-03-22 Thread Andre Poenitz
On Thu, Mar 22, 2007 at 01:57:00PM -0300, Bruno Schneider wrote:
> Updated, simplified version of the problem:
> 
> Start a new LyX file. Add a floating figure. Edit the LaTeX preamble
> and add "\input{mz.sty}" (mz.sty is attached in previous post). Now
> the figure no longer works.
> 
> However, if you edit mz.sty and comment out line 24
> (\renewcommand{\empty}{\emptyset}), it works.
> 
> Interestingly, if you change line 24 to
> "\renewcommand{\empty}{$\emptyset$}" it also works, but an empty set
> sign appears in the figure.
> 
> So it seems "\empty" is used in figures. Can anybody explain that?

\empty is defined in latex.ltx as 

[EMAIL PROTECTED]
[EMAIL PROTECTED]

I am not sure fiddling around with this is a good idea.

Andre'


Re: trouble adding figures (latex style breaks them)

2007-03-22 Thread Bruno Schneider

On 3/22/07, Bruno Schneider wrote:

Figures are EPS, and since I can usually work with figures, I checked
the document's LaTeX preamble.

It has

  \input{mz.sty}

at the end. If I remove this line, Figures are exported OK.

Looking at the mz.sty file, I can't figure out what breaks the
figures, perhaps someone can help me...


Updated, simplified version of the problem:

Start a new LyX file. Add a floating figure. Edit the LaTeX preamble
and add "\input{mz.sty}" (mz.sty is attached in previous post). Now
the figure no longer works.

However, if you edit mz.sty and comment out line 24
(\renewcommand{\empty}{\emptyset}), it works.

Interestingly, if you change line 24 to
"\renewcommand{\empty}{$\emptyset$}" it also works, but an empty set
sign appears in the figure.

So it seems "\empty" is used in figures. Can anybody explain that?

--
Bruno Schneider
http://www.dcc.ufla.br/~bruno/


trouble adding figures (latex style breaks them)

2007-03-22 Thread Bruno Schneider

Hi all,

I received a LyX file that when exported to PDF (ps2pdf), has no figures.

I'm using LyX 1.4.3 on Linux. When I open the lyx file and do a "file

export > PDF (ps2pdf)" a get several errors like:


Missing $ inserted

where the figures are.

Figures are EPS, and since I can usually work with figures, I checked
the document's LaTeX preamble.

It has

 \input{mz.sty}

at the end. If I remove this line, Figures are exported OK.

Looking at the mz.sty file, I can't figure out what breaks the
figures, perhaps someone can help me...

I have attached the mz.sty file and error details from the log and the
temporary tex file (they are attached so that line numbers don't
change.


--
Bruno Schneider
http://www.dcc.ufla.br/~bruno/
%
% mz.sty
%
% Copyright (c) 1995 by Marc Mengel <[EMAIL PROTECTED]>
%
% Permission is hereby granted for you to use, copy, and modify this file
% provided you:
%   * retain the above copyright notice
%   * clearly note any changes from the original
%   * send any good improvements back to me
%
% A nicely font independent LaTeX style for Z, works with old and new LaTeX
%
\typeout{Style Option 'mz'. Marc Mengel's Z style. Version 1.0 Oct 13 1995}
%
% Spacing
%\newcommand{\also}{\\[0.5ex]}
\newcommand{\also}{\\[0.2ex]}

% overrides of existing LaTeX commands
\renewcommand{\t}[1]{\hspace*{#1ex}}% note: this breaks accents...
\renewcommand{\star}{^*}% overrides plain asterisk...
\renewcommand{\div}{{\mathsf{\ div\ }}} % overrides dot over dot symbol
\renewcommand{\empty}{\emptyset}% don't know why these need renew
\renewcommand{\notin}{\not\in}  % 
\renewcommand{\iff}{\Leftrightarrow}% 
%
\let \mzmesh=\# % make \# a command 
\renewcommand{\#}{{\mathsf{\mzmesh}}}   % (why does this work?)
%
% Outer Grouping Environments
%
% These first 3 mean something to ztc, but not to anyone else
\newenvironment{spec}{\relax}{\relax}
\newenvironment{nocheck}{\relax}{\relax}
\newenvironment{comment}{\relax}{\relax}
%
% General purpose zed box for 
% zed, schema, etc.
% outer layer is an array{l} stack like this
%    <= topline
%  |
%  | <= left bracket <= empty right bracket
%  |   guts
%  | <= bottom line
%
% the guts is *another* array this time an array{}
% so folks can set tabs, etc.
% its built with \mztopbox{toplinecommand}{leftbracket}
% at the top and \mzbotbox{bottomlinecommand}
% at the bottom.  

\newcommand{\mztopbox}[2]{
\[
\array{l}
#1\\[-1ex] 
\! \left#2 \array{l} 
\ \\[-1.7ex]
%\hspace*{-0.6em}
% update by Nelson S. Rosa
\hspace*{0.0em}
\array{}
}
\newcommand{\mzbotbox}[1]{
\ \\[0ex]
\endarray
\endarray
\right. \\[-1.65ex]
#1
\endarray
\]
}
%\newcommand{\mzwidth}{4.2in}
\newcommand{\mzwidth}{3.0in}
%
% horizontal line commands
%
\newcommand{\where}{% separator for schemas, axdef, etc.
\ \\[-1ex]
\hspace*{-0.55em} \overline{\hspace{1in}} \\[0ex]
}
\newcommand{\mzbotline}{ % bottom of schema box, line above
\overline{\makebox[\mzwidth]{\hfill}}
}
\newcommand{\mznoline}{ % invisible line, same width as others
\makebox[\mzwidth]{\hfill}
\ \\[-1ex]
}
\newcommand{\mzsline}[1]{ % schema top line, with name
\hspace*{-0.65em}
\raisebox{0.05ex}{
\makebox[\mzwidth][l]{
\makebox[1em]{\hrulefill}
$#1$
\hrulefill
}
}
}
\newcommand{\mzgline}[1]{ % gendef top line, with name
\underline{\makebox[\mzwidth][l]{\makebox[1em]{\hrulefill}$#1$\hrulefill}}
}
%
% actual environments built with 'em
%
\newenvironment{axdef}{ % axiom -- no top or bottom, just left
\mztopbox{\mznoline}{|}
}{
\mzbotbox{\mznoline}
}
%\newenvironment{gendef}[1]{% gendef -- double top w/name & bottom
%   \mztopbox{\mzgline{#1}}{|}
%}{
%   \mzbotbox{\mzbotline}
%}
\def \gendef[#1] {\mztopbox{\mzgline{[#1]}}{|}}
\def \endgendef {\mzbotbox{\mzbotline}}
\newenvironment{schema}[1]{ % schema -- single top w/name & bottom
\mztopbox{\mzsline{#1}}{|}
}{
\mzbotbox{\mzbotline}
}
\newenvironment{syntax}{% synatax -- no top,bottom,or left
\mztopbox{\mznoline}{.}
}{
\mzbotbox{\mznoline}
}
\newenvironment{zed}{   % zed -- same as syntax
\mztopbox{\mznoline}{.}
}{
\mzbotbox{\mznoline}
}


%
% handy macros for various things
%
\newcommand{\mzovr}[2]{ % overlay two symbols
\makebox[0pt][l]{$#1$}#2
}   
\newcommand{\mzhsmr}[1]{% "smear" a character horizantally
\makebox[0pt][l]{$