Math on the Web -- Class 9
Using the history list in UNIX
In the tcsh shell, as we pointed out recently, there is a
history list, which keeps track of the commands that you have used recently.
You should be able to view the history list. To see your last 10 commands, use:
clam% history 10
We have seen how to use the history list to recall commands by using the
up arrow key to step through the list, or using, say, !la to
recall the last command that started with la.
I had mentioned that there is some danger with using the ! command completion
because you might intend to run latex firstfile and instead
you accidently run latex secondfile. To get around that
difficulty, you can look before the leap by typing at the
clam% prompt:
!la:p
Then the command will be displayed for you, and you can use the up arrow
key or type !! to run the displayed command.
The syntax for the history reference is:
!event:words:modifiers
In the example, the event was "la", there was no "words"
argument, and the modifier was "p", which "prints" the command
without executing ( by "prints", here, one means "displays on the
terminal"). Thus, the effect of running the command was to search the
history list for the most recent command line that started with the
string "la" and simply display that command.
What do the terms mean?
- event
- Here "event" means "command"
- words
- (Optional)If given, select words from the command, else use all words
- modifiers
- (Optional)If given, modifies selected words or event
You can run several commands in a row with the same argument. For example,
if you review a file, decide to edit it and then want to mail it, you can use
the following:
more some-file-with-a-long-name
emacs !$ &
mail friend < !$
In this example, !$ gives the last argument of the
previous command.
You could be more specific by using !mo:$ to recall
the last argument
of the most recent command that started with "mo".
- Practice searching for information
- Practice searching for software
- Learn to install and use some LaTeX packages
Another contest. Find information on each of the following topics
as quickly as you can.
- Artificial Life
- Cryptography
- Symbolic Computation
Today I would like you to spend some time exploring the exercises
from a web page about LaTeX packages
The
LaTeX online catalogue has indices to help you locate TeX files.
You should be able to find information about the draftcopy
package there. Follow the instructions to download the package and
get it working. Start by making a directory called "draftcopy", or
some such name. You'll need the files draftcopy.ins and
draftcopy.doc. Run
latex draftcopy.ins
Exercise 1: Typeset a test file for the draftcopy package
The file draftcopy-test1.tex should be created by your
installation of the package. Run LaTeX on it and hand in the typeset
copy with your name on it.
If you download the GIF image of a rabbit from the Millenium Fulcrum
edition of Alice in Wonderland as well as the first few paragraphs,
you should be able to reproduce the first paragraphs of
this example. For that you use
the package
"picins". Watch out though for the extraneous character
CTRL Z at the end of the file (UNIX systems).
Exercise 2: Typeset a test file for the picins package
Picins is designed to work with the "graphics" package. The
required argument to the \parpic command is supposed to
be a LaTeX graphics box.
It is not, as you might first guess, just the name of a PostScript file.
You can create a latex graphics "box" from a PostScript file
by using the
command \includegraphics from the
graphics package. Without using the savebox command,
you must have the \includegraphics command as part of the
required argument for \parpic, so your
argument is going to be fairly complicated, especially if you want to
rescale your PostScript graphic by using \scalebox inside
the \includegraphic command.
The only tricky part for this exercise is creating a suitable
PostScript file from the GIF image, and making the correct dimension
entries for the parameters in the package. You can use the
command \scalebox from the
graphics package to match the size of the image to
the dimensions that you specify in the \parpic command.
Be sure to specify units of length if you do give dimensions.
The goal is to typeset a reasonable facsimile of Quiz 3-A or a similar-looking quiz on any mathematical
topic you like.
Instead of using LaTeX to produce a
.dvi file and then running dvips to print
the DVI file, or xdvi to view the DVI file, use
PDF-LaTeX to produce a PDF file viewable by Adobe Acrobat Reader.
On clam just run the command pdflatex
myfile instead of running latex
myfile. Other implementations of TeX, such as
MikTeX, allow you to choose PDF as an output format also.
This will probably be easiest if you move your PDF file to the
directory that houses your HTML web page and change its
permissions so that the file become accessible to web browsers.
Finished?
If you have done all the above activities,
and there is still time left, here are some other activities you can do.
- Help someone else.
- Think about the projects.
You probably will not have time to start these during class.
- Continue to explore a mathematical topic, with a view
to using what you find as part of project B.
- If you have not done so, make a link on your very basic web
page to your PDF quiz file from Exercise 4.
- Revise your list of links to mathematical sites that you think are
worth revisiting. Include the list of links either on your very
basic Web page or as a separate document linked to that Web page.
- Send me an email summary of what you have done and are doing now on your
project B.
/ Home / Contents /
email to:Martin Karel