CSCI 3294 (Seminar: UNIX Power Tools), Fall 2016:
Homework 7
- Credit:
- 50 points.
Be sure you have read, or at least skimmed,
the readings for 10/17 and 10/12.
Please include with each part of the assignment the Honor Code pledge or
just the word ``pledged'', plus one or more of the following about
collaboration and help (as many as apply).1Text in italics is explanatory or something for you to
fill in.
For written assignments, it should go right after your name and
the assignment number; for programming assignments, it should go
in comments at the start of your program.
- This assignment is entirely my own work.
- This assignment is entirely my own work, except for portions
I got from the assignment itself
(some programming assignments include ``starter
code'')
or sample programs for the course (from which you
can borrow freely -- that's what they're for).
- I worked with names of other students on this
assignment.
- I got help with this assignment from source of help -- ACM
tutoring, another student in the course, the instructor, etc.
- I got significant help from outside source --
a book other than the textbook (give title and author),
a Web site (give its URL), etc..
(``Significant'' here means more than just a little
assistance with tools -- you don't need to tell me that you
looked up an error message on the Web, but if you found
an algorithm or a code sketch, tell me about that.)
- I provided significant help to names of students on this
assignment.
(``Significant'' here means more than just a little
assistance with tools -- you don't need to tell me about
helping other students decipher compiler error messages,
but beyond that, do tell me.)
(This isn't exactly a programming problem, but I want your source files
by e-mail so I can confirm that they can be turned into the formatted
document on a semi-standard Linux system. So follow
the standard instructions below, except interpret ``program source''
as ``LaTeX and other source'' and ``programs'' as ``document'',
and send me files in e-mail as described below.)
Do the following programming problems.
You will end up with at
least one code file per problem.
Submit your program source (and any other needed files)
by sending mail to
bmassing@cs.trinity.edu with each file as an attachment.
Please use a subject line that mentions the course and
the assignment (e.g.,
``csci 3294 hw 7'' or
``UNIX hw 7'').
You can develop your programs on any system that provides the
needed functionality, but I will test them on one of the department's
Linux machines, so you should probably make sure they work
in that environment before turning them in.
For this assignment your mission is to create a LaTeX document
(using the article class) that includes examples of a number
of features. You will also use gnuplot to create at least
two plots to be incorporated into your document and write a simple
biblography file to be processed by BibTeX.
- (5 points)
Overall, your document should contain the following:
- A title/author/date header with your name,
the date you finish the assignment, and a title
of your choice.
- A section called ``Honor code statement'' containing
the Honor Code pledge, or just the word ``pledged'',
plus whether you got/gave help.
- A section called ``Basics'' containing elements
described in question 2
- A section called ``Figures and tables'' containing elements
described in question 3.
- A bibliography, created using BibTeX,
as described in problem 5.
Your document can also include
anything else you think is interesting or might be fun to try
to figure out how to do.
An obvious possibility is one or more figures drawn using
one of LaTeX's picture-drawing environments.
(If you decide to try TikZ,
you should be able to find a manual for it online.)
- (10 points)
The ``Basics'' section should include the following:
- A bulleted or numbered list of
(some) things you learned from
the readings for this assignment
and think you might find useful.
- A bulleted or numbered list of
(some) things you would like to be able
to do in a document and don't (yet) know how to
do with LaTeX.
- At least one example of not-totally-trivial
math typesetting, set inline or displayed on a line
by itself as in the ``sampler'' example.
(If you choose the latter, it's up to you whether
to use the equation environment to number it.)
If no more-interesting examples occur to you,
use the quadratic formula
(
(-b +/- sqrt(b*b - 4ac))/(2a)
).
- At least one example of referencing a section
using \ref (e.g, ``my tables
and plots are in Section N'',
where N is whatever section they're in),
and at least one example of referencing something
in your bibliography (described later).
(Note that by default the bibliography section of the
formatted document includes only items actually referenced.
You can make it include all items with
\nocite{*}
.)
- (10 points)
The ``Figures and tables'' section should include the following:
- A table showing your schedule for this semester.
Use the tabular environment to make the table
and the table environment to make it
a numbered floating table.
Include a caption, and
put something in your text referencing the table
(e.g., ``Table N shows my schedule for this semester'').
It's up to you what exactly should go in your table
and how it should look, but if nothing else occurs to
you, make a four-column table showing for each course
its number and name, the instructor's name, and meeting times.
- A figure displaying program source for a short
program, in whatever language you choose.
Use
\verbatim
or \verbatiminput
to
typeset the code,
use the figure environment to make it a
floating figure with a caption,
and include something in your text referencing it
(e.g., ``Figure N shows a simple C program'').
- At least two plots produced using gnuplot,
as described in problem 4.
Use the figure environment to make each a
floating figure, include a caption for each,
and put something in your text referencing all of them.
(e.g., ``Figure Y shows plotting a formula
with gnuplot'').
It's up to you exactly how to incorporate the
plots into your document; you could generate .png
images and include them with \includegraphics
,
or you could generate combined .tex
source and EPS
as in one of the examples shown in class,
or you might discover another option.
- (15 points)
Use gnuplot to create at least two plots,
one plotting one or more formulas and one plotting data.
It's up to you what to plot, but
if nothing more interesting occurs to you:
For the formulas you could do the kind of plot
I often use in class to illustrate order of
magnitude of functions,
showing a few
and
functions (at least
two of each) and specifying the x-range (starting at 0
and going up to whatever will make the plot meaningful).
For the data you could do a bar chart using
output of this simple C program2 rands.c
that generates ``random'' data.
(To compile it you'll need -std=c99.
The compiled program takes two command-line arguments,
a seed value and a count.)
- (10 points)
Create a bibliography using BibTeX,
containing at least two different kinds of references.
Simplest to do are probably books and Web sites,
but if you've ever included other references in
a bibliography for another course (e.g., a journal article),
try including one of those as well.
For books you could just pick one or more of the textbooks
you're using this semester, and for Web sites --
well, you could use the one for this course or anything
that appeals to you.
On all of the above, I will give extra
points for anything that seems to go well beyond the minimum requirements.
If you find parts or all of this assignment very easy
because you've used LaTeX before,
try to go beyond what you've done previously.
You're welcome to copy text from any of the
examples on the class ``sample programs'' page,
as long as you understand reasonably well what
the copied lines do.
Turn in (by e-mail):
- Your LaTeX source, in the form of one or more .tex files.
- ``Source'' for your plots, in the form of .plotin
files containing gnuplot input and .dat
files containing data.
- Your bibliography ``source'', in the form of a .bib
file to be processed by BibTeX.
- Any other files needed to generate your document.
- A PDF version of your document.
- A plain-text README.txt file with the commands you
used to generate the PDF version (including any commands
needed to generate image or other files).
(Note: In class I may have mentioned that there are
several IDE-like environments for LaTeX.
For this assignment, however, I recommend that you not use
one of them; I think you will learn more
by writing the LaTeX source with a simple text editor.)
Footnotes
- ... apply).1
-
Credit where credit is due:
I based the wording of this list on a posting to a SIGCSE mailing
list. SIGCSE is the ACM's Special Interest Group on CS Education.
- ... program2
-
Why a C program? well, it was quick and easy to adapt
one I had written for CSCI 1120.
Berna Massingill
2016-11-22