- support for \nocite (since format 309)
- add \nocite{*} option to testfile

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36960 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2010-12-20 02:08:22 +00:00
parent a0ff0a15cf
commit 54cee82fb6
2 changed files with 8 additions and 2 deletions

View File

@ -93,6 +93,11 @@ Now the natbib things:
\bibliographystyle{unsrt}
\bibliography{xampl}
With \textbackslash{}nocite\{{*}\}:
\bibliographystyle{unsrt}
\nocite{*}
\bibliography{xampl}
\section{Input files\index{Input files}}
We can input files too, like this \input{DummyDocument}, or with the include

View File

@ -2204,11 +2204,12 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
end_inset(os);
}
else if (t.cs() == "cite") {
else if (t.cs() == "cite"
|| t.cs() == "nocite") {
context.check_layout(os);
// LyX cannot handle newlines in a latex command
string after = subst(p.getOptContent(), "\n", " ");
begin_command_inset(os, "citation", "cite");
begin_command_inset(os, "citation", t.cs());
os << "after " << '"' << after << '"' << "\n";
os << "key " << '"' << subst(p.verbatim_item(), "\n", " ") << '"' << "\n";
end_inset(os);