Signal Processing Society
Electronic Publication Experiment





Table Of Contents

E-Pub Main Page

Submission Info

Reviewer Info

Author Info

Examples

Links

Project Documentation

Daily Work Log

Personnel

E-Publishing Documentation

by Douglas Bortzfield and Laura Balzano

Last edited June 21, 1999


Table of Contents

  1. Introduction

  2. TeX Hyperlinks

  3. Word Hyperlinks

  4. Password Protection

  5. Helpful UNIX commands

  6. Perl
    1. Example 1


Introduction


The IEEE Signal Processing Society has a publication in print, but not on the web. Our goal is to get it there, along with hyperlinks (internal and external to the document), color figures and specific formats. We want to:
1. Make sure all LaTeX and Word documents with hyperlinks, color figures and specific formats will translate exactly as they are into .dvi (device independent) viewers.
2. Translate these from .dvi to .ps (postscript), again without losing linkage, color, and format.
3. Translate these from .ps to .pdf (portable document format), ditto the rest from above.
We also want to get the article submission processes online. When someone sends in their article, it will go directly to a password protected www site. Editors, anonymous to the author, will be able to reach these articles and give their comments.

top

Hyperlinks in TeX

Click here for a more extensive "HyperTeX FAQ" by Los Alamos National Labs.

HyperTeX is a standard used in order to include hyperlinks in TeX documents. Hyperlinks include clickable links from one part of the document to another, from a part of the document to a www page, or from a part of the document to another file (be it a matlab file or a wave file or a graphics file or whatever; be creative).

The package hyperref is a LaTeX2e package that provides for constructing hyperlinks in LaTeX documents, and will automatically construct internal links for all the '\cite' and '\ref' commands that LaTeX users use to cite sources and refer to figures. It is avaiable at any CTAN mirror in the directory 'macros/latex2e/contrib/supported/hyperref/'. By including '\usepackage{hyperref}' at the beginning of your document you will be able to take advantage of all it has to offer.

Using hyperref To link to an email address:

\href{mailto:you@yourhost.blah}{linkingtext}

for example:

\href{mailto:sunbeam@rice.edu}{Email Laura}

To link to a file:
\href{file:///path/to/the.file}{linkingtext}

for example:

\href{file:///home/usr/sounds/mywav.wav}{my speech}

To link to a URL:
\href{http://www.the.url.blah}{linkingtext}

for example:

\href{http://www.rice.edu/}{Rice University}

As stated above, internal links are taken care of with the '\cite' and '\ref' commands.

In addition, HyperTeX adds new '\special' commands to deal with hyperlinks. They resemble html. Using these, you can put links directly into your document without using a package, but the package is recommended.

Note: My explanations are fairly conjectural. I haven't tried it; I have only seen hyperlinks work using hyperref. But I think I am basically correct because these commands are supposed to work much like html.

The first and third are used together around the linking text to link to the document located at "hrefstring." For example,
\special{html:<a href="http://www.rice.edu/">}{Rice University}\speical{html:</a>}
would link the text Rice University to its URL.
The second and third are used together to name the current anchor text, so that it can later be referred to (with href) as that name. For example, if I were to use it as follows:
\speical{html:<a name="OneTruth">}{Laura is a genius}\special{</a>}
Every time I later referred something to it:
\special{html:<a href = "OneTruth">}{2+2=4}\special{html:</a>}
it would send me to anchoring text "Laura is a genius."

Using the fourth command will insert the image stored at location "hrefstring."

Finally, using the fifth command allows you to link documents relative to each other. This way if you are linking to a document with the same base path, all you have to do is use this command and the "hrefstring" will simply be the different ending to the path.

top


Hyperlinks in MS Word 97

MS Word provides an easy way for users to create hyperlinks.

For a www link: Click "insert/hyperlink" and Word will prompt you for the location. Type it and click "OK." The linking text is by default the www address. Change this by highlighting the linking text and typing your preferred linking text.

For a link to another file on the computer: Click "insert/hyperlink" and type the path to where the file is located. If you are not sure of the path, click "Browse" to find your file. Click "OK." You can edit the linking text for these links in the same manner as for www links.

For a link inside the document: first you must 'bookmark' the object to which you want to link, for example the figure or equation. To do this, click at the beginning of the figure or equation to place the cursor there. Click "insert/bookmark." Word will prompt you for a name for your bookmark. Name it and click "OK." Then, go to the place in the document where you want to link to this bookmark. Click "insert/hyperlink." For the location, type the path to the document in which you are working. In the same window, there is an option for an internal link. Here, type the name of the bookmark, or use browse to choose from a list of bookmarks you have created in this document. Click "OK." Edit the linking text in the same manner as described above.

top

Password Protection

Create a file in the directory you would like to protect. Call it .htaccess and make it look like this:
AuthUserFile yourpathhere/.htpasswd
AuthGroupFile /dev/null
AuthName ByPassword
AuthType Basic

<Limit GET POST>
require user username
</Limit>
Where yourpathhere is a path of your choice and username is your user's name.
The second small section, starting with < Limit GET POST >, could vary for your server. I also tried:
require user username
but I received the error "unknown method require" and I also tried
<Limit GET>
require user username
</Limit>
Neither of those two methods worked for me; if none of these three work for you, ask your system administrator.

Next, type the following command at the UNIX prompt:
htpasswd -c yourpathhere/.htpasswd username
This will prompt you for a password twice (second time for verification) and then will create a file in yourpathhere called .htpasswd with the username and the password encrypted.

top


Our UNIX commands

1) command to create htpasswd file and obliterate old user
htpasswd -c yourpathhere/.htpasswd username
Where yourpath here is your chosen path, and user name is the user's name. :)

2) command to go dvi->ps (with teTeX beta version 0.9)
dvips -z -o example.ps example.dvi
3) command to go ps->pdf (with ghostscript)
ps2pdf example.ps
4) our *fave* command to give the current calendar!
cal
5) Or to give the whole year...
cal 1999

6) To find the directory in which a program is running (ie, netscape)
which netscape
top

Perl

Example 1

This example starts at a web page, in html. The html is for a form to submit information: name, email and comments. The perl puts up a return page thanking the submitter for his or her data. Then, the perl sends an email to both the sumitter and me which holds the submitted information. Visit this page to see it work!
The HTML:
<html> <head> <title>Submission Form</title></head>
<body>
Please fill in the following information:<br> <form
method=post
action="http://spib.ece.rice.edu/cgi-bin/spib-bin/submit.pl">
Your Name:<input type=text size="20" name="username"><br>
Your e-mail: <input type=text size="20" name="email"><br>
Comments:<br>
<textarea cols="40" rows="3" name="comments"></textarea><br>
<input type=submit name="submit" value="submit">
<input type=reset name="reset" value="reset">
</form> </body> </html>

The Perl:
#!/usr/local/bin/perl

#$me holds my email address.
$me = "sunbeam\@rice.edu";

#$mailprog holds the path to the mail program I use to send the email.
$mailprog = "/usr/lib/sendmail";

#cgi-lib.pl is required so that perl will parse the form data.
require "/spib5/httpd_1.4.2/cgi-bin/cgi-lib.pl";

#My first sub-routine is ret_page, which posts up a return page to the
#submitter. The page says Thank you, and shows the submitter the info that
#they submitted. It sings a little song, and then it gives a back option
#just in case the submitter made any mistakes.

sub ret_page{
print "Content-type: text/html\n\n";

print "<head>\n<title>Thank You</title>\n</head>\n";
print "<body>\n<basefont size=5>\n<h1>Thank You</h1>\n";
print "your submission has been received<br>";
print "Thanks $username<br><br>\n";
print "Your email: $email<br>\n";
print "Your comments: $comments<br><br>\n";
print "she bop she bop bop bop a woo bop. <br><br>\n";
print "If this is incorrect, please <a href='http://spib.ece.rice.edu/~sunbeam/esubmit/1/'>go back</a> and re-do it.\n";
print "</body>";
}

#send_mail sends an email to both the submitter and to me! It has all the
#information that the submitter submitted. peter picked a peck of pickled
#peppers.

sub send_mail{
open(MAIL, "| $mailprog -t $me, $email") or die "I can't open $mailprog\n";
print MAIL "From: $username <$email>\n";
print MAIL "Subject: My Log report\n";
print MAIL "It was filled out by: $username\n";
print MAIL "Here is what they said:\n";
print MAIL "$comments\n";
close(MAIL);
}

#Finally, submit takes all the data parsed by perl from the html form
#that put it into the array called @in. (&ReadParse does this.) submit puts
#each of the variables in @in into global scalar variables. Then it calls
#send_mail and ret_page with the variables.

sub submit {
$username = $in{'username'};
$email = $in{'email'};
$comments = $in{'comments'};
ret_page;
&send_mail;
}

#here I send standard error to null, so that the (non-existent, of course)
#errors don't print. I call &ReadParse so that perl reads and parses the
#data, and then I evaluated sub-routine submit.
#ta-da!!!

open (STDERR,"> /dev/null");
&ReadParse;
submit;
top

Blow By Blow


This page maintained by Laura and Doug
email us if there are any broken links.
Last updated on Nov 23, 1999 at 12:55 pm
Page accessed times.