diff --git a/src/latexdocument.cpp b/src/latexdocument.cpp index 51aa3d55a0..47788ddbf7 100644 --- a/src/latexdocument.cpp +++ b/src/latexdocument.cpp @@ -1082,7 +1082,9 @@ void LatexDocument::reinterpretCommandArguments(HandledData &changedCommands) } } bool skipRecheck=dlh->hasFlag(QDocumentLine::argumentsParsed); - changedCommands.removedUsepackages << mUsepackageList.values(dlh); // make already interpreted usepakages known + if(!dlh->hasFlag(QDocumentLine::argumentsParsed)){ + removeLineElements(dlh,changedCommands); + } interpretCommandArguments(dlh,i,changedCommands,false,docStructureIter); if (edView && !skipRecheck){ edView->documentContentChanged(i, 1); diff --git a/src/latexparser/latexparsing.cpp b/src/latexparser/latexparsing.cpp index a1cbc5be35..2d402f9985 100644 --- a/src/latexparser/latexparsing.cpp +++ b/src/latexparser/latexparsing.cpp @@ -383,8 +383,11 @@ bool latexDetermineContexts2(QDocumentLineHandle *dlh, TokenStack &stack, Comman } } else { if(tk.type==Token::command && tk.subtype == Token::none){ - tk.type = Token::commandUnknown; - unknownCommandsPresent=true; + if(command!="\\\\"){ + // skip "\\" + tk.type = Token::commandUnknown; + unknownCommandsPresent=true; + } } } lexed << tk;