]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.34
authorfred <fred>
Sun, 24 Mar 2002 20:03:59 +0000 (20:03 +0000)
committerfred <fred>
Sun, 24 Mar 2002 20:03:59 +0000 (20:03 +0000)
bin/ly2dvi.sh [new file with mode: 0644]
make/lelievijver.lsm
make/lilypond.lsm
make/lilypond.spec

diff --git a/bin/ly2dvi.sh b/bin/ly2dvi.sh
new file mode 100644 (file)
index 0000000..89556cd
--- /dev/null
@@ -0,0 +1,474 @@
+#!/bin/sh
+#
+# Script to make a LaTeX file for Lilypond
+#
+# Written by Jan Arne Fagertun <Jan.A.Fagertun@energy.sintef.no>
+#  Sat Nov 22 22:26:43 CET 1997
+#
+#  Original LaTeX file made by Mats Bengtsson, 17/8 1997
+#
+
+VERSION="0.3"
+
+echo "lytodvi.sh $VERSION" 1>&2
+    
+# NEWS
+# 0.3
+#      - multiple input files to make score from several files
+#        (extra files assumed to be Lilypond output)
+#      - cp dvi-file instead of mv, to allow for xdvi reload
+#      - check for illegal long options
+#      - put in pt in text width, if not given
+#      - put in \nonstopmode in LaTeX file
+#      - restored LaTeX exit value check
+# 0.2.1
+#      - temporarily omit LaTeX exit value check
+#      - remove ALL temporary files
+
+# 0.2
+#      - fix for solaris          - included from 0.1.jcn1
+#      - long option hack         - included from 0.1.jcn1 - modified
+#      - moved help into function - NOT included from 0.1.jcn1 yet
+#      - various improvements     - included from 0.1.jcn1
+#      - find mudela definitions from titledefs.tex
+#      - find papersize from lilypond output file (mudelapapersize),
+#        overridden by option '-p size' or '--papersize=size'
+#      - option -l lang or --language=lang overrides
+#        lilypond output file definition (mudelalanguage)
+#      - textwidth from lilypond output file (mudelapaperlinewidth)
+
+# 0.1.jcn1
+#      - fix for solaris
+#      - long option hack
+#      - moved help into function
+
+#
+# Exit value, when needed
+#
+EXIT=0
+
+#
+# Keywords defined in titledefs.tex
+#   Isn't there a way to ask LaTeX for the location of titledefs.tex?
+#
+TF=/usr/lib/texmf/tex/lilypond/titledefs.tex
+MU_DEF=""
+if [ -f $TF ]
+then
+  MU_DEF=`egrep "^.newcommand...mudela" $TF | \\
+    sed -e s/^.newcommand...//g | sed -e "s/\\}.*$//"`
+fi
+
+if [ "$MU_DEF" = "" ]
+then
+  MU_DEF="mudelatitle mudelasubtitle mudelacomposer \
+          mudelaarranger mudelainstrument"
+fi
+
+#
+# debugging
+#
+# debug_echo=echo
+debug_echo=true
+
+#
+# Find command line options and switches
+#
+# "x:" x takes argument
+#
+switches="Dhkl:p:\?"
+options=""
+#
+# ugh, "\-" is a hack to support long options
+# while getopts \-:$options$switches O
+# must be in double quotes for bash-2.0
+while getopts "\-:$options$switches" O
+do
+  $debug_echo "O: \`$O'"
+  $debug_echo "arg: \`$OPTARG'"
+  case $O in
+    D  )
+      set -x
+      ;;
+    h  )
+      HELP=Y
+      ;;
+    k  )
+      KEEP=Y
+      ;;
+    l  )
+      LNG=$OPTARG
+      ;;
+    p  )
+      PSZ=$OPTARG
+      ;;
+    \? )
+      HELP=Y
+      ;;
+    # a long option!
+    -)
+      $debug_echo "long option: \`$OPTARG'"
+      case "$OPTARG" in
+        h*|-h*)
+          HELP=Y
+          ;;
+        k*|-k*)
+          KEEP=Y
+          ;;
+        l*|-l*)
+          LNG=`echo $OPTARG | sed -e s/"^.*="//`
+          ;;
+        p*|-p*)
+          PSZ=`echo $OPTARG | sed -e s/"^.*="//`
+          ;;
+        D*|-D*)
+          set -x;
+          ;;
+        *|-*)
+          echo $0": illegal option -- "$OPTARG;
+          EXIT=-1;
+          HELP=Y
+          ;;
+      esac
+  esac
+done
+shift `expr $OPTIND - 1`
+#
+# Input file name
+#
+if [ "$HELP" != "Y" ]
+then
+  if [ "$1" = "" ]
+  then
+    cat << EOF
+
+$0 - no input file name given
+EOF
+    EXIT=1
+    HELP=Y
+  fi
+fi
+GF=$1
+#
+# Check if input file exists...
+#
+if [ "$HELP" != "Y" ]
+then
+  if [ ! -f $GF ]
+  then
+    GF=$1.ly
+    if [ ! -f $GF ]
+    then
+      cat << EOF
+
+$0 - input file $GF not found
+EOF
+      EXIT=2
+      HELP=Y
+    fi
+  fi
+fi
+
+#
+# print usage
+#
+#help() {
+if [ "$HELP" = "Y" ]
+then
+  cat << EOF
+Generate dvi file from mudela or lilypond output
+Usage: $0 [options] file
+
+Options:
+  -D, --debug           set debug mode
+  -h, --help            this help text
+  -k, --keep            keep LaTeX file
+  -l, --language=       give LaTeX language (babel)
+  -p, --papersize=      give LaTeX papersize (eg. a4paper)
+
+  file may be input to or output from lilypond(1)
+EOF
+  exit $EXIT
+fi
+#}
+
+#
+# More files?
+#
+shift 1
+
+#
+# Check whether input file is the input to or output from lilypond
+#
+L1=`head -1 $GF` 
+OP=`echo $L1 | grep "^% Creator: GNU LilyPond"`
+if [ "$OP" != "" ]
+then
+  #
+  # OK - it's the output from lilypond.
+  # Get lilypond source file name
+  #
+  OF=$GF
+  IFL=`grep mudelafilename $OF`
+  if [ "$IFL" != "" ]
+  then
+    IF=`echo $IFL | sed -e s/^.*{// | sed -e s/"}*.$"//`
+    #
+    # Check if source file exists
+    #
+    if [ ! -f $IF ]
+    then
+      cat << EOF
+
+$0 - mudela file not found.
+
+EOF
+      TW=15.5cm
+    fi
+  else
+    cat << EOF
+
+$0 - mudela file name not found.
+
+EOF
+    TW=15.5cm
+  fi
+else
+  #
+  # I have to assume this is the lilypond input file
+  # Find output file name, if defined
+  #
+  IF=$GF
+  OFS=`egrep "paper|midi|output" $IF`
+  OF1=`echo $OFS | sed -e s/".midi.*$"// | sed -e s/"^.*paper"//`
+  if [ "$OF1" = "" ]
+  then
+    OF1=`echo $OFS | sed -e s/"^.*paper"// | sed -e s/".midi.*$"//`
+  fi
+  if [ "$OF1" = "" ]
+  then
+    OF=lelie.tex
+  else
+    OF2=`echo $OF1 | grep output`
+    if [ "$OF2" = "" ]
+    then
+      OF=lelie.tex
+    else
+      OF=`echo $OF2 | sed -e "s/\\";.*$//" | sed -e "s/^.*\\"//"`
+    fi
+    if [ "$OF2" = "" ]
+    then
+      OF=lelie.tex
+    fi
+  fi
+  #
+  # Remove the output file, to avoid being misled by an old one
+  #
+#  if [ -f $OF ]
+#  then
+#    rm $OF
+#  fi
+  #
+  # Run lilypond - exit if unsuccessfull
+  #
+  lilypond $IF || exit 3
+  #
+  # Check if output file is generated
+  #
+  if [ ! -f $OF ]
+  then
+    cat << EOF
+
+$0 - hmm, I could not find the output file $OF
+
+EOF
+    exit 4
+  fi
+fi
+#
+# Find textwidth
+#
+if [ "$IF" != "" ]
+then
+  if [ -f $IF ]
+  then
+    TWL=`grep linewidth $IF`
+    TWS=`echo $TWL | grep -v "^%"`
+    if [ "$TWS" != "" ]
+    then
+      TW=`echo $TWS | sed -e s/^.*=//  | sed -e s/";.*$"// | \\
+          sed -e s/.mm/mm/ | sed -e s/.cm/cm/  | sed -e s/.p/p/`
+      case $TW in
+        *mm)
+          ;;
+        *cm)
+          ;;
+        *pt)
+          ;;
+        *)
+          TW=$TW"pt"
+          ;;
+      esac
+    else
+      TW=15.5cm
+    fi
+  fi
+fi
+#
+# LaTeX file name
+#
+if [ "$KEEP" != "Y" ]
+then
+  if [ "$TMP" = "" ]
+  then
+    TMP=/tmp
+  fi
+  if [ ! -d $TMP ]
+  then
+    cat << EOF
+
+$0 - temporary directory $TMP not found, set to /tmp
+
+EOF
+    TMP=/tmp
+  fi
+#
+  BN=`basename $OF .tex`
+  FN=$BN.$$
+  LF=$TMP/$FN.tex
+else
+  BN=`basename $OF .tex`
+  FN=$BN.$$
+  LF=$FN.tex
+fi
+#
+# Find if a paper size is defined
+#
+if [ "$PSZ" = "" ]
+then
+  PSZ=`egrep ".def.mudelapapersize" $OF | \\
+        sed -e s/.def.mudelapapersize//  | \\
+        sed -e s/^{// | sed -e s/}.*$//`
+fi
+
+if [ "$PSZ" != "" ]
+then
+  PAPER="["$PSZ"]"
+fi
+
+#
+# Find if a language is defined
+#
+if [ "$LNG" = "" ]
+then
+  LNG=`egrep ".def.mudelalanguage" $OF | \\
+        sed -e s/.def.mudelalanguage//  | \\
+        sed -e s/^{// | sed -e s/}.*$//`
+fi
+if [ "$LNG" != "" ]
+then
+  LLNG="\usepackage["$LNG"]{babel}"
+else
+  LLNG="%"
+fi
+
+#
+# Find if a textwidth is defined
+#
+TWN=`egrep ".def.mudelapaperlinewidth" $OF | \\
+        sed -e s/.def.mudelapaperlinewidth//  | \\
+        sed -e s/^{// | sed -e s/}.*$//`
+if [ "$TWN" != "" ]
+then
+  TW=$TWN
+  case $TW in
+    *mm)
+      ;;
+    *cm)
+      ;;
+    *pt)
+      ;;
+    *)
+      TW=$TW"pt"
+      ;;
+  esac
+  $debug_echo "Text width = "$TW
+fi
+
+#
+# Write LaTeX file
+#
+cat << EOF > $LF
+\documentclass$PAPER{article}
+\nonstopmode
+$LLNG
+\usepackage[T1]{fontenc}
+\addtolength{\oddsidemargin}{-1cm}
+\addtolength{\topmargin}{-1cm}
+\setlength{\textwidth}{$TW}
+\input lilyponddefs
+\input titledefs
+\begin{document}
+EOF
+#
+# Include \def\mudela-definitions
+#
+for L in $MU_DEF
+do
+  LL=`grep ".def."$L $OF`
+  if [ "$LL" != "" ]
+  then
+    LLL=`echo $LL | sed -e s/^.def.$L// | \\
+         sed -e s/^{// | sed -e s/}.*$//`
+    if [ "$LLL" != "" ]
+    then
+      echo '\'$L'{'$LLL'}%'                                    >> $LF
+    fi
+  fi
+done
+#
+cat << EOF >> $LF
+\makelilytitle
+\input{$OF}
+EOF
+for EX in $*; do echo "\input{"$EX"}%" >> $LF; done
+cat << EOF >> $LF
+\vfill\hfill{(\LilyIdString)}
+\end{document}
+EOF
+#
+# Run LaTeX
+#
+latex $LF || exit 5
+#latex $LF
+cat << EOF
+
+
+Take care - LaTeX exit value check temporarily omitted!
+
+
+EOF
+#
+# Rename dvi file
+#
+if [ -f $FN.dvi ]
+then
+  cp $FN.dvi $BN.dvi
+fi
+#
+# Clean up
+#
+if [ "$KEEP" != "Y" ]
+then
+  rm $LF $FN.*
+fi
+#
+# Output some info
+#
+cat << EOF
+
+$0 - dvi file name is $BN.dvi
+
+EOF
+# OK - finished
index 708299730e8ae7295c99253232d61aadd5769a51..0ec4bb236e0b7e8df3e3e499013d0283f203d084 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Titel: LilyPond
-Versie: 0.1.33
-Inschrijf datum: 24NOV97
+Versie: 0.1.34
+Inschrijf datum: 03DEC97
 Beschrijving: LilyPond is de muziek typesetter van het GNU Project.  
                Het programma genereert muziek in zichtbare of 
                hoorbare vorm uit uit een muzikale definitie file: 
@@ -16,8 +16,8 @@ Auteur: hanwen@stack.nl (Han-Wen Nienhuys)
        jan@digicash.com (Jan Nieuwenhuizen)
 Onderhouden door: hanwen@stack.nl (Han-Wen Nienhuys)
 Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
-       395k lilypond-0.1.33.tar.gz 
+       395k lilypond-0.1.34.tar.gz 
 Oorspronkelijke plek: pcnov095.win.tue.nl /pub/lilypond/
-       395k lilypond-0.1.33.tar.gz 
+       395k lilypond-0.1.34.tar.gz 
 Copi"eer politie: GPL
 End
index b15c4fe07daa940c2c3a0f15599b7831dd863308..3c14c25a1723c761dabb14aff83281437bb7b3e8 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title: LilyPond
-Version: 0.1.33
-Entered-date: 24NOV97
+Version: 0.1.34
+Entered-date: 03DEC97
 Description: LilyPond is the GNU Project music typesetter.  The program
                generates visual or auditive output from a music 
                definition file: it can typeset formatted sheet music 
@@ -14,8 +14,8 @@ Author: hanwen@stack.nl (Han-Wen Nienhuys)
        jan@digicash.com (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       440k lilypond-0.1.33.tar.gz 
+       440k lilypond-0.1.34.tar.gz 
 Original-site: pcnov095.win.tue.nl /pub/lilypond/development/
-       440k lilypond-0.1.33.tar.gz 
+       440k lilypond-0.1.34.tar.gz 
 Copying-policy: GPL
 End
index ce6665146a63a2c4d01a5e30a8d3b23d382fce02..8e3d32b7d8a2b8a76b72bafa080293fc4b1884ea 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 0.1.33
+Version: 0.1.34
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: alpha.gnu.org:/gnu/lilypond/development/lilypond-0.1.33.tar.gz
+Source0: alpha.gnu.org:/gnu/lilypond/development/lilypond-0.1.34.tar.gz
 Summary: A program for typesetting music.
 URL: http://www.stack.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@stack.nl>