End
+InsetLayout Caption:LongTableNoNumber
+ CopyStyle Caption:Standard
+ LatexName caption*
+ Argument 1
+ LabelString "Long Table Caption (unnumbered)"
+ Tooltip "The caption as it appears in the list of tables"
+ EndArgument
+End
+
+
InsetLayout Preview
LabelString Preview
Decoration minimalistic
return
document.body[i] = "\\begin_inset Caption Standard"
i = i + 1
-
def revert_captioninsets(document):
def convert_captionlayouts(document):
" Convert caption layouts to caption insets. "
-
+
caption_dict = {
"Captionabove": "Above",
"Captionbelow": "Below",
"CenteredCaption" : "Centered",
"Bicaption" : "Bicaption",
}
-
+
i = 0
while True:
i = find_token(document.body, "\\begin_layout", i)
i = i + 1
+def revert_starred_caption(document):
+ " Reverts unnumbered longtable caption insets "
+
+ i = 0
+ while True:
+ i = find_token(document.body, "\\begin_inset Caption LongTableNoNumber", i)
+ if i == -1:
+ return
+ # This is not equivalent, but since the caption inset is a full blown
+ # text inset a true conversion to ERT is too difficult.
+ document.body[i] = "\\begin_inset Caption Standard"
+ i = i + 1
+
+
##
# Conversion hub
#
[465, [convert_lyxframes, remove_endframes]],
[466, []],
[467, []],
- [468, []]
+ [468, []],
+ [469, []]
]
revert = [
+ [468, [revert_starred_caption]],
[467, [revert_mbox_fbox]],
[466, [revert_iwona_fonts]],
[465, [revert_powerdot_flexes, revert_powerdot_pause, revert_powerdot_itemargs, revert_powerdot_columns]],
}
case LFUN_CAPTION_INSERT: {
code = CAPTION_CODE;
- bool varia = true;
+ string arg = cmd.getArg(0);
+ bool varia = arg != "LongTableNoNumber";
if (cur.depth() > 0) {
- if (&cur[cur.depth() - 1].inset()
- && !cur[cur.depth() - 1].inset().allowsCaptionVariation())
- varia = false;
+ if (&cur[cur.depth() - 1].inset())
+ varia = cur[cur.depth() - 1].inset().allowsCaptionVariation(arg);
}
- string arg = cmd.getArg(0);
// not allowed in description items,
// and in specific insets
enable = !inDescriptionItem(cur)
docstring const type = split(*cit, dummy, ':');
docstring const trtype = translateIfPossible(type);
docstring const cmitem = bformat(_("Caption (%1$s)"), trtype);
- if (switchcap)
- addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(cmitem),
- FuncRequest(LFUN_INSET_MODIFY,
- from_ascii("changetype ")
- + type), QString(), true));
- else
- captions.addWithStatusCheck(MenuItem(MenuItem::Command,
- toqstr(trtype),
- FuncRequest(LFUN_CAPTION_INSERT,
- type), QString(), true));
+ // make menu item optional, otherwise we would also see
+ // forbidden caption types
+ if (switchcap)
+ addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(cmitem),
+ FuncRequest(LFUN_INSET_MODIFY,
+ from_ascii("changetype ")
+ + type), QString(), true));
+ else
+ captions.addWithStatusCheck(MenuItem(MenuItem::Command,
+ toqstr(trtype),
+ FuncRequest(LFUN_CAPTION_INSERT,
+ type), QString(), true));
}
if (!captions.empty()) {
MenuItem item(MenuItem::Submenu, qt_("Caption"));
/** The entries with the following kind are expanded to a
sequence of Command MenuItems: Lastfiles, Documents,
ViewFormats, ExportFormats, UpdateFormats, Branches,
- Indices, Arguments, SwitchArguments, Captions, Switchcaptions
+ Indices, Arguments, SwitchArguments, Captions, SwitchCaptions
*/
void expand(MenuDefinition const & frommenu, MenuDefinition & tomenu,
BufferView const *) const;
/// can we click at the specified position ?
virtual bool clickable(int, int) const { return false; }
/// Move one cell backwards
- virtual bool allowsCaptionVariation() const { return false; }
+ virtual bool allowsCaptionVariation(std::string const &) const { return false; }
/// does this contain text that can be change track marked in DVI?
virtual bool canTrackChanges() const { return false; }
if (first_arg == "changetype") {
string const type = cmd.getArg(1);
status.setOnOff(type == type_);
- bool varia = true;
+ bool varia = type != "LongTableNoNumber";
// check if the immediate parent inset allows caption variation
if (cur.depth() > 1) {
- if (&cur[cur.depth() - 2].inset()
- && !cur[cur.depth() - 2].inset().allowsCaptionVariation())
- varia = false;
+ if (&cur[cur.depth() - 2].inset())
+ varia = cur[cur.depth() - 2].inset().allowsCaptionVariation(type);
}
status.setEnabled(varia
&& buffer().params().documentClass().hasInsetLayout(
}
+bool InsetFloat::allowsCaptionVariation(std::string const & newtype) const
+{
+ return !params_.subfloat && newtype != "LongTableNoNumber";
+}
+
+
docstring InsetFloat::getCaption(OutputParams const & runparams) const
{
if (paragraphs().empty())
///
InsetFloatParams const & params() const { return params_; }
///
- bool allowsCaptionVariation() const { return !params_.subfloat; }
+ bool allowsCaptionVariation(std::string const &) const;
private:
///
docstring layoutName() const;
}
+bool InsetTabular::allowsCaptionVariation(std::string const & newtype) const
+{
+ return tabular.is_long_tabular &&
+ (newtype == "Standard" || newtype == "LongTableNoNumber");
+}
+
+
void InsetTabular::write(ostream & os) const
{
os << "Tabular" << endl;
insets that may contain several paragraphs */
bool inheritFont() const { return false; }
///
+ bool allowsCaptionVariation(std::string const &) const;
+ ///
DisplayType display() const;
///
void latex(otexstream &, OutputParams const &) const;
\usepackage[scale|scaled=$val]{biolinum-type1}
\font_sans
\font_sf_scale
-463
-465
466 Powerdot updates:
\pause[] layout Pause
\onslide{}{} InsetFlex, InsetArgument
\begin{enumerate|itemize|...}[] InsetArgument
467 support for iwona math font (the other iwona fonts are already supported)
+
General
* Use the language information provided by Language.cpp and the languages file (for babel/lyx/polyglossia name, quote style etc.)
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 469
\begin_document
\begin_header
\textclass article
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 469
\begin_document
\begin_header
\textclass article
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 469
\begin_document
\begin_header
\textclass article
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 469
\begin_document
\begin_header
\textclass article
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 469
\begin_document
\begin_header
\textclass article
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 469
\begin_document
\begin_header
\textclass article
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 468
+\lyxformat 469
\begin_document
\begin_header
\textclass article
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 469
\begin_document
\begin_header
\textclass article
\begin_layout Standard
\begin_inset Tabular
-<lyxtabular version="3" rows="64" columns="2">
+<lyxtabular version="3" rows="66" columns="2">
<features rotate="0" islongtable="true">
<column alignment="none" valignment="top" special="@{*}r">
<column alignment="none" valignment="top" special="|p{1in}@{*}">
\end_layout
+\end_inset
+</cell>
+</row>
+<row endfoot="true" caption="true">
+<cell multicolumn="1" alignment="none" valignment="top" topline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\begin_inset Caption LongTableNoNumber
+
+\begin_layout Standard
+
+\begin_inset Argument 1
+status collapsed
+
+\begin_layout Standard
+An optional table foot caption (used in the list of tables)
+\end_layout
+
+\end_inset
+
+standard foot
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="2" alignment="none" valignment="top" topline="true" usebox="none">
+\begin_inset Text
+
\end_inset
</cell>
</row>
<row endfoot="true">
-<cell alignment="none" valignment="top" topline="true" bottomline="true" usebox="none">
+<cell alignment="none" valignment="top" topline="true" usebox="none">
\begin_inset Text
\begin_layout Standard
\end_inset
</cell>
-<cell alignment="none" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="none" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Standard
bottom.
\end_layout
+\end_inset
+</cell>
+</row>
+<row endlastfoot="true" caption="true">
+<cell multicolumn="1" alignment="none" valignment="top" topline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\begin_inset Caption LongTableNoNumber
+
+\begin_layout Standard
+
+\begin_inset Argument 1
+status collapsed
+
+\end_inset
+
+(last foot)
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multicolumn="2" alignment="none" valignment="top" topline="true" usebox="none">
+\begin_inset Text
+
\end_inset
</cell>
</row>
\textbf{First}&\textbf{Second}\\
\hline\hline
\endhead
+\caption*
+[An optional table foot caption (used in the list of tables)]
+{standard foot}\\
\hline
This goes at the&bottom.\\
\hline
\endfoot
+\caption*[]{(last foot)}\\
\hline
These lines will&appear\\
in place of the & usual foot\\
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 469
\begin_document
\begin_header
\textclass amsart
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 469
\begin_document
\begin_header
\textclass book
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 469
\begin_document
\begin_header
\textclass article
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 469
\begin_document
\begin_header
\textclass article
#LyX file created by tex2lyx 2.1.0dev
-\lyxformat 467
+\lyxformat 469
\begin_document
\begin_header
\textclass article
}
else if (t.cs() == "caption") {
+ bool starred = false;
+ if (p.next_token().asInput() == "*") {
+ p.get_token();
+ starred = true;
+ }
p.skip_spaces();
context.check_layout(os);
p.skip_spaces();
- begin_inset(os, "Caption Standard\n");
+ if (starred)
+ begin_inset(os, "Caption LongTableNoNumber\n");
+ else
+ begin_inset(os, "Caption Standard\n");
Context newcontext(true, context.textclass, 0, 0, context.font);
newcontext.check_layout(os);
// FIXME InsetArgument is now properly implemented in InsetLayout
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
-#define LYX_FORMAT_LYX 468 // uwestoehr: mbox/fbox support
-#define LYX_FORMAT_TEX2LYX 468 // uwestoehr: mbox/fbox support
+#define LYX_FORMAT_LYX 469 // gb: \caption*{}
+#define LYX_FORMAT_TEX2LYX 469 // gb: \caption*{}
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
#ifndef _MSC_VER