indexing help

Don Gingrich gingrich at internode.on.net
Thu Mar 7 22:36:08 CET 2019


I hadn't considered automagically generating my container file, but that 
might be a worthwhile effort since all of the code is highly repetitive.

Two complications jump up immediately--
1) The table of contents seems to have problems  when it grows past about 25-30 entries (1 page)
so I've needed to insert code to force page breaks as required
-- Hmm, that's an ideal programming problem to solve.

2) For musical reasons, I prefer that each score / PDF is two pages and stars on an even (left) page so that there is no need to flip pages part way through a piece  -- but there are a few 1 page scores  that need a blank following page to get back to the "required" organisation
-- and a tag in the database/flat file could do this also

Having said that, it may well be worth designing a simple "flat file" format as a starting point

I'll need to look at the previous poster's suggestions about multiple indices, since that's more of a central consideration.

Thanks,

-Don



On 03/07/2019 07:41 PM, Mike Marchywka wrote:
>> ________________________________________
>> 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
> for the human reader?
>
> 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
> addition.
>
> 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}%
>> \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
>>
>
> note new address
>   Mike Marchywka 306 Charles Cox Drive Canton, GA 30115
>   2295 Collinworth  Drive Marietta GA 30062.  formerly 487 Salem Woods Drive Marietta GA 30067 404-788-1216 (C)<- leave message 989-348-4796 (P)<- emergency
>
>

-- 
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