Document ClassesWhere do I put an input file?

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
ajnabi
Posts: 10
Joined: Mon Jan 29, 2007 1:09 am

Where do I put an input file?

Post by ajnabi »

I am trying to install the invoice package which requires, among other things, the realcalc package. I can't figure out how to install it.

Here are the installation instructions:

Code: Select all

Installation:
     Put the file realcalc.tex where your TeX looks for inputs.
     Name a copy realcalc.sty to use as a LaTeX style option,
     or create a file realcalc.sty with the lines:
          \input realcalc.tex
          \endinput
Does anyone know where I should put this realcalc.tex file?

I tried putting it in /usr/share/texmf/tex/inputs/ to no avail.

I am not sure how to make a sty file. That seems ideal. Copying realcalc.tex to realcalc.sty and isntalling that didn't work. I've tried running latex on a file with just these two lines in it:

Code: Select all

  \input realcalc.tex
  \endinput
Any help appreciated.

Thanks,
Frank

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Where do I put an input file?

Post by gmedina »

The answer depends on your particular distribution. In my texlive I do the following for a pac_name.sty file:
1) create a directory pac_name on /usr/share/texmf-texlive/tex/latex/
2) copy the file pac_name.sty into this new directory
3) in a terminal, run

Code: Select all

texconfig rehash
However, this page and the links in it can give you some additional hints.

Edit: (from CTAN page, referring to realcalc):
There are known problems with this package; an alternative is fp (a latex package, only).
1,1,2,3,5,8,13,21,34,55,89,144,233,...
ajnabi
Posts: 10
Joined: Mon Jan 29, 2007 1:09 am

Where do I put an input file?

Post by ajnabi »

Thanks gmedina,
an alternative is fp

The problem is that I'm installing realcalc because it's a dependency for this invoice package.

After hearing your point that realcalc has issues, I'm thinking a simpler solution would be to make a PHP script do all the calculations and then layout a LaTeX file which would then generate a PDF invoice. It would also be more customized to my needs.

Thanks for your help.

Frank
ajnabi
Posts: 10
Joined: Mon Jan 29, 2007 1:09 am

Where do I put an input file?

Post by ajnabi »

I don't know if this would be helpful to anyone but I made a quick sty install script (for *nix). Anyone who uses it would have to change the texdir variable to the correct path for your distribution.

Usage (assuming saved as styinstall):
styinstall package.sty

Code: Select all


#!/bin/sh
file=`echo $1 | sed -e 's#\.sty$##'`
texdir="/usr/share/texmf/tex/latex/"
sudo mkdir $texdir$file
sudo cp $1 $texdir$file/
ls $texdir$file/*
sudo texhash
exit 0

jjt3
Posts: 9
Joined: Fri Jan 26, 2007 3:04 pm

Where do I put an input file?

Post by jjt3 »

The realcalc.tex package should go into

. . . texmf-dist\tex\generic\realcalc

or

. . . texmf\tex\generic\realcalc

where the dots stand for whatever path leads to one of these folders (the first is preferable).

Then you must refresh the ls-R database (in TeXnicCenter) or similar in MikTeX; this is an important step whenever you add a new file, be it .tex, .cls or .sty, to your TeX distribution. (You need to close your TeX IDE down whilst you do this, so the new database will be loaded.)

John
ajnabi
Posts: 10
Joined: Mon Jan 29, 2007 1:09 am

Re: Where do I put an input file?

Post by ajnabi »

Thanks jjt3,

I abandoned the install because I couldn't get it to work.

When I get some time I will try this.

Thanks,
Frank
balfonsi
Posts: 93
Joined: Wed Mar 14, 2007 12:05 am

Re: Where do I put an input file?

Post by balfonsi »

Did you refresh the filename database? Otherwise tex won't find it!

B.A.
Post Reply