[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: LaTeX with monospace material



Kent West wrote:
> (Off-Topic because this is really a LaTeX question rather than a Debian
> question.)
> 
> Verse 1
>          A
> I wanna make you smile
> Bm
> Whenever you're sad
> C#m
> Carry you around
>               D
> When your arthritis is bad
> A                  E
> All I wanna do is
>      D         A     E
> Grow old with you.
> 
> What I'm concerned about is the chord names (A, D, etc) need to line up
> with the word where the chords change, which means exact placement will
> be necessary. I currently do this in OO.o with a monospace font and
> manually spacing over to where the chord name goes.

With plain LaTeX, I would just define a proper macro for algning the
letters, say

\newcommand{chord}{Definition of how to put chord A over letter a}

and then whenever your want a chord, you just type \chord{chord}{letter}
whenever you want chord over a letter.

> The songs will be one (or maybe two or three short ones) to a page, with
> a few taking two or three pages. The pages won't be numbered, but I will
> want them in alphabetical order by category (mine, Christmas songs,
> Country songs, etc), and then a table of contents. This way I can add a
> new song/page without having to re-print the entire book of songs; I can
> just print the one song and the newly-generated table of contents, and
> then replace the current TOC in my book with the new one and put the new
> song/page into the proper place alphabetically into the book.

My suggestion is to use one .tex-file per song, where the filename is
the title of the song (replace spaces by _). You can then just to use
'ls' and 'sort' or the like to create an alphabetical list of your
songs. These will then be incorporated into your songbooks
latex-master-file in alphabetical order. [Hint: \include{filename}]

> My basic question is this: Is LaTeX suitable for this sort of document?

Yes.

> And my second question: Is the learning curve going to be worth it, or
> should I just stick to OO.o which pretty much does the job already?

Yes, as someone else has pointed out, you will soon discover that you
can do many useful neat tricks you never knew of...

I'm no guitarplayer, and so I don't know if that is really what you
wanted, but here comes my little LaTeX hack to do what I think you
wanted to achieve. The pdf (7.2k) of all that is attached as well.

Johannes

NB: I don't know if this alignment (without use of a monospace font!) is
what you would want, but that could be changed easily. Probably one
would also like to improve the linespacing a bit.


<---LaTeX-File--->
\documentclass[a4paper,10pt]{article}

\newlength{\chordlength}
\newcommand{\chord}[2]{\settowidth{\chordlength}{#2}\parbox[b]{\chordlength}{#1\\#2}}
\begin{document}

\section{Verse 1}

\begin{verse}

I wanna m\chord{A}{a}ke you smile\\
Wh\chord{Bm}{e}never you're sad\\
C\chord{C\#m}{a}rry you around\\
When your arthr\chord{D}{i}tis is bad\\
\chord{A}{A}ll I wanna do \chord{E}{i}s\\
Grow \chord{D}{o}ld with y\chord{A}{o}u. \quad \chord{E}{ }

\end{verse}
\end{document}
<---/LatexFile--->

Attachment: song.pdf
Description: Adobe PDF document


Reply to: