indexing help
Don Gingrich
gingrich at internode.on.net
Thu Mar 7 03:28:28 CET 2019
I've got a big book of music
I created the scores with LilyPond (using options to minimise the
margins and such to make them better included files) and then generated PDFs
Then I built a LaTex container file to build the book with contents
indices, etc.
At present there is a contents table, and an index of first lines.
I'd like to add the following indices:
composer/lyricist
country of origin
title
It's got over 100, and may get to 200 songs, so the easier it is
to find things, the better
Just to give the flavour, I'll give a (not quite working) example --
for it to be working I'd need to supply the musical scores.
I've noticed that a bunch of the packages do not "play nice" with one
another
and I've done a *lot* of tweaking and fiddling to get the page margins in
the right places, as well as working to force page-breaks and such so that
the music would sit with a score on a left/right combination. If there
was any
interest, I'd be happy to share the container template when it was a
fully working
thing.
---------------------------start e g --------------------------
\documentclass[titlepage,12pt,a4paper,twoside]{article}
\setlength{\topmargin}{-0.75 in}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{pdfpages}
\usepackage{fancyhdr}
\usepackage{titling}
\usepackage{blindtext}
\usepackage{makeidx}
%\usepackage[pdftex]{graphicx,color} wont work with tocstyle
\usepackage[tocindentauto]{tocstyle}
%\usekomafont{roman}
\usetocstyle{KOMAlike} %the previous line resets it
\usetocstyle{allwithdot}
%\usetocstyle{tocbreakscareless}
% \usepackage[inner=2.5cm,textwidth=18cm]{geometry}
\newcommand\invisiblesection[1]{%
\refstepcounter{section}%
\addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}%
\sectionmark{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% following block allows for page number to be visible
% and easily modified
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot[C]{\large \thepage} % except the center
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\textheight}{240mm}
\renewcommand{\footrulewidth}{2pt}
%\renewcommand{\evensidemargin}{1cm}
%\renewcommand{\oddsidemargin}{1cm}
%\renewcommand{\hoffset}{-2cm}
\renewcommand{\abstractname}{} } % clear the title
% \newcommand\l at section {\@dottedtocline{1}{2em}{3em}}
% \renewcommand{\absnamepos}{empty} % originally center
\renewcommand*{\indexname}{Index of First lines}
\newcommand{\at}{\makeatletter @\makeatother}
\makeindex
\pagestyle{empty}
\begin{titlepage}
\clearpage\thispagestyle{empty}
\title{\huge \bf Songs for Busking\\-----------------------------------
\\ \large \it AKA Don's Favourites }
\author{\Large{Compiled by Don Gingrich}}
\date{January 2019}
\end{titlepage}
\begin{document}
\maketitle
\pagebreak
\pagestyle{plain}
\pagenumbering{roman}
\section*{Note to Musicians}
This book is compiled from a range of scores for folk music
and modern tunes written ``in the folk tradition''. They represent
an eclectic and idiosyncratic selection of tunes with the primary
commonality being that they suit the musical or/or political taste of the
compiler.
\cleardoublepage
\tableofcontents
% \input busking.toc
\cleardoublepage
\section*{Dedication}
\begin{textit}
This book is dedicated to the musicians who use it, in
the hope that they get enjoyment from playing these tunes.
\end{textit}
-Don
\pagebreak
% \\begin{theindex}
\pagestyle{plain}
\pagenumbering{arabic}
\invisiblesection{500 Miles}
\index{If you miss the train I'm on, you will know that I am gone}
\includepdf[pages=-, scale=0.85, offset=-1.2cm 0,
pagecommand={}]{500-miles.pdf}
\invisiblesection{All Around My Hat}
\index{Fare thee well cold winter and fare thee well cold frost}
\includepdf[pages=-, scale=0.85, offset=-1.2cm 0,
pagecommand={}]{All-Around-My-Hat.pdf}
\invisiblesection{And the Band Played Waltzing Matilda}
\index{When I was a young man I carried a pack}
\includepdf[pages=-, scale=0.85, offset=-1.2cm 0,
pagecommand={}]{And-the-Band-Played-Waltzing-Matilda.pdf}
% the above pattern repeats for each song
\pagebreak
\footnotesize
\clearpage
\printindex
% \blinddocument
% \\end{theindex}
\end{document}
---------------------------------- end e g
---------------------------------------
--
Don Gingrich
gingrich at internode.on.net gingrich at gmail.com
don at gingrich.id.au
http://www.gingrich.id.au for web page
More information about the texhax
mailing list