.
\end_layout
-\begin_layout Standard
+\begin_layout Section
+Lists/Indices
+\end_layout
+\begin_layout Standard
+single
+\backslash
+addcontentsline:
\begin_inset ERT
status collapsed
\end_layout
\begin_layout Standard
-
+with
+\backslash
+addcontentsline and
+\backslash
+phantomsection:
+\end_layout
+
+\begin_layout Standard
+
\begin_inset CommandInset bibtex
LatexCommand bibtex
-bibfiles "IEEEexample"
+bibfiles "xampl"
options "bibtotoc,test"
\end_inset
\end_layout
+\begin_layout Standard
+normal:
+\end_layout
+
\begin_layout Standard
\begin_inset CommandInset bibtex
LatexCommand bibtex
-bibfiles "IEEEexample"
+bibfiles "xampl"
options "test"
\end_inset
\end_layout
+\begin_layout Standard
+with wrong
+\backslash
+addcontentsline:
+\end_layout
+
\begin_layout Standard
\begin_inset ERT
\end_inset
-
+
\begin_inset CommandInset bibtex
LatexCommand bibtex
-bibfiles "IEEEexample"
+bibfiles "xampl"
options "test"
\end_inset
\end_layout
+\begin_layout Standard
+with
+\backslash
+addcontentsline and
+\backslash
+nocite{*}:
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset CommandInset bibtex
+LatexCommand bibtex
+btprint "btPrintAll"
+bibfiles "xampl"
+options "bibtotoc,test"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+normal index:
+\end_layout
+
\begin_layout Standard
\begin_inset CommandInset index_print
\end_layout
+\begin_layout Standard
+normal nomenclature:
+\end_layout
+
\begin_layout Standard
\begin_inset CommandInset nomencl_print
\end_layout
\begin_layout Standard
-
+manually set width:
\begin_inset ERT
status collapsed
\end_layout
+\begin_layout Standard
+nomenclature with set width:
+\end_layout
+
\begin_layout Standard
\begin_inset CommandInset nomencl_print
or by a defined page break \pagebreak % again with a comment
[4]
+
\section{Special characters\index{Special characters}}
Then one has those macros with a long name for a short meaning, like
A sub\textsubscript{sc\emph{ript}} and super\textsuperscript{script
with $a^2+b^2=c^2$ math}.
+
\section{Mathematics\index{Mathematics}}
Let $f:\left[ a,b\right] \rightarrow%
%EndExpansion
$.
-\addcontentsline{toc}{section}{test}
+
+\section{Lists/Indices}
+
+single \textbackslash{}addcontentsline: \addcontentsline{toc}{section}{test}
+
+with \textbackslash{}addcontentsline and \textbackslash{}phantomsection:
\bibliographystyle{test}
-\addcontentsline{toc}{section}{\refname}
-\bibliography{IEEEexample}
+\phantomsection\addcontentsline{toc}{section}{\refname}\bibliography{xampl}
+
+
+normal:
\bibliographystyle{test}
-\bibliography{IEEEexample}
+\bibliography{xampl}
+
+
+with wrong \textbackslash{}addcontentsline:
+
+\bibliographystyle{test} \addcontentsline{toc}{section}{test} \bibliographystyle{test}
+\bibliography{xampl}
+
+
+with \textbackslash{}addcontentsline and \textbackslash{}nocite\{{*}\}:
\bibliographystyle{test}
-\addcontentsline{toc}{section}{test}
-\bibliography{IEEEexample}
+\addcontentsline{toc}{section}{\refname}\nocite{*}
+\bibliography{xampl}
+
+
+normal index:
\printindex{}
+normal nomenclature:
+
\printnomenclature hello
-\settowidth{\nomlabelwidth}{URL2}
-\printnomenclature{}
+manually set width: \settowidth{\nomlabelwidth}{URL2} \printnomenclature{}
+
+nomenclature with set width:
\printnomenclature[0.02\linewidth]{}
continue;
} else if (t2.cs() == "bibliography")
output = false;
+ else if (t2.cs() == "phantomsection") {
+ output = false;
+ continue;
+ }
else if (t2.cs() == "addcontentsline") {
// get the 3 arguments of \addcontentsline
p.getArg('{', '}');
}
}
+ else if (t.cs() == "phantomsection") {
+ // we only support this if it occurs between
+ // \bibliographystyle and \bibliography
+ if (bibliographystyle.empty())
+ output_ert_inset(os, "\\phantomsection", context);
+ }
+
else if (t.cs() == "addcontentsline") {
context.check_layout(os);
// get the 3 arguments of \addcontentsline
BibOpts = bibliographystyle;
else
BibOpts = BibOpts + ',' + bibliographystyle;
+ // clear it because each bibtex entry has its style
+ // and we need an empty string to handle \phantomsection
+ bibliographystyle.clear();
}
os << "options " << '"' << BibOpts << '"' << "\n";
end_inset(os);