mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
wrap floats: switch from floatflt to wrapfig
(the manuals have already been updated two days ago) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@22895 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e99adb41bc
commit
bf5e1e5eeb
@ -230,7 +230,6 @@
|
||||
\TestPackage{esint}
|
||||
\TestPackage{fancybox}
|
||||
\TestPackage{fancyhdr}
|
||||
\TestPackage{floatflt}
|
||||
\TestPackage{framed}
|
||||
\TestPackage{geometry}
|
||||
\TestPackage{jurabib}
|
||||
@ -247,8 +246,9 @@
|
||||
\TestPackage{soul}
|
||||
\TestPackage{subfigure}
|
||||
\TestPackage{textcomp}
|
||||
\TestPackage{varioref}
|
||||
\TestPackage{url}
|
||||
\TestPackage{varioref}
|
||||
\TestPackage{wrapfig}
|
||||
\TestPackage{xcolor}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#LyX 1.5.2svn created this file. For more info see http://www.lyx.org/
|
||||
#LyX 1.5.4svn created this file. For more info see http://www.lyx.org/
|
||||
\lyxformat 276
|
||||
\begin_document
|
||||
\begin_header
|
||||
@ -2912,35 +2912,6 @@ fancy
|
||||
It provides alternate headers and footers to your pages.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
floatflt
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Found: @chk_floatflt@
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
CTAN:
|
||||
\family typewriter
|
||||
macros/latex/contrib/floatflt/
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Notes: The package
|
||||
\family sans
|
||||
floatflt
|
||||
\family default
|
||||
(an extension of
|
||||
\family sans
|
||||
floatfig
|
||||
\family default
|
||||
) is used by LyX if you insert text wrap floats (menu Insert\SpecialChar \menuseparator
|
||||
Float).
|
||||
It allows you to create a figure float which is narrower than the full
|
||||
page and wrap the text around it.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
jurabib
|
||||
\end_layout
|
||||
@ -3226,6 +3197,35 @@ url
|
||||
is needed by LyX to be able to output url's corrently.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
wrapfig
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Found: @chk_wrapfig@
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
CTAN:
|
||||
\family typewriter
|
||||
macros/latex/contrib/wrapfig/
|
||||
\end_layout
|
||||
|
||||
\begin_layout Description
|
||||
Notes: The package
|
||||
\family typewriter
|
||||
wrapfig
|
||||
\family default
|
||||
is used by LyX if you insert text wrap floats (menu
|
||||
\family sans
|
||||
Insert\SpecialChar \menuseparator
|
||||
Float)
|
||||
\family default
|
||||
.
|
||||
It allows you to create a figure float which is narrower than the fullpage
|
||||
and wrap the text around it.
|
||||
\end_layout
|
||||
|
||||
\begin_layout Subsection
|
||||
xcolor
|
||||
\end_layout
|
||||
|
@ -415,10 +415,14 @@ char const * simplefeatures[] = {
|
||||
"latexsym",
|
||||
"pifont",
|
||||
"subfigure",
|
||||
"floatflt",
|
||||
"varioref",
|
||||
"prettyref",
|
||||
/*For a successful cooperation of the `wrapfig' package with the
|
||||
`float' package you should load the `wrapfig' package *after*
|
||||
the `float' package. See the caption package documentation
|
||||
for explanation.*/
|
||||
"float",
|
||||
"wrapfig",
|
||||
"booktabs",
|
||||
"dvipost",
|
||||
"fancybox",
|
||||
|
@ -176,7 +176,7 @@ Inset * createInset(BufferView * bv, FuncRequest const & cmd)
|
||||
string const argument = to_utf8(cmd.argument());
|
||||
if (argument == "figure")
|
||||
return new InsetWrap(params, argument);
|
||||
lyxerr << "Non-existent floatflt type: " << argument << endl;
|
||||
lyxerr << "Non-existent wrapfig type: " << argument << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ void QWrapDialog::change_adaptor()
|
||||
typedef QController<ControlWrap, QView<QWrapDialog> > wrap_base_class;
|
||||
|
||||
QWrap::QWrap(Dialog & parent)
|
||||
: wrap_base_class(parent, _("Text Wrap Settings"))
|
||||
: wrap_base_class(parent, _("Wrap Float Settings"))
|
||||
{
|
||||
}
|
||||
|
||||
@ -113,16 +113,16 @@ void QWrap::apply()
|
||||
|
||||
switch (dialog_->valignCO->currentIndex()) {
|
||||
case 0:
|
||||
params.placement.erase();
|
||||
params.placement = "o";
|
||||
break;
|
||||
case 1:
|
||||
params.placement = "l";
|
||||
params.placement = "i";
|
||||
break;
|
||||
case 2:
|
||||
params.placement = "r";
|
||||
params.placement = "l";
|
||||
break;
|
||||
case 3:
|
||||
params.placement = "p";
|
||||
params.placement = "r";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -131,12 +131,9 @@ void QWrap::apply()
|
||||
static string const numtostr(double val)
|
||||
{
|
||||
string a = convert<string>(val);
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Will this test ever trigger? (Lgb)
|
||||
#endif
|
||||
if (a == "0")
|
||||
a.erase();
|
||||
return a;
|
||||
//0pt is a legal width now, it yields a
|
||||
//wrapfloat just wide enough for the contents.
|
||||
}
|
||||
|
||||
|
||||
@ -149,11 +146,11 @@ void QWrap::update_contents()
|
||||
dialog_->unitsLC->setCurrentItem(len.unit());
|
||||
|
||||
int item = 0;
|
||||
if (params.placement == "l")
|
||||
if (params.placement == "i")
|
||||
item = 1;
|
||||
else if (params.placement == "r")
|
||||
else if (params.placement == "l")
|
||||
item = 2;
|
||||
else if (params.placement == "p")
|
||||
else if (params.placement == "r")
|
||||
item = 3;
|
||||
|
||||
dialog_->valignCO->setCurrentIndex(item);
|
||||
|
@ -1,7 +1,4 @@
|
||||
<ui version="4.0" >
|
||||
<author></author>
|
||||
<comment></comment>
|
||||
<exportmacro></exportmacro>
|
||||
<class>QWrapUi</class>
|
||||
<widget class="QDialog" name="QWrapUi" >
|
||||
<property name="geometry" >
|
||||
@ -19,18 +16,39 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
@ -50,7 +68,12 @@
|
||||
</property>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Default (outer)</string>
|
||||
<string>Outer (default)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Inner</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
@ -63,11 +86,6 @@
|
||||
<string>Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Outer</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" >
|
||||
@ -81,11 +99,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="LengthCombo" name="unitsLC" >
|
||||
<widget class="LengthCombo" native="1" name="unitsLC" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -107,9 +123,7 @@
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLineEdit" name="widthED" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>1</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -149,12 +163,21 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="restorePB" >
|
||||
<property name="toolTip" >
|
||||
@ -224,17 +247,11 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<includes>
|
||||
<include location="local" >qt_helpers.h</include>
|
||||
</includes>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LengthCombo</class>
|
||||
<extends></extends>
|
||||
<extends>QWidget</extends>
|
||||
<header>LengthCombo.h</header>
|
||||
<container>0</container>
|
||||
<pixmap></pixmap>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
@ -246,6 +263,9 @@
|
||||
<tabstop>applyPB</tabstop>
|
||||
<tabstop>closePB</tabstop>
|
||||
</tabstops>
|
||||
<includes>
|
||||
<include location="local" >qt_helpers.h</include>
|
||||
</includes>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
@ -160,7 +160,7 @@ void InsetWrap::read(Buffer const & buf, Lexer & lex)
|
||||
|
||||
void InsetWrap::validate(LaTeXFeatures & features) const
|
||||
{
|
||||
features.require("floatflt");
|
||||
features.require("wrapfig");
|
||||
InsetCollapsable::validate(features);
|
||||
}
|
||||
|
||||
@ -180,12 +180,13 @@ docstring const InsetWrap::editMessage() const
|
||||
int InsetWrap::latex(Buffer const & buf, odocstream & os,
|
||||
OutputParams const & runparams) const
|
||||
{
|
||||
os << "\\begin{floating" << from_ascii(params_.type) << '}';
|
||||
os << "\\begin{wrap" << from_ascii(params_.type) << '}';
|
||||
if (!params_.placement.empty())
|
||||
os << '[' << from_ascii(params_.placement) << ']';
|
||||
os << '{' << from_ascii(params_.placement) << '}';
|
||||
else os << "{o}"; //Outer is default in the current UI
|
||||
os << '{' << from_ascii(params_.width.asLatexString()) << "}%\n";
|
||||
int const i = InsetText::latex(buf, os, runparams);
|
||||
os << "\\end{floating" << from_ascii(params_.type) << "}%\n";
|
||||
os << "\\end{wrap" << from_ascii(params_.type) << "}%\n";
|
||||
return i + 2;
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,13 @@ order of importance. This is, of course, subjective...]
|
||||
What's new
|
||||
==========
|
||||
|
||||
Important Note: The LaTeX-package "floatflt" that is used by LyX for wrap
|
||||
floats has been removed from all major LaTeX-distributions
|
||||
due to a license conflict. We are therefore forced to switch
|
||||
from floatflt to the package "wrapfig". As consequence of this,
|
||||
the wrap floats in your documents can eventually look
|
||||
different, the position can slightly differ. So you should
|
||||
check the output of your documents where you use wrap floats.
|
||||
|
||||
** Updates:
|
||||
***********
|
||||
@ -135,7 +142,7 @@ What's new
|
||||
was active (bug 4452).
|
||||
|
||||
- Fix an assertion when inserting a box in a list while at least one
|
||||
paragraph of that list was selected (bug 5402).
|
||||
paragraph of that list was selected (bug 4502).
|
||||
|
||||
- Do not exit after catching an iconv exception (bug 4385, part 2).
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user