# indexing help

Mike Marchywka marchywka at hotmail.com
Thu Mar 7 09:41:12 CET 2019

>
>________________________________________
>From: texhax <texhax-bounces+marchywka=hotmail.com at tug.org> on behalf of Don Gingrich <gingrich at internode.on.net>
>Sent: Wednesday, March 6, 2019 9:28 PM
>To: texhax at tug.org
>Subject: indexing help
>
>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
>
Do you hae some other database in which these items are stored
or you mean you want the latex output itself to just be indexed

I guess any sizable collection you want to maintain in a machine
readable format and that could be a structured latex document
( I'm doing this now with text files and an ad hoc language I made
up lol ) or you could generate the latex from the DB for each new

I'm not trying to answer your question but just put it into a
larger context as there may be a lot of people with variants
of this problem and maybe some have intersting approaches.
All my data is text but with data more grapically
oriented there may be more cleve things to do.

Once you have some experience "tweaking and fiddling" you
may be able to wrie code to generate decent latex or
just put the parameters into the DB with the music.

>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}%
>   \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{\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
>