I understand now why I loose a lot of elements in my preambles during
imports from SWP into Lyx. The idea is smart, but maybe too smart to
work flawlessly ;-)

Concerning your problem, maybe adding a newtheorem called definition
in the preamble could solve it?.
\newtheorem{definition}{Definition}

Murat

2009/3/10 David Bickel <davidbickel.com+re...@gmail.com>:
> Thanks, Uwe. I filed a bug report.
>
> Unfortunately, adding the deleted \usepackage lines back to the LyX
> file did not prevent the error.
>
> David
>
>
> On Tue, Mar 10, 2009 at 4:31 PM, Uwe Stöhr <uwesto...@web.de> wrote:
>> David Bickel schrieb:
>>
>>> Thanks, Uwe. I reproduced the error using the following file contents.
>>
>> The problem is that the file exported from SWP has a huge amount of
>> definitions in the document preamble that are not used in the further
>> document. For example the counter "MaxMatrixCols" is set. This can only be
>> done when the package "graphics" is loaded. When importing to LyX, LyX's
>> tex2lyx converter checks what packages are used in the document. But in your
>> document you don't have any graphic and matrix, therefore tex2lyx kicks out
>> the unneeded package "graphics" and you then get an error when compiling
>> your document that MaxMatrixCols is unknown. This has been proven useful
>> because every unneeded package may cause problems or interferences with
>> other packages. But although the export from SWP contains unneeded
>> definitions, your file must work.
>> Can you therefore please file a bug report at bugzilla.lyx.org (CC me
>> there), I'll try for fix this for the next LyX release.
>>
>>> How should I modify the preamble for proper import?
>>
>> Delete the packages from the preamble of your LaTeX documents that are not
>> used in the further document. But to know that, you must be a LaTeX expert,
>> therefore there's no general workaround.
>> The easiest way is to add all lines starting with
>> \usepackage
>> that have been deleted by LyX to the preamble of the LyX document got by
>> importing a TeX file.
>> To see what packages you need to add, use in LyX the menu View->Source and
>> use there the option "complete source". Then compare the \usepackage lines
>> with that from the LaTeX file and add the missing ones to the document
>> preamble in LyX (menu Document->Settings).
>>
>> regards Uwe
>>
>



-- 
*** NEW UNIVERSITY, NEW ADDRESS ! ***

Prof. Murat Yildizoglu
Université Paul Cézanne (Aix-Marseille 3)
GREQAM (UMR CNRS 6579)
Centre de la Vieille Charité
2, rue de la Charité
13236 Marseille cedex 02

Bureau 320
Tel : +33 4 91 14 07 27 (standard)
Tel : +33 4 91 14 07 70 (secrétariat)
Tel : +33 4 91 14 07 47 (bureau)
Fax : +33 4 91 90 02 27

e-mail: murat.yildizo...@univ-cezanne.fr
www : http://www.vcharite.univ-mrs.fr/PP/yildi/index.html
http://www.twitter.com/yildizoglu
______________________________________________

Reply via email to