Changeset 3897

Show
Ignore:
Timestamp:
06/26/09 21:30:28 (5 months ago)
Author:
dr2chase
Message:

More tweaks to fortick and added an example

Location:
trunk
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/bin/fortick

    r3895 r3897  
    2020FORTRESS_HOME="`${0%fortick}fortress_home`" 
    2121 
     22if [ "x"$1 = "x-q" ] ; then 
     23  SILENCE="golden" 
     24  shift 
     25fi 
     26 
    2227if [ $# -ne 1 ] ; then 
    23   echo "fortick somefile.suffix" 
    24   echo "Replaces backtick-delimited fortress with nicely formatted fortress." 
    25   echo "Writes to somefile.tex (will overwrite original if suffix = tex)" 
     28  echo "Usage: fortick [-q] somefile.suffix (one file, no more, no less)" 
     29  echo "  Replaces backtick-delimited fortress with nicely formatted fortress." 
     30  echo "  Writes to somefile.tex (will overwrite original if suffix = \"tex\")" 
     31  echo "  Option -q suppresses some of the command output." 
    2632  exit 1 
    2733fi 
    2834 
    29 if grep -q "usepackage{fortify}" $1 ; then 
     35if grep -q "usepackage{.*fortify.*}" $1 ; then 
    3036  true 
    3137else 
    32   echo "WARNING: input file lacks \\usepackage{fortify}" 
     38  if [ -z "$SILENCE" ]  ; then 
     39     echo "WARNING: input file lacks \\usepackage{fortify}" 
     40  fi 
    3341fi 
    3442 
     
    3947"${USE_EMACS}" -batch "$@" -l "$FORTRESS_HOME/Fortify/fortify.el" -f fortick 
    4048 
    41 echo "Process with" 
    42 echo "  TEXINPUTS=.:${FORTRESS_HOME}/Fortify: latex ${BASENAME}.tex" 
     49if [ -z "$SILENCE" ]  ; then 
     50  echo "Process with" 
     51  echo "  TEXINPUTS=\".:${FORTRESS_HOME}/Fortify:\" latex \"${BASENAME}.tex\"" 
     52  echo "or (for pdf output) " 
     53  echo "  TEXINPUTS=\".:${FORTRESS_HOME}/Fortify:\" pdflatex \"${BASENAME}.tex\"" 
     54fi