mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 21:05:12 +00:00
findadv: Output language chage in ANY case, if outputting for search
Without this, the first \item entry in a list does not specify the language in latex output. But we need it if we do not ignore language in search.
This commit is contained in:
parent
01af66d658
commit
5c2f29d024
@ -680,7 +680,7 @@ void parStartCommand(Paragraph const & par, otexstream & os,
|
|||||||
case LATEX_ITEM_ENVIRONMENT:
|
case LATEX_ITEM_ENVIRONMENT:
|
||||||
case LATEX_LIST_ENVIRONMENT:
|
case LATEX_LIST_ENVIRONMENT:
|
||||||
if (runparams.for_search) {
|
if (runparams.for_search) {
|
||||||
os << "\\item{" << style.latexname() << "}";
|
os << "\\" + style.itemcommand() << "{" << style.latexname() << "}";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
os << "\\" + style.itemcommand();
|
os << "\\" + style.itemcommand();
|
||||||
@ -875,12 +875,12 @@ void TeXOnePar(Buffer const & buf,
|
|||||||
bool const localswitch_needed = localswitch && par_lang != outer_lang;
|
bool const localswitch_needed = localswitch && par_lang != outer_lang;
|
||||||
|
|
||||||
// localswitches need to be closed and reopened at each par
|
// localswitches need to be closed and reopened at each par
|
||||||
if ((par_lang != prev_lang || localswitch_needed)
|
if (runparams_in.for_search || ((par_lang != prev_lang || localswitch_needed)
|
||||||
// check if we already put language command in TeXEnvironment()
|
// check if we already put language command in TeXEnvironment()
|
||||||
&& !(style.isEnvironment()
|
&& !(style.isEnvironment()
|
||||||
&& (pit == 0 || (priorpar->layout() != par.layout()
|
&& (pit == 0 || (priorpar->layout() != par.layout()
|
||||||
&& priorpar->getDepth() <= par.getDepth())
|
&& priorpar->getDepth() <= par.getDepth())
|
||||||
|| priorpar->getDepth() < par.getDepth()))) {
|
|| priorpar->getDepth() < par.getDepth())))) {
|
||||||
if (!localswitch
|
if (!localswitch
|
||||||
&& (!using_begin_end || langOpenedAtThisLevel(state))
|
&& (!using_begin_end || langOpenedAtThisLevel(state))
|
||||||
&& !lang_end_command.empty()
|
&& !lang_end_command.empty()
|
||||||
|
Loading…
Reference in New Issue
Block a user