- docstring default_tip = InsetCollapsable::toolTip(bv, x, y);
- OutputParams rp(&buffer().params().encoding());
- odocstringstream ods;
- InsetText::plaintext(ods, rp);
- docstring foot_tip = custom_label_ + ": " + ods.str();
- // shorten it if necessary
- if (foot_tip.size() > 200)
- foot_tip = foot_tip.substr(0, 200) + "...";
- if (!isOpen() && !foot_tip.empty())
- return foot_tip + '\n' + default_tip;
- return default_tip;
-}
-
-
-int InsetFoot::latex(odocstream & os, OutputParams const & runparams_in) const
-{
- OutputParams runparams = runparams_in;
- // footnotes in titling commands like \title have moving arguments
- runparams.moving_arg |= runparams_in.intitle;
-
- // in titling commands, \thanks should be used instead of \footnote.
- // some classes (e.g. memoir) do not understand \footnote.
- if (runparams_in.intitle)
- os << "%\n\\thanks{";
- else
- os << "%\n\\footnote{";
-
- int const i = InsetText::latex(os, runparams);
- os << "%\n}";
- runparams_in.encoding = runparams.encoding;
-
- return i + 2;
+ if (isOpen(bv))
+ // this will give us something useful if there is no button
+ return InsetCollapsible::toolTip(bv, x, y);
+ return toolTipText(custom_label_+ ": ");