This is a follow-up question of my previous one: Cross-referencing numeric values and text from later section to executive summary of a latex document

I have finished making my report and now my boss asks to insert an index into the document.I have made a sample as below (the tex file is created using Rmarkdown and pandoc, so it may have some code not needed but incorporated)

\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\else % if luatex or xelatex
% use upquote if available, for straight quotes in verbatim environments
% use microtype if available
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
            pdfborder={0 0 0},
\urlstyle{same}  % don't use monospace font for urls
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
}{% else
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em}  % prevent overfull lines
% Redefines (sub)paragraphs to behave more like sections

%%% Use protect on footnotes to avoid problems with footnotes in titles

%%% Change title format to be more compact

% Create subtitle command for use in maketitle








\abidx{setosa}, \abidx{versicolor}, \abidx{virginica}

  This is a \ref*{label01}
  Types of flowers: \ref*{label02}
  Types of flowers: \ref*{label03}



\storehide{\abidx{setosa}, \abidx{versicolor}, \abidx{virginica}}{label03}



I create a list of terms and cross-referenced them in other part of the document, what I want to the index each and every one of the terms so that they can be listed in the index part (i.e. cross-referencing label03), but it is not working.

What have I done wrong? Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.