Re: Put figures in figure float in center - the best way?

2012-09-14 Thread Guenter Milde
On 2012-09-13, Jürgen Spitzmüller wrote:
 Guenter Milde wrote:
  1) using paragrahh properties - alignment - center

 Unfortunately, this adds vertical space above and below the graphic.

 No. Note that we use \begin{centering} in floats, not \begin{center} (which 
 is 
 the one which adds the space).

 \begin{centering}...\end{centering} is basically equivalent to
 \bgroup\centering...\egroup

OK, so this issue is solved long ago without me noticing and we only have to
bother about the default alignment in floats.

Thanks for correcting me.

Günter



Re: Put figures in figure float in center - the best way?

2012-09-14 Thread Guenter Milde
On 2012-09-13, Jürgen Spitzmüller wrote:
 Guenter Milde wrote:
  1) using paragrahh properties - alignment - center

 Unfortunately, this adds vertical space above and below the graphic.

 No. Note that we use \begin{centering} in floats, not \begin{center} (which 
 is 
 the one which adds the space).

 \begin{centering}...\end{centering} is basically equivalent to
 \bgroup\centering...\egroup

OK, so this issue is solved long ago without me noticing and we only have to
bother about the default alignment in floats.

Thanks for correcting me.

Günter



Re: Put figures in figure float in center - the best way?

2012-09-14 Thread Guenter Milde
On 2012-09-13, Jürgen Spitzmüller wrote:
> Guenter Milde wrote:
>> > 1) using paragrahh properties - alignment - center

>> Unfortunately, this adds vertical space above and below the graphic.

> No. Note that we use \begin{centering} in floats, not \begin{center} (which 
> is 
> the one which adds the space).

> \begin{centering}...\end{centering} is basically equivalent to
> \bgroup\centering...\egroup

OK, so this issue is solved long ago without me noticing and we only have to
bother about the default alignment in floats.

Thanks for correcting me.

Günter



Re: Put figures in figure float in center - the best way?

2012-09-13 Thread Guenter Milde
On 2012-09-12, Rainer M Krug wrote:

 Hi

 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a figure float:

 1) using paragrahh properties - alignment - center

Unfortunately, this adds vertical space above and below the graphic.

 2) using a \hfill left and right of the figure


 What is the better / more robust / more LaTeX way of doing this?

3) Write \centering as ERT before the graphics inset.

   (or the re-definition in the preamble suggested in the other responses).
   
Günter   



Re: Put figures in figure float in center - the best way?

2012-09-13 Thread Jürgen Spitzmüller
Guenter Milde wrote:
  1) using paragrahh properties - alignment - center
 
 Unfortunately, this adds vertical space above and below the graphic.

No. Note that we use \begin{centering} in floats, not \begin{center} (which is 
the one which adds the space).

\begin{centering}...\end{centering} is basically equivalent to
\bgroup\centering...\egroup

Jürgen


Re: Put figures in figure float in center - the best way?

2012-09-13 Thread Guenter Milde
On 2012-09-12, Rainer M Krug wrote:

 Hi

 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a figure float:

 1) using paragrahh properties - alignment - center

Unfortunately, this adds vertical space above and below the graphic.

 2) using a \hfill left and right of the figure


 What is the better / more robust / more LaTeX way of doing this?

3) Write \centering as ERT before the graphics inset.

   (or the re-definition in the preamble suggested in the other responses).
   
Günter   



Re: Put figures in figure float in center - the best way?

2012-09-13 Thread Jürgen Spitzmüller
Guenter Milde wrote:
  1) using paragrahh properties - alignment - center
 
 Unfortunately, this adds vertical space above and below the graphic.

No. Note that we use \begin{centering} in floats, not \begin{center} (which is 
the one which adds the space).

\begin{centering}...\end{centering} is basically equivalent to
\bgroup\centering...\egroup

Jürgen


Re: Put figures in figure float in center - the best way?

2012-09-13 Thread Guenter Milde
On 2012-09-12, Rainer M Krug wrote:

> Hi

> There are (at least) two ways of centering a single figure / graphic 
> horizontally in a figure float:

> 1) using paragrahh properties - alignment - center

Unfortunately, this adds vertical space above and below the graphic.

> 2) using a \hfill left and right of the figure


> What is the better / more robust / more LaTeX way of doing this?

3) Write \centering as ERT before the graphics inset.

   (or the re-definition in the preamble suggested in the other responses).
   
Günter   



Re: Put figures in figure float in center - the best way?

2012-09-13 Thread Jürgen Spitzmüller
Guenter Milde wrote:
> > 1) using paragrahh properties - alignment - center
> 
> Unfortunately, this adds vertical space above and below the graphic.

No. Note that we use \begin{centering} in floats, not \begin{center} (which is 
the one which adds the space).

\begin{centering}...\end{centering} is basically equivalent to
\bgroup\centering...\egroup

Jürgen


Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

There are (at least) two ways of centering a single figure / graphic 
horizontally in a figure float:

1) using paragrahh properties - alignment - center
2) using a \hfill left and right of the figure

What is the better / more robust / more LaTeX way of doing this?

Thanks,

Rainer

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBQau0ACgkQoYgNqgF2egp7FgCeIHyhYT/x+bJzqoANM9Muapeo
vi4An28oDskmG/XKqdTgVLKPvJlhfRiZ
=88Df
-END PGP SIGNATURE-


Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Liviu Andronic
On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a figure float:

 1) using paragrahh properties - alignment - center

I'm no expert, but this is what I usually do. And to me this seems the
less hacky approach.

Liviu


 2) using a \hfill left and right of the figure

 What is the better / more robust / more LaTeX way of doing this?

 Thanks,

 Rainer

 - --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
 UCT), Dipl. Phys.
 (Germany)

 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa

 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44

 Fax (D):+49 - (0)3 21 21 25 22 44

 email:  rai...@krugs.de

 Skype:  RMkrug
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

 iEYEARECAAYFAlBQau0ACgkQoYgNqgF2egp7FgCeIHyhYT/x+bJzqoANM9Muapeo
 vi4An28oDskmG/XKqdTgVLKPvJlhfRiZ
 =88Df
 -END PGP SIGNATURE-



-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Stephen Buonopane
You can add something like this to your preamble
(does not affect how they appear in LyX preview of course)…

\renewenvironment{figure}[1][]{
 \@float{figure}
 \centering
 \singlespacing}
 {\end@float}
 
 \renewenvironment{table}[1][]{
 \@float{table}
 \centering
 \singlespacing}
 {\end@float}

On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:

 On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a figure float:
 
 1) using paragrahh properties - alignment - center
 
 I'm no expert, but this is what I usually do. And to me this seems the
 less hacky approach.
 
 Liviu
 
 
 2) using a \hfill left and right of the figure
 
 What is the better / more robust / more LaTeX way of doing this?
 
 Thanks,
 
 Rainer
 
 - --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
 UCT), Dipl. Phys.
 (Germany)
 
 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa
 
 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
 
 iEYEARECAAYFAlBQau0ACgkQoYgNqgF2egp7FgCeIHyhYT/x+bJzqoANM9Muapeo
 vi4An28oDskmG/XKqdTgVLKPvJlhfRiZ
 =88Df
 -END PGP SIGNATURE-
 
 
 
 -- 
 Do you know how to read?
 http://www.alienetworks.com/srtest.cfm
 http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
 Do you know how to write?
 http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail



Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/09/12 14:19, Stephen Buonopane wrote:
 You can add something like this to your preamble (does not affect how they 
 appear in LyX
 preview of course)…
 
 \renewenvironment{figure}[1][]{ \@float{figure} \centering \singlespacing} 
 {\end@float}  
 \renewenvironment{table}[1][]{ \@float{table} \centering \singlespacing} 
 {\end@float}

Now this is a neat idea - haven't thought about that. Saves me quite some work.

Thanks,

Rainer

 
 On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:
 
 On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a
 figure float:
 
 1) using paragrahh properties - alignment - center
 
 I'm no expert, but this is what I usually do. And to me this seems the less 
 hacky approach.
 
 Liviu
 
 
 2) using a \hfill left and right of the figure
 
 What is the better / more robust / more LaTeX way of doing this?
 
 Thanks,
 
 Rainer
 
 - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
 Biology, UCT),
 Dipl. Phys. (Germany)
 
 Centre of Excellence for Invasion Biology Stellenbosch University South 
 Africa
 
 Tel :   +33 - (0)9 53 10 27 44 Cell:   +33 - (0)6 85 62 59 98 Fax : 
   +33 -
 (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 
 (GNU/Linux) 
 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
 
 iEYEARECAAYFAlBQau0ACgkQoYgNqgF2egp7FgCeIHyhYT/x+bJzqoANM9Muapeo 
 vi4An28oDskmG/XKqdTgVLKPvJlhfRiZ =88Df -END PGP SIGNATURE-
 
 
 
 -- Do you know how to read? http://www.alienetworks.com/srtest.cfm 
 http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you 
 know how to
 write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
 
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBQiwAACgkQoYgNqgF2egqn4wCfeaVsxaeXKeZg05j+FldYgxVy
keIAn0p3xiStaP6F5uR8HLwEszM5w8zv
=aBmS
-END PGP SIGNATURE-



Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/09/12 15:15, Rainer M Krug wrote:
 On 12/09/12 14:19, Stephen Buonopane wrote:
 You can add something like this to your preamble (does not affect how they 
 appear in LyX 
 preview of course)…
 
 \renewenvironment{figure}[1][]{ \@float{figure} \centering \singlespacing} 
 {\end@float} 
 \renewenvironment{table}[1][]{ \@float{table} \centering \singlespacing} 
 {\end@float}
 
 Now this is a neat idea - haven't thought about that. Saves me quite some 
 work.

But I was to fast. I get an error:

! Undefined control sequence.
\\figure ...at {figure} \centering \singlespacing

l.177 \begin{figure}[H]

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Any suggestions?

Rainer

 
 Thanks,
 
 Rainer
 
 
 On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:
 
 On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a 
 figure float:
 
 1) using paragrahh properties - alignment - center
 
 I'm no expert, but this is what I usually do. And to me this seems the less 
 hacky
 approach.
 
 Liviu
 
 
 2) using a \hfill left and right of the figure
 
 What is the better / more robust / more LaTeX way of doing this?
 
 Thanks,
 
 Rainer
 
 - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
 Biology, UCT), 
 Dipl. Phys. (Germany)
 
 Centre of Excellence for Invasion Biology Stellenbosch University South 
 Africa
 
 Tel :   +33 - (0)9 53 10 27 44 Cell:   +33 - (0)6 85 62 59 98 Fax 
 :   +33 - 
 (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug

 

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBQjD8ACgkQoYgNqgF2egrUSACfapSbOg4k++TnoErSLBpLA3Hq
Yf8AmwUh5HpGyGw+nRPkTRyqYToGwqYl
=caSn
-END PGP SIGNATURE-


Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Stephen Buonopane

On Sep 12, 2012, at 9:21 AM, Rainer M Krug wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 12/09/12 15:15, Rainer M Krug wrote:
 On 12/09/12 14:19, Stephen Buonopane wrote:
 You can add something like this to your preamble (does not affect how they 
 appear in LyX 
 preview of course)…
 
 \renewenvironment{figure}[1][]{ \@float{figure} \centering \singlespacing} 
 {\end@float} 
 \renewenvironment{table}[1][]{ \@float{table} \centering \singlespacing} 
 {\end@float}
 
 Now this is a neat idea - haven't thought about that. Saves me quite some 
 work.
 
 But I was to fast. I get an error:
 
 ! Undefined control sequence.
 \\figure ...at {figure} \centering \singlespacing
 
 l.177 \begin{figure}[H]
 
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
 misspelled it (e.g., `\hobx'), type `I' and the correct
 spelling (e.g., `I\hbox'). Otherwise just continue,
 and I'll forget about whatever was undefined.
 
 Any suggestions?
 
 Rainer
 

I have not used it recently, but I get the same error you do.
I copied it from Herbert Voss' tips and tricks page many years ago. 
It worked then, but I am not sure what has changed.

Actually…it looks like the /singlespacing command is causing the problem.
Delete that and the centering still works.

Steve

 
 Thanks,
 
 Rainer
 
 
 On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:
 
 On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a 
 figure float:
 
 1) using paragrahh properties - alignment - center
 
 I'm no expert, but this is what I usually do. And to me this seems the 
 less hacky
 approach.
 
 Liviu
 
 
 2) using a \hfill left and right of the figure
 
 What is the better / more robust / more LaTeX way of doing this?
 
 Thanks,
 
 Rainer
 
 - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
 Biology, UCT), 
 Dipl. Phys. (Germany)
 
 Centre of Excellence for Invasion Biology Stellenbosch University South 
 Africa
 
 Tel :   +33 - (0)9 53 10 27 44 Cell:   +33 - (0)6 85 62 59 98 Fax 
 :   +33 - 
 (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug
 
 
 
 - -- 
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
 UCT), Dipl. Phys.
 (Germany)
 
 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa
 
 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
 
 iEYEARECAAYFAlBQjD8ACgkQoYgNqgF2egrUSACfapSbOg4k++TnoErSLBpLA3Hq
 Yf8AmwUh5HpGyGw+nRPkTRyqYToGwqYl
 =caSn
 -END PGP SIGNATURE-



Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/09/12 15:36, Stephen Buonopane wrote:
 
 On Sep 12, 2012, at 9:21 AM, Rainer M Krug wrote:
 
 On 12/09/12 15:15, Rainer M Krug wrote:
 On 12/09/12 14:19, Stephen Buonopane wrote:
 You can add something like this to your preamble (does not affect how 
 they appear in
 LyX preview of course)…
 
 \renewenvironment{figure}[1][]{ \@float{figure} \centering 
 \singlespacing} {\end@float}
  \renewenvironment{table}[1][]{ \@float{table} \centering \singlespacing} 
 {\end@float}
 
 Now this is a neat idea - haven't thought about that. Saves me quite some 
 work.
 
 But I was to fast. I get an error:
 
 ! Undefined control sequence. \\figure ...at {figure} \centering 
 \singlespacing
 
 l.177 \begin{figure}[H]
 
 The control sequence at the end of the top line of your error message was 
 never \def'ed. If you
 have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., 
 `I\hbox').
 Otherwise just continue, and I'll forget about whatever was undefined.
 
 Any suggestions?
 
 Rainer
 
 
 I have not used it recently, but I get the same error you do. I copied it 
 from Herbert Voss'
 tips and tricks page many years ago. It worked then, but I am not sure what 
 has changed.
 
 Actually…it looks like the /singlespacing command is causing the problem. 
 Delete that and the
 centering still works.

Great - thanks

Rainer

 
 Steve
 
 
 Thanks,
 
 Rainer
 
 
 On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:
 
 On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug r.m.k...@gmail.com 
 wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally
 in a figure float:
 
 1) using paragrahh properties - alignment - center
 
 I'm no expert, but this is what I usually do. And to me this seems the 
 less hacky 
 approach.
 
 Liviu
 
 
 2) using a \hfill left and right of the figure
 
 What is the better / more robust / more LaTeX way of doing this?
 
 Thanks,
 
 Rainer
 
 - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
 Biology,
 UCT), Dipl. Phys. (Germany)
 
 Centre of Excellence for Invasion Biology Stellenbosch University South 
 Africa
 
 Tel :   +33 - (0)9 53 10 27 44 Cell:   +33 - (0)6 85 62 59 98 
 Fax :
 +33 - (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug
 
 
 
 
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEUEARECAAYFAlBQonQACgkQoYgNqgF2egpd9ACXWx7OqeyV2Dqs54VCGD8qm0ZE
yACeLd67c4x+ZvHCc4ORtGjv8C9CBp4=
=IhFk
-END PGP SIGNATURE-


Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Stephen Buonopane

On Sep 12, 2012, at 10:55 AM, Rainer M Krug wrote:

 I have not used it recently, but I get the same error you do. I copied it 
 from Herbert Voss'
 tips and tricks page many years ago. It worked then, but I am not sure what 
 has changed.
 
 Actually…it looks like the /singlespacing command is causing the problem. 
 Delete that and the
 centering still works.
 
 Great - thanks

\singlespacing requires the setspace package
not really sure what it was intended to do in this context.

Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/09/12 17:15, Stephen Buonopane wrote:
 
 On Sep 12, 2012, at 10:55 AM, Rainer M Krug wrote:
 
 I have not used it recently, but I get the same error you do. I copied it 
 from Herbert
 Voss' tips and tricks page many years ago. It worked then, but I am not 
 sure what has
 changed.
 
 Actually…it looks like the /singlespacing command is causing the problem. 
 Delete that and
 the centering still works.
 
 Great - thanks
 
 \singlespacing requires the setspace package not really sure what it was 
 intended to do in this
 context.
 

Thanks.

Just to add two links: I asked the question at stackexchange, and got some 
answers:

http://tex.stackexchange.com/questions/71280/best-way-to-centre-figure-in-float

and
http://tex.stackexchange.com/questions/2651/should-i-use-center-or-centering-for-figures-and-tables

Effeectively: use \centering as the preferred option. If you want to have this 
for all floats,
there are e.g. the floatrow package (http://www.ctan.org/pkg/floatrow) as 
well as the
adjustbox (http://www.ctan.org/pkg/adjustbox) oryou can use

\makeatletter
\g@addto@macro\@floatboxreset\centering
\makeatother

I must admit I have not the slightest clue what the second line is doing.

Cheers,

Rainer


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBQqfoACgkQoYgNqgF2egpCMACfcjEbyWsOp8Ekrz8kQ6i8Oj/2
5MsAnRy7xqnlw/IdWCSLp6b94Pvhgp6q
=nN5+
-END PGP SIGNATURE-


Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

There are (at least) two ways of centering a single figure / graphic 
horizontally in a figure float:

1) using paragrahh properties - alignment - center
2) using a \hfill left and right of the figure

What is the better / more robust / more LaTeX way of doing this?

Thanks,

Rainer

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBQau0ACgkQoYgNqgF2egp7FgCeIHyhYT/x+bJzqoANM9Muapeo
vi4An28oDskmG/XKqdTgVLKPvJlhfRiZ
=88Df
-END PGP SIGNATURE-


Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Liviu Andronic
On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a figure float:

 1) using paragrahh properties - alignment - center

I'm no expert, but this is what I usually do. And to me this seems the
less hacky approach.

Liviu


 2) using a \hfill left and right of the figure

 What is the better / more robust / more LaTeX way of doing this?

 Thanks,

 Rainer

 - --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
 UCT), Dipl. Phys.
 (Germany)

 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa

 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44

 Fax (D):+49 - (0)3 21 21 25 22 44

 email:  rai...@krugs.de

 Skype:  RMkrug
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

 iEYEARECAAYFAlBQau0ACgkQoYgNqgF2egp7FgCeIHyhYT/x+bJzqoANM9Muapeo
 vi4An28oDskmG/XKqdTgVLKPvJlhfRiZ
 =88Df
 -END PGP SIGNATURE-



-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Stephen Buonopane
You can add something like this to your preamble
(does not affect how they appear in LyX preview of course)…

\renewenvironment{figure}[1][]{
 \@float{figure}
 \centering
 \singlespacing}
 {\end@float}
 
 \renewenvironment{table}[1][]{
 \@float{table}
 \centering
 \singlespacing}
 {\end@float}

On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:

 On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a figure float:
 
 1) using paragrahh properties - alignment - center
 
 I'm no expert, but this is what I usually do. And to me this seems the
 less hacky approach.
 
 Liviu
 
 
 2) using a \hfill left and right of the figure
 
 What is the better / more robust / more LaTeX way of doing this?
 
 Thanks,
 
 Rainer
 
 - --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
 UCT), Dipl. Phys.
 (Germany)
 
 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa
 
 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
 
 iEYEARECAAYFAlBQau0ACgkQoYgNqgF2egp7FgCeIHyhYT/x+bJzqoANM9Muapeo
 vi4An28oDskmG/XKqdTgVLKPvJlhfRiZ
 =88Df
 -END PGP SIGNATURE-
 
 
 
 -- 
 Do you know how to read?
 http://www.alienetworks.com/srtest.cfm
 http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
 Do you know how to write?
 http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail



Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/09/12 14:19, Stephen Buonopane wrote:
 You can add something like this to your preamble (does not affect how they 
 appear in LyX
 preview of course)…
 
 \renewenvironment{figure}[1][]{ \@float{figure} \centering \singlespacing} 
 {\end@float}  
 \renewenvironment{table}[1][]{ \@float{table} \centering \singlespacing} 
 {\end@float}

Now this is a neat idea - haven't thought about that. Saves me quite some work.

Thanks,

Rainer

 
 On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:
 
 On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a
 figure float:
 
 1) using paragrahh properties - alignment - center
 
 I'm no expert, but this is what I usually do. And to me this seems the less 
 hacky approach.
 
 Liviu
 
 
 2) using a \hfill left and right of the figure
 
 What is the better / more robust / more LaTeX way of doing this?
 
 Thanks,
 
 Rainer
 
 - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
 Biology, UCT),
 Dipl. Phys. (Germany)
 
 Centre of Excellence for Invasion Biology Stellenbosch University South 
 Africa
 
 Tel :   +33 - (0)9 53 10 27 44 Cell:   +33 - (0)6 85 62 59 98 Fax : 
   +33 -
 (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 
 (GNU/Linux) 
 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
 
 iEYEARECAAYFAlBQau0ACgkQoYgNqgF2egp7FgCeIHyhYT/x+bJzqoANM9Muapeo 
 vi4An28oDskmG/XKqdTgVLKPvJlhfRiZ =88Df -END PGP SIGNATURE-
 
 
 
 -- Do you know how to read? http://www.alienetworks.com/srtest.cfm 
 http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you 
 know how to
 write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
 
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBQiwAACgkQoYgNqgF2egqn4wCfeaVsxaeXKeZg05j+FldYgxVy
keIAn0p3xiStaP6F5uR8HLwEszM5w8zv
=aBmS
-END PGP SIGNATURE-



Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/09/12 15:15, Rainer M Krug wrote:
 On 12/09/12 14:19, Stephen Buonopane wrote:
 You can add something like this to your preamble (does not affect how they 
 appear in LyX 
 preview of course)…
 
 \renewenvironment{figure}[1][]{ \@float{figure} \centering \singlespacing} 
 {\end@float} 
 \renewenvironment{table}[1][]{ \@float{table} \centering \singlespacing} 
 {\end@float}
 
 Now this is a neat idea - haven't thought about that. Saves me quite some 
 work.

But I was to fast. I get an error:

! Undefined control sequence.
\\figure ...at {figure} \centering \singlespacing

l.177 \begin{figure}[H]

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Any suggestions?

Rainer

 
 Thanks,
 
 Rainer
 
 
 On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:
 
 On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a 
 figure float:
 
 1) using paragrahh properties - alignment - center
 
 I'm no expert, but this is what I usually do. And to me this seems the less 
 hacky
 approach.
 
 Liviu
 
 
 2) using a \hfill left and right of the figure
 
 What is the better / more robust / more LaTeX way of doing this?
 
 Thanks,
 
 Rainer
 
 - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
 Biology, UCT), 
 Dipl. Phys. (Germany)
 
 Centre of Excellence for Invasion Biology Stellenbosch University South 
 Africa
 
 Tel :   +33 - (0)9 53 10 27 44 Cell:   +33 - (0)6 85 62 59 98 Fax 
 :   +33 - 
 (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug

 

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBQjD8ACgkQoYgNqgF2egrUSACfapSbOg4k++TnoErSLBpLA3Hq
Yf8AmwUh5HpGyGw+nRPkTRyqYToGwqYl
=caSn
-END PGP SIGNATURE-


Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Stephen Buonopane

On Sep 12, 2012, at 9:21 AM, Rainer M Krug wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 On 12/09/12 15:15, Rainer M Krug wrote:
 On 12/09/12 14:19, Stephen Buonopane wrote:
 You can add something like this to your preamble (does not affect how they 
 appear in LyX 
 preview of course)…
 
 \renewenvironment{figure}[1][]{ \@float{figure} \centering \singlespacing} 
 {\end@float} 
 \renewenvironment{table}[1][]{ \@float{table} \centering \singlespacing} 
 {\end@float}
 
 Now this is a neat idea - haven't thought about that. Saves me quite some 
 work.
 
 But I was to fast. I get an error:
 
 ! Undefined control sequence.
 \\figure ...at {figure} \centering \singlespacing
 
 l.177 \begin{figure}[H]
 
 The control sequence at the end of the top line
 of your error message was never \def'ed. If you have
 misspelled it (e.g., `\hobx'), type `I' and the correct
 spelling (e.g., `I\hbox'). Otherwise just continue,
 and I'll forget about whatever was undefined.
 
 Any suggestions?
 
 Rainer
 

I have not used it recently, but I get the same error you do.
I copied it from Herbert Voss' tips and tricks page many years ago. 
It worked then, but I am not sure what has changed.

Actually…it looks like the /singlespacing command is causing the problem.
Delete that and the centering still works.

Steve

 
 Thanks,
 
 Rainer
 
 
 On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:
 
 On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug r.m.k...@gmail.com wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a 
 figure float:
 
 1) using paragrahh properties - alignment - center
 
 I'm no expert, but this is what I usually do. And to me this seems the 
 less hacky
 approach.
 
 Liviu
 
 
 2) using a \hfill left and right of the figure
 
 What is the better / more robust / more LaTeX way of doing this?
 
 Thanks,
 
 Rainer
 
 - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
 Biology, UCT), 
 Dipl. Phys. (Germany)
 
 Centre of Excellence for Invasion Biology Stellenbosch University South 
 Africa
 
 Tel :   +33 - (0)9 53 10 27 44 Cell:   +33 - (0)6 85 62 59 98 Fax 
 :   +33 - 
 (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug
 
 
 
 - -- 
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
 UCT), Dipl. Phys.
 (Germany)
 
 Centre of Excellence for Invasion Biology
 Stellenbosch University
 South Africa
 
 Tel :   +33 - (0)9 53 10 27 44
 Cell:   +33 - (0)6 85 62 59 98
 Fax :   +33 - (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
 
 iEYEARECAAYFAlBQjD8ACgkQoYgNqgF2egrUSACfapSbOg4k++TnoErSLBpLA3Hq
 Yf8AmwUh5HpGyGw+nRPkTRyqYToGwqYl
 =caSn
 -END PGP SIGNATURE-



Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/09/12 15:36, Stephen Buonopane wrote:
 
 On Sep 12, 2012, at 9:21 AM, Rainer M Krug wrote:
 
 On 12/09/12 15:15, Rainer M Krug wrote:
 On 12/09/12 14:19, Stephen Buonopane wrote:
 You can add something like this to your preamble (does not affect how 
 they appear in
 LyX preview of course)…
 
 \renewenvironment{figure}[1][]{ \@float{figure} \centering 
 \singlespacing} {\end@float}
  \renewenvironment{table}[1][]{ \@float{table} \centering \singlespacing} 
 {\end@float}
 
 Now this is a neat idea - haven't thought about that. Saves me quite some 
 work.
 
 But I was to fast. I get an error:
 
 ! Undefined control sequence. \\figure ...at {figure} \centering 
 \singlespacing
 
 l.177 \begin{figure}[H]
 
 The control sequence at the end of the top line of your error message was 
 never \def'ed. If you
 have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., 
 `I\hbox').
 Otherwise just continue, and I'll forget about whatever was undefined.
 
 Any suggestions?
 
 Rainer
 
 
 I have not used it recently, but I get the same error you do. I copied it 
 from Herbert Voss'
 tips and tricks page many years ago. It worked then, but I am not sure what 
 has changed.
 
 Actually…it looks like the /singlespacing command is causing the problem. 
 Delete that and the
 centering still works.

Great - thanks

Rainer

 
 Steve
 
 
 Thanks,
 
 Rainer
 
 
 On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:
 
 On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug r.m.k...@gmail.com 
 wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally
 in a figure float:
 
 1) using paragrahh properties - alignment - center
 
 I'm no expert, but this is what I usually do. And to me this seems the 
 less hacky 
 approach.
 
 Liviu
 
 
 2) using a \hfill left and right of the figure
 
 What is the better / more robust / more LaTeX way of doing this?
 
 Thanks,
 
 Rainer
 
 - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
 Biology,
 UCT), Dipl. Phys. (Germany)
 
 Centre of Excellence for Invasion Biology Stellenbosch University South 
 Africa
 
 Tel :   +33 - (0)9 53 10 27 44 Cell:   +33 - (0)6 85 62 59 98 
 Fax :
 +33 - (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug
 
 
 
 
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEUEARECAAYFAlBQonQACgkQoYgNqgF2egpd9ACXWx7OqeyV2Dqs54VCGD8qm0ZE
yACeLd67c4x+ZvHCc4ORtGjv8C9CBp4=
=IhFk
-END PGP SIGNATURE-


Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Stephen Buonopane

On Sep 12, 2012, at 10:55 AM, Rainer M Krug wrote:

 I have not used it recently, but I get the same error you do. I copied it 
 from Herbert Voss'
 tips and tricks page many years ago. It worked then, but I am not sure what 
 has changed.
 
 Actually…it looks like the /singlespacing command is causing the problem. 
 Delete that and the
 centering still works.
 
 Great - thanks

\singlespacing requires the setspace package
not really sure what it was intended to do in this context.

Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/09/12 17:15, Stephen Buonopane wrote:
 
 On Sep 12, 2012, at 10:55 AM, Rainer M Krug wrote:
 
 I have not used it recently, but I get the same error you do. I copied it 
 from Herbert
 Voss' tips and tricks page many years ago. It worked then, but I am not 
 sure what has
 changed.
 
 Actually…it looks like the /singlespacing command is causing the problem. 
 Delete that and
 the centering still works.
 
 Great - thanks
 
 \singlespacing requires the setspace package not really sure what it was 
 intended to do in this
 context.
 

Thanks.

Just to add two links: I asked the question at stackexchange, and got some 
answers:

http://tex.stackexchange.com/questions/71280/best-way-to-centre-figure-in-float

and
http://tex.stackexchange.com/questions/2651/should-i-use-center-or-centering-for-figures-and-tables

Effeectively: use \centering as the preferred option. If you want to have this 
for all floats,
there are e.g. the floatrow package (http://www.ctan.org/pkg/floatrow) as 
well as the
adjustbox (http://www.ctan.org/pkg/adjustbox) oryou can use

\makeatletter
\g@addto@macro\@floatboxreset\centering
\makeatother

I must admit I have not the slightest clue what the second line is doing.

Cheers,

Rainer


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBQqfoACgkQoYgNqgF2egpCMACfcjEbyWsOp8Ekrz8kQ6i8Oj/2
5MsAnRy7xqnlw/IdWCSLp6b94Pvhgp6q
=nN5+
-END PGP SIGNATURE-


Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

There are (at least) two ways of centering a single figure / graphic 
horizontally in a figure float:

1) using paragrahh properties - alignment - center
2) using a \hfill left and right of the figure

What is the better / more robust / more LaTeX way of doing this?

Thanks,

Rainer

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBQau0ACgkQoYgNqgF2egp7FgCeIHyhYT/x+bJzqoANM9Muapeo
vi4An28oDskmG/XKqdTgVLKPvJlhfRiZ
=88Df
-END PGP SIGNATURE-


Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Liviu Andronic
On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug  wrote:
> There are (at least) two ways of centering a single figure / graphic 
> horizontally in a figure float:
>
> 1) using paragrahh properties - alignment - center
>
I'm no expert, but this is what I usually do. And to me this seems the
less hacky approach.

Liviu


> 2) using a \hfill left and right of the figure
>
> What is the better / more robust / more LaTeX way of doing this?
>
> Thanks,
>
> Rainer
>
> - --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
> UCT), Dipl. Phys.
> (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel :   +33 - (0)9 53 10 27 44
> Cell:   +33 - (0)6 85 62 59 98
> Fax :   +33 - (0)9 58 10 27 44
>
> Fax (D):+49 - (0)3 21 21 25 22 44
>
> email:  rai...@krugs.de
>
> Skype:  RMkrug
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iEYEARECAAYFAlBQau0ACgkQoYgNqgF2egp7FgCeIHyhYT/x+bJzqoANM9Muapeo
> vi4An28oDskmG/XKqdTgVLKPvJlhfRiZ
> =88Df
> -END PGP SIGNATURE-



-- 
Do you know how to read?
http://www.alienetworks.com/srtest.cfm
http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
Do you know how to write?
http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail


Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Stephen Buonopane
You can add something like this to your preamble
(does not affect how they appear in LyX preview of course)…

\renewenvironment{figure}[1][]{
 \@float{figure}
 \centering
 \singlespacing}
 {\end@float}
 
 \renewenvironment{table}[1][]{
 \@float{table}
 \centering
 \singlespacing}
 {\end@float}

On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:

> On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug  wrote:
>> There are (at least) two ways of centering a single figure / graphic 
>> horizontally in a figure float:
>> 
>> 1) using paragrahh properties - alignment - center
>> 
> I'm no expert, but this is what I usually do. And to me this seems the
> less hacky approach.
> 
> Liviu
> 
> 
>> 2) using a \hfill left and right of the figure
>> 
>> What is the better / more robust / more LaTeX way of doing this?
>> 
>> Thanks,
>> 
>> Rainer
>> 
>> - --
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
>> UCT), Dipl. Phys.
>> (Germany)
>> 
>> Centre of Excellence for Invasion Biology
>> Stellenbosch University
>> South Africa
>> 
>> Tel :   +33 - (0)9 53 10 27 44
>> Cell:   +33 - (0)6 85 62 59 98
>> Fax :   +33 - (0)9 58 10 27 44
>> 
>> Fax (D):+49 - (0)3 21 21 25 22 44
>> 
>> email:  rai...@krugs.de
>> 
>> Skype:  RMkrug
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.4.11 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>> 
>> iEYEARECAAYFAlBQau0ACgkQoYgNqgF2egp7FgCeIHyhYT/x+bJzqoANM9Muapeo
>> vi4An28oDskmG/XKqdTgVLKPvJlhfRiZ
>> =88Df
>> -END PGP SIGNATURE-
> 
> 
> 
> -- 
> Do you know how to read?
> http://www.alienetworks.com/srtest.cfm
> http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
> Do you know how to write?
> http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail



Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/09/12 14:19, Stephen Buonopane wrote:
> You can add something like this to your preamble (does not affect how they 
> appear in LyX
> preview of course)…
> 
> \renewenvironment{figure}[1][]{ \@float{figure} \centering \singlespacing} 
> {\end@float}  
> \renewenvironment{table}[1][]{ \@float{table} \centering \singlespacing} 
> {\end@float}

Now this is a neat idea - haven't thought about that. Saves me quite some work.

Thanks,

Rainer

> 
> On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:
> 
>> On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug  wrote:
>>> There are (at least) two ways of centering a single figure / graphic 
>>> horizontally in a
>>> figure float:
>>> 
>>> 1) using paragrahh properties - alignment - center
>>> 
>> I'm no expert, but this is what I usually do. And to me this seems the less 
>> hacky approach.
>> 
>> Liviu
>> 
>> 
>>> 2) using a \hfill left and right of the figure
>>> 
>>> What is the better / more robust / more LaTeX way of doing this?
>>> 
>>> Thanks,
>>> 
>>> Rainer
>>> 
>>> - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
>>> Biology, UCT),
>>> Dipl. Phys. (Germany)
>>> 
>>> Centre of Excellence for Invasion Biology Stellenbosch University South 
>>> Africa
>>> 
>>> Tel :   +33 - (0)9 53 10 27 44 Cell:   +33 - (0)6 85 62 59 98 Fax : 
>>>   +33 -
>>> (0)9 58 10 27 44
>>> 
>>> Fax (D):+49 - (0)3 21 21 25 22 44
>>> 
>>> email:  rai...@krugs.de
>>> 
>>> Skype:  RMkrug -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 
>>> (GNU/Linux) 
>>> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>>> 
>>> iEYEARECAAYFAlBQau0ACgkQoYgNqgF2egp7FgCeIHyhYT/x+bJzqoANM9Muapeo 
>>> vi4An28oDskmG/XKqdTgVLKPvJlhfRiZ =88Df -END PGP SIGNATURE-
>> 
>> 
>> 
>> -- Do you know how to read? http://www.alienetworks.com/srtest.cfm 
>> http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you 
>> know how to
>> write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
> 
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBQiwAACgkQoYgNqgF2egqn4wCfeaVsxaeXKeZg05j+FldYgxVy
keIAn0p3xiStaP6F5uR8HLwEszM5w8zv
=aBmS
-END PGP SIGNATURE-



Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/09/12 15:15, Rainer M Krug wrote:
> On 12/09/12 14:19, Stephen Buonopane wrote:
>> You can add something like this to your preamble (does not affect how they 
>> appear in LyX 
>> preview of course)…
> 
>> \renewenvironment{figure}[1][]{ \@float{figure} \centering \singlespacing} 
>> {\end@float} 
>> \renewenvironment{table}[1][]{ \@float{table} \centering \singlespacing} 
>> {\end@float}
> 
> Now this is a neat idea - haven't thought about that. Saves me quite some 
> work.

But I was to fast. I get an error:

! Undefined control sequence.
\\figure ...at {figure} \centering \singlespacing

l.177 \begin{figure}[H]

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Any suggestions?

Rainer

> 
> Thanks,
> 
> Rainer
> 
> 
>> On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:
> 
>>> On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug  wrote:
 There are (at least) two ways of centering a single figure / graphic 
 horizontally in a 
 figure float:
 
 1) using paragrahh properties - alignment - center
 
>>> I'm no expert, but this is what I usually do. And to me this seems the less 
>>> hacky
>>> approach.
>>> 
>>> Liviu
>>> 
>>> 
 2) using a \hfill left and right of the figure
 
 What is the better / more robust / more LaTeX way of doing this?
 
 Thanks,
 
 Rainer
 
 - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
 Biology, UCT), 
 Dipl. Phys. (Germany)
 
 Centre of Excellence for Invasion Biology Stellenbosch University South 
 Africa
 
 Tel :   +33 - (0)9 53 10 27 44 Cell:   +33 - (0)6 85 62 59 98 Fax 
 :   +33 - 
 (0)9 58 10 27 44
 
 Fax (D):+49 - (0)3 21 21 25 22 44
 
 email:  rai...@krugs.de
 
 Skype:  RMkrug

> 

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBQjD8ACgkQoYgNqgF2egrUSACfapSbOg4k++TnoErSLBpLA3Hq
Yf8AmwUh5HpGyGw+nRPkTRyqYToGwqYl
=caSn
-END PGP SIGNATURE-


Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Stephen Buonopane

On Sep 12, 2012, at 9:21 AM, Rainer M Krug wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 12/09/12 15:15, Rainer M Krug wrote:
>> On 12/09/12 14:19, Stephen Buonopane wrote:
>>> You can add something like this to your preamble (does not affect how they 
>>> appear in LyX 
>>> preview of course)…
>> 
>>> \renewenvironment{figure}[1][]{ \@float{figure} \centering \singlespacing} 
>>> {\end@float} 
>>> \renewenvironment{table}[1][]{ \@float{table} \centering \singlespacing} 
>>> {\end@float}
>> 
>> Now this is a neat idea - haven't thought about that. Saves me quite some 
>> work.
> 
> But I was to fast. I get an error:
> 
> ! Undefined control sequence.
> \\figure ...at {figure} \centering \singlespacing
> 
> l.177 \begin{figure}[H]
> 
> The control sequence at the end of the top line
> of your error message was never \def'ed. If you have
> misspelled it (e.g., `\hobx'), type `I' and the correct
> spelling (e.g., `I\hbox'). Otherwise just continue,
> and I'll forget about whatever was undefined.
> 
> Any suggestions?
> 
> Rainer
> 

I have not used it recently, but I get the same error you do.
I copied it from Herbert Voss' tips and tricks page many years ago. 
It worked then, but I am not sure what has changed.

Actually…it looks like the /singlespacing command is causing the problem.
Delete that and the centering still works.

Steve

>> 
>> Thanks,
>> 
>> Rainer
>> 
>> 
>>> On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:
>> 
 On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug  wrote:
> There are (at least) two ways of centering a single figure / graphic 
> horizontally in a 
> figure float:
> 
> 1) using paragrahh properties - alignment - center
> 
 I'm no expert, but this is what I usually do. And to me this seems the 
 less hacky
 approach.
 
 Liviu
 
 
> 2) using a \hfill left and right of the figure
> 
> What is the better / more robust / more LaTeX way of doing this?
> 
> Thanks,
> 
> Rainer
> 
> - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
> Biology, UCT), 
> Dipl. Phys. (Germany)
> 
> Centre of Excellence for Invasion Biology Stellenbosch University South 
> Africa
> 
> Tel :   +33 - (0)9 53 10 27 44 Cell:   +33 - (0)6 85 62 59 98 Fax 
> :   +33 - 
> (0)9 58 10 27 44
> 
> Fax (D):+49 - (0)3 21 21 25 22 44
> 
> email:  rai...@krugs.de
> 
> Skype:  RMkrug
> 
>> 
> 
> - -- 
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
> UCT), Dipl. Phys.
> (Germany)
> 
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
> 
> Tel :   +33 - (0)9 53 10 27 44
> Cell:   +33 - (0)6 85 62 59 98
> Fax :   +33 - (0)9 58 10 27 44
> 
> Fax (D):+49 - (0)3 21 21 25 22 44
> 
> email:  rai...@krugs.de
> 
> Skype:  RMkrug
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
> 
> iEYEARECAAYFAlBQjD8ACgkQoYgNqgF2egrUSACfapSbOg4k++TnoErSLBpLA3Hq
> Yf8AmwUh5HpGyGw+nRPkTRyqYToGwqYl
> =caSn
> -END PGP SIGNATURE-



Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/09/12 15:36, Stephen Buonopane wrote:
> 
> On Sep 12, 2012, at 9:21 AM, Rainer M Krug wrote:
> 
> On 12/09/12 15:15, Rainer M Krug wrote:
 On 12/09/12 14:19, Stephen Buonopane wrote:
> You can add something like this to your preamble (does not affect how 
> they appear in
> LyX preview of course)…
 
> \renewenvironment{figure}[1][]{ \@float{figure} \centering 
> \singlespacing} {\end@float}
>  \renewenvironment{table}[1][]{ \@float{table} \centering \singlespacing} 
> {\end@float}
 
 Now this is a neat idea - haven't thought about that. Saves me quite some 
 work.
> 
> But I was to fast. I get an error:
> 
> ! Undefined control sequence. \\figure ...at {figure} \centering 
> \singlespacing
> 
> l.177 \begin{figure}[H]
> 
> The control sequence at the end of the top line of your error message was 
> never \def'ed. If you
> have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., 
> `I\hbox').
> Otherwise just continue, and I'll forget about whatever was undefined.
> 
> Any suggestions?
> 
> Rainer
> 
> 
>> I have not used it recently, but I get the same error you do. I copied it 
>> from Herbert Voss'
>> tips and tricks page many years ago. It worked then, but I am not sure what 
>> has changed.
> 
>> Actually…it looks like the /singlespacing command is causing the problem. 
>> Delete that and the
>> centering still works.

Great - thanks

Rainer

> 
>> Steve
> 
 
 Thanks,
 
 Rainer
 
 
> On Sep 12, 2012, at 7:23 AM, Liviu Andronic wrote:
 
>> On Wed, Sep 12, 2012 at 12:58 PM, Rainer M Krug  
>> wrote:
>>> There are (at least) two ways of centering a single figure / graphic 
>>> horizontally
>>> in a figure float:
>>> 
>>> 1) using paragrahh properties - alignment - center
>>> 
>> I'm no expert, but this is what I usually do. And to me this seems the 
>> less hacky 
>> approach.
>> 
>> Liviu
>> 
>> 
>>> 2) using a \hfill left and right of the figure
>>> 
>>> What is the better / more robust / more LaTeX way of doing this?
>>> 
>>> Thanks,
>>> 
>>> Rainer
>>> 
>>> - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation 
>>> Biology,
>>> UCT), Dipl. Phys. (Germany)
>>> 
>>> Centre of Excellence for Invasion Biology Stellenbosch University South 
>>> Africa
>>> 
>>> Tel :   +33 - (0)9 53 10 27 44 Cell:   +33 - (0)6 85 62 59 98 
>>> Fax :
>>> +33 - (0)9 58 10 27 44
>>> 
>>> Fax (D):+49 - (0)3 21 21 25 22 44
>>> 
>>> email:  rai...@krugs.de
>>> 
>>> Skype:  RMkrug
> 
 
> 
> 
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEUEARECAAYFAlBQonQACgkQoYgNqgF2egpd9ACXWx7OqeyV2Dqs54VCGD8qm0ZE
yACeLd67c4x+ZvHCc4ORtGjv8C9CBp4=
=IhFk
-END PGP SIGNATURE-


Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Stephen Buonopane

On Sep 12, 2012, at 10:55 AM, Rainer M Krug wrote:

>>> I have not used it recently, but I get the same error you do. I copied it 
>>> from Herbert Voss'
>>> tips and tricks page many years ago. It worked then, but I am not sure what 
>>> has changed.
>> 
>>> Actually…it looks like the /singlespacing command is causing the problem. 
>>> Delete that and the
>>> centering still works.
> 
> Great - thanks

\singlespacing requires the setspace package
not really sure what it was intended to do in this context.

Re: Put figures in figure float in center - the best way?

2012-09-12 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 12/09/12 17:15, Stephen Buonopane wrote:
> 
> On Sep 12, 2012, at 10:55 AM, Rainer M Krug wrote:
> 
 I have not used it recently, but I get the same error you do. I copied it 
 from Herbert
 Voss' tips and tricks page many years ago. It worked then, but I am not 
 sure what has
 changed.
>>> 
 Actually…it looks like the /singlespacing command is causing the problem. 
 Delete that and
 the centering still works.
>> 
>> Great - thanks
> 
> \singlespacing requires the setspace package not really sure what it was 
> intended to do in this
> context.
> 

Thanks.

Just to add two links: I asked the question at stackexchange, and got some 
answers:

http://tex.stackexchange.com/questions/71280/best-way-to-centre-figure-in-float

and
http://tex.stackexchange.com/questions/2651/should-i-use-center-or-centering-for-figures-and-tables

Effeectively: use \centering as the preferred option. If you want to have this 
for all floats,
there are e.g. the "floatrow" package (http://www.ctan.org/pkg/floatrow) as 
well as the
"adjustbox" (http://www.ctan.org/pkg/adjustbox) oryou can use

\makeatletter
\g@addto@macro\@floatboxreset\centering
\makeatother

I must admit I have not the slightest clue what the second line is doing.

Cheers,

Rainer


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys.
(Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBQqfoACgkQoYgNqgF2egpCMACfcjEbyWsOp8Ekrz8kQ6i8Oj/2
5MsAnRy7xqnlw/IdWCSLp6b94Pvhgp6q
=nN5+
-END PGP SIGNATURE-