Re: How to use "abstract" package with LyX

2018-08-15 Thread list_email

> On Aug 14, 2018, at 11:31 AM, Paul A. Rubin  wrote:
> 
> On 08/13/2018 10:31 PM, list_em...@icloud.com  
> wrote:
>>> On Aug 7, 2018, at 11:57 AM, Paul A. Rubin  
>>>  wrote:
>>> 
>>> 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.
>> I first tried adding the package to the preamble and got to messing around 
>> with the LaTeX and ERT trying to fix problems.
>>> 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.
>> Thanks again for those files. I believe they work as “advertised.” However, 
>> when I tried to add an author, possibly with a footnote attached to the 
>> author’s name, I ran into problems again. I’ve attached modified versions of 
>> your two MWEs. Maybe you have further comments. I didn’t try adding the 
>> \author field to the preamble but I suppose that could work—don’t know about 
>> fixing the footnote problem though.
>> 
>> Jerry
>> 
>> 
>> 
>> 
>>> Paul
> I'm not sure there is a way to fix the second of your modified files. Even 
> without an author footnote, the abstract is on a separate page from the 
> author. For your first version, I think I was able to hack it to do what you 
> want. The key was to load the abstract package, even though you won't be 
> using it for the abstract, because it supplies a command named "\saythanks". 
> Sticking that command in ERT after the \twocolumn[] command seems to work. I 
> suppose you could look in the abstract package source code, find the 
> definition of \saythanks, and put that directly in the preamble (or in a 
> little module). That would free you from loading the abstract package, just 
> in case it introduces any side effects somewhere else.
> 
> Paul
> 
> 

This is working. Thanks!
Jerry




Re: How to use "abstract" package with LyX

2018-08-14 Thread Paul A. Rubin

On 08/13/2018 10:31 PM, list_em...@icloud.com wrote:

On Aug 7, 2018, at 11:57 AM, Paul A. Rubin  wrote:

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.

I first tried adding the package to the preamble and got to messing around with 
the LaTeX and ERT trying to fix problems.

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.

Thanks again for those files. I believe they work as “advertised.” However, 
when I tried to add an author, possibly with a footnote attached to the 
author’s name, I ran into problems again. I’ve attached modified versions of 
your two MWEs. Maybe you have further comments. I didn’t try adding the \author 
field to the preamble but I suppose that could work—don’t know about fixing the 
footnote problem though.

Jerry





Paul
I'm not sure there is a way to fix the second of your modified files. 
Even without an author footnote, the abstract is on a separate page from 
the author. For your first version, I think I was able to hack it to do 
what you want. The key was to load the abstract package, even though you 
won't be using it for the abstract, because it supplies a command named 
"\saythanks". Sticking that command in ERT after the \twocolumn[] 
command seems to work. I suppose you could look in the abstract package 
source code, find the definition of \saythanks, and put that directly in 
the preamble (or in a little module). That would free you from loading 
the abstract package, just in case it introduces any side effects 
somewhere else.


Paul



abstract copy.lyx
Description: application/lyx


Re: How to use "abstract" package with LyX

2018-08-13 Thread list_email

> On Aug 7, 2018, at 11:57 AM, Paul A. Rubin  wrote:
> 
> 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.

I first tried adding the package to the preamble and got to messing around with 
the LaTeX and ERT trying to fix problems.
> 
> 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.

Thanks again for those files. I believe they work as “advertised.” However, 
when I tried to add an author, possibly with a footnote attached to the 
author’s name, I ran into problems again. I’ve attached modified versions of 
your two MWEs. Maybe you have further comments. I didn’t try adding the \author 
field to the preamble but I suppose that could work—don’t know about fixing the 
footnote problem though.

Jerry



abstract copy.lyx
Description: Binary data


abstract2 copy.lyx
Description: Binary data


> 
> Paul



Re: How to use "abstract" package with LyX

2018-08-08 Thread Paul A. Rubin

On 08/07/2018 07:03 PM, Rich Shepard wrote:

On Aug 7, 2018, at 11:57 AM, Paul A. Rubin  wrote:


That said, it's a PITA to get the abstract package to work with LyX.


Paul,

  I've not followed this thread being busy with paying work. :-) But, 
I am

surprised you've had issues with it.

  All my documents (letters, articles, reports, and books) use the
KOMA-script versions. I don't explicitly load an abstract package in the
document's preamble, just type it in the appropriate place, highlight it,
and select 'Abstract' from the environment menu. As long as I remember to
not put the title on the page it comes out correctly.

  Were I to write a two-column article, I'd use the \multicols{} 
package and

put the abstract above that.

  Just my 50-cents worth.

Rich

Rich,

I've never had any problems with abstracts, using the standard Abstract 
environment and no additional package (same as you). The LaTeX Abstract 
package is apparently supposed to simplify creating centered, page-wide 
abstracts in papers that use a two column layout. I assume that's why 
Jerry, the OP, was loading it. At least when used with LyX, the 
"simplify" part seems to be in doubt. :-)


As far as using the \multicols command, to each his own. It's been a 
while since I wrote something in two column format, and I think the last 
time I did it used a journal-specific LaTeX class that dealt with the 
two-column stuff (and the layout of the abstract). Jerry might want to 
look at \multicols{} (which I seem to vaguely recall using in the past), 
but I sent him a couple of MWE (one with the Abstract package, one 
without), and it sounds like that'll get him over the hump for now.


Paul



Re: How to use "abstract" package with LyX

2018-08-07 Thread Rich Shepard

On Aug 7, 2018, at 11:57 AM, Paul A. Rubin  wrote:


That said, it's a PITA to get the abstract package to work with LyX.


Paul,

  I've not followed this thread being busy with paying work. :-) But, I am
surprised you've had issues with it.

  All my documents (letters, articles, reports, and books) use the
KOMA-script versions. I don't explicitly load an abstract package in the
document's preamble, just type it in the appropriate place, highlight it,
and select 'Abstract' from the environment menu. As long as I remember to
not put the title on the page it comes out correctly.

  Were I to write a two-column article, I'd use the \multicols{} package and
put the abstract above that.

  Just my 50-cents worth.

Rich


Re: How to use "abstract" package with LyX

2018-08-07 Thread list_email


> On Aug 7, 2018, at 11:57 AM, Paul A. Rubin  wrote:
> 
> 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
> 
> 

Thanks a lot, Paul. I was able eventually to get a reasonable result but then I 
wasn’t able to duplicate it on a new document. Both of your examples give good 
results for my purposes. (Curious about the differing vertical space after the 
section title, “The Text,” but that’s not concerning me right now.) I’m 
planning another writing project in a few days which will give me a chance to 
try your methods. Thanks again.

Jerry



Re: How to use "abstract" package with LyX

2018-08-07 Thread Paul A. Rubin

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



abstract.lyx
Description: application/lyx


abstract2.lyx
Description: application/lyx


How to use "abstract" package with LyX

2018-08-01 Thread list_email
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