#include <algorithm>
#include <sstream>
+using namespace std;
namespace lyx {
-using std::string;
-using std::istringstream;
-using std::ostream;
-using std::ostringstream;
-
-
namespace {
-typedef Translator<std::string, InsetNoteParams::Type> NoteTranslator;
+typedef Translator<string, InsetNoteParams::Type> NoteTranslator;
typedef Translator<docstring, InsetNoteParams::Type> NoteTranslatorLoc;
NoteTranslator const init_notetranslator()
NoteTranslatorLoc const init_notetranslator_loc()
{
- NoteTranslatorLoc translator(_("Note"), InsetNoteParams::Note);
+ NoteTranslatorLoc translator(_("Note[[InsetNote]]"), InsetNoteParams::Note);
translator.addPair(_("Comment"), InsetNoteParams::Comment);
translator.addPair(_("Greyed out"), InsetNoteParams::Greyedout);
return translator;
}
+bool InsetNote::isMacroScope(Buffer const & buf) const
+{
+ // LyX note has no latex output
+ if (params_.type == InsetNoteParams::Note)
+ return true;
+
+ return InsetCollapsable::isMacroScope(buf);
+}
+
+
int InsetNote::latex(Buffer const & buf, odocstream & os,
OutputParams const & runparams_in) const
{
os << str;
runparams_in.encoding = runparams.encoding;
// Return how many newlines we issued.
- return int(std::count(str.begin(), str.end(), '\n'));
+ return int(count(str.begin(), str.end(), '\n'));
}