Stephen Harris <[EMAIL PROTECTED]> writes:

> I tried this on WinLyx137 because it comes with relyx.
> The file only partially opened.
> 
> I tried this on LyX140pre3 compiled by Msys for windows,
> which comes with tex2lyx. The file also open partially, identical 
> to first case. I replaced tex2lyx -f $$i $$o with reLyX -f $$i
> and got the same partial result. Then I removed the offending
> "}" and this closed LyX without any display, using tex2lyx.
> I put the "}"back in and the display returned to the same partial 
> process for tex2lyx. I never got a good process with reLyx
> either and I have Perl in the PATH and Path_prefix.
> 
> There is an extra "}" which causes a problem. I had to run Latex 
> 3 times on the file to see what it should look like with a dviviewer.
> 
> Quite odd,
> Stephen 


I paste here what I obtain using either tex2lyx (1.4.0pre3) or reLyX (1.3.7).

--
Enrico

============================= begin tex2lyx ==============================
#LyX file created by  tex2lyx 0.1.2
\lyxformat 245
\begin_document
\begin_header
\textclass article
\begin_preamble
%%% ====================================================================
%%%  @LaTeX-file{
%%%     filename  = "subeqn.tex",
%%%     version   = "1.2c",
%%%     date      = "1999/11/29",
%%%     time      = "14:49:29 EST",
%%%     checksum  = "29866 202 668 6426",
%%%     author    = "American Mathematical Society",
%%%     copyright = "Copyright 1999 American Mathematical Society,
%%%                  all rights reserved.  Copying of this file is
%%%                  authorized only if either:
%%%                  (1) you make absolutely no changes to your copy,
%%%                  including name; OR
%%%                  (2) if you do make changes, you first rename it
%%%                  to some other name.",
%%%     address   = "American Mathematical Society,
%%%                  Technical Support,
%%%                  Electronic Products and Services,
%%%                  P. O. Box 6248,
%%%                  Providence, RI 02940,
%%%                  USA",
%%%     telephone = "401-455-4080 or (in the USA and Canada)
%%%                  800-321-4AMS (321-4267)",
%%%     FAX       = "401-331-3842",
%%%     email     = "[EMAIL PROTECTED] (Internet)",
%%%     supported = "yes",
%%%     keywords  = "latex, amslatex, ams-latex, amstex",
%%%     abstract  = "This is part of the AMS-\LaTeX{} distribution.
%%%                  It is a sample document illustrating the use of
%%%                  the subequations environment and the effect of
%%%                  the fleqn option.",
%%%     docstring = "The checksum field above contains a CRC-16
%%%                  checksum as the first value, followed by the
%%%                  equivalent of the standard UNIX wc (word
%%%                  count) utility output of lines, words, and
%%%                  characters.  This is produced by Robert
%%%                  Solovay's checksum utility.",
%%%  }
%%% ====================================================================


\title{Test of subequations environment}
\author{mjd}


\numberwithin{equation}{section}

\newcommand{\env}[1]{{\normalfont\texttt{#1}}}

\AtEndDocument{\multipasswarning}
\newcommand{\multipasswarning}{%
  \clearpage
  \typeout{%
  **********************************************************************}
  \typeout{%
  Note: This document needs to run through LaTeX three times, instead of}
  \typeout{%
  the usual two, to resolve indirect cross-references.}
  \typeout{%
  **********************************************************************}
}

\makeatletter
%    Omit the warning message if three passes have been completed (on
%    first pass \ref{check} is undefined and it is set to 0; on second
%    pass \ref{check} is 0 and set to 1; on third pass it is 1).
\def\checkref{\begingroup
  [EMAIL PROTECTED]@[EMAIL PROTECTED]@currentlabel{1}}%
  [EMAIL PROTECTED]@check\relax
    \global\let\multipasswarning\relax
  \fi
  \label{check}%
  \endgroup}
\makeatother


\end_preamble
\options fleqn
\language english
\inputencoding latin1
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize default
\use_geometry false
\use_amsmath 1
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\end_header

\begin_body

\begin_layout Section

Prime equation numbers
\end_layout

\begin_layout Standard

First an equation. 
\begin_inset Formula \begin{equation}\label{e:previous}
A=B
\end{equation}
\end_inset

 That was equation 
\begin_inset LatexCommand \eqref{e:previous}

\end_inset

.
\end_layout

\begin_layout Standard

Then the same, with a prime on the number.
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
checkref
\end_layout

\end_inset

 
\begin_inset Formula \begin{equation}
\tag{\ref{e:previous}}'\end{equation}
\end_inset


\begin_inset ERT
status collapsed

\begin_layout Standard

}
\end_layout

\end_inset


\begin_inset LatexCommand \label{e:prevprime}

\end_inset

 C=D 
\end_layout

\end_body
\end_document
============================= end tex2lyx ==============================



============================= begin reLyX ==============================
# The reLyX bundled with LyX 1.3 created this file.
# For more info see http://www.lyx.org/
\lyxformat 2.15
\textclass article
\options fleqn
\use_natbib 0
\use_numerical_citations 0
\begin_preamble
\title{Test of subequations environment}
\author{mjd}

\usepackage{amsmath}
\numberwithin{equation}{section}

\newcommand{\env}[1]{{\normalfont\texttt{#1}}}

\AtEndDocument{\multipasswarning}
\newcommand{\multipasswarning}{%
  \clearpage
  \typeout{%
  **********************************************************************}
  \typeout{%
  Note: This document needs to run through LaTeX three times, instead of}
  \typeout{%
  the usual two, to resolve indirect cross-references.}
  \typeout{%
  **********************************************************************}
}

%    Omit the warning message if three passes have been completed (on
%    first pass \ref{check} is undefined and it is set to 0; on second
%    pass \ref{check} is 0 and set to 1; on third pass it is 1).
\def\checkref{\begingroup
  [EMAIL PROTECTED]@[EMAIL PROTECTED]@currentlabel{1}}%
  [EMAIL PROTECTED]@check\relax
    \global\let\multipasswarning\relax
  \fi
  \label{check}%
  \endgroup}
\end_preamble

\layout Section

Prime equation numbers
\layout Standard

First an equation. 
\begin_inset Formula \begin{equation} \label{e:previous}
A=B
\end{equation}
\end_inset 

 That was equation 
\latex latex 

\backslash eqref{e:previous}
\latex default 
.
\layout Standard

Then the same, with a prime on the number.
\latex latex 

\backslash checkref
\newline 

\latex default 

\begin_inset Formula \begin{equation} 
\tag{\ref{e:previous}\('\)}\label{e:prevprime}
C=D
\end{equation}
\end_inset 

 And that was equation 
\latex latex 

\backslash eqref{e:prevprime}
\latex default 
.
\layout Standard

Notice, by the way, that when a 
\latex latex 

\backslash verb"
\backslash ref"
\latex default 
 occurs inside a 
\latex latex 

\backslash verb"
\backslash tag"
\latex default 
, and that 
\latex latex 

\backslash verb"
\backslash tag"
\latex default 
 is then 
\latex latex 

\backslash verb"
\backslash label"
\latex default 
'd, a 
\latex latex 

\backslash verb"
\backslash ref"
\latex default 
 for the the second 
\latex latex 

\backslash verb"
\backslash label"
\latex default 
 requires 
\emph on 
three
\emph default 
 runs of LaTeX in order to get the proper value.
 (If you run through the logic of LaTeX's cross-referencing mechanisms as they
apply in this case, you will see
 that this is necessary.)
\layout Section

Subnumbered equations
\layout Standard

Here is a,b,c sub-numbering. 
\latex latex 

\backslash begin{subequations}
\newline 

\backslash begin{eqnarray}
\newline 
A&=&B
\backslash 
\backslash 
\newline 
D&=&C 
\backslash label{e:middle}
\backslash 
\backslash 
\newline 
E&=&F
\newline 

\backslash end{eqnarray}
\newline 

\backslash end{subequations}
\latex default 
 That was produced with the 
\latex latex 

\backslash env{eqnarray}
\latex default 
 environment; the middle line was labeled as 
\latex latex 

\backslash eqref{e:middle}
\latex default 
.
\layout Standard

An equation following the end of the 
\latex latex 

\backslash verb"subequations"
\latex default 
 environment should revert to normal numbering: 
\begin_inset Formula \begin{equation} \label{e:check}
H<K
\end{equation}
\end_inset 

 A check on the labeling: that was equation
\protected_separator 

\latex latex 

\backslash eqref{e:check}
\latex default 
.
\layout Standard

The sub-numbered equations can be spread out through the text, like this:
 
\latex latex 

\backslash begin{subequations}
\newline 

\backslash begin{equation}
\newline 
A=B
\newline 

\backslash end{equation}
\newline 
The 
\backslash verb"subequations" environment can span arbitrary text between
\newline 
subsidiary equations. The only restriction is that if there are any
\newline 
numbered equations inside the 
\backslash verb"subequations" environment that break
\newline 
out of the subequation numbering sequence, they would have to be handled
\newline 
specially.
\newline 

\backslash begin{equation}
\newline 
D=C 
\backslash label{e:newmiddle}
\newline 

\backslash end{equation}
\newline 
More arbitrary text.
\newline 

\backslash begin{equation}
\newline 
E=F
\newline 

\backslash end{equation}
\newline 

\backslash end{subequations}
\latex default 
 Label check: the middle one was 
\latex latex 

\backslash eqref{e:newmiddle}
\latex default 

\layout Standard

A final equation for a numbering check. 
\begin_inset Formula \begin{equation} \label{e:final}
G=H
\end{equation}
\end_inset 

 That equation was labeled as 
\latex latex 

\backslash eqref{e:final}
\latex default 
.
\layout Section

Tests of 
\latex latex 

\backslash env{align}
\latex default 
, 
\latex latex 

\backslash env{gather}
\latex default 
, and other AMS-
\latex latex 

\backslash protect
\latex default 
LaTeX environments
\layout Standard

The 
\latex latex 

\backslash env{align}
\latex default 
 environment: 
\latex latex 

\backslash begin{subequations}
\newline 

\backslash begin{align}
\newline 

\backslash label{align:a}A+B&=B+A
\backslash 
\backslash 
\newline 

\backslash label{align:b}C&=D+E
\backslash 
\backslash 
\newline 

\backslash label{align:c}E&=F
\newline 

\backslash end{align}
\newline 

\backslash end{subequations}
\latex default 
 Label check: that was 
\latex latex 

\backslash eqref{align:a}
\latex default 
, 
\latex latex 

\backslash eqref{align:b}
\latex default 
, and 
\latex latex 

\backslash eqref{align:c}
\latex default 
.
\layout Standard

The 
\latex latex 

\backslash env{align}
\latex default 
 environment again: 
\latex latex 

\backslash begin{subequations}
\newline 

\backslash begin{align}
\newline 

\backslash label{xalign:a}A+B&=B&     B&=B+A
\backslash 
\backslash 
\newline 

\backslash label{xalign:b}C&=D+E&     C
\backslash oplus D&=E
\backslash 
\backslash 
\newline 

\backslash label{xalign:c}E&=F&       E'&=F'
\newline 

\backslash end{align}
\newline 

\backslash end{subequations}
\latex default 
 Label check: that was 
\latex latex 

\backslash eqref{xalign:a}
\latex default 
, 
\latex latex 

\backslash eqref{xalign:b}
\latex default 
, and 
\latex latex 

\backslash eqref{xalign:c}
\latex default 
.
\layout Standard

The 
\latex latex 

\backslash env{gather}
\latex default 
 environment.
 For the third line we refer to one of the numbers in the first 
\latex latex 

\backslash env{align}
\latex default 
 structure. 
\latex latex 

\backslash begin{subequations}
\newline 

\backslash begin{gather}
\newline 

\backslash label{gather:a}A+B=B
\backslash 
\backslash 
\newline 

\backslash label{gather:b}C=D+E
\backslash 
\backslash 
\newline 

\backslash tag{
\backslash ref{align:c}
\backslash ('
\backslash )}
\backslash label{gather:c}E=F
\newline 

\backslash end{gather}
\newline 

\backslash end{subequations}
\latex default 
 Label check: that was 
\latex latex 

\backslash eqref{gather:a}
\latex default 
, 
\latex latex 

\backslash eqref{gather:b}
\latex default 
, and 
\latex latex 

\backslash eqref{gather:c}
\latex default 
.
\layout Standard

The next 
\latex latex 

\backslash env{subequations}
\latex default 
 environment encompasses two separate equations.
 A 
\latex latex 

\backslash env{split}
\latex default 
 environment: 
\latex latex 

\backslash begin{subequations}
\newline 

\backslash begin{equation}
\newline 

\backslash label{split:x}
\newline 

\backslash begin{split}
\newline 
A&=B+C+F
\backslash 
\backslash 
\newline 
&=G
\newline 

\backslash end{split}
\newline 

\backslash end{equation}
\newline 
and a 
\backslash env{multline} environment:
\newline 

\backslash begin{multline}
\backslash label{multline:x}
\newline 
A[B]C[D]E[F]G[[H[I]J[K]L[M]N]]=
\backslash 
\backslash 
\newline 
H[I]J[K]L[M]N[O]P[Q]R[S]T[U]V[W]X[Y]Z
\newline 

\backslash end{multline}
\newline 

\backslash end{subequations}
\latex default 
 Label check: That was 
\latex latex 

\backslash eqref{split:x}
\latex default 
 and 
\latex latex 

\backslash eqref{multline:x}
\latex default 
.
\the_end
============================= end reLyX ==============================


Reply via email to