I don't know how to solve this problem---I'm top-posting since the
details below don't matter much---but I can say how to go about solving it.

Since you are comfortable with LaTeX, figure this out at the LaTeX level
first, and ignore LyX. So, e.g,. create a simple file, based on
article.cls, and include a variety of types of equations, e.g., align*
and other things that seem to be causing problems. You may need to try
putting the line that loads extract in different places. Does this work?
If not, the problem lies in extract's treatment of those environments.
If it does work, try shifting the document class to classic-thesis. Does
that work? If not, then there's some incompatibility between
classic-thesis and extract. Those are both LaTeX issues. I'd try writing
the extract maintainer, or asking on comp.text.tex or somewhere like that.

If all is well on the LaTeX side, try importing your simple LaTeX file
into LyX. Alternatively, just try creating the same kind of file in LyX.
If it no longer works, then export it back to LaTeX and compare the two
files. They will be different. It may be that the line that's loading
extract is coming at a different place.

Richard


On 10/26/2016 11:42 AM, Riccardo wrote:
> 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
> <mailto: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
>     <https://wiki.lyx.org/FAQ/MinimalExample>
>
>     Scott
>     >
>     > Riccardo
>
>

Reply via email to