mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
fix broken latex output range checking
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27571 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cc670d82b4
commit
86618e2650
@ -2084,7 +2084,8 @@ bool Paragraph::latex(BufferParams const & bparams,
|
|||||||
os << fontchange;
|
os << fontchange;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c == ' ' && i >= start_pos && i < end_pos) {
|
// FIXME: think about end_pos implementation...
|
||||||
|
if (c == ' ' && i >= start_pos && (end_pos == -1 || i < end_pos)) {
|
||||||
// FIXME: integrate this case in latexSpecialChar
|
// FIXME: integrate this case in latexSpecialChar
|
||||||
// Do not print the separation of the optional argument
|
// Do not print the separation of the optional argument
|
||||||
// if style.pass_thru is false. This works because
|
// if style.pass_thru is false. This works because
|
||||||
@ -2113,17 +2114,18 @@ bool Paragraph::latex(BufferParams const & bparams,
|
|||||||
// Handle here those cases common to both modes
|
// Handle here those cases common to both modes
|
||||||
// and then split to handle the two modes separately.
|
// and then split to handle the two modes separately.
|
||||||
if (c == META_INSET) {
|
if (c == META_INSET) {
|
||||||
if (i >= start_pos && i < end_pos)
|
if (i >= start_pos && (end_pos == -1 || i < end_pos)) {
|
||||||
d->latexInset(bparams, os,
|
d->latexInset(bparams, os,
|
||||||
texrow, rp, running_font,
|
texrow, rp, running_font,
|
||||||
basefont, outerfont, open_font,
|
basefont, outerfont, open_font,
|
||||||
runningChange, style, i, column);
|
runningChange, style, i, column);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (i >= start_pos && i < end_pos) {
|
if (i >= start_pos && (end_pos == -1 || i < end_pos)) {
|
||||||
try {
|
try {
|
||||||
d->latexSpecialChar(os, rp, running_font, runningChange,
|
d->latexSpecialChar(os, rp, running_font, runningChange,
|
||||||
style, i, column);
|
style, i, column);
|
||||||
} catch (EncodingException & e) {
|
} catch (EncodingException & e) {
|
||||||
if (runparams.dryrun) {
|
if (runparams.dryrun) {
|
||||||
os << "<" << _("LyX Warning: ")
|
os << "<" << _("LyX Warning: ")
|
||||||
<< _("uncodable character") << " '";
|
<< _("uncodable character") << " '";
|
||||||
|
@ -133,7 +133,7 @@ public:
|
|||||||
///
|
///
|
||||||
bool latex(BufferParams const &, Font const & outerfont, odocstream &,
|
bool latex(BufferParams const &, Font const & outerfont, odocstream &,
|
||||||
TexRow & texrow, OutputParams const &,
|
TexRow & texrow, OutputParams const &,
|
||||||
int start_pos = -1, int end_pos = -1) const;
|
int start_pos = 0, int end_pos = -1) const;
|
||||||
|
|
||||||
/// Can we drop the standard paragraph wrapper?
|
/// Can we drop the standard paragraph wrapper?
|
||||||
bool emptyTag() const;
|
bool emptyTag() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user