Justin Wood <upas...@gmail.com> írta:
>Hi all. Bit of a tortured question, but hoping someone can help me sort this 
>out.The goal: I&#39;m trying to add the ability to create box floats in my 
>doctoral thesis, which are used to contain regular text displayed as an 
>important aside. Attached is an example of what I&#39;m after (box.pdf), based 
>on what I have so far.>
Functionality requirements:* a float, framed* numbered caption, derived from 
containing chapter (Box 2.1, 2.2, etc) which is included in the List of X in 
TOC* that caption should be at the top and inside the box itself>
* text should be smaller font size>
The setup:* LyX 2.0.2 on OS X 10.7.3 with TeXLive 2011.* documents use the 
bundled thesis template (KOMA-script), set with XeTeX for additional fonts 
(though the same function was provided by this mechanism when it was 
&#39;just&#39; LaTeX).>
To date (~18 months) I&#39;ve been using a custom boxedfloat.module that Jürgen 
Spitzmüller provided me with (attached), with the following LaTeX preamble to 
control the caption format:\@ifundefined{fs@boxed}{}% do nothing if not in use>
{%  \usepackage{framed}>
   \newcommand\floatc@simplerule[2]{\flushleft{\@fs@cfont #1 #2}}  
    \def\@fs@post{\end{framed}}%    \def\@fs@mid{\kern8pt}%>
    \let\@fs@iftopcapt\iftrue}}%This works very well — again, producing the 
example — however I have a couple of limitations that the floatrow package 
seems to be able to address:>
* specifying the font size once in preamble, whereas at the moment I&#39;ve not 
been able to find any other way than ERT at the beginning and end of the float 
to add {\small ... }>
* the ability to use normal paragraph breaks rather than manually entering 
\medskip* the ability to include footnotes within the Box, which to date has 
proved impossible but floatrow states that it can do soThe problem...:>
I cannot get floatrow to work. I found this previous list trail from 2011, and 
followed the suggestion to implement floatrow.module (aside: looking at 
exported LaTeX, \usepackage{floatrow} is still inserted twice). Unfortunately 
nothing I&#39;ve tried has succeeded, and my knowledge of LaTeX and/or LyX 
modules doesn&#39;t appear up to the task... It seems that the module 
overriding of the auto-included float package does not occur before LyX 
automatically adds the configuration commands pertaining to the original float 
package; namely:>
floatrow documentation sort of says this should work anyway, but it 
doesn&#39;t. Any time I try to replace or override this in the floatrow.module 
or LaTeX preamble, compilation (XeTeX) throws an Undefined control sequence 
error, protesting that \floatstyle{boxed} was not \def&#39;d, followed by a 
missing \begin{document}. My tentative guess is that the float style commands 
are effectively being given twice?>
The request:I&#39;ll be eternally grateful if someone can help me solve this! I 
don&#39;t much care how it&#39;s done, whether by resolving this particular 
issue with using floatrow over the default float or by some other package or 
LaTeX wizardry. Perhaps it could even be added to LyX proper; surely I&#39;m 
not that unusual in seeking this format type?>
Thanks as always!PS - slightly less than 6 months till immutable submission 
~:justin.wood:~ ≤ 350ppm>


Here are two example lyx files. See the difference between the location of
the floats, which is reflected in the TOC.

This requires caption and floatrow packages but not the module you mentioned.
For details see the documentation of floatrow package.



Attachment: textbox-float-a.lyx
Description: Binary data

Attachment: textbox-float-b.lyx
Description: Binary data

Reply via email to