On Sun, Apr 11, 1999 at 10:58:29PM +0000, Daniel Naber wrote:
> Amir Karger wrote:
> 
> > \/, which mathed then shows as an empty square. To get a slash in math mode
> > in TeX, or in mathed, you just type the slash. You don't have to backslash
> > it. Is this another thing that changes in tla?
> 
> I don't know, I just started using TLA (TLA and TLA+ are specification
> languages, BTW). I have several *.sty files for TLA, e.g. a
> well-documented tla.sty. I will send them to you if that helps?
> 
> If I remove the critical line and read the file to lyx, most of the text
> is red :-) So I wonder if it makes sense at all to write TLA files with
> lyx. The least I would have to do is write an own layout file, right?

Well, part of this is reLyX's fault. Part is LyX's fault.  Hm, maybe part is
John Weiss' fault too :)

\begin{slide} and \end{slide} are copied in tex mode by reLyX. The reason is
that one final slide, which needs to end with a EndAllSlides paragraph.
Basically, you could go through and change every \begin{slide} to Slide
layout (and of course the actual text of that paragraph doesn't matter; see
the docs for more info) and erase every \end{slide}, except for the last
which you change to an EndAllSlides. (Alternatively, you could write your
TeX slides using the \lyxnewslide et al. macros used by the LyX Slides
layout. Those would be correctly translated to LyX layouts. But it would
be annoying to write that way.) That will get rid of some of your ERT.
So I call this John Weiss' fault since he wrote slides.layout, but really
it's not anyone's fault. It's just that LyX works much differently from
regular LaTeX, and with slides that's a particularly bad problem.

The next problem is minipage. reLyX doesn't translate them, unfortunately.
They're on the TODO, and they should be easy... but I never got around to
them. I was going to say you could use "reLyX -r minipage", but that
actually wouldn't work, because the extra args to the \begin{minipage}
command would be copied as text. Anyway, within LyX, you could always change
the tex mode \begin{minipage} to a LyX minipage. Then you could change the
text within the minipage away from TeX mode.

Next, there's modules, and whatever other fancy new environments tla
defines. To make these work without TeX mode, you'll need to create a
tla.layout file. That may be easy or hard, depending on how different tla is
from something like article or slides. (Hm. You'd probably have to make a
separate tlaart.layout and tlaslide.layout.) This will make some of the
environments not be TeX mode any more. Note that this will *not* work for
any environment whose contents are set in math mode, since mathed won't
understand them. (I assume mathed in 1.1 will understand more environments,
and I'm hoping that it will be able to not choke on environments that it
hasn't even heard of.)

Finally, it's your fault for writing lots of verbatim environments :) Of
*course* that comes out looking ugly! I guess you could put this in a
LyX-code, or whatever the LyX equivalent to verbatim is; I forget. Hm.
Should reLyX be changed to copy verbatim environments into that layout? I
fear there could be translation problems with special characters and other
stuff.

The answer might be "just do it in LaTeX" but I'm not sure.

-Amir

Reply via email to