mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
Allow \nocite again with the basic citation engine (backport r39777).
Fix a bug introduced in r26547. Also reorders the entries for natbib-numerical into a more natural, visually pleasing order. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39830 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e2a82f44bd
commit
1c56ffc10f
@ -1033,30 +1033,35 @@ string citationStyleToString(const CitationStyle & s)
|
||||
|
||||
vector<CiteStyle> citeStyles(CiteEngine engine)
|
||||
{
|
||||
unsigned int nStyles = 0;
|
||||
unsigned int start = 0;
|
||||
vector<CiteStyle> styles(0);
|
||||
|
||||
switch (engine) {
|
||||
case ENGINE_BASIC:
|
||||
nStyles = 2;
|
||||
start = 0;
|
||||
break;
|
||||
case ENGINE_NATBIB_AUTHORYEAR:
|
||||
case ENGINE_NATBIB_NUMERICAL:
|
||||
nStyles = nCiteStyles - 1;
|
||||
start = 1;
|
||||
styles.push_back(CITE);
|
||||
break;
|
||||
case ENGINE_JURABIB:
|
||||
nStyles = nCiteStyles;
|
||||
start = 0;
|
||||
styles.push_back(CITE);
|
||||
case ENGINE_NATBIB_AUTHORYEAR:
|
||||
styles.push_back(CITET);
|
||||
styles.push_back(CITEP);
|
||||
styles.push_back(CITEALT);
|
||||
styles.push_back(CITEALP);
|
||||
styles.push_back(CITEAUTHOR);
|
||||
styles.push_back(CITEYEAR);
|
||||
styles.push_back(CITEYEARPAR);
|
||||
break;
|
||||
case ENGINE_NATBIB_NUMERICAL:
|
||||
styles.push_back(CITET);
|
||||
styles.push_back(CITEALT);
|
||||
styles.push_back(CITEAUTHOR);
|
||||
styles.push_back(CITEP);
|
||||
styles.push_back(CITEALP);
|
||||
styles.push_back(CITEYEAR);
|
||||
styles.push_back(CITEYEARPAR);
|
||||
break;
|
||||
}
|
||||
|
||||
vector<CiteStyle> styles(nStyles);
|
||||
size_t i = 0;
|
||||
int j = start;
|
||||
for (; i != styles.size(); ++i, ++j)
|
||||
styles[i] = citeStylesArray[j];
|
||||
styles.push_back(NOCITE);
|
||||
|
||||
return styles;
|
||||
}
|
||||
|
@ -146,6 +146,8 @@ What's new
|
||||
- Don't allow copy-pasting newline characters in Document->Settings
|
||||
and Tools->Preferences (bug 5840).
|
||||
|
||||
- Allow the \nocite LaTeX command when using the basic citation engine.
|
||||
|
||||
|
||||
* ADVANCED FIND AND REPLACE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user