mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
Improve verbatim for RTL
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21153 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
45482a947d
commit
6da13bd888
@ -1957,8 +1957,9 @@ bool Paragraph::latex(Buffer const & buf,
|
||||
open_font = false;
|
||||
}
|
||||
|
||||
// Switch file encoding if necessary
|
||||
if (runparams.encoding->package() == Encoding::inputenc &&
|
||||
// Switch file encoding if necessary (and allowed)
|
||||
if (!runparams.verbatim &&
|
||||
runparams.encoding->package() == Encoding::inputenc &&
|
||||
font.language()->encoding()->package() == Encoding::inputenc) {
|
||||
std::pair<bool, int> const enc_switch = switchEncoding(os, bparams,
|
||||
runparams.moving_arg, *(runparams.encoding),
|
||||
|
@ -253,6 +253,18 @@ TeXOnePar(Buffer const & buf,
|
||||
BufferParams const & bparams = buf.params();
|
||||
LayoutPtr style;
|
||||
|
||||
if (runparams_in.verbatim) {
|
||||
Font const outerfont =
|
||||
outerFont(std::distance(paragraphs.begin(), pit),
|
||||
paragraphs);
|
||||
// FIXME UNICODE
|
||||
bool need_par = pit->latex(buf, bparams, outerfont,
|
||||
os, texrow, runparams_in);
|
||||
os << '\n';
|
||||
texrow.newline();
|
||||
return ++pit;
|
||||
}
|
||||
|
||||
// In an inset with unlimited length (all in one row),
|
||||
// force layout to default
|
||||
if (!pit->forceDefaultParagraphs())
|
||||
@ -558,7 +570,7 @@ TeXOnePar(Buffer const & buf,
|
||||
if (closing_rtl_ltr_environment)
|
||||
os << "}";
|
||||
|
||||
if (pending_newline && !runparams.verbatim) {
|
||||
if (pending_newline) {
|
||||
os << '\n';
|
||||
texrow.newline();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user