I need to print in the acronym list the page number of first occurrence of an acronym in the text, not the page numbers of the subsequent occurrences. How can I achieve that ?
I have defined my acronyms in a separate file. Though in the MWE, I have defined two acronyms in the main body itself.
In the MWE, the acronym MC appears in the 1st and 3rd page, for example. I want only page number 1 (the first occurence) to be there in the list of acronyms.
I also need to add units after the description in the acronym list. For example, in the second acronym, the unit angstrom beside "bond length", followed by page number of first occurrence of L.
For all the comumns, I need to add column names:
Symbol ....... Name and Units ....... First used on Page No.
The dots means white space.
The MWE
\documentclass[12pt,a4paper]{article}
\usepackage{hyperref}
\hypersetup{
bookmarks=true, % show bookmarks bar?
unicode=false, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=false, % window fit to page when opened
pdfstartview={FitH}, % fits the width of the page to the window
pdftitle={My title}, % title
pdfauthor={Author}, % author
pdfsubject={Subject}, % subject of the document
pdfcreator={Creator}, % creator of the document
pdfproducer={Producer}, % producer of the document
pdfkeywords={keyword1} {key2} {key3}, % list of keywords
pdfnewwindow=true, % links in new window
colorlinks=true, % false: boxed links; true: colored links
linkcolor=red, % color of internal links
citecolor=blue, % color of links to bibliography
filecolor=magenta, % color of file links
urlcolor=cyan % color of external links
}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{lipsum,appendix}
\usepackage[english]{babel}
%glossaries and acronym
\usepackage[nomain,acronym,xindy,toc, style=alttree,numberline,savewrites=true]{glossaries}
\renewcommand*{\glspostdescription}{}%removes dot at end
\glssetwidest{AAAAAAA}% widest name
\renewcommand*{\glsnamefont}[1]{\textmd{#1}}
\makeglossaries
\renewcommand*\appendixpagename{Nomenclature}
\renewcommand*\appendixtocname{Nomenclature}
\begin{document}
%\maketitle
\pagenumbering{alph}
\newpage
\tableofcontents
\newpage
%Acronyms
\printglossaries
\newpage
\pagenumbering{arabic}
\glsresetall
\newacronym{MC}{MC}{Monte Carlo}
\newacronym{L}{L}{bond length}
This is the first use of \gls{MC}.
\newpage
This is the first use of \gls{L}.
\newpage
This is the second use of \gls{MC}.
\newpage
This is the second use of \gls{L}.
\end{document}
Following is the custom glossary style from manual
%custom glossary style
\newglossarystyle{long6col}{%
% put the glossary in a longtable environment:
\renewenvironment{theglossary}%
{\begin{longtable}{lp{\glsdescwidth}cccp{\glspagelistwidth}}}%
{\end{longtable}}%
% Set the table’s header:
\renewcommand
*
{\glossaryheader}{%
\bfseries Term & \bfseries Description & \bfseries Symbol &
\bfseries Units & \bfseries Dimensions & \bfseries Page List
\\\endhead}%
% No heading between groups:
\renewcommand
*
{\glsgroupheading}[1]{}%
% Main (level 0) entries displayed in a row optionally numbered:
\renewcommand
*
{\glossaryentryfield}[5]{%
\glsentryitem{##1}% Entry number if required
\glstarget{##1}{##2}% Name
& ##3% Description
& ##4% Symbol
& \glsentryuseri{##1}% Units
& \glsentryuserii{##1}% Dimensions
& ##5% Page list
\\% end of row
}%
% Similarly for sub-entries (no sub-entry numbers):
\renewcommand
*
{\glossarysubentryfield}[6]{%
% ignoring first argument (sub-level)
\glstarget{##2}{##3}% Name
& ##4% Description
& ##5% Symbol
& \glsentryuseri{##2}% Units
& \glsentryuserii{##2}% Dimensions
& ##6% Page list
\\% end of row
}%
% Nothing between groups:
\renewcommand
*
{\glsgroupskip}{}%
}
%END: custom glossary style
How do I delete SYMBOLS and DIMENSION from the above style? How do I define the acronyms ?