mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Missing pieces for InsetLayout arguments
This commit is contained in:
parent
1e9907557a
commit
a41bdfa453
@ -469,6 +469,8 @@ InsetLayout Info:shortcuts
|
|||||||
End
|
End
|
||||||
|
|
||||||
InsetLayout Caption
|
InsetLayout Caption
|
||||||
|
LaTeXType command
|
||||||
|
LatexName caption
|
||||||
Argument 1
|
Argument 1
|
||||||
LabelString "Short Title|S"
|
LabelString "Short Title|S"
|
||||||
Tooltip "The caption as it appears in the list of figures/tables"
|
Tooltip "The caption as it appears in the list of figures/tables"
|
||||||
|
@ -227,11 +227,7 @@ void InsetCaption::latex(otexstream & os,
|
|||||||
// FIXME: actually, it is moving only when there is no
|
// FIXME: actually, it is moving only when there is no
|
||||||
// optional argument.
|
// optional argument.
|
||||||
runparams.moving_arg = true;
|
runparams.moving_arg = true;
|
||||||
os << "\\caption";
|
|
||||||
getOptArg(os, runparams);
|
|
||||||
os << '{';
|
|
||||||
InsetText::latex(os, runparams);
|
InsetText::latex(os, runparams);
|
||||||
os << "}\n";
|
|
||||||
runparams_in.encoding = runparams.encoding;
|
runparams_in.encoding = runparams.encoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,13 +276,6 @@ void InsetCaption::getArgument(otexstream & os,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetCaption::getOptArg(otexstream & os,
|
|
||||||
OutputParams const & runparams) const
|
|
||||||
{
|
|
||||||
latexArgInsets(paragraphs()[0], os, runparams, getLayout().latexargs());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int InsetCaption::getCaptionAsPlaintext(odocstream & os,
|
int InsetCaption::getCaptionAsPlaintext(odocstream & os,
|
||||||
OutputParams const & runparams) const
|
OutputParams const & runparams) const
|
||||||
{
|
{
|
||||||
|
@ -28,8 +28,6 @@ public:
|
|||||||
docstring layoutName() const;
|
docstring layoutName() const;
|
||||||
/// return the mandatory argument (LaTeX format) only
|
/// return the mandatory argument (LaTeX format) only
|
||||||
void getArgument(otexstream & os, OutputParams const &) const;
|
void getArgument(otexstream & os, OutputParams const &) const;
|
||||||
/// return the optional argument(s) only
|
|
||||||
void getOptArg(otexstream & os, OutputParams const &) const;
|
|
||||||
/// return the caption text
|
/// return the caption text
|
||||||
int getCaptionAsPlaintext(odocstream & os, OutputParams const &) const;
|
int getCaptionAsPlaintext(odocstream & os, OutputParams const &) const;
|
||||||
/// return the caption text as HTML
|
/// return the caption text as HTML
|
||||||
|
@ -436,6 +436,7 @@ void InsetText::latex(otexstream & os, OutputParams const & runparams) const
|
|||||||
if (runparams.moving_arg)
|
if (runparams.moving_arg)
|
||||||
os << "\\protect";
|
os << "\\protect";
|
||||||
os << '\\' << from_utf8(il.latexname());
|
os << '\\' << from_utf8(il.latexname());
|
||||||
|
getOptArg(os, runparams);
|
||||||
if (!il.latexparam().empty())
|
if (!il.latexparam().empty())
|
||||||
os << from_utf8(il.latexparam());
|
os << from_utf8(il.latexparam());
|
||||||
os << '{';
|
os << '{';
|
||||||
@ -590,6 +591,12 @@ docstring InsetText::insetAsXHTML(XHTMLStream & xs, OutputParams const & rp,
|
|||||||
return docstring();
|
return docstring();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InsetText::getOptArg(otexstream & os,
|
||||||
|
OutputParams const & runparams) const
|
||||||
|
{
|
||||||
|
latexArgInsets(paragraphs()[0], os, runparams, getLayout().latexargs());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetText::cursorPos(BufferView const & bv,
|
void InsetText::cursorPos(BufferView const & bv,
|
||||||
CursorSlice const & sl, bool boundary, int & x, int & y) const
|
CursorSlice const & sl, bool boundary, int & x, int & y) const
|
||||||
|
@ -94,6 +94,9 @@ public:
|
|||||||
///
|
///
|
||||||
void validate(LaTeXFeatures & features) const;
|
void validate(LaTeXFeatures & features) const;
|
||||||
|
|
||||||
|
/// return the optional argument(s) only
|
||||||
|
void getOptArg(otexstream & os, OutputParams const &) const;
|
||||||
|
|
||||||
/// return x,y of given position relative to the inset's baseline
|
/// return x,y of given position relative to the inset's baseline
|
||||||
void cursorPos(BufferView const & bv, CursorSlice const & sl,
|
void cursorPos(BufferView const & bv, CursorSlice const & sl,
|
||||||
bool boundary, int & x, int & y) const;
|
bool boundary, int & x, int & y) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user