What code will enable me to reorganize the List of Figures alphabetically (and keep the page number)? My goal is to include that alphabetical listing of figures in the PDF file that is created.
Here is a tiny reproducible example with three figures. Thank you for your assistance.
\documentclass[11pt]{article}
\begin{document}
\listoffigures
<<source, include = FALSE>>=
library(knitr)
library(ggplot2)
library(datasets)
df <- as.data.frame(Titanic)
@
<<plot1, eval = TRUE, fig.cap = "Plot 1", include = TRUE, warning = FALSE, echo=FALSE>>=
ggplot(df, aes(x=Class, y = Freq)) + geom_point()
@
<<plot2, eval = TRUE, fig.cap = "Another Plot", include = TRUE, warning = FALSE, echo=FALSE>>=
ggplot(df, aes(x=Class, y = Freq)) + geom_point()
@
<<plot3, eval = TRUE, fig.cap = "Third plot", include = TRUE, warning = FALSE, echo=FALSE>>=
ggplot(df, aes(x=Class, y = Freq)) + geom_point()
@
\end{document}
Best Answer
With "reorganize alphabetically" you mean change the numeric counter (1,2,3 ...) by an alphabetic counter (A,B,C...)? Some like this?
But if you mean order by caption contents, then you basically need a indexing package:
See Layouting the index-page if you want to change the comma delimiter by
\dotfill
.