namespace {
-int const LYX_FORMAT = 340; //jamatos: add plain layout
+int const LYX_FORMAT = 341; //uwestoehr: TAB support for listings
typedef map<string, bool> DepClean;
typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
++pos;
space_inserted = true;
} else {
- const pos_type n = 8 - pos % 8;
- for (pos_type i = 0; i < n; ++i) {
- par.insertChar(pos, ' ', font, params().trackChanges);
- ++pos;
- }
+ par.insertChar(pos, *cit, font, params().trackChanges);
+ ++pos;
space_inserted = true;
}
} else if (!isPrintable(*cit)) {
OutputParams runparams = runparams_in;
+ // Classify the unicode characters appearing in math insets
+ Encodings::initUnicodeMath(*this);
+
// validate the buffer.
LYXERR(Debug::LATEX, " Validating buffer...");
LaTeXFeatures features(*this, params(), runparams);
// Write the preamble
runparams.use_babel = params().writeLaTeX(os, features, d->texrow);
+ runparams.use_japanese = features.isRequired("japanese");
+
if (!output_body)
return;
if (runparams.flavor == OutputParams::XML)
top += params().language->code();
else
- top += params().language->code().substr(0,2);
+ top += params().language->code().substr(0, 2);
top += '"';
if (!params().options.empty()) {
void Buffer::getSourceCode(odocstream & os, pit_type par_begin,
- pit_type par_end, bool full_source)
+ pit_type par_end, bool full_source) const
{
OutputParams runparams(¶ms().encoding());
runparams.nice = true;
}
+void Buffer::updateTocItem(std::string const & type,
+ DocIterator const & dit) const
+{
+ if (gui_)
+ gui_->updateTocItem(type, dit);
+}
+
+
void Buffer::structureChanged() const
{
if (gui_)
return "docbook";
if (isLiterate())
return "literate";
+ if (params().encoding().package() == Encoding::japanese)
+ return "platex";
return "latex";
}