LaTex: Where to store package, sty, etc files?

  • LaTeX
  • Thread starter teroenza
  • Start date
  • Tags
    files Latex
In summary, the conversation discusses the confusion of a novice user regarding where to locate specific files such as packages, .sty files, and .cl files when using the LaTeX software. The recommended solution is to use the "texmf" folder in the installation directory or in the user's home directory. Another option is to set environment variables or register a user managed TEX directory. These methods will allow the user to easily access the necessary files for any LaTeX document without having to manually find and add them each time.
  • #1
teroenza
195
5
Hello. I am using windows 7, MikTex, and Texmaker to create LaTeX files. I am a novice user, and am confused about where to locate specific files such as packages, .sty files, and .cl files. I use MikTex's package manager to download most, and it puts them somewhere where they are then accessible for any document I create. If it can't find what need (as indicated by an error in Texmaker), then I manually find the file online and stick it in the folder with the .txt file. Is there a place I can put these files so that I don't have to have a copy with every .txt document I have?

Thanks
 
Physics news on Phys.org
  • #2
of course there is place to put those files in...to be sure, there are two places: 1) The same place where all the other *.sty files, i.e., the installation directory and 2) somewhere in your home directory...

...I am no expert, either, and have used latex very little; but sometime back and run into this same problem on the Linux side and because I don't have admin rights (this is the office computer) I went the 'home directory' route...I think the directory needed to be named "texmf", in my case, and follow a very specific structure.

if nobody comes along with the exact answer, google it, the answer is somewhere out there...maybe within the documentation.
 
  • #3
Thank you. I have seen the name "texmf" all over the place, for example: here. But I can't seem to find it, and started to think it was Linux-spesific.
 
  • #4
I see.

Maybe texmf is not used by the software itself, when installed or compiled and it is reserved for when installing *.sty OUTSIDE of the installation directory...and since you are yet to install something in this manner, you don't have a texmf folder, yet.
 
  • #5
There are several ways to do this. See http://docs.miktex.org/manual/localadditions.html (you should have this somewhiere in your own MikTeX help system).

The simplest option to use is probably the "set environment variables" method.

If you want to do this on a large scale (i.e. you are using many packages, fonts, etc that are not in the MikTeX standard distribution), take the time out to understand the "register a user managed TEX directory" method.
 

1. Where should I store my LaTex package files?

It is generally recommended to store your LaTex package files in the same directory as your main LaTex file. This helps to keep all of your files organized and easily accessible.

2. Can I store my LaTex sty files in a different location?

Yes, you can store your LaTex sty files in a different location, such as a dedicated "packages" folder. However, you will need to specify the file path in your main LaTex file using the \usepackage{package_name} command.

3. What is the purpose of storing LaTex package files?

Storing LaTex package files allows you to easily access and use additional features and formatting options in your LaTex document. These packages contain predefined commands and settings that can be used to customize your document.

4. Can I create my own LaTex package files?

Yes, you can create your own LaTex package files by writing custom commands and settings in a .sty file. This can be useful for creating a specific formatting style or for sharing frequently used commands with others.

5. Are there any best practices for organizing LaTex package files?

It is recommended to create a separate folder for your custom LaTex packages and to name them appropriately for easy identification. Additionally, it is important to keep your packages up to date and remove any unused packages to avoid conflicts or errors in your document.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
11K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
4K
  • Feedback and Announcements
Replies
3
Views
309
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
998
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
5K
  • Programming and Computer Science
Replies
9
Views
865
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Back
Top