Discussion:
[LYX] Trouble using the LNCS class/style
Jon Haitz Legarreta
2014-05-26 11:32:56 UTC
Permalink
Hi there,
I am having quite a few difficulties while trying to use the LNCS style [1]
in a LyX document.

My aim to use the LNCS style in a LyX document, and then export it to a PDF.

Apparently, I have succesfully installed the LNCS style for MiKTeX
(following some instructions I found [2]): I pasted the lncs.cls and
llncsdoc.sty files under \MiKTeX 2.9\tex\latex\lncs, executed texhash,
refreshed FNDB and updated formats in MiKTeX and reconfigured LyX.

The LNCS style is now available under the "Document" "Configure" menu entry
in LyX.

I import the input llncs.dem file (or the very same file with the *.tex
extension) provided in the materials [1] using the "Import" "Simple LaTeX"
option in Lyx.

When trying to export the attached document (which is the very llncs.dem
example provided by LNCS authors) to a PDF (via either LuaTeX or pdflatex),
LyX is unable to export the document.

Some of the errors are:

















*]! Too many }'s.l.829 Index} {Subject Index}
\global\long\def\indexname{Subject Index}You've closed more groups than you
opened.Such booboos are generally harmless, so keep going.! LaTeX Error:
Lonely \item--perhaps a missing list environment.See the LaTeX manual or
LaTeX Companion for explanation.Type H <return> for immediate
help. ...
l.3 \item A
bsorption\idxquad 327Try typing <return> to proceed.If that doesn't work,
type X <return> to quit.*


I cannot make head or tails of the error: there are not too mant }'s, nor
lonely items. Besides, the LaTeX compilation works fine (0 errores, 0
warnings, 3 bad boxes).

I am using LyX 2.1.0 and MiKTeX 2.9 under Windows 7.

I did not find any useful solution after some googling.

Has any of you had similar problems with the lncs style in the past? Can
someone point some useful directions?

Thank you,
JON HAITZ


[1] ftp://ftp.springer.de/pub/tex/latex/llncs/latex2e/llncs2e.zip
[2] http://nkush.blogspot.com.es/2012/07/how-to-install-springer-lncs
-class-for.html


P.S.: I am having difficulties sending mails with attached documents to the
list, so I cannot attach the error log, lncs style sheet/template, the
subjidx.tex file nor my own lyx document.
Jon Haitz Legarreta
2014-05-30 09:38:09 UTC
Permalink
Hi,
can anybody give some advice on this, please?

Thanks,
JON HAITZ

---------- Forwarded message ----------
From: Jon Haitz Legarreta <***@vicomtech.org>
Date: 26 May 2014 13:32
Subject: [LYX] Trouble using the LNCS class/style
To: lyx-***@lists.lyx.org


Hi there,
I am having quite a few difficulties while trying to use the LNCS style [1]
in a LyX document.

My aim to use the LNCS style in a LyX document, and then export it to a PDF.

Apparently, I have succesfully installed the LNCS style for MiKTeX
(following some instructions I found [2]): I pasted the lncs.cls and
llncsdoc.sty files under \MiKTeX 2.9\tex\latex\lncs, executed texhash,
refreshed FNDB and updated formats in MiKTeX and reconfigured LyX.

The LNCS style is now available under the "Document" "Configure" menu entry
in LyX.

I import the input llncs.dem file (or the very same file with the *.tex
extension) provided in the materials [1] using the "Import" "Simple LaTeX"
option in Lyx.

When trying to export the attached document (which is the very llncs.dem
example provided by LNCS authors) to a PDF (via either LuaTeX or pdflatex),
LyX is unable to export the document.

Some of the errors are:

















*]! Too many }'s.l.829 Index} {Subject Index}
\global\long\def\indexname{Subject Index} You've closed more groups than
you opened.Such booboos are generally harmless, so keep going.! LaTeX
Error: Lonely \item--perhaps a missing list environment.See the LaTeX
manual or LaTeX Companion for explanation. Type H <return> for immediate
help. ...
l.3 \item A
bsorption\idxquad 327Try typing <return> to proceed. If that doesn't
work, type X <return> to quit.*


I cannot make head or tails of the error: there are not too mant }'s, nor
lonely items. Besides, the LaTeX compilation works fine (0 errores, 0
warnings, 3 bad boxes).

I am using LyX 2.1.0 and MiKTeX 2.9 under Windows 7.

I did not find any useful solution after some googling.

Has any of you had similar problems with the lncs style in the past? Can
someone point some useful directions?

Thank you,
JON HAITZ


[1] ftp://ftp.springer.de/pub/tex/latex/llncs/latex2e/llncs2e.zip
[2] http://nkush.blogspot.com.es/2012/07/how-to-install-springer-lncs
-class-for.html


P.S.: I am having difficulties sending mails with attached documents to the
list, so I cannot attach the error log, lncs style sheet/template, the
subjidx.tex file nor my own lyx document.
Richard Heck
2014-05-30 12:54:54 UTC
Permalink
Post by Jon Haitz Legarreta
Hi,
can anybody give some advice on this, please?
I take it the problem is that no one here is using this class. But I'll try.
Post by Jon Haitz Legarreta
Hi there,
I am having quite a few difficulties while trying to use the LNCS
style [1] in a LyX document.
My aim to use the LNCS style in a LyX document, and then export it to a PDF.
Apparently, I have succesfully installed the LNCS style for MiKTeX
(following some instructions I found [2]): I pasted the lncs.cls and
llncsdoc.sty files under \MiKTeX 2.9\tex\latex\lncs, executed texhash,
refreshed FNDB and updated formats in MiKTeX and reconfigured LyX.
The LNCS style is now available under the "Document" "Configure" menu
entry in LyX.
I import the input llncs.dem file (or the very same file with the
*.tex extension) provided in the materials [1] using the "Import"
"Simple LaTeX" option in Lyx.
When trying to export the attached document (which is the very
llncs.dem example provided by LNCS authors) to a PDF (via either
LuaTeX or pdflatex), LyX is unable to export the document.
Some of the errors are: [snip]
The way to debug this is to start deleting material from the document
until you get something that will compile. Then start adding stuff back
until you find what's causing the problem.

You should check the document preamble, as well as the body. There could
be errors there.

Richard
stefano franchi
2014-05-30 14:27:56 UTC
Permalink
Post by Jon Haitz Legarreta
Hi,
can anybody give some advice on this, please?
Jon,

you may have the wrong approach. Instead of importing the .dem file into
LyX, which may produce errors (LyX's LaTeX import is not 100% correct), why
don't you start a new LNCS document and work on that? I did exactly that
recently, and it worked fine. I just looked at the LNCS docs for examples.


Stefano
--
__________________________________________________
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies Ph: +1 (979) 845-2125
Texas A&M University Fax: +1 (979) 845-6421
College Station, Texas, USA

***@tamu.edu
http://stefano.cleinias.org
Jon Haitz Legarreta
2014-06-02 07:53:48 UTC
Permalink
Hi Stefano, Richard,
thank you for your interest.

I started a Lyx document with LNCS format from scratch several times, but I
cannot even get the authors written.

I also tried to reduce the *.tex example (*.dem file, renamed to *.tex
-compiling fine in LaTeX-, and exported to LyX) to its minimum expression
(please find attached the *.lyx file, and the subjidx.lyx, and llncs.cls
files, just in case) in order to spot the source of the problem.

There seems to be a problem when adding the authors: when deleting the
following line the document is compiled correctly, but no authors are
displayed (even if it seems that this just adds a list of subjects); if the
line is kept there are a number of errors whose explanation seems not to be
so easy:

*\addtocmark[2]{Subject Index} % additional numbered TOC
entry\markboth{Subject Index}{Subject Index} \indexname=Subject Index
Input: subjidx.lyx*

So frankly speaking, I am at a loss at this stage.

Thank you,
JON HAITZ
Post by stefano franchi
Post by Jon Haitz Legarreta
Hi,
can anybody give some advice on this, please?
Jon,
you may have the wrong approach. Instead of importing the .dem file into
LyX, which may produce errors (LyX's LaTeX import is not 100% correct), why
don't you start a new LNCS document and work on that? I did exactly that
recently, and it worked fine. I just looked at the LNCS docs for examples.
Stefano
--
__________________________________________________
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies Ph: +1 (979) 845-2125
Texas A&M University Fax: +1 (979) 845-6421
College Station, Texas, USA
http://stefano.cleinias.org
Jürgen Spitzmüller
2014-06-02 10:24:40 UTC
Permalink
Post by Jon Haitz Legarreta
Hi Stefano, Richard,
thank you for your interest.
I started a Lyx document with LNCS format from scratch several times, but
I cannot even get the authors written.
I also tried to reduce the *.tex example (*.dem file, renamed to *.tex
-compiling fine in LaTeX-, and exported to LyX) to its minimum expression
(please find attached the *.lyx file, and the subjidx.lyx, and llncs.cls
files, just in case) in order to spot the source of the problem.
There seems to be a problem when adding the authors: when deleting the
following line the document is compiled correctly, but no authors are
displayed (even if it seems that this just adds a list of subjects); if the
line is kept there are a number of errors whose explanation seems not to be
*\addtocmark[2]{Subject Index} % additional numbered TOC
entry\markboth{Subject Index}{Subject Index} \indexname=Subject Index
Input: subjidx.lyx*
So frankly speaking, I am at a loss at this stage.
There were several issues:

1. All brackets that belong to native LaTeX commands need to be put in ERT
(else, LyX outputs "[" protected as "{[}"). This concerns the two commands
at the end of the main document
2. The \markboth at the end of the main document needs to go on a new line.
Else, it is partially commented out due to the comment on the previous line
3. Likewise, the \begin{index} in the subdocument needs to go on is own
line (same reason).

Corrected files attached. These compile for me.

HTH
JÃŒrgen
Jürgen Spitzmüller
2014-06-02 10:26:09 UTC
Permalink
Post by Jürgen Spitzmüller
Corrected files attached. These compile for me.
I forgot to save one file before attaching. Here is the correct version.

JÃŒrgen
Post by Jürgen Spitzmüller
HTH
JÃŒrgen
Jon Haitz Legarreta
2014-06-02 14:53:25 UTC
Permalink
Dear JÃŒrgen,
thanks for having devoted some time to it and for having helped cast some
light on it.

Even if the document yields no errors now, I am still getting "No Authors
Given" "No Institute Given" in the rendered PDF.

Is there anything else to be fixed?

Thanks,
JON HAITZ
Post by Jürgen Spitzmüller
Corrected files attached. These compile for me.
I forgot to save one file before attaching. Here is the correct version.
JÃŒrgen
Post by Jürgen Spitzmüller
HTH
JÃŒrgen
Jürgen Spitzmüller
2014-06-02 14:56:38 UTC
Permalink
Post by Jon Haitz Legarreta
Dear JÃŒrgen,
thanks for having devoted some time to it and for having helped cast some
light on it.
Even if the document yields no errors now, I am still getting "No Authors
Given" "No Institute Given" in the rendered PDF.
Is there anything else to be fixed?
Below the paper title, insert the Author and select "Author" from the
paragraph style combo. Likewise, inset the Institute in a separate
paragraph following the Author and select "Institute" from the combo.

HTH
JÃŒrgen
Post by Jon Haitz Legarreta
Thanks,
JON HAITZ
Jürgen Spitzmüller
2014-06-02 15:01:53 UTC
Permalink
Post by Jürgen Spitzmüller
Below the paper title, insert the Author and select "Author" from the
paragraph style combo. Likewise, inset the Institute in a separate
paragraph following the Author and select "Institute" from the combo.
I see now that your paper has these infos, but the titling information is
interrupted by Standard paragraphs (the ERT comments), which makes LyX
terminate the Titling block (i.e, output \maketitle). Remove these
comments, and the titling will be correct. See attached.

JÃŒrgen
Post by Jürgen Spitzmüller
HTH
JÃŒrgen
Post by Jon Haitz Legarreta
Thanks,
JON HAITZ
Jon Haitz Legarreta
2014-06-02 15:22:34 UTC
Permalink
Dear JÃŒrgen,
thanks.

I had to delete the Email: field to make it work properly. Otherwise, the
actual email was displayed in an additional blank page.

It seems to me that it may be related to the paragraph styles created when
the import is done, such as the Running Title or the Author Running.

Kind regards,

JON HAITZ
Post by Jürgen Spitzmüller
Below the paper title, insert the Author and select "Author" from the
Post by Jürgen Spitzmüller
paragraph style combo. Likewise, inset the Institute in a separate
paragraph following the Author and select "Institute" from the combo.
I see now that your paper has these infos, but the titling information is
interrupted by Standard paragraphs (the ERT comments), which makes LyX
terminate the Titling block (i.e, output \maketitle). Remove these
comments, and the titling will be correct. See attached.
JÃŒrgen
Post by Jürgen Spitzmüller
HTH
JÃŒrgen
Post by Jon Haitz Legarreta
Thanks,
JON HAITZ
Jürgen Spitzmüller
2014-06-02 15:28:33 UTC
Permalink
Post by Jon Haitz Legarreta
It seems to me that it may be related to the paragraph styles created when
the import is done, such as the Running Title or the Author Running.
Yes, this is certainly something where the tex2lyx converter could do
better. But as soon as a lot of comments are in the source, things get
nontrivial (for the importer).

JÃŒrgen
Jon Haitz Legarreta
2014-06-03 11:54:16 UTC
Permalink
Just to (hopefully) conclude with the issue, and even if I guess that we
will usually not encounter the case, the document fails to successfully
render two titles (the LNCS demo *.tex does have two just as an example).

However, if the second title (with its authors and institutions) are added
by means with an ERT, the title is displayed and added to the TOC correctly.

I wonder whether having two tieles is a feature that is not allowed in LyX,
or whether it requires some deeper and more complex explanation, may be
linked to the LNCS template.

Thanks,
JON HAITZ
Post by Jon Haitz Legarreta
It seems to me that it may be related to the paragraph styles created when
Post by Jon Haitz Legarreta
the import is done, such as the Running Title or the Author Running.
Yes, this is certainly something where the tex2lyx converter could do
better. But as soon as a lot of comments are in the source, things get
nontrivial (for the importer).
JÃŒrgen
Jürgen Spitzmüller
2014-06-04 07:23:44 UTC
Permalink
Post by Jon Haitz Legarreta
Just to (hopefully) conclude with the issue, and even if I guess that we
will usually not encounter the case, the document fails to successfully
render two titles (the LNCS demo *.tex does have two just as an example).
However, if the second title (with its authors and institutions) are added
by means with an ERT, the title is displayed and added to the TOC correctly.
I wonder whether having two tieles is a feature that is not allowed in
LyX, or whether it requires some deeper and more complex explanation, may
be linked to the LNCS template.
Are the two titles subsequent (without any body text)? If so, it should
work. If they are not subsequent, adding \maketitle in ERT just below the
second title should help.

JÃŒrgen
Post by Jon Haitz Legarreta
Thanks,
JON HAITZ
Post by Jon Haitz Legarreta
It seems to me that it may be related to the paragraph styles created
when the import is done, such as the Running Title or the Author Running.
Yes, this is certainly something where the tex2lyx converter could do
better. But as soon as a lot of comments are in the source, things get
nontrivial (for the importer).
JÃŒrgen
Jon Haitz Legarreta
2014-06-04 07:52:45 UTC
Permalink
Dear JÃŒrgen,
thank you.

The two titles are not subsequent, they have body text in between.

Although the error yielded by LyX [1] persists, adding \maketitle in ERT
actually renders the title correctly. So the issue can be considered as
solved if the error can be considered as "normal" for this situation.

Thanks JÃŒrgen,
JON HAITZ





[1] Error in latexParagraphs: You should not mix title layouts with normal
ones.
..\..\src\output_latex.cpp (1112): Error in latexParagraphs: You should not
mix title layouts with normal ones.
Post by Jon Haitz Legarreta
Just to (hopefully) conclude with the issue, and even if I guess that we
Post by Jon Haitz Legarreta
will usually not encounter the case, the document fails to successfully
render two titles (the LNCS demo *.tex does have two just as an example).
However, if the second title (with its authors and institutions) are
added by means with an ERT, the title is displayed and added to the TOC
correctly.
I wonder whether having two tieles is a feature that is not allowed in
LyX, or whether it requires some deeper and more complex explanation, may
be linked to the LNCS template.
Are the two titles subsequent (without any body text)? If so, it should
work. If they are not subsequent, adding \maketitle in ERT just below the
second title should help.
JÃŒrgen
Post by Jon Haitz Legarreta
Thanks,
JON HAITZ
Post by Jon Haitz Legarreta
It seems to me that it may be related to the paragraph styles created
when the import is done, such as the Running Title or the Author Running.
Yes, this is certainly something where the tex2lyx converter could do
better. But as soon as a lot of comments are in the source, things get
nontrivial (for the importer).
JÃŒrgen
Loading...