My Solaris Hints

My Solaris Hints

  1. Writing HTML files with specified page breaks.
  2. Printing letters including the UF letterhead
  3. Using Class mailing lists, and archiving them.
  4. Including mathematics in a web page by using GIF images.
  5. TeX for Windows.
  6. Notes on the standard unix commandline mail program
  7. TeXexplorer
  8. Having applications start automatically at login.
  9. Html mode in Emacs.
  10. Disable color for remote terminals or Greyscale monitors
  11. X-resources
  12. PDFlatex
  13. Scanner Resolution
  14. Getting EPS files for maple plots. q
  1. Writing HTML files with specified page breaks

    When putting a syllabus on the web, it's desirable that it can be printed out nicely as well as showing well on the screen. One frequent problem is that page breaks are more or less random, and can come in undesirable places. The following uses CSS to specify the location of a page break. It will be invisible when viewed with a browser, and permits text (such as "continued on other side") to be printed on paper at the page break. First, include the following in the HEAD section of the file:
    
    <style>
    <!--
      @media screen { .continue {display:none} }
      @media print {
         .continue { 
               margin-right: .5in; 
    	   font-family:sans-serif; 
    	   font-weight:bold; 
               font-size:smaller;
    	   text-align:right; 
    	   page-break-after:always
          }
      }
    -->
    </style>
    
    Now insert the following at the place where you want the page break. You can, of course, change (or omit) the text.
    
    <div class=continue> (Continued on other side)</div>
    
  2. Writing Letters with UF letterhead in LaTeX

    The file blankletter.tex is a template for using LaTeX to write and print letters with the University of Florida letterhead. Directions for using it are given in the file.
  3. Setting up a mailing list for a class

    Setting up a mailing list for a class is simple: just go to the page http://www.clas.ufl.edu/clasnet/handouts/course-mailing-lists.html, fill out and submit the form, and then follow directions. (One observation: the form claims that the password can be blank, but in my exprience this is not true. I have been known to use the work "blank".)

    I use a separate program to archive messages which come through the mailing list: this is mhonarc. Full information about this program is available at its web page, http://www.oac.uci.edu/indiv/ehood/mhonarc.html. You could install it yourself or use it from my bin directory, "/home/fac0/wjm/bin". To use it, you also need to be using procmail, which you do by creating a file called ".procmailrc" in your home directory. Here are the relevant parts of my ".procmailrc" file, with comments (lines starting with # are comments, and are ignored by procmail). Note that what I have here reflects an element of paranoia: Each message gets (1) saved to a special inbox, "LAarchive", (2) run through "mhonarc" to be placed in the web archive, and (3) appears in my regular mailbox.

    HOME=/home/fac0/wjm
    PATH=$HOME/bin:/bin:/usr/bin:usr/ucb/bin:usr/local/bin
    # ~/Mail must exist.
    MAILDIR = ${HOME}/Mail
    SHELL=/usr/bin/sh
    
    ## To use my copy, replace the next line with the following (without
    ## the leading sharp signs).
    ## BIN=/home/fac0/wjm/bin
    BIN=${HOME}/bin
    MHONARC=${BIN}/do_mhonarc 
    
    #---------------- Linear Algebra
    ##  The following three lines save all message in the mailbox "LAarchive".
    ##  You can change the name, or you can omit (or comment out) the
    ##  lines if you don't want this. 
    
    :0 c:
     *^Sender.*s02-3163\@clas\.ufl\.udu
    LAarchive
    
    ## The following three lines run mhonarc to add the message to the
    ## web archive.
    ##
    ## The "c" in the next line makes the message come up in my regular
    ## mail, as well.  Omit the 'c' if you don't want this.
    ## 
    ## Note that you must create the directory "archive" specified in the third
    ## line.  It must also be at least world executable 
    ## (Use the command "chmod o+x directoryname"). 
    
    
    :0 c
     *^Sender.*s02-3163\@clas\.ufl\.edu
    |${MHONARC} -add  -outdir /home/fac0/wjm/public_html/class/linalg/archive
    
    #---------------- Same for my Set Theory class
    
    :0 c:
      *^Sender.*s02-4633
    SETarchive
    
    :0 c
     *^Sender.*s02-4633\@clas\.ufl\.edu
    |${MHONARC} -add -outdir /home/fac0/wjm/public_html/class/settheory/archive
    
  4. Equations such as can be included in a web page by including them as GIF images generated from a tex file. The equation above was generated from the following tex file:
        \documentclass[12pt]{article}
        \usepackage{amssymb}
        \begin{document}
        \thispagestyle{empty}
        \large
        $$
        \sqrt[\textstyle 3]2 = a \sqrt 2+b
        $$
        \end{document}
    
    using the following commands (assuming the tex file is ``equation.tex'')
      latex equation.tex
      dvips equation -o
      /opt/latex2html/pstoimg -gif -transparent equation.ps
    
    will create the GIF file. I've written a script which can be used instead of pstoimg. The last line would be replaced by
      ~wjm/bin/mypstoimg equation.ps
    

  5. I have a CD with free versions TeX for essentially any system, including Miktex for windows 95+. However you would be better off downloading the latest release from The MiKTeX project homepage. You would want all the level 1 files and amslatex.zip, a total of about 11 Megabytes.

  6. For information on techexplorer, see the URL http://www.software.ibm.com/network/techexplorer/.

  7. mail If you don't want to have mail go into mbox after you look at it, add the following to your .mailrc file: "set hold".

    The standard mail command is now mailx. The command mail has been aliased to mailx, so this doesn't seem to matter when using csh or tcsh, but the command for information is man mailx. If you are using another shell they you'll have to use mailx (or, of course, set up an alias for yourself).

    The command mail is a crippled version which allegedly imitates the ucb mail program. In particular it silently ignores the -s flag, and regards its argument as an additional recepient. This is presumably a bug. It also doesn't accept the -v flag, and it is not clear that it has that functionality.

  8. To have applications start up automatically on login:
    [According to Urvashi, non-solaris applications such as emacs can be started up in the standard way: in the System-manager/startup click on "set Home Session" and then "Return to Home session". However iconized windows don't necessarily come up iconized, so the method below may be needed if you want an application to be automatically started, but iconized.]

    You can also put commands in "~/.dt/sessionexit" to be executed on exit.

  9. The HTML mode of emacs seems useful. Among other things, it has a command (C-c C-v) to call up netscape and see what your file looks like.

  10. For my greyscale (ie, not color) monitor (or a remote terminal window): The last two items here are old, from several years ago when I had a greyscale monitor. I don't know if there are any greyscale monitors around anymore. The first item should take care of most, if not all, problems.

  11. The old ".Xres" file should be renamed ".Xdefaults", to specify X-resources for individual applications.
  12. making pdf files The TeX distribution now includes the commands "pdftex" and "pdflatex" which can make a pdf file from a tex file. The command \pdfoutput=1 is needed to tell it to output a pdf file instead of a dvi file. The command can either be in the tex file, or it can be included on the command line as follows:
    pdflatex '\pdfoutput=1 \input myfile.tex'

  13. This is not Solaris, but I finally found out how to change the resolution on the scanner attached to the PC in the office. (This is from the HP-deskscan program, which seems to be the simplest way to use the scanner if you don't want to use the OCR program and don't want to do anything with the image on the PC.) It is done in the "custom" menu, under "print path"(!).
    I did it a 8-1/2 x 11 page with 150 dpi and got readable copy, though still with broken letters. The files are under 10K when stored as GIF files, so it might even be possible to go to 300dpi.
  14. I have finally found a way to get usable eps files from Maple. The key is a program called "epstool". I currently have it running as ~wjm/bin/epstool, but I hope that it will be installed in the system directories. Here is the most convenient way I have found to use it. It assumes that you have called xmaple while in your working directory: That completes the process. You can, of course, replace step 1 with the maple command plotsetup(ps,...) to print directly to a file, but there seems to be little advantage to this unless you have a lot of figures to do and want to automate the process.

    You can test the result with the following latex file:

    ----------------------------------------------------------------
    \documentclass{article}
    \usepackage{graphicx}
    \begin{document}
    $$\fbox{\includegraphic[scaled=.5]{myfilename.eps}}$$
    \end{document}
    ----------------------------------------------------------------
    
    The "scaled" number is typical, but depends on how big the plot is, and how big you want it.

    To see the contrast, use "plotsetup(ps); plot(...)" to make what Maple thinks is an eps file, and include it in a tex document in the same way.

    The program epstool is also available for windows.


William Mitchell -- wjm@math.ufl.edu
February 16, 1998