Re: [LyX/master] Amend [7efdbeaddf226/lyxgit]

2022-06-14 Thread Daniel

On 13/06/2022 21:27, Jürgen Spitzmüller wrote:

Am Montag, dem 13.06.2022 um 20:10 +0200 schrieb Daniel:

I am curious, where does one get the 'Non-Floating Figures and
Tables'
module? (It might be relevant to
https://www.lyx.org/trac/ticket/11734.)


I seem to have written it myself. But it's not a good approach. It
doesn't use Caption InsetLayout, but InsetFlex (see attachment). A
better model are the special captions in the KOMA classes.


Thanks for clarifying that. Yes, I remember trying to get it to work 
with the special captions approach from the KOMA classes. I also tried 
to document my failed attempts at https://www.lyx.org/trac/ticket/11734. 
(It also contains my arguments for why a pure module approach to this 
does not seem right.)


Daniel

--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Amend [7efdbeaddf226/lyxgit]

2022-06-13 Thread Jürgen Spitzmüller
Am Montag, dem 13.06.2022 um 20:10 +0200 schrieb Daniel:
> I am curious, where does one get the 'Non-Floating Figures and
> Tables' 
> module? (It might be relevant to
> https://www.lyx.org/trac/ticket/11734.)

I seem to have written it myself. But it's not a good approach. It
doesn't use Caption InsetLayout, but InsetFlex (see attachment). A
better model are the special captions in the KOMA classes.

-- 
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
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Amend [7efdbeaddf226/lyxgit]

2022-06-13 Thread Daniel

On 2022-06-13 15:30, Juergen Spitzmueller wrote:

commit b7f0a9036473321ded99ac75d24d1b2daaa8f954
Author: Juergen Spitzmueller 
Date:   Mon Jun 13 16:12:16 2022 +0200

 Amend [7efdbeaddf226/lyxgit]
 
 We do not ship the nonfloat module, actually (I had a private copy).

---
  src/insets/InsetCaption.cpp |3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp
index 8e415bb..934cceb 100644
--- a/src/insets/InsetCaption.cpp
+++ b/src/insets/InsetCaption.cpp
@@ -331,8 +331,7 @@ docstring InsetCaption::toolTip(BufferView const & bv, int 
x, int y) const
  {
if (non_float_)
return _("Standard captions are not allowed outside floats. You will 
get a LaTeX error.\n"
-"For captions outside floats, please use the module 
'Non-Floating Figures and Tables' "
-"from Document > Settings > Modules.");
+"For captions outside floats, you can use the 'nonfloat' 
LaTeX package.");
return InsetText::toolTip(bv, x, y);
  }
  


I am curious, where does one get the 'Non-Floating Figures and Tables' 
module? (It might be relevant to https://www.lyx.org/trac/ticket/11734.)


Daniel


--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel