Hi -- you asked for them! -- Dynamics that start in a beam are rejected (this could be input error??) I want a decrescendo starting over the second quaver and ending after the crotchet. \score { \melodic \relative c' { a4\< [b8\! c\>] a4 \! g } } .... ./x.ly:4:16: warning: junking request: `Span_dynamic_req': a4\< [b8\! c\> ] a4 \! g ./x.ly:4:20: warning: can't find both ends of cresc: a4\< [b8\! c\>] a4 \! g -- Bar number placement is not good. If I include `bar-numbering.ly' the bar numbers go inside the lines of the staff. If I include `score-bar-numbering.ly' the numbers are a long way from the staff -- especially if a staff has done hara-kiri. -- Lyric spacing is bad. I often see words collide. -- Dots and slurs aren't quite placed right. \melodic\relative c'' { <[b,8-.( d-. g-.> <b8-. d-. g-.> <b-. d-. g-.> <)b-. d-. g-.]> <[b8-. d-. g-.(> <b8-. d-. g-.> <b-. d-. g-.> <)b-. d-. g-.]> } -- the slur should be flatter, and below all the staccato dots. As it is, the ends of the slur come between the dots and the noteheads. -- ly2dvi barfs for filenames with spaces in thme -- ly2dvi clobbers its input file if invoked as ly2dvi x.tex where x.tex was created from a previous lilypond run. **Diffs for ly2dvi below! -- I need to be able to specify metre and poet/wordsmith as well as composer... ** Diffs for titledefs.tex below -- GrandStaff needs more work -- I want a single word `harpsichord' to the left of the grandstaff, not one on each stave. (Organ staff -- with separate pedal -- but common properties may be something to think about. Of course for organ you want to be able to give stop indications on the way through, so the \property Voice.Instrument would be a stop, and \property GrandStaff.instrument would be PipeOrgan...) --- scripts/orig-ly2dvi.sh Wed Jul 29 09:09:42 1998 +++ scripts/ly2dvi.sh Wed Jul 29 17:32:22 1998 @@ -21,6 +21,15 @@ # NEWS +# +#0.11.pc +# - fix backslash gobbling, reduce number of separate processes used +# - require readable rc files, allow rc file in /usr/local/share/lilypond/lilyrc +# - use latex path, not tex path +# - Don't override if kpsepath returns non-NULL +# - Don't clobber x.tex if it wasn't created by ly2dvi + +# #0.11.jcn1 # - find .fly files too # @@ -220,6 +229,15 @@ EOF } # +# SVr4 echo swallows backslashes, and there's no way to turn it off. +# Therefore use Echo whenever backslashes may be important. +# printf is in the posix.2 standard -- which means it's in +# all modern shells. +# +Echo() { + printf "%s\n" "$@" +} +# # Trap function (cleanup) # trap cleanup 0 9 15 @@ -380,10 +398,10 @@ # # RC-files ? # -for D in /usr/local/share/ /etc/ $HOME/. ./. +for D in /usr/local/share/ /usr/local/share/lilypond/ /etc/ $HOME/. ./. do RCfile=$D"lilyrc" - [ -f $RCfile ] && . $RCfile + [ -r $RCfile ] && . $RCfile done fORI=$ORIENTATION fLNG=$LANGUAGE @@ -393,28 +411,20 @@ # # Keywords defined in titledefs.tex # -TF=`kpsewhich -n tex tex titledefs.tex` -if [ -n $TF ] -then - TF=/usr/lib/texmf/tex/lilypond/titledefs.tex -fi +TF="`kpsewhich -n latex tex titledefs.tex`" MU_DEF="" -if [ -f $TF ] +if [ -r "${TF:=/usr/local/share/texmf/tex/lilypond/titledefs.tex}" ] then - MU_DEF=`egrep "^.newcommand...mudela" $TF | \\ - sed -e 's/^.newcommand...//' -e 's/\\}.*$//'` + MU_DEF=`sed -n -e 's/.*newcommand\*{.\(mudela[^}]*\)}.*$/\1/p' "$TF"` fi -if [ -z "$MU_DEF" ] -then - MU_DEF="mudelatitle mudelasubtitle mudelacomposer \ - mudelaopus mudelaarranger mudelapiece mudelainstrument" -fi +: "${MU_DEF:=mudelatitle mudelasubtitle mudelacomposer \ + mudelaopus mudelaarranger mudelapiece mudelainstrument}" # # debugging # -debug_echo=true +debug_echo=: # # All files in one LaTeX run # @@ -491,20 +501,20 @@ $debug_echo "long option: \`$OPTARG'" case "$OPTARG" in He*|-He*) - PHEIGHT=`echo $OPTARG | sed -e s/"^.*="//` + PHEIGHT"`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`"= ;; W*|-W*) - PWIDTH=`echo $OPTARG | sed -e s/"^.*="//` + PWIDTH="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`" ;; dep*|-dep*) - LILYOPTS=$LILYOPTS" -d" + LILYOPTS="$LILYOPTS -d" ;; d*|-d*) [ $debug_echo = echo ] && set -x debug_echo=echo ;; hea*|-hea*) - LATEXHF=`echo $OPTARG | sed -e s/"^.*="//` + LATEXHF="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`" ;; h*|-h*) help; @@ -520,25 +530,25 @@ ORIENTATION=landscape ;; lang*|-lang*) - LANGUAGE=`echo $OPTARG | sed -e s/"^.*="//` + LANGUAGE="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`" ;; n*|-n*) PNUM="\pagestyle{empty}" ;; or*|-or*) - ORIENTATION=`echo $OPTARG | sed -e s/"^.*="//` + ORIENTATION="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`" ;; ou*|-ou*) - OUTPUTDIR=`echo $OPTARG | sed -e s/"^.*="//` + OUTPUTDIR="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`" ;; p*|-p*) - PAPERSIZE=`echo $OPTARG | sed -e s/"^.*="//` + PAPERSIZE="`expr \"$OPTARG\" ':' '[^=]*=\(.*\)'`" ;; s*|-s*) SEPFILE=Y ;; *|-*) - echo $0": illegal option -- "$OPTARG; + echo "$0: illegal option -- \"$OPTARG\"" help; exit -1 ;; @@ -552,7 +562,7 @@ if [ "$1" = "" ] then help - $debug_echo $IDENTIFICATION": No input file name given" + $debug_echo "$IDENTIFICATION: No input file name given" exit 1 fi # @@ -562,36 +572,28 @@ # for L in $MU_DEF do - SS=$1 - # LL=`egrep '^\\\\def.'$L'{' $OF` - LL=`egrep '^\\\\def.'$L'{' $File` - if [ "$LL" = "" ] - then - LL=`egrep '^\\\\def.'$L'{' $OF` - fi - if [ "$LL" != "" ] - then - ##{ - LLL=`echo $LL | sed -e 's/}.*$//' -e 's/.*{//'` - ##}{ - if [ "$LLL" != "" ] - then - echo "$SS\\"$L'{'$LLL'}%' >> $LatF - fi - fi + for F in "$File" "$OF" + do + LL=`sed -n 's/\\\\def\\\\'"$L"'{\([^}]*\)}.*$/\1/p' "$F"` + [ "$LL" ] && { + Echo "$1\\"$L'{'"$LL"'}%' >> $LatF + break + } + done done } + startFile(){ # # LaTeX file name # -BN=`basename $File .tex` -FN=$BN.$$ +BN=`basename "$File" .tex` +FN="$BN.$$" if [ "$KEEP_LY2DVI_OUTPUT" != "Y" ] then - LatF=$TMP/$FN.tex + LatF="$TMP/$FN.tex" else - LatF=$FN.tex + LatF="$FN.tex" fi # # Find: @@ -607,54 +609,54 @@ -e 's/\\\\def\\\\mudelapaperlinewidth{\([^}]*\).*$/TWN=\1;/p' \\ -e 's/\\\\def\\\\mudelapapertextheight{\([^}]*\).*$/THN=\1;/p' \\ -e 's/\\\\def\\\\mudelapapersize{\([^}]*\).*$/fPSZ=\1;/p' \\ - $File` + "$File"` # if [ -z "$LATEXHF" ] then - LATEXHF=$fLHF + LATEXHF="$fLHF" fi LLHF="%" if [ -n "$LATEXHF" ] then - [ -f $LATEXHF ] && LLHF="\input{$LATEXHF}" + [ -f "$LATEXHF" ] && LLHF="\input{$LATEXHF}" fi # if [ -z "$PAPERSIZE" ] then - PAPERSIZE=$fPSZ + PAPERSIZE="$fPSZ" fi if [ -n "$PAPERSIZE" ] then setPaperZize - PAPEROPT=$PAPERSIZE + PAPEROPT="$PAPERSIZE" fi # if [ -z "$ORIENTATION" ] then - ORIENTATION=$fORI + ORIENTATION="$fORI" fi if [ -n "$ORIENTATION" ] then if [ -z "$PAPEROPT" ] then - PAPEROPT=$ORIENTATION + PAPEROPT="$ORIENTATION" else - PAPEROPT=$PAPEROPT,$ORIENTATION + PAPEROPT="$PAPEROPT,$ORIENTATION" fi fi # if [ -n "$PAPEROPT" ] then - PAPER="["$PAPEROPT"]" + PAPER="[$PAPEROPT]" fi # if [ -z "$LANGUAGE" ] then - LANGUAGE=$fLNG + LANGUAGE="$fLNG" fi if [ -n "$LANGUAGE" ] then - LLNG="\usepackage["$LANGUAGE"]{babel}" + LLNG="\usepackage[$LANGUAGE]{babel}" else LLNG="%" fi @@ -664,8 +666,8 @@ # if [ -n "$TWN" ] then - TW=$TWN - case $TW in + TW="$TWN" + case "$TW" in *mm) ;; *cm) @@ -673,13 +675,13 @@ *pt) ;; *) - TW=$TW"pt" + TW="${TW}pt" ;; esac - $debug_echo "Text width = "$TW + $debug_echo "Text width = $TW" fi -TWp=`echo $TW | sed -e 's/\..*$//'` -PWp=$PWIDTH +TWp=`Echo $TW | sed -e 's/\..*$//'` +PWp="$PWIDTH" # # Find textheight # @@ -694,24 +696,22 @@ *pt) ;; *) - TH=$TH"pt" + TH="${TH}pt" ;; esac - $debug_echo "Text height = "$TH + $debug_echo "Text height = $TH" fi -THp=`echo $TH | sed -e 's/\..*$//'` -PHp=$PHEIGHT +THp="`echo $TH | sed -e 's/\..*$//'`" +PHp="$PHEIGHT" if [ "$ORIENTATION" = "landscape" ] then - PWp=$PHEIGHT - PHp=$PWIDTH + PWp="$PHEIGHT" + PHp="$PWIDTH" fi -HMARG=`expr $PWp - $TWp` -HMARG=`expr $HMARG / 2`"pt" -$debug_echo "Text left = "$HMARG -VMARG=`expr $PHp - $THp` -VMARG=`expr $VMARG / 2`"pt" -$debug_echo "Text top = "$VMARG +HMARG="`expr '(' $PWp - $TWp ')' / 2`"pt +$debug_echo "Text left = $HMARG" +VMARG="`expr '(' $PHp - $THp ')' / 2`"pt +$debug_echo "Text top = $VMARG" # # Geometry: /var/lib/texmf/latex/geometry/geometry.dvi # @@ -778,11 +778,10 @@ # if [ -f $FN.dvi ] then - RESULT=$BN.dvi + RESULT="$BN.dvi" [ -n "$OUTPUTDIR" ] && RESULT="$OUTPUTDIR/$RESULT" - cp $FN.dvi $RESULT || exit 5 - + cp "$FN.dvi" "$RESULT" || exit 5 fi # # Output some info @@ -797,28 +796,31 @@ # ugh. GF is side-effect. findInput() { # should check for LILYINCLUDE - for lypath in "." `echo $LILYINCLUDE| sed 's/:/ /g'` + OIFS="$IFS" + IFS=':' + x=$LILYINCLUDE + IFS="$OIFS" + for lypath in . $x do if [ -f "$lypath/$1" ] then GF="$lypath/$1" - return + return fi if [ -f "$lypath/$1.ly" ] then GF="$lypath/$1.ly" return - else - if [ -f "$lypath/$1.fly" ] - then - GF="$lypath/$1.fly" - return - fi + fi + if [ -f "$lypath/$1.fly" ] + then + GF="$lypath/$1.fly" + return fi done - $debug_echo $IDENTIFICATION": Input file "$GF" not found" - echo $NAME": Input file "$GF" not found" 1>&2 + $debug_echo "$IDENTIFICATION: Input file \"$GF\" not found" + echo "$NAME: Input file \"$GF\" not found" 1>&2 exit 2 } # @@ -827,7 +829,7 @@ LILY_OUTPUT_FILES= -for GF in $* +for GF do findInput $GF @@ -875,9 +877,9 @@ $debug_echo "lilypond "$LILYOPTS $IF lilypond $LILYOPTS $IF 2>&1 | tee $LOGFILE - OF=`egrep '^TeX output to ' $LOGFILE | \\ - sed -e 's/TeX output to//' -e 's/\.\.\.//'` - $debug_echo "==> "$OF + OF="`sed -n -e 's/TeX output to \([^\.]*\.tex\)\.\.\.$/\1/p' "$LOGFILE"`" + $debug_echo "==> $OF" + LILY_OUTPUT_FILES="$LILY_OUTPUT_FILES $OF" STATUS=`egrep -i "error|segmentation|abort" $LOGFILE` echo $STATUS if [ ! -z "$STATUS" ] @@ -894,9 +896,9 @@ # # Check if output file is generated # - if [ ! -f $File ] + if [ ! -f "$File" ] then - $debug_echo $IDENTIFICATION": hmm, I could not find the output file "$File + $debug_echo "$IDENTIFICATION: hmm, I could not find the output file $File" exit 4 fi # @@ -904,7 +906,7 @@ # if [ -z "$FFile" ] then - FFile=$File + FFile="$File" startFile else nextFile @@ -917,7 +919,6 @@ FFile="" endFile fi - LILY_OUTPUT_FILES="$LILY_OUTPUT_FILES $OF" done done if [ $SEPFILE = N ] --- tex/orig-titledefs.tex Thu May 14 05:20:19 1998 +++ tex/titledefs.tex Wed Jul 29 15:09:09 1998 @@ -10,48 +10,70 @@ \def\thetitle{} \def\thesubtitle{} \def\thecomposer{} + +\def\themetre{} +\def\thepoet{} \def\thearranger{} \def\theinstrument{} \def\theopus{} \def\thepiece{} % % duh. LaTeX has a \title too. -\renewcommand*{\title}[1]{\def\thetitle{#1\\}} -\newcommand*{\subtitle}[1]{\def\thesubtitle{#1\\}} -\newcommand*{\composer}[1]{\def\thecomposer{#1\\}} +\renewcommand*{\title}[1]{\def\thetitle{#1}} +\newcommand*{\subtitle}[1]{\def\thesubtitle{#1}} +\newcommand*{\composer}[1]{\def\thecomposer{#1}} \newcommand*{\arranger}[1]{\def\thearranger{#1}} \newcommand*{\instrument}[1]{\def\theinstrument{#1}} \newcommand*{\opus}[1]{\def\theopus{#1}} \newcommand*{\piece}[1]{\def\thepiece{#1}} +\newcommand*{\metre}[1]{\def\themetre{#1}} +\newcommand*{\poet}[1]{\def\thepoet{#1}} % -\newcommand*{\mudelatitle}[1]{\def\thetitle{#1\\}} -\newcommand*{\mudelasubtitle}[1]{\def\thesubtitle{#1\\}} -\newcommand*{\mudelacomposer}[1]{\def\thecomposer{#1\\}} +\newcommand*{\mudelatitle}[1]{\def\thetitle{#1}} +\newcommand*{\mudelasubtitle}[1]{\def\thesubtitle{#1}} +\newcommand*{\mudelacomposer}[1]{\def\thecomposer{#1}} \newcommand*{\mudelaarranger}[1]{\def\thearranger{#1}} \newcommand*{\mudelainstrument}[1]{\def\theinstrument{#1}} \newcommand*{\mudelaopus}[1]{\def\theopus{#1}} \newcommand*{\mudelapiece}[1]{\def\thepiece{#1}} +\newcommand*{\mudelametre}[1]{\def\themetre{#1}} +\newcommand*{\mudelapoet}[1]{\def\thepoet{#1}} % -\def\makelilytitle -{ - {\center\bfseries\center\sethuge{\thetitle}} - \par - {\center\bfseries\setLarge{\thesubtitle}} +% +\def\mudelanull{}% +% +\def\makelilytitle{% + \begin{center} + \bfseries + \ifx\mudelanull\thetitle\else\sethuge{\thetitle}\\ \fi + \ifx\mudelanull\thesubtitle\else\setLarge{\thesubtitle}\\ \fi + \end{center} \bigskip - {\flushright\setlarge{\normalfont\scshape\thecomposer}\par} % urg \edef\saveparskip{\parskip}\parskip-5mm - {\flushright\settext{\theopus}\par} - {\flushright\settext{\thearranger}\par} + \begin{minipage}[t]{0.5\textwidth} + \ifx\mudelanull\themetre\else\settext{\themetre}\\ \fi + \ifx\mudelanull\thepoet\else\settext{\thepoet}\\ \fi + \end{minipage} + \begin{minipage}[t]{0.5\textwidth} + \begin{flushright} + +\ifx\mudelanull\thecomposer\else\setlarge{\normalfont\scshape\thecomposer}\\ \fi + \ifx\mudelanull\theopus\else\settext{\theopus}\\ \fi + \ifx\mudelanull\thearranger\else\settext{\thearranger}\\ \fi + \end{flushright}% + \end{minipage}\par \parskip\saveparskip {\center\setlarge{\theinstrument}\par} {\flushleft\setLarge{\normalfont\scshape\thepiece}} + \leavevmode } \def\makelilypiecetitle { \bigskip {\flushright\settext{\theopus}\par} {\flushleft\setLarge{\normalfont\scshape\thepiece}} + {\flushleft\settext{\themetre}\par} + {\flushleft\settext{\thepoet}\par} } \endinput