Re: Figure captions

2018-06-09 Thread Ricardo Berlasso
2018-06-09 22:13 GMT+02:00 Steve Litt :

> On Sat, 9 Jun 2018 12:43:47 +0200
> Ricardo Berlasso  wrote:
>
> > 2018-06-09 11:50 GMT+02:00 F M Salter :
> >
> > > Hi
> > >
> > > Is it possible to place captioned figures side by side rather
> > > than vertically?
> >
> >
> > Yes, but you need to use the sidecap package. To integrate it on LyX
> > you can use a "Local format" (Document → Settings → Local format),
> > something like this (I'm using 2.3 here, for 2.2 use "Format 60"
> > instead)
>
> Hi Richard,
>
> How did you know that the sidecap package would do this? It seems like
> every desire anyone has in LaTeX, somebody pops up with a package to do
> it. But how does one discover that package? Is there an algorithm to go
> from a need to solution by package discovery?
>

Unfortunately, no. I'm able to provide a fast answer to some problems only
because I've already asked that question many times in the past and was
able to build an answer. I'm not a LaTeX expert, so each time I solve
something I write down the solution I've found on my personal archive.



>
> Given LaTeX code, I can hammer away at it, do research, and eventually
> modify it to do what I need. I can describe the process pretty much in
> English. But I don't begin to understand how people can hear a need and
> instantly know "you need the XYZ package." That process should be
> articulated so that all of us can do it.
>

I'm using LyX since... 2001? My memory fails. But even with such experience
it took me months to understand how local formats work. In fact, I'm not
able to write code from scratch, I always need to copy/paste from my
archive of solutions, so don't feel amazed for our fast answers, they only
mean that we are good at copy/paste old solutions from our own long list of
solved problems ;)

Even the most wild questions I've ever had were already asked by someone
else on the Internet, so it's only matter of using the right keywords on
the right place. TeX-LaTeX Stack Exchange is usually the right place so
once I find the answer, and of course I understand it (which is not always
granted), it's just a matter of adapting the whole thing to LyX (which may
be some work)

http://tex.stackexchange.com/

If nobody knows the answer to a question there, it's not possible. But
since almost nothing is impossible on LaTeX, the answer is there ;)

Regards,
Ricardo



>
> Thanks,
>
> SteveT
>
> Steve Litt
> June 2018 featured book: Twenty Eight Tales of Troubleshooting
> http://www.troubleshooters.com/28
>
>
>


Re: Figure captions

2018-06-09 Thread Steve Litt
On Sat, 9 Jun 2018 12:43:47 +0200
Ricardo Berlasso  wrote:

> 2018-06-09 11:50 GMT+02:00 F M Salter :
> 
> > Hi
> >
> > Is it possible to place captioned figures side by side rather
> > than vertically?  
> 
> 
> Yes, but you need to use the sidecap package. To integrate it on LyX
> you can use a "Local format" (Document → Settings → Local format),
> something like this (I'm using 2.3 here, for 2.2 use "Format 60"
> instead)

Hi Richard,

How did you know that the sidecap package would do this? It seems like
every desire anyone has in LaTeX, somebody pops up with a package to do
it. But how does one discover that package? Is there an algorithm to go
from a need to solution by package discovery?

Given LaTeX code, I can hammer away at it, do research, and eventually
modify it to do what I need. I can describe the process pretty much in
English. But I don't begin to understand how people can hear a need and
instantly know "you need the XYZ package." That process should be
articulated so that all of us can do it.

Thanks,

SteveT

Steve Litt 
June 2018 featured book: Twenty Eight Tales of Troubleshooting
http://www.troubleshooters.com/28




Re: Figure captions

2018-06-09 Thread F M Salter
Thank both of you, Ricardo Berlasso  and Juergen Spitzmueller

Frank Salter

On 09/06/18 10:50, F M Salter wrote:
> Hi
>
>     Is it possible to place captioned figures side by side rather than
> vertically?   It is possible to place graphics, without captions, side
> by side.  Figure captions seem only to be used in floats.  Attempts to
> copy to a  box produces senseless!
>
> Regards
>
> Frank Salter
>
>



Re: Figure captions

2018-06-09 Thread Jürgen Spitzmüller
Am Samstag, den 09.06.2018, 12:43 +0200 schrieb Ricardo Berlasso:
> 2018-06-09 11:50 GMT+02:00 F M Salter :
> > Hi
> > 
> > Is it possible to place captioned figures side by side rather
> > than
> > vertically?   
> 
> Yes, but you need to use the sidecap package. To integrate it on LyX
> you can use a "Local format" 

There is also an unofficial module listed here, to the same effect:
https://wiki.lyx.org/Layouts/Modules


> > It is possible to place graphics, without captions, side
> > by side.  Figure captions seem only to be used in floats.  Attempts
> > to
> > copy to a  box produces senseless!

The attached module adds support for captions outside floats (via
Insert > Custom Insets)

Jürgen
#\DeclareLyXModule{Non-floating Figures and Tables}
#DescriptionBegin
#Insert captions to figures and tables that do not float.
#DescriptionEnd

# Author: Jürgen Spitzmüller 

Format 66


InsetLayout Flex:NonFloatingFigure
LyxType  custom
LabelString  non-floating
LaTeXTypecommand
LatexNamefigcaption
NeedProtect  1
MultiPar false
Argument 1
LabelString   "Short Title|S"
Tooltip   "The caption as it appears in the list of 
figures/tables"
InsertCotext  1
EndArgument
Preamble
\usepackage{nonfloat}
EndPreamble
End

InsetLayout Flex:NonFloatingTable
CopyStyleFlex:NonFloatingFigure
LabelString  non-floating
LatexNametabcaption
End



signature.asc
Description: This is a digitally signed message part


Re: Figure captions

2018-06-09 Thread Ricardo Berlasso
2018-06-09 11:50 GMT+02:00 F M Salter :

> Hi
>
> Is it possible to place captioned figures side by side rather than
> vertically?


Yes, but you need to use the sidecap package. To integrate it on LyX you
can use a "Local format" (Document → Settings → Local format), something
like this (I'm using 2.3 here, for 2.2 use "Format 60" instead)

Format 66

AddToPreamble

\usepackage{sidecap} % added by sidecap.module

\let\SCfigurename\figurename

EndPreamble

Float

Type SCfigure

GuiName "Figure (side caption)"

Placement tbp

Extension loscf

NumberWithin none

Style plain

ListCommand empty

ListName "List of Figures (side caption): does nothing, use List of Figures
instead"

RefPrefix fig

IsPredefined 1

UsesFloatPkg 0

End

Float

Type SCtable

GuiName "Table (side caption)"

Placement tbp

Extension losct

NumberWithin none

Style plain

ListCommand empty

ListName "List of Tables (side caption): does nothing, use List of Tables
instead"

RefPrefix tab

IsPredefined 1

UsesFloatPkg 0

End


Now, under Insert → Float you'll have "Figure (side caption)" and "Table
(side caption)". The side-captioned figures will integrate with the normal
ones, so just use the normal index of figures to list them (and all the
others).



> It is possible to place graphics, without captions, side
> by side.  Figure captions seem only to be used in floats.  Attempts to
> copy to a  box produces senseless!
>

You can delete the caption box inside the float without problems, resulting
on a floating figure without caption. To insert several figures inside a
float you can just do that, or even insert another float inside the float
to get several "sub-figures", LyX will recognize the situation
automatically.

Regards,
Ricardo



>
> Regards
>
> Frank Salter
>
>
>


Figure captions

2018-06-09 Thread F M Salter
Hi

    Is it possible to place captioned figures side by side rather than
vertically?   It is possible to place graphics, without captions, side
by side.  Figure captions seem only to be used in floats.  Attempts to
copy to a  box produces senseless!

Regards

Frank Salter