On 08/01/2018 07:27 PM, list_em...@icloud.com wrote:
Has anyone successfully used the “abstract” package with LyX?

http://mirror.las.iastate.edu/tex-archive/macros/latex/contrib/abstract/abstract.pdf

I am trying to use it with "Article (Standard Class)” in two-column mode to get 
a single-column abstract to appear above the two-column body but am having trouble 
because the title page command “\maketitle” is called twice which is very bad. You 
can see more details of my experience here but for now I want to keep this message 
simple:

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg205850.html

Jerry

First, you're using the package wrong. In theory, you should just add the \usepackage command in the preamble, give it any package options you want related to the formatting of the abstract title etc., and then add the abstract in the usual way (using the Abstract environment, no raw LaTeX required). In particular, your typing the \maketitle command in ERT creates the duplication you observed.

That said, it's a PITA to get the abstract package to work with LyX. I'm attaching two small examples. abstract2.lyx uses the abstract package. I did not specify any options to it. The keys were (1) to define the title in the preamble and not use the Title environment, which lets you get away with specifying the \maketitle command manually, and (2) to stick a forced end of line at the end of the abstract, to prevent it from butting up against the first section.

The other attached file, abstract.lyx, accomplishes the same thing without using the abstract package. IMO it's easier, but may be less desirable if you need to customize placement of the title "Abstract" or futz with fonts or margins in just the abstract.

Paul

Attachment: abstract.lyx
Description: application/lyx

Attachment: abstract2.lyx
Description: application/lyx

Reply via email to