Indeed it is very useful in my opinion!
By the way, sorry for the poor explanation. I'll try to better explain the
problem:

*In latex* with a Minimal.tex (attached) you run
latex Minimal.tex
and the line
\usepackage[active,generate=filename,extract-env={align,equation}]{extract}
generate a filename.tex (attached), attaching to it every align and
equation environment found in Minimal.tex.

In my case, however, I'm using *LyX with classicthesis template*. Being it
based on a latex template, I thought it'd be easy to modify the preamble
classicthesis-config.tex (in fact it worked in the past with some other
packages). I tried to add the following lines to the  package list loaded

\PassOptionsToPackage[active, \PassOptionsToPackage[active,generate=file,
extract-env={equation,align}]{extract}
\usepackage{extract}

and I got many errors (not relevant showing them, please read the
following).

Then, I tried adding to the Latex preamble

\usepackage[active,generate=file,extract-env={equation,align}]{extract}


via the Document->Setting->LatexPreamble dialog, with a little more luck.
At first, I got many identical errors concerning the package extract
handling of unnumbered equations environment (please refer to the package
documentation):

! LaTeX Error: \begin{XTRalign*} on input line 1 ended by \end{XTRalign}.


See the LaTeX manual or LaTeX Companion for explanation.

Type H <return> for immediate help.

...

l.4 \end{XTRalign*}

Your command was ignored.

Type I <command> <return> to replace it with another command,

or <return> to continue without it.

Removing every {align*} and {eqnarray*} environment, leaving numbered
equations only, a proper "file.tex" is created in the temporary log folder,
with every numbered formula attached.So now my questions are:

1. Has anyone encountered the same problem? Do you now any fix to the
align* issue?
2. Do you know any alternative, possibly with a Lyx file output instead of
a latex one? Formatting and tipography issue are not relevant for me, since
this would be just an auxiliary file for me to check while writing.

Thanks in advance
Riccardo

2016-10-26 15:32 GMT+02:00 Scott Kostyshak <skost...@lyx.org>:

> On Wed, Oct 26, 2016 at 02:31:03PM +0200, Riccardo wrote:
> > Hello,
>
> Hi Riccardo,
>
> > do anybody have ever used the package extract in LyX (possibly in
> > combination with classicthesis)?
>
> I have not used it, but it looks interesting and useful!
>
> > I'm writing my thesis and I'd like to
> > check the consistency of the notation throughout it, focusing on math
> only.
> > Are there any alternatives?
> > If I use the package as suggested in the CTAN repository documentation,
> Lyx
> > fails with a number of errors.
>
> For issues like this, please always say explicitly which errors you get
> and please also attach a minimal example. See here for more information:
>
> https://wiki.lyx.org/FAQ/MinimalExample
>
> Scott
> >
> > Riccardo
>

Attachment: filename.tex
Description: TeX document

Attachment: Minimal.tex
Description: TeX document

Reply via email to