|
|
Computing (general) |
| This section addresses questions on computing
on the OSU campus and in the Physics Department.
Check out the | |
| Major Topics:
General Questions:
| |
| [New Answer in "Computing (general)"] | |
| 2005-Sep-07 1:03pm | |
|
|
|
| Using email at OSU and in the Physics Department.
| |
| Major Topics:
General Questions:
| |
| [New Answer in "Email"] | |
| 2007-Apr-09 12:47pm | |
|
|
Pine mail program |
| Pine is a good choice for a non-gui mail program (as opposed to using the mail capabilities of a web browser or some other graphical interface). It is the default mail program for most unix systems these days (which for OSU Physics means campbell and the other alphas as well as any linux boxes). 2001-Dec-14 10:02am furnstahl.1@osu.edu | |
| Subcategories:
Answers in this category: | |
| [New Answer in "Pine mail program"] | |
| 2001-Dec-14 1:32pm | |
|
|
How do I get help on the Pine mail program? |
| If you wish to get more in-depth information regarding PINE, you can check out the PINE information center at: The University of Washington (http://www.washington.edu/pine). 2001-Sep-08 8:50am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2001-Dec-14 10:05am | |
|
|
How can I change my Elm folders to folders in Pine? |
| ELM stores mail folders in a directory called 'Mail' in your account.
However, PINE uses a directory called 'mail' to store it's mail
folders.
One option you can choose is to move all of your folders that are in your 'Mail' directory into your 'mail' directory. You can do this by typing in this command at your mail prompt: mv ~/Mail/* ~/mail/*This will move all of the mail folders from your 'Mail' directory in your account to a directory called 'mail'. Then, when you go into PINE, and list your folders, you should see all of your folders listed on the screen. The other option you can choose is to change Pine's setup using these directions: Go into Pine
Hit 's' for setup
Hit 'c' for configuration
Go down to the option for 'folder-collections'
and highlight that row.
Hit 'c' for change value.
Put in the following:
Mail/[]
and hit RETURN.
Hit 'e' to exit and then hit 'y' to save your changes.
Then, exit out of pine, and re-enter pine. You should
see your mail folders appear in your folder list.
If you wish to get more in-depth information regarding PINE, you can
check out the PINE information center at:
The University of Washington (http://www.washington.edu/pine). | |
| [Append to This Answer] | |
| 2001-Dec-14 10:05am | |
|
|
How do I convert my old Elm alias list to a Pine address book? |
You can convert an elm aliases file to a pine address book using the Perl script elm-to-pine. Your elm aliases file will typically be found in your .elm directory and will be called aliases.text. To make the conversion:
elm-to-pine ~/.elm/aliases.text > ~/.addressbookwhich will leave you with a file called .addressbook in your top directory (which is where Pine looks for it by default.
The script is available from </~ntg/scripts/elm-to-pine> (just save this file with the name elm-to-pine in a convenient directory). | |
| [Append to This Answer] | |
| 2001-Dec-14 10:14am | |
|
|
How do I read my Unix email when running Pine on another computer? |
| Note that you could always ssh to fox and then run pine directly on fox. This has the advantage of making all the mail operations fast but doesn't work so well in handling attachments (e.g., MS Word documents). Also, if you have a slow connection (e.g., modem), you wouldn't want to use the viewers (e.g., gv or xv) on fox but instead use local viewers (it still will be slow if the attachment is large!).
To have Pine access your mail on Unix we'll use imap. You don't need to know what it is doing, you just need to change a few lines in your .pinerc file. (You can also do this within mail using the Setup facility, but I find it easier just to explain how to edit .pinerc). You will find .pinerc in your home directory. Bring it up in an editor. There will be lines starting with #, which are comments, and other lines that specify options. The option lines start in the first column unless it is a continuation line, in which case the second, thrid, etc. lines are indented at least with one space. This is explained in comments at the top of the file.
Let us suppose that your name is John Doe and your username on your own computer is john while your username on Unix is jdoe. Find the following items in .pinerc and change them analogously: personal-name=John Doe 2004-Aug-19 9:47am furnstahl.1@osu.edu, bcd@pacific.mps.ohio-state.edu | |
| [Append to This Answer] | |
| 2004-Aug-19 9:47am | |
|
|
What are some useful Pine options to set? |
| For the latest and greatest options in gory detail, check out the official Pine configuration notes at http://www.washington.edu/pine/tech-notes/config.html (but be careful whether the version you are using is up-to-date).
A sample .pinerc (mine), which is used to access Pine on Campbell from remote machines via imap and ssh, is available here: </~ntg/scripts/.pinerc>
| |
| [Append to This Answer] | |
| 2001-Dec-14 2:40pm | |
|
|
How can I read my Unix (fox) or VMS (mps) mail from a web browser? |
| You can use twig to access VMS mail (ohstpy.mps.ohio-state.edu) or fox/pacific unix mail.
Here are the facts: * You need to use an ssl-enabled web browser, which is one that can interact
with "https" (as opposed to the usual "http") pages. If you are using a
recent version of Internet Explorer or Netscape, you should be fine.
If you are using Mozilla, make sure that mozilla-psm is installed.
* Go to https://twig.physics.ohio-state.edu/twig/ to get started.
Select the Server from the pulldown menu (VMS or unix), then enter
your username and password. Click on "Log in".
* If you login successfully, you should reach a screen with options.
that include "Mail". Click on the link to Mail.
* On the unix side, this should display your INBOX. You can use the Prefs
link to change how the list is sorted (oldest first or last).
* Use the Help link to learn more!
Things to remember: * Always go through the login screen at
https://twig.physics.ohio-state.edu/twig/
instead of bookmarking a page further on.
* Always "Logout" at the end of the session to clear the cache.
* Always "Logout" before leaving twig for a different website in the same
browser window. If you go to another website and then come back to twig,
without logging out, new mail you send will probably fail to be sent.
2004-Aug-19 9:39am furnstahl.1@osu.edu, bcd@pacific.mps.ohio-state.edu | |
| [Append to This Answer] | |
| 2004-Aug-19 9:40am | |
|
|
How can I send a fax by email? |
| The OIT Help Desk page
(http://www.oit.ohio-state.edu/tsc/33084.html)
tells how to do it.
The basic idea is that your fax message is composed as an email message and you send it to a special address that includes the phone number to which you are faxing. The form of the address is: First_Last%phone@faxgate.acs.ohio-state.eduwhere First_Last is made from the first and last names of the recipients (or any other identifier). E.g., John Doe becomes John_Doe. Examples of phone numbers: Long Distance Toll-free
1UUUUUUAAAPPPPPPP 91800PPPPPPP
where U is your UNITS Plus code (it will be blanked out in the message),
A is the area code, P is the phone number.
For example, to send a campus fax to OSURF purchasing at x2-6870, use the address: OSURF_purchasing%26870@faxgate.acs.ohio-state.eduand to send a fax to Jane Doe at (916)743-6322 using Plus number 12345, use the address: Jane_Doe%1123459167436322@faxgate.acs.ohio-state.edu(don't forget the 1 at the beginning!). 2001-Sep-08 8:45am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2001-Sep-08 8:45am | |
|
|
How do I uuencode a file? |
| Uuencode [uudecode] is a utility for encoding [decoding] files
exchanged on a network, particularly by email.
Suppose we have the file test.doc that we want to encode as test.doc.uu (it is standard practice to append .uu to the name of the file) so that it has the filename newtest.doc when uudecoded. On a unix system: uuencode test.doc newtest.doc > test.doc.uuOn VMS: UUENCODE TEST.DOC/OUT=TEST.DOC.UU/NAME=NEWTEST.DOC 2001-Aug-30 4:50pm furnstahl.1@osu.edu, webmaster@www.physics.ohio-state.edu | |
| If you have a group of files to uuencode, first combine them
into some sort of archive before invoking uuencode.
The utility script uufiles (available on Campbell) will tar, gzip, and uuencode a group of files. The command: uufiles -gzwill start things rolling. Just answer the questions!
An extensive discussion of uufiles and sources for all platforms
(unix, vms, dos/windows, MacOS) can be found at
(http://xxx.lanl.gov/help/uufiles). This includes a detailed
example (http://xxx.lanl.gov/help/uuexample.html). | |
| [Append to This Answer] | |
| 2001-Aug-30 4:50pm | |
|
|
How do I deal with spam and viruses? |
We don't have an effective way to *stop* it. We do have some ways to help manage it. Brian Keller points out that you can get yourself removed temporarily from some of the spam lists by actually following their unsubscribe instructions. I find this risky - some of them use that as confirmation of a real address and send more, and a couple times we've seen retaliation in the form of viruses sent in response to an unsubscribe attempt. However, this is the strategy Brian uses. On Unix, we have a utility called SpamAssassin, which is run via procmail. This tool is unavailable on VMS (the VMS server quarantines spam and viruses using a system called Precisemail). To use SpamAssassin, follow these instructions on Unix: Create a file named ~/.procmailrc containing the following (what is in between the "cut here" lines, not including them): --cut here-- PATH=/bin:/usr/bin:/usr/local/bin MAILDIR=$HOME/mail LOGFILE=$MAILDIR/.from INCLUDERC=/usr/local/share/procmail-include --cut here-- Now, email will come in, and procmail will run on it. Procmail will use SpamAssassin to filter mail into 3 files: ~/mail/spam: This is where the messages that spamassassin identifies as spam will go. Sometimes legitimate email that happens to contain "spammy" words or maybe HTML tags will end up here, so you want to check this file to make sure you don't lose something you care about. ~/mail/virus: Now that we are filtering viruses at the server with Clam Anti-Virus, this mailbox receives the notifications from ClamAV, which tell you which virus was detected and who the purported sender was. Note well that the viruses fake the sender, so that part is usually a lie. Your regular inbox: Very little spam should make it through to this one. Since these files are in ~/mail, pine will see them in the folder list. If you use a different mail program or a different subdirectory to store email messages, you can change the setting for this directory in your .procmailrc. It's important to check these mailboxes in case of false positives. It is also very important to clean out these files periodically so that they do not grow to an unmanageable size or fill up your disk quota. However, I find that categorizing the email lets me optimize my time a bit. CUSTOMIZATION: SpamAssassin reads a file named ~/.spamassassin/user_prefs. You can edit this file to tailor spamassassin's behavior. Three very useful directives you can put in this file are required_score 3.00 whitelist_from user@address.com blacklist_from spammer@badneighbor.org "required_score" defines the numeric score at which a message is identified as spam. The default is 5.00. A higher required_score means more spam will reach your regular mailbox; a lower required_score may mean that more legitimate mail is placed in the spam box. "whitelist_from" defines an address from which email will always be tagged as non-spam. "blacklist_from" defines an address whose email will always be tagged as spam. This is useful in cases that you find are frequently mis-identified. Each of them takes one argument, but can be repeated: whitelist_from dad@home.org whitelist_from mom@home.org There are lots more things you can do in the user_prefs file; for more information see `man Mail::SpamAssassin::Conf' on fox but beware: you can easily configure it into not working right at all, so use caution.2008-Jan-24 9:11am bcd@pacific.mps.ohio-state.edu | |
| [Append to This Answer] | |
| 2008-Jan-24 9:11am | |
|
|
How do I send vacation email notifications automatically while I'm away? |
On Unix:
1) create a file named ~/.vacation.msg, containing exactly the text you
want in your outgoing message. For example, the file might contain
the following:
From: YOURUSERNAMEHERE@pacific.mps.ohio-state.edu (via the vacation program)
Subject: away from my mail
I am away from the office until next Thursday. Your mail will be
read when I return. If you have an emergency, call my personal assistant
at 555-1212.
2) create a file named ~/.forward, containing the line
\YOURUSERNAMEHERE,"|/usr/local/bin/vacation YOURUSERNAMEHERE"
NOTE WELL that it is important to include the backslash and double
quotes exactly as shown.
2a) if you already have a .forward, and it looks something like this
"| /usr/local/bin/procmail #YOURUSERNAMEHERE"
then instead of the first example, yours should combine them thus:
"| /usr/local/bin/procmail #YOURUSERNAMEHERE", "| /usr/local/bin/vacation YOURUSERNAMEHERE"
Note well the exact quotes and the comma.
3) Change the string YOURUSERNAMEHERE to your username (in lowercase).
4) Run the command
chmod 644 ~/.forward
5) Run the command
/usr/local/bin/vacation -I
to initialize the vacation database (so it knows to whom it has already
replied). This works best if done on fox.
6) Remember to remove or rename the .forward file when you return!2006-Jul-27 1:48pm bcd@pacific.mps.ohio-state.edu | |
| [Append to This Answer] | |
| 2006-Jul-27 1:48pm | |
|
|
Processing many messages in pine |
| Start pine. Type S for Setup Type C for Config Type W for Whereis Type the string "aggregate". This will take you to "Enable-aggregate-command-set". Type X to turn this option on Type E to Exit Setup Type Y to save changes Navigate to the mail folder you want, e.g. spam Type a semicolon (;) to start the selection process Use the appropriate selection criterion from the menu (e.g., A for All) Type A for Apply Type the letter for the appropriate action from the menu (e.g., D for Delete) 2007-Apr-09 12:58pm bcd@pacific.mps.ohio-state.edu | |
| [Append to This Answer] | |
| 2007-Apr-09 12:58pm | |
|
|
Graphics |
| Questions about plotting and other graphics programs available in the
Physics Department.
| |
| Major Topics:
General Questions:
| |
| [New Answer in "Graphics"] | |
| 2003-Nov-14 4:34pm | |
|
|
Grace (or xmgrace) |
| Grace and its X-windows incarnation xmgrace are the latest evolution of
the program xmgr for two-dimensional plotting.
| |
| Major Topics:
General Questions: | |
| [New Answer in "Grace (or xmgrace)"] | |
| 2003-Feb-18 6:39pm | |
|
|
Is there an FAQ for Grace or xmgrace? |
| Yes! It is http://plasma-gate.weizmann.ac.il/Grace/doc/FAQ.html. 2001-Sep-08 8:52am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2001-Sep-08 8:52am | |
|
|
When I include an EPS file generated by Grace into my (La)TeX document, the graphic hides some of the surrounding text. |
| This answer is from the Grace FAQ at http://plasma-gate.weizmann.ac.il/Grace/doc/FAQ.html.
LaTeX does not do hard clipping of EPS files unless instructed to do so. Use \includegraphics*{} and NOT \includegraphics{}. If using the epsf package, remember to include the \epsfclipon flag.
The erasing comes about because Grace fills the background with the page size and not the bbox size. The
background filling can be disabled from the "Plot/Plot appearance" popup. | |
| [Append to This Answer] | |
| 2000-Jan-24 7:51am | |
|
|
Printing to my old PostScript printer produces an error. |
| This answer is from the Grace FAQ at
http://plasma-gate.weizmann.ac.il/Grace/doc/FAQ.html.
By default, the PS driver uses Level 2 features, while your printer may not be PostScript Level 2 compliant. You
can force the use of PS Level 1 only features in the PostScript device setup, though output may be not exactly
as expected (there will be no pattern fills, for example). | |
| [Append to This Answer] | |
| 2000-Jan-24 7:52am | |
|
|
The GIMP |
| From (http://www.gimp.org/the_gimp.html): "The GIMP is the GNU Image Manipulation Program. It is a freely distributed piece of software suitable for such tasks as photo retouching, image composition and image authoring." In short, The Gimp is a program like Adobe Photoshop, only open source (which means, in this case, it is free and you can extend/hack it). It is distributed with all major Linux distributions, but there are also versions available for other unixes, for Windows [(http://www.gimp.org/~tml/gimp/win32/)], and for Mac OS X [(http://www.macgimp.com/) but not free]. See (http://www.rru.com/~meo/gimp/faq-user.html) for the GIMP User FAQ and (http://www.gimp.org/tutorials.html) for Gimp tutorials (and pointers to others). 2001-Sep-09 4:01pm furnstahl.1@osu.edu | |
| Subcategories:
Answers in this category:
| |
| [New Answer in "The GIMP"] | |
| 2001-Sep-09 4:01pm | |
|
|
Drawing Feynman Diagrams |
| Here we consider various options for producing Feynman diagrams for talks or for inclusion in journal articles.
If you have alternative approaches, please contact Dick Furnstahl at furnstahl.1@osu.edu. | |
| Subcategories:
Answers in this category:
| |
| [New Answer in "Drawing Feynman Diagrams"] | |
| 2001-Sep-11 7:44am | |
|
|
Feynmf |
| One of the best options for Feynman diagrams if you're using TeX or LaTeX is Feynmf, which was written by Thorsten Ohl. Check out the examples! 2001-Sep-11 4:59pm furnstahl.1@osu.edu | |
| Subcategories:
Answers in this category: | |
| [New Answer in "Feynmf"] | |
| 2001-Sep-11 5:00pm | |
|
|
What do I need to run Feynmf? |
| A "tarball" of the package is available locally as
</~furnstah/temp/feynmf/feynmf.tar.gz> but you might want to do a Google.com search to check for an updated version.
You also might want to use (or adapt) this simple csh script
</~furnstah/temp/feynmf/fmf_make> for processing diagrams and popping up xdvi with the revised version. (It kills old intermediate files, to avoid confusing xdvi and dvips.) This other script
</~furnstah/temp/feynmf/fmf_make2> uses Metapost instead of Metafont. You'll want to use it to make Feynman diagrams with colors. | |
| [Append to This Answer] | |
| 2001-Sep-11 5:00pm | |
|
|
Is there documentation for Feynmf? |
There is a manual: </~furnstah/temp/feynmf/fmfman.ps.gz> and a three part tutorial. All of the links are to gzipped postscript files.
Part 1: </~furnstah/temp/feynmf/textproc1.ps.gz> Part 2: </~furnstah/temp/feynmf/textproc2.ps.gz> Part 3: </~furnstah/temp/feynmf/textproc3.ps.gz>
The manual and tutorials have many examples. | |
| [Append to This Answer] | |
| 2001-Sep-11 7:56am | |
|
|
Can you show me some examples of Feynmf? |
|
* A simple QED vertex correction </~furnstah/temp/feynmf/qedtest.ps> and the
LaTeX file that generated it </~furnstah/temp/feynmf/qedtest.tex>
* Hugenholtz diagrams </~furnstah/temp/feynmf/fig_hugenholtz.ps> and the
LaTeX source </~furnstah/temp/feynmf/fig_hugenholtz.tex> (you'll also
need hugenholtz.tex </~furnstah/temp/feynmf/hugenholtz.tex>)
2001-Sep-11 8:01am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2001-Sep-11 8:01am | |
|
|
How do I make Feynman diagrams using Feynmf with colors? |
| You'll need to run Metapost instead of Metafont to get the colors (this means
that you'll need the "feynmp" rather than "feynmf" input files. Also,
any colors that are not part of the figures (e.g., from external labels)
won't show up until you create a postscript file (see the example).
Here's an example postscript file </~furnstah/temp/feynmf/fig_rmf.ps>
and the LaTeX source code </~furnstah/temp/feynmf/fig_rmf.tex>.
The instructions are given in the comments of the examples' source code: * to typeset XXX.tex with Feynmp: [e.g., fig_rmf.tex]
$ latex XXX [latex fig_rmf]
$ mpost fmfXXX [mpost fmffig_rmf]
$ latex XXX [latex fig_rmf]
* to generate a postscript file:
$ dvips -o XXX.ps XXX.dvi [dvips -o fig_rmf.ps fig_rmf.dvi]
* you may need to delete the fmfXXX??? files to make sure the fonts
are updated
2001-Sep-14 1:19pm furnstahl.1@osu.edu | |
Here are some examples:Description postscript / source
various chiral eft </~furnstah/temp/feynmf/fig_chiral1.ps>
diagrams </~furnstah/temp/feynmf/fig_chiral1.tex>
</~furnstah/temp/feynmf/fig_chiral2.ps>
</~furnstah/temp/feynmf/fig_chiral2.tex>
</~furnstah/temp/feynmf/fig_chiral3.ps>
</~furnstah/temp/feynmf/fig_chiral3.tex>
</~furnstah/temp/feynmf/fig_chiral4.ps>
</~furnstah/temp/feynmf/fig_chiral4.tex>
</~furnstah/temp/feynmf/fig_chiral5.ps>
</~furnstah/temp/feynmf/fig_chiral5.tex>
</~furnstah/temp/feynmf/fig_chiral6.ps>
</~furnstah/temp/feynmf/fig_chiral6.tex>
</~furnstah/temp/feynmf/fig_chiral7.ps>
</~furnstah/temp/feynmf/fig_chiral7.tex>
| |
| [Append to This Answer] | |
| 2001-Sep-14 1:32pm | |
|
|
How do I rotate a postscript document or figure by 90 or 180 degrees? |
| If the document or figure is a single postscript page without any embedded postscript files (such as an embedded figure) . . .
To rotate by 180 degrees, add the postscript command: 180 rotate -612 -792 translateafter the start of the page in your document (so on the line after the %%Page: 1 or %%Page: 1 1 line) and adjust the bounding box by %%BoundingBox: Lx Ly Ux Uy --> %%BoundingBox: 612-Ux 792-Uy 612-Lx 792-Ly(the bounding box specification should be near the start of the file). To rotate by 90 degrees, add the postscript command: 90 rotate 0 -612 translateafter the start of the page in your document (so on the line after the %%Page: 1 or %%Page: 1 1 line) and adjust the bounding box by %%BoundingBox: Lx Ly Ux Uy --> %%BoundingBox: 612-Uy Lx 612-Ly Ux(the bounding box specification should be near the start of the file).
* If you put the command earlier, e.g. immediately after %%EndComments, then the page will be rotated when initially viewed by a postscript viewer (such as gv), but will revert to the original form when you "reopen" or "redisplay" the file. * If your page or figure fills a full letter-sized page, then the bounding-box mapping for a 180 degree rotation takes %%BoundingBox: 0 0 612 792 --> %%BoundingBox: 0 0 612 792(so it is not necessary!). * If your document has more than one page, then you have to add 180 rotate -612 -792 translateafter each %%Page: command in the file (there should be one for each page!). DO NOT add this line after the %%Page: commands that are part of any embedded postscript files. (You can identify the latter because they start with %%BeginDocument and end with %%EndDocument.) 2001-Sep-07 2:18pm furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2001-Sep-07 2:18pm | |
|
|
Is there a way to convert a postscript (eps) file into a pdf clipped at the bounding box? |
| Yes, use the epstopdf script.
If you put a << /PageSize [ xsize ysize ] >> setpagedeviceline at the beginning of your postscript file, epstopdf will invoke ghostscript so that it clips at a bounding box equal to 0 0 xsize ysize. (You may need to translate as well.) From an answer found by a google search: Add some code to resize the page. If the bounding box
is 50 50 450 450
gs -c "<< /PageSize [400 400] >> setpagedevice 50 neg 50 neg translate>> -f yourfile.ps
2003-Nov-14 4:39pm furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2003-Nov-14 4:39pm | |
|
|
Macintosh |
| Hints and pointers for mac stuff at OSU.
| |
| Major Topics:
General Questions: | |
| [New Answer in "Macintosh "] | |
| 1999-Dec-27 9:34am | |
|
|
New Item |
| [Append to This Answer] | |
| 1999-Dec-27 9:25am | |
|
|
Where are public Macintosh's in Smith Lab? |
| Room 4035: One G3/300 and one PowerMac
Physics Students: | |
| [Append to This Answer] | |
| 1999-Dec-27 9:43am | |
|
|
Numerical Analysis |
| "Numerical Recipes" by Press et al. is a standard source of information on numerical analysis. The homepage for NR products is http://www.nr.com/. The book is available on line at http://lib-www.lanl.gov/numerical/index.html in postscript or PDF. Note that the Numerical Recipes routines at seldom as robust as those available from sources such as CERNLIB or Netlib.
A general guide to routines is GAMS ("Guide to Available Mathematical Software") maintained by NIST at http://gams.nist.gov/. Particularly useful is the Problem Decision Tree http://gams.nist.gov/serve.cgi. Also off the GAMS page is a good list of links to other sources of math software http://gams.nist.gov/OtherSources.html.
| |
| Major Topics:
General Questions: | |
| [New Answer in "Numerical Analysis"] | |
| 2001-Oct-17 7:44pm | |
|
|
Where can I find out about Monte Carlo methods? |
| A list of Monte Carlo Tutorials is at http://www.cooper.edu/engineering/chemechem/MMC/tutor.html. The lectures by D.M. Cepperley http://archive.ncsa.uiuc.edu/Apps/CMP/method.html are particularly good. 2001-Oct-17 7:29pm furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2001-Oct-17 7:29pm | |
|
|
Printing |
| How do I find available printers? What commands and options are available?
2001-Sep-26 1:37pm bcd@pacific.mps.ohio-state.edu | |
| Subcategories:
Answers in this category: | |
| [New Answer in "Printing"] | |
| 2003-Jan-28 1:26pm | |
|
|
What printers are available? |
For a complete list of printers, typelpstat -pPrinters are named by the room where they reside. Printers with a `c' on the end of the name are color printers (e.g., smith4035c, smith2097c). Public printers are the ones in 1011s (undergraduate use only) 1021 (graduate use only), 1021k (graduate use only), 2097, 4035 and 4144. All other printers are in private offices and labs, and if you don't have access to that room, you are only wasting paper. 2001-Sep-26 1:41pm bcd@pacific.mps.ohio-state.edu | |
| [Append to This Answer] | |
| 2001-Sep-26 1:41pm | |
|
|
How do I print double-sided? |
The simplest way is to use the /duplex instance of the printer for the name. For examplelpr -Psmith2097/duplex abstract.pswill print the file `abstract.ps' in duplex (double-sided) mode on the smith2097 printer.
Not all printers support duplex printing. If you believe a printer is capable of duplexing, but there is no /duplex instance for it in the list produced by the command lpstat -pthen please send email to action@mps.ohio-state.edu reporting this, and we will look into it.
The /duplex instance used above is really just a shorthand for a command like: lpr -Psmith2097 -o sides=two-sided-long-edge abstract.psIt is also possible to rotate around the short edge of the page (Tumble printing) with the option `-o sides=two-sided-short-edge'.
See http://localhost:631/documentation.html for complete documentation (CUPS Software Users Manual).
| |
| [Append to This Answer] | |
| 2001-Sep-26 1:48pm | |
|
|
How do I set up printing on my Linux machine in the Physics Dept.? |
| See http://www.physics.ohio-state.edu/cgi-bin/fom?auth=ck4c904ddf40d1&editCmds=show&file=171
2001-Sep-26 1:50pm bcd@pacific.mps.ohio-state.edu | |
| [Append to This Answer] | |
| 2001-Sep-26 1:50pm | |
|
|
Where is the documentation on printing commands and options? |
| See http://lpd.physics.ohio-state.edu:631/documentation.html The most common questions are answered in the CUPS Software User Manual. 2003-Jan-28 1:29pm bcd@pacific.mps.ohio-state.edu | |
| [Append to This Answer] | |
| 2003-Jan-28 1:29pm | |
|
|
Scanning |
| An excellent source of information about scanning
and image size optimization is a page by Wayne
Fulton (http://www.scantips.com/). 2001-Sep-08 9:05am furnstahl.1@osu.edu | |
| Major Topics:
General Questions: | |
| [New Answer in "Scanning"] | |
| 2003-Jan-14 9:32am | |
|
|
How do I scan a drawing or figure for a document to be printed out (Windows)? |
| The following procedure is based specifically on the HP DeskScan II software,
but can be adapted to any other scanning software. The basic idea is to scan
the drawing or figure at a larger scaled size and then reduce it when you
convert to postscript later.
1. Select "Sharp Black and White Drawing" (or equivalent) as the scan type. You may need to re-select this as you iterate the scan, because the software will sometimes change it to another selection. 2. Select a (relatively) high resolution, such as LaserWriter or PhotoShop or 300dpi printer. There's probably no point choosing 600dpi, but it won't kill you (just makes your file larger than it needs to be). 3. Use the "Preview" and "Zoom" functions to isolate the drawing or figure that you want to scan. 4. Choose the "Scaling" to be greater than 100%. Make it large enough to still fit on letter-size paper, but as large as possible. 5. Choose "Final" and select something like tiff as the format. Complete the scan. 6. Now you need to convert the tiff file to a postscript file. There are many utility programs to do this. I recommend xv, which is available on the alpha unix, linux, and vms systems. On a mac, GraphicConverter is a good choice.
Using xv, load the tiff file and choose save. Select postscript as the type
of file and adjust the size so that the dpi (which will initially be 72dpi)
is something around 150dpi. You can choose "center" to keep the drawing
centered on the page. When you're ready, choose "ok" and you're done. | |
| [Append to This Answer] | |
| 2003-Jan-14 9:31am | |
|
|
How do I avoid huge scanned files? |
| Scanners these days tend to come with PhD-style interfaces ("Push here, Dummy!"), which means that most of the default settings are made behind your back. In my experience (e.g., with HP PrecisionScan software), the default is to use all the colors and resolution available. Naturally enough, this generates the largest files. This is fine if you are printing a scanned image directly or you want to save all of the details, but not if you want to put an image directly on the web or convert a scanned image to pdf for posting on the web.
The solution, then, is to change the defaults! Examples: * For scanned notes, a resolution of 150 dpi (dots per inch) is fine. | |
| [Append to This Answer] | |
| 2002-Apr-02 9:03am | |
|
|
How do I scan notes or text on linux? |
| This summary is based on experience with the HP Scanjet 6300c scanner attached via a USB connector to a pentium PC running RedHat 7.3. The scanning program is xsane 0.84 (there are newer versions available; check <www.xsane.org> for the latest version). Your mileage may vary . . .
The assumption is that you have handwritten notes or printed text (we'll assume you are covered under copyright fair use!) that you want to combine into a single PDF file. Aside: PDF is the best choice at present for distributing via the web, since the viewers are free (Acrobat Reader or Ghostview) and available on all platforms (Windows, Mac, Linux, Unix) and ghostscript can convert postscript to pdf. 1. Prepare your notes by xeroxing them (at least if they are written in pencil). Xerox fairly dark; they may look gray and ugly, but they'll be fine after scanning (which will turn the gray to white and keep the black). I usually reduce notes a bit (95-98%) to make sure that writing in the margins and close to the bottom is captured. 2. Go to the directory where you want to save the files (I create a new directory for each new batch). Start xsane in the background (that's what the "&" is for): xsane &It should pop up a small box that says it is "scanning for devices" and then a small control panel and a large Preview screen. (If xsane doesn't find an appropriate device, like a scanner, it will exit.) The first time you run the program there may be more than one control panel. To turn off the extra ones (and turn on good features): * under the View menu (in the main control panel), turn off "Show histogram",
"Show standard options", and "Show advanced options"
* under View, turn on "Show tooltips" and "Show preview"
* under Preferences, turn on "Show resolutions list"
These preferences will be saved when you exit the program.
3. Place the first page of the document to be scanned in the upper right corner of the scanner. On the Preview screen, choose the paper type (pull down menu); usually "letter port." (letter-size portrait) is what you want. 4. On the control panel, select "Viewer", "Line art", "Normal", and either 160 or 320 dpi. I find 160 is fine for notes and 320 is excellent for printed text. The file sizes are roughly (note that the postscript is just an intermediate step, so it's ok to be large unless disk space is really tight): material dpi pdf postscript handwritten notes 160 25-40KB/page ~500K/page text 2up 320 60-90KB/page ~2200K/page 5. Click on "Acquire Preview" at the bottom of the Preview screen to make the first scan. You will only do this for the first page. Adjust the dashed box with your mouse to select the area to be scanned. Remember that this will be the same for all pages (unless you want to adjust it, which would really slow you down!). The "Autoselect scanarea" and "Select visible area" buttons at the top of the Preview panel may be useful in positioning the dashed box. The "Zoom into selected area" button (magnifying glass with +) will show just the content of the area to be scanned. 6. On the Control panel, select Xsane mode->"Save", "Line art", "Normal" enter a filename: notes1.ps, "step +1", "by ext", "320" or "160". Here's what these mean: * "Save" means you're scanning to a file;
* "Line art" means black and white only (handwritten or printed text, or
figures);
* "Normal" means normal (I need to look up this option!)
* The filename specifies the name of the first file. You don't need to call
it "notes1.ps" of course, but include a "1" in the name and end it with
".ps" (for postscript). The first file will actually be saved as
notes0001.ps.
* "Step +1" means that the filename will automatically
increment with each scan. So the second scanned page will be
notes0002.ps and so on, without your having to enter anything else.
This is very convenient and efficient!
* "by ext" means to select the file type by the extension of the filename.
Here ".ps" means to save it as postscript. (Pull down this menu
for other file formats such as png and tiff.)
* "320" or "160" is the resolution in dots per inch.
7. Press "start" on the Control panel to start the scan. A green bar will grow on "Receiving gray data" and then another one on "Converting image". When these are complete, the scan is finished and you can put the next sheet of paper in the scanner. The scan head will still be lit up and slowly moving back to its initial postion, but that's ok. 8. Repeat step 7. until all pages are scanned. If you need to do a page over, just change the filename back by hand (and click on "ok" to overwrite the file). 9. Run the pdfmerge script to combine the postscript files into a single pdf file. This is a Perl script to run gs with the appropriate options. It is available at http://www.physics.ohio-state.edu/~ntg/scripts/pdfmerge.pl (link pdfmerge.pl to pdfmerge and make it executable [chmod +x pdfmerge.pl] for the following to work). If your files are notes0001.ps, notes0002.ps, up to notes0024.ps, then type: pdfmerge notes*.psand the script will ask for an output file name. For example, notes1.pdf. It will merge the 24 (or whatever) pages into the single PDF file notes1.pdf. 10. Transfer the PDF file to the desired computer and location using scp: scp notes1.pdf ntg4004:public_html/880/notesis an example.
11. Use File->quit to exit xsane. There is nothing to turn off on the scanner (the light stays on). | |
| [Append to This Answer] | |
| 2003-Mar-27 7:30am | |
|
|
TeX and LaTeX |
| A list of "TeX Resources on the Web" is at http://www.tug.org/interest.html.
This includes a searchable TeX faq list (http://www.tex.ac.uk/cgi-bin/texfaq2html). 2000-Mar-28 2:50pm furnstahl.1@osu.edu | |
| Major Topics:
General Questions: | |
| [New Answer in "TeX and LaTeX"] | |
| 2003-Mar-27 9:41am | |
|
|
Powerpoint-Style Presentations using LaTeX |
| Presentations using Microsoft Powerpoint (shown using a video projector) are rapidly becoming the norm for physics talks in many subfields. However, many of us want to generate platform-independent presentations with all of the good features of Powerpoint while maintaining all of the advantages of creating a talk using LaTeX.
The best solution at present is to take advantage of Adobe's Acroread PDF viewer, which is available at no charge for all of the major platforms (although not all platforms have the most up-to-date version available). The basic idea is to convert your LaTeX presentation to a PDF file and then to display it using Acroread. The features are: * full-screen mode (so all you see is your talk projected on the screen)
* transition effects including
* bullet items revealed one-by-one
* figures revealed step-by-step
* fancy page (or partial page) transitions, such as left-to-right wipes
* hyperlinks in your document so you can click them to go to other parts of
your talk or to external web pages
To create a basic talk that just projects your transparencies (no special transition effects), you just need to generate a pdf (rather than a postscript) file. Then just start up Acroread (it is called acroread on the Linux systems) on the pdf file and switch to full-screen mode (under the View menu or with a shortcut that is usually ctrl-L).
To incorporate transition effects, there are at least three choices at present: the TeXPower bundle by Stephan Lemke, the PPower4 postprocessor, and the Prosper package. Descriptions and links are given in the resource pages listed below.
PDF Classroom Demonstrations: http://www.math.uakron.edu/~dpstory/pdf_present.html Screen presentations: http://www.miwie.org/presentations/ (This site is kept up to date.) Prosper (LaTeX class for writing transparencies): http://prosper.sourceforge.net/
| |
| Subcategories:
Answers in this category: | |
| [New Answer in "Powerpoint-Style Presentations using LaTeX"] | |
| 2002-Jun-17 9:05am | |
|
|
TeXPower package |
| [Warning: The version of TeXPower described here is designated alpha. In this case, that means that the code is likely to change and the changes will not all be backwards compatible. However, the current version has most of the features you could hope for and does not appear to be buggy. (This warning is an update from one from March, 2002, at which time TeXPower was "pre-alpha".)] 2002-Oct-22 7:50am furnstahl.1@osu.edu | |
| TeXPower is a set of LaTeX style files that can be used to create dynamic presentations. The principal developer is Stephan Lehmke (Stephan.Lehmke@cs.uni-dortmund.de) but recently the TeXPower project has moved to SourceForget.net (http://texpower.sourceforge.net/). The texpower package implements the presentation effects, which include special page transitions, incremental page displays (e.g., stepping through bullet items), and color highlighting. These effects exploit the built-in capabilities of the Adobe Acroread PDF reader, which is available (at no charge) for all platforms.
You still need to use a package (or the slides class) to format your slides. Possibilities are foiltex, seminar, the LaTeX2e slides class, prosper, pdfslide, pdfscreen, ...
The features of texpower are implemented entirely using TeX and LaTeX, but the final output file must be a pdf file. There are several options, including:
I favor the pdfLaTeX approach, but your mileage may vary. | |
| Subcategories:
Answers in this category: | |
| [New Answer in "TeXPower package"] | |
| 2002-Oct-22 7:53am | |
|
|
Demonstrations and Examples |
| [Warning: These are examples from the pre-Alpha version of TeXPower!]
Here are some of the demonstration pdf files included in the TeXPower bundle: * fulldemo.pdf (http://www.physics.ohio-state.edu/~ntg/pdf/texpower/fulldemo.pdf), which demonstrates most of TeXPower's capabilities. * FAQ-display.pdf (http://www.physics.ohio-state.edu/~ntg/pdf/texpower/FAQ-display.pdf), which is the display version of the TeXPower FAQ.
| |
| TeXPower has recently moved to SourceForge.net (http://texpower.sourceforge.net/), where you can find more examples (currently for the alpha version). 2002-Oct-22 7:55am furnstahl.1@osu.edu | |
| Subcategories:
Answers in this category:
| |
| [New Answer in "Demonstrations and Examples"] | |
| 2002-Oct-22 7:58am | |
|
|
Where do I get TeXPower? |
| At the moment, TeXPower is an alpha release. You can get the current version from http://texpower.sourceforge.net/, which has a "downloads" section. Check there for the latest version. There is also a manual and a gallery there. 2002-Oct-22 7:57am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2002-Oct-22 7:57am | |
|
|
Is there a manual for TeXPower? |
| Yes. A local version is available: </~ntg/pdf/texpower/manual.pdf> (with LaTeX source </~ntg/pdf/texpower/manual.tex>), but it may be out of date as you read this. An up-to-date manual should be available from http://lrb.cs.uni-dortmund.de/~lehmke/texpower/doc.
There is also an FAQ, available in display form: </~ntg/pdf/texpower/FAQ-display.pdf> or printable form: </~ntg/pdf/texpower/FAQ-printout.pdf>. | |
| [Append to This Answer] | |
| 2002-Mar-31 9:48am | |
|
|
Using Acrobat or Acroread for Presentations |
|
2002-Mar-30 9:09am furnstahl.1@osu.edu | |
| Subcategories:
Answers in this category: | |
| [New Answer in "Using Acrobat or Acroread for Presentations"] | |
| 2002-Mar-30 11:41am | |
|
|
Where do I get an up-to-date version of the Acrobat PDF Reader (Acroread)? |
| You can get the current version from the Adobe web site at http://www.adobe.com/products/acrobat/readstep.html. The instructions will step you through the download procedure. The basic product (which is all you need) is called the Acrobat Reader. Get the latest version (largest version number) available for your platform (Windows 9x, Windows XP, Mac OS X, Linux, etc.). 2002-Mar-30 9:15am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2002-Mar-30 9:15am | |
|
|
How do I enter/exit the Acrobat Reader (Acroread) full-screen mode? |
To enter full-screen mode:
* under the View menu, select "Full Screen"
* or use the short-cut, which is usually Ctrl+L (it is listed next to
"Full Screen" under the View menu) or Command+L (on Macs)
To exit full-screen mode:
* use the "escape button" (usually marked "Esc" in upper left of keyboard)
* use the short-cut, which is usually Ctrl+L (it is listed next to
"Full Screen" under the View menu) or Command+L (on Macs)
2002-Mar-30 9:27am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2002-Mar-30 9:27am | |
|
|
What "Full Screen Preferences" are useful for Acrobat Reader? |
| You find the "Full Screen Preferences" under the File menu: File -> Preferences -> Full Screen... Useful Navigation preferences: * Advance On Any Click if you have a remote control (e.g., RF) mouse * Loop After Last Page takes you back to the beginning * Escape Key Exits --- Esc leaves full-screen mode 2002-Mar-30 11:44am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2002-Mar-30 11:44am | |
|
|
How do I create a presentation with PDFLatex? |
| See "Creating Presentations in PDFLaTeX" by Matt Welsh http://www.cs.berkeley.edu/~mdw/proj/texslides/. 2001-Oct-18 10:48am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2002-Mar-22 7:46am | |
|
|
How do I start another program from within a PDF presentation? |
| This answer is taken from the Hints and Tricks section of the Screen Presentation Tools summary (http://www.miwie.org/presentations/html/hints.html) by Michael Wiedmann.
-------------- begin excerpt ------------- Herman Bruyninckx submitted the following macros to start up movies or other programs from within a PDF presentation made with LaTeX:
The key is to write a little shell-script and launch it from within pdflatex. In the shell-script you should simply call a standard unix tool for viewing video files, e.g.: mpeg_play -controls off -dither color -position +128+96 video.mpgName this script for example videoscript.sh and make it executable. Defining the following two new commands in pdflatex, \newcommand{\pdflaunch}[1] {\pdfpageattr{/AA << /O << /S /Launch /F (#1) >>>>}}
\newcommand{\pdflaunchlink}[2]{%
\pdfannotlink attr{/Border [0 0 0]} user{/Subtype /Link /A << %
/S /Launch /F (#1) >>}%
\pdfliteral{0 1 0 0 k}%
{#2}\pdfliteral{0 0 0 1 k}\pdfendlink%
}
you have either the possibility to launch this script instantly with a new slide: \pdflaunch{videoscript.sh}
or after pressing a special link defined by: \pdflaunchlink{videoscript.sh}{Start video}
Don't forget to kill the video application when it is not needed anymore. For this purpose again define a little script e.g.: killall mpeg_play
and call it as mentioned above.
------------------ end excerpt ------------------ | |
| [Append to This Answer] | |
| 2002-Jun-17 8:59am | |
|
|
How do I automatically start a PDF presentation in full-screen mode? |
Load the hyperref package, e.g.,
\usepackage[plainpages=false]{hyperref}
and add the command:
\hypersetup{pdfpagemode=FullScreen}
(I put it just after the \usepackage commands but I don't know if the positioning is critical. I would at least put it before \begin{document}.)2002-Jun-17 9:02am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2002-Jun-17 9:02am | |
|
|
How do I include postscript figures in a TeX file? |
| A comprehensive overview is "Using Imported Graphics in LaTeX2e". A pdf version is ftp://ftp.cdrom.com/pub/tex/ctan/info/epslatex.pdf or ftp://ftp.tex.ac.uk/tex-archive/info/epslatex.pdf.
[Warning: It is over 80 pages!] 2000-Mar-29 9:38am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2000-Mar-29 9:38am | |
|
|
How do I figure out the bounding box (BoundingBox) for an encapsulated postscript file? |
Here is a section from "Using Imported Graphics in LaTeX2e"
(ftp://ftp.cdrom.com/pub/tex/ctan/info/epslatex.pdf or ftp://ftp.tex.ac.uk/tex-archive/info/epslatex.pdf):
------------ begin excerpt -------------3.2 The EPS BoundingBox By convention, the first line of a PostScript file specifies the type of PostScript and is then followed by a series of comments called the header or preamble. (Like LATEX, PostScript's comment character is %). One of these comments specifies the BoundingBox. The BoundingBox line contains four integers:
1. The x-coordinate of the lower-left corner of the BoundingBox. For example, the first 5 lines of an eps file created by gnuplot are %!PS-Adobe-2.0 EPSF-2.0 %%Creator: gnuplot %%DocumentFonts: Times-Roman %%BoundingBox: 50 50 410 302 %%EndComments Thus the gnuplot eps graphic has a lower-left corner with coordinates (50, 50) and an upper-right corner with coordinates (410, 302). The BoundingBox parameters have units of PostScript points which are 1/72 of an inch, making the above graphic's natural width 5 inches and its natural height 3.5 inches. Note that a PostScript point is slightly larger than a TEX point, which is 1/72.27 of an inch. In TEX and LATEX, PostScript points are called "big points" and abbreviated bp while TEX points are called "points" and abbreviated pt.
Single-page PostScript files without any improper commands can be converted to eps by using one of the following methods for adding a BoundingBox line. Since these methods do not check for illegal PostScript operators, they do not produce usable EPS files unless the PS files are free of forbidden operators. 1. The most convenient option is to use the ps2epsi utility distributed with Ghostscript (see Section 5), which reads the PostScript file, calculates the BoundingBox parameters, and creates an eps file (complete with a BoundingBox) which contains the PostScript graphics. The resulting file eps file is in epsi format, which means it contains a low- resolution bitmapped preview at the beginning of the file. Since this preview is ascii-encoded, it does not cause the Section 4.1 bufsize errors. However, this epsi preview increases the file size. 2. Alternatively, the BoundingBox parameters can be calculated and inserted in the PostScript file's BoundingBox line or specified in the graphics-insertion command (e.g., the \includegraphics command's bb option). There are several ways to calculate the BoundingBox parameters (a) Use Ghostview/GSview to display the PostScript graphic. As the pointer is moved around the graphic, the pointer's coordinates (with respect to the lower-left corner of the page) are displayed. To determine the BoundingBox parameters, record the pointer coordinates at the lower-left corner of the graphic and the upper-right corner of the graphic. (b) Print out a copy of the PostScript graphics and measure the horizontal and vertical distances (in inches) from the lower-left corner of the paper to the lower-left corner of the graphics. Multiply these measurements by 72 to get the BoundingBox's lower-left coordinates. Likewise, measure the distances from the lower-left corner of the paper to the upper-right corner of the graphics to get the BoundingBox's upper-right coordinates.
(c) The bbfig script uses a PostScript printer to calculate the BoundingBox.
bbfig adds some PostScript commands to the beginning of the PostScript
file and sends it to the printer. At the printer, the added PostScript
commands calculate the BoundingBox of the original PostScript file, printing the
BoundingBox coordinates superimposed on the PostScript graphic. ---------------- end excerpt ----------------- 2000-Mar-29 9:38am furnstahl.1@osu.edu | |
Here's a new way: If you have Ghostscript 6.0 (or later), the command:
gs -sDEVICE=bbox -dNOPAUSE -dBATCH file.pswill print the bounding box information for file.ps (and then exit gs). I have written a perl script that will automatically find the bounding box and correct the postscript file (or add the info if there is none). The script is </~ntg/scripts/bbox_add.pl>Be sure to make it executable: chmod +x bbox_add.plTo see the options and the defaults, bbox_add.pl --help 2001-Sep-07 5:01pm furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2001-Sep-07 5:01pm | |
|
|
Can I include a JPEG (jpg) graphic file directly into TeX or LaTeX? |
| If you want it to be portable, probably not. So you can either convert it
to encapsulated postscript (eps) using a graphics program like Gimp, or use a program called jpeg2ps, which puts
an eps wrapper on the jpeg file. This means you can treat it like a postscript
file (as long as you have at least postscript 2, which is pretty much everywhere
these days). So this is essentially like putting it directly in.
The source code (it's in C) for jpeg2ps is available from http://www.pdflib.com/jpeg2ps/.
Here is a Linux executable
(right-click on the link and save it to a file called jpeg2ps):
</~ntg/download/jpeg2ps> (of version 1.8; check the link above for updates). To create file.eps from file.jpg, the command is: jpeg2ps -o file.eps file.jpgor jpeg2ps file.jpg > file.eps 2002-Apr-02 8:19am furnstahl.1@osu.edu | |
You can find out the options to jpeg2ps by just typing it with no arguments:
jpeg2psand you'll get a list of options. I find the -a (auto rotate) option to be very useful. It automatically switches to landscape mode if the jpeg width is greater than the height. If the picture is too big to fit on a page, it will scale it appropriately. 2002-Apr-02 8:17am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2002-Apr-02 8:19am | |
|
|
Is there a way to automatically figure out and insert the bounding box in a postscript file? |
If you have Ghostscript 6.0 (or later), you can use a perl script
that will automatically find the bounding box
and correct the postscript file (or add the info if there is none).
The script is
</~ntg/scripts/bbox_add.pl>Be sure to make it executable: chmod +x bbox_add.plTo see the options and the defaults, bbox_add.pl --helpHere is what the "help" says at present: The script bbox_add.pl adds a tight bounding box to postscript files. It uses gs with the bbox option. The only mandatory command-line arguments are the names of the files to be processed. Wildcards are allowed (e.g. *.tex will process all of the TeX files.) The options are --help print this help --version version number --keep keep original file, with ".orig" appended to name --padding=i add an "i" point border around box (default is 3) 2001-Sep-07 4:59pm furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2001-Sep-07 4:59pm | |
|
|
How can I convert a TeX or LaTeX file to a text (ascii) file? |
| There is a program called detex that can be used to strip away TeX and
LaTeX commands, but it is not a great solution (it is designed to be a
pre-processor for a spelling checker).
Maybe the best solution is to generate a postscript file and then use ps2ascii to convert from postscript to ascii. From the man page: ps2ascii uses gs(1) to extract ASCII text from PostScript(tm) or
Adobe Portable Document Format (PDF) files. If no files are specified
on the command line, gs reads from standard input; but PDF input
must come from an explicitly-named file, not standard input.
If no output file is specified, the ASCII text is written to
standard output.
The short script ps2ascii should be included with your gs distribution
(on linux systems you should find it in /usr/bin, ready to go).2000-Apr-24 11:28am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2000-Apr-24 11:28am | |
|
|
Where do I get RevTeX? |
| The latest version of REVTeX is REVTeX 4; you should really switch to this one is you've been using REVTeX 3.
The homepage for REVTeX 4 is http://publish.aps.org/revtex4/, which includes documentation and the files you'll need (the latter are available as http://publish.aps.org/revtex4/revtex4.tar.gz or http://publish.aps.org/revtex4/revtex4.zip or on CTAN at http://www.ctan.org).
Basically, you just need to unzip the distribution file and put all of the LaTeX files somewhere pointed to by your TEXINPUTS environment variable (e.g., /usr/local/lib/tex/inputs is frequently used). | |
| [Append to This Answer] | |
| 2001-Sep-24 11:07am | |
|
|
How do I reduce the size of postscript figure files? |
| The following answer is taken vertabim from the FAQ at the Front for the Mathematics ArXiv http://front.math.ucdavis.edu/ifaq#3.3; check there for updates.
------------------------ begin answer ---------------------------------3.3 My Postscript figure files are bloated.
You can usually reduce or eliminate Postscript bloat if you understand your Postscript. Computers cannot understand Postscript well enough to do it automatically, because Postscript, like TeX, is a full-fledged programming language. However, two Unix utilities can often fix the problem: * convert is a bitmap-based image conversion program which is part of the
ImageMagick graphics package. It interconverts nearly 100 different image
formats, including several kinds of Postscript.
* eps2eps, which is part of the ghostscript package, converts fancy Postscript
to simple Postscript. The output is frequently much shorter than the input,
even though it is functionally identical. However, it does not help much
with bitmaps.
Here are three possible reasons that your Postscript might be bloated, together with suggested remedies.* The file is a huge bitmap. This is usually because the resolution is substantially higher than necessary, because it is a black-and-white diagram saved as a full-color photograph, or because it is encoded inefficiently (using as many as 12 bytes per pixel). If you include the figure in your TeX document without rescaling it, then you should try: 2001-Oct-09 1:57pm furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2001-Oct-09 1:57pm | |
|
|
How do I find out the LaTeX page layout parameters? |
| The layout of a page in LaTeX is dtermined by various settings such as \topmargin, \textwidth, \footskip, and so on. An easy way to find out the current settings in your document is with the \layout command from the layout package.
To use it, put \usepackage{layout}
somewhere before \begin{document} and then use the command:
\layoutsomewhere in a sample document. It will generate a diagram with the settings marked. You can change the values using \setlength, e.g., \setlength{\textwidth}{13cm}
2003-Mar-27 9:45am furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2003-Mar-27 9:45am | |
|
|
Utilities |
| Useful utilities to do miscellaneous things.
| |
| Major Topics:
General Questions: | |
| [New Answer in "Utilities"] | |
| 2006-Mar-03 1:37pm | |
|
|
How do I remove <cr>'s or ^M's from a file? |
| After transferring files between different operating systems, such as DOS
or MacOS to unix or vms, one often finds cr's or ^M's at the end of every
line (when viewed in an editor). These arise because of differences between
how lines are ended in files (carriage returns and linefeeds).
A simple program to remove these extraneous characters is cr_strip.pl, which is a Perl script written by Dick Furnstahl. It is available here as http://www.physics.ohio-state.edu/~ntg/scripts/cr_strip.pl. If you use it on another system, you may need to edit the first line to specify the correct path to Perl.
Another way to remove them is to edit the file and do a substitution of these
"characters" with a null string (blanks, essentially). This can be tricky
if you don't know how to represent this character. In some editors it is
\r. | |
In emacs, you can use query-replace, if you quote the ^M with ^Q: M-X query-replace ^Q^M carriage-return carriage-return! (^Q means hold down the CONTROL key and strike the q key)2003-Jan-21 3:25pm bcd@pacific.mps.ohio-state.edu | |
On Redhat Linux systems, dos2unix and unix2dos utilities are standard.2003-Feb-18 6:37pm furnstahl.1@osu.edu | |
| [Append to This Answer] | |
| 2003-Feb-18 6:37pm | |
|
|
What can I do with Microsoft Office documents on Linux? |
| For Word files, you can quickly display the text as plain ASCII text with the
antiword utility, see `man antiword'. It can also produce PostScript.
To edit and otherwise manipulate MS Office files in more detail, including also Excel and PowerPoint files, you can use OpenOffice, which is installed on the Linux hosts. To initialize it for your own use, run
and then, from the same directory, you can run
swriter (Word) scalc (Excel) simpress (PowerPoint) These programs are usually but not always successful at reading MS files. Another alternative is Crossover Office, available from codeweavers.com. This product runs the actual Microsoft programs under wine under Linux. It is a licensed commercial product. The price is reasonable but you must also purchase a license for the Microsoft software you are running. Please contact the PCF staff if you think you are interested in this, and we can help you.
| |
| [Append to This Answer] | |
| 2004-Aug-19 10:08am | |
|
|
File Permissions on Unix |
| The Unix command chmod is used to set file permissions. You can learn more about it by typing
man chmod You can see file permissions with the -l option to ls. 'ls -l' lists the permissions symbolically as I'm about to describe. The chmod command recognizes two methods of specifying a permission, symbolic and numeric. FIRST THE SYMBOLIC METHOD: There are 3 fields in a Unix file permission. From left to right they apply to user (the owner of the file), group (members of the group which owns the file) and other (everyone else). Symbolically, these are represented by the letters u, g and o respectively. Also, the letter a may be used to refer to all 3 fields at once. In each field there are 3 possible permissions which may be on or off: read, write and execute. Symbolically, these are represented by the letters r, w and x respectively. There are also 3 operators which may be used: =, which sets a field explicitly, +, which adds permissions to a field, and -, which removes permissions from a field.
Some examples of using the symbolic notation: chmod o-w filename remove write permission from other chmod g+w filename allow group members to write a file chmod u=rwx filename allow owner full access chmod go-rwx filename remove all access for non-ownersNote the meaning of these permissions for directories may not be obvious at first:
read: files in the directory may be listed, such as with the ls command So, some examples for directories:
chmod go+rx directoryname allow everyone to list and access files
(but not create or delete them)
chmod g=rwx directoryname allow group members full control of dir
NEXT THE NUMERIC METHOD: Unix file permissions are stored as a string of 9 bits. This is divided into 3 fields of 3 bits, which we represent as a 3-digit hexadecimal number, with each digit in the range of 0-7. The order is the order given above; from left to right user, group and other, and within each field from left to right read, write and execute. Read, being the first bit, is 4, write is 2 and execute is one. So all permissions turned on for a field is 4+2+1=7. Read and execute only is 4+1=5. Read and write is 4+2=6. Here are some common examples:
chmod 750 executable-file let my group and me run it, nobody else chmod 644 index.html web files MUST be world readable! chmod 755 directoryname let everyone see the files in directory chmod 600 file this file is private, nobody but me NEVER DO THESE THINGS: You can use chmod to remove access from the owner. If you do that, you cannot fix it yourself because you no longer have access! So don't do anything like these:
chmod u-rwx file chmod 077 directory chmod 77 directory (same as above!) 2006-Mar-03 2:31pm bcd@pacific.mps.ohio-state.edu | |
| [Append to This Answer] | |
| 2006-Mar-03 2:31pm | |
|
|
How do I get help on university computing questions? |
| There is searchable help (http://8help.ohio-state.edu/)
at the Help Desk Technology Support Center.
The Office of Information Technology (UIT) web pages (http://www.oit.ohio-state.edu/)
have lots of useful
information about your OSU account.
For example, you can find out About
Your OSU Internet Username
(http://www.osu.edu/units/uts/publications/security_help/username.html). | |
| [Append to This Answer] | |
| 2001-Sep-08 8:40am | |
|
|
How do I get my OSU account (name.nn@osu.edu) to forward mail to my Department account? |
| To get your OSU account to forward mail, go to the
OIT E-mail Forwarding page
(http://www.oit.ohio-state.edu/tsc/mail_forwarding.html)
or the OIT Coordinator Forwarding page
(http://www.osu.edu/units/uts/tsc/coordforward.html)
and fill in the form.
See | |
| [Append to This Answer] | |
| 2002-Apr-02 7:38am | |
|
|
An email message said I should change something on my computer and forward the warning to everyone I know. What should I do? |
| This kind of email is almost always a hoax. Be particularly suspicious of messages that tell you to forward them to everyone possible, or that are vague about factual details ("recently" or "this week" instead of "on Feb. 22, 2002", for instance).
You can check on such things at a number of helpful websites: http://hoaxbusters.ciac.org/ - The Hoaxbusters Homepage http://www.snopes2.com/ - The Urban Legends Homepage http://vil.mcafee.com/hoax.asp? - McAfee's Virus Hoax Homepage http://securityresponse.symantec.com/ - Symantec's Computer Virus Alerts Homepage And of course, you can always ask the PCF staff by email to `action' or calling 2-4269.
| |
| [Append to This Answer] | |
| 2004-Aug-19 9:51am | |
|
|
Wireless access in PRB |
|
2005-Sep-07 1:04pm jdw@mps.ohio-state.edu | |
| On Windows XP:
There are a lot of special cases that I will not cover here. Let's start with the most general case: Windows XP on a laptop using "Wireless Zero Configuration", (I guess they had to call it something). I'll assume you know what things look like on the desktop when an XP laptop detects a wireless access point... You'll get a "bubble" pop-up off the system tray, and/or you can view available wireless networks by right-clicking the wireless icon in the system tray. We have a number of access points in the PRB, arranged so that we get coverage over all of the atrium, most of the office side, and about a third of the lab side of the building. The access points have the naming convention "prb-ap-physics-rm#". When you view available wireless networks, you'll probably see more than one of the access points. Choose the one that has the strongest signal; (WZC doesn't order them by signal strength). Hit the Connect button, and you'll get a prompt for a netowrk key. the network key is:
0FE32D8EBB067AEFECB8599A62 I suggest you save the key above to a text file in notepad that you save to your desktop. Then you can cut-n-paste the key from the text file into the prompt window.
After you enter the key, hit the Connect button. You ought to get a connection. Unfortunately, you're not done. Now you need to open a browser, and go to wireless.physics.ohio-state.edu. Enter your physics email username and password. *Now* you have an authenticated connection, good until the next Sunday midnight. | |
| ========================== On Linux (Fedora Core 3): (If you are reading this while connected via the wired, network, I suggest cutting and pasting it onto your laptop so you don't have to type that long WEP key a couple lines down.)
Short version: type commands like these as root: /sbin/iwconfig eth1 essid any key 0FE32D8EBB067AEFECB8599A62 /sbin/dhclient eth1You must have the package named wireless-tools installed to get iwconfig. If you do not, you can get it by running (as root): yum -y install wireless-toolseth1 may not be the correct name for your wireless interface. You can see which one is wireless by typing: iwconfigIf dhclient complains that it is already running, you can easily kill the running instance by typing: killall dhclientNote that by setting the ESSID to 'any' in the iwconfig command, you should be able to roam from one of our access points (APs) to another without having to re-run the iwconfig command.
Once you have associated with the AP, you must (and may only) connect
with a web browser to http://wireless.physics.ohio-state.edu...where you will login using the username and password which you use for departmental email. Note well that there is no "www" in that hostname. There are other tools available for various versions of Linux which may be used to manage wireless networking. My experience with FC3 was that the above command-line commands are the most reliable. | |
| [Append to This Answer] | |
| 2005-Dec-12 8:21am |
| Previous: |
|
| Next: |
|
| ||||||||||