New answers tagged packages
0
Here is one possible solution using tikz
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{figure}[htbp]
\begin{tikzpicture}
\tikzstyle{tight} = [outer sep=0,inner sep=0]
\tikzstyle{myarr} = [-stealth]
\tikzstyle{myline} = [-,tight]
\node (v1) at (1,0) {$\dots$};
\node (v2) at (3.5,0) ...
0
Expanding on Will Robertson's suggestion, here's some code that uses the typearea package to calculate margins and text height / width for A5 pages, and then using twocolumn mode to simulate two A5 pages on one A4 page.
\documentclass{article}
\usepackage[twoside,a5paper,DIV=calc]{typearea}
\makeatletter
\@twocolumntrue
\@twosidefalse
\makeatother
...
0
I just want to report that pythontex works as expected with TeXLive 2012!
Edit: I just played with it for an hour. It is really, really cool peace of software!!!
0
In your given class definition is a first error I saw:
Change
\ProvidesClass{Hirwanto}[25/01/2012, v1.0]
to
\ProvidesClass{Hirwanto}[2012/01/25, v1.0]
For me is there a \RequirePackage[T1]{fontenc} missing.
Seems you have some errors in your class definition so you should first work on that.
I you want us to help you more please provide a ...
1
After reading all the helpful suggestions,the first thing I did was uninstall all the "texlive" ports. I googled "how to uninstall ports in Macports" and found two good websites.
The first one is actual guide to "Macports": http://guide.macports.org/
The second site, which really solved my questions was this one: ...
6
mathstyle does
\AtBeginDocument{\catcode`\^=12\relax \catcode`\_=12\relax}%
If you need definitions in the preamble you could just execute that earlier.
\documentclass{article}
\usepackage{amsmath}
\usepackage{mathstyle}
\catcode`\^=12\relax \catcode`\_=12\relax
\newcommand*{\testcmd}{\(M_{\texttt{k}}\)}
\begin{document}
\(M_{\texttt{k}}\) \par
...
4
This has nothing to do with keycommand; when LaTeX finds \begin{scaleboxenv} it need to see \end{scaleboxenv}, but it doesn't because it finds \end{scaled}, which triggers the error.
\documentclass{article}
\usepackage{environ}
\usepackage{keycommand}
\usepackage{graphicx}
% Turn scalebox into an environment
\NewEnviron{scaleboxenv}[1]{%
...
3
You can use a self-defined command with a better syntax than using five arguments:
\documentclass{article}
\usepackage{xparse,array}
\NewDocumentCommand{\map}{s m >{\SplitArgument{1}{\to}}m >{\SplitArgument{1}{\mapsto}}m}
{\IfBooleanTF{#1}{\onelinemap{#2}#3#4}{\twolinemap{#2}#3#4}}
\NewDocumentCommand{\onelinemap}{mmmmm}
{#1\colon #2\to#3,\quad ...
5
In the distribution documentation is separated from run time files, but it isn't essential that you do that, so if in doubt (or in a hurry) just leave all the files together in a directory in your input path.
Whether you need to run texhash afterwards depends where you put them. Some directories are marked as being hashed so if the new files are not hashed ...
6
You can use the following.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\pi^\ast \colon C^k(P,N) &\to C^k(M,N)\\[-1ex]
f &\mapsto f \circ \pi
\end{align*}
\end{document}
Remember to use \colon for naming maps; with : you will get the wrong spacing.
P.S. I don't think there is a package for typing only this ...
1
I have incorporated the patch suggested by Joseph Wright into the ucs package. The updated package should soon appear on CTAN under version number 2.2.
2
From the starfont package manual:
\documentclass{article}
\usepackage{starfont}
\newcommand{\showboth}[1]{\starfontsans #1 & \starfontserif #1}
\begin{document}
\begin{tabular}{llll|llll}
\verb|\Ceres| & \showboth{\Ceres} & Ceres &
\verb|\Vesta| & \showboth{\Vesta} & Vesta
\end{tabular}
\end{document}
Here is my screen shot:
...
0
As long as you download and unzip the package http://www.ctan.org/tex-archive/fonts/libertine to your local tree, followed by tlmgr update --all , run mktexlsr or texhash and updmap-sys enable Map libertine.map , the package must work.
As of May 2013 Texlive is frozen, so the above works like a charm.
4
The problem is the way ucs emulates LaTeX kernel features. If you read the code, you'll find:
\ifx\@ifnextchar\undefined
\def\@ifnextchar#1#2#3{%
\let\reserved@d=#1%
\def\reserved@a{#2}%
\def\reserved@b{#3}%
\futurelet\@let@token\@ifnch}\fi
which looks safe enough, but fails in the case where the immediately preceding use of \@let@token ...
1
You can obtain ulem.sty here: http://ctan.mackichan.com/macros/plain/contrib/misc/ulem.sty
If you put it into the catalogue (folder) with your files, it should be enough to compile your work.
2
If you have Linux (or some other system where to run bash and gnu-version on grep), make a script like this:
#!/bin/sh
> notneeded
> needed
fgrep '\usepackage' $1 | cut -f 2 -d '{' | cut -f 1 -d '}' |
while read a; do
egrep -v "\\usepackage(\[.+\])?\{$a\}" $1 > tmp.tex
latex -halt-on-error tmp.tex &&
echo $a >> ...
1
After manually installing package amsmath, amscls and amslatex-primer, you might have an error about etex.sty not found.
You can fix it by using "Package Manager (Admin)" from MiKTeX 2.9.
Choose Repository > Synchronize
1
I cannot solve your problem, BUT... If you need MikTeX immediately, then try using the portable version instead. If you are the only user (others at work do not need it), then you might consider placing it in a location where you can take full ownership rights (your user home directory?), if that is the problem.
As far as I can tell, the portable version ...
3
The file amsthm.sty is part of MiKTeX's amscls package. Using the MiKTeX Package Manager, you should install amscls. You will probably want to install the amsmath package as well, for any mathematical typesetting.
In general, you can find out which MiKTeX package any file is in, by typing the full file name (such as in this case amsthm.sty) into the box ...
6
This answer is a complement to Charles Stewart's excellent answer. It shows a (dirty and annoying) workaround to the problem you will face if you need some cross-references between the main text and the appendix.
It uses pdfpages, but instead of compiling the main body and the appendix separately, each from its own master file, you compile them both from ...
14
Tex/Latex have what is called monolithic state: you can't cleanly isolate the configuration done by one package from another, which is one of the reasons why incompatibilities are possible. This means there is no way to identify how to undo what changes the \usepackage command has caused. Think of installing software on your machine: if the software makes ...
1
Here's my two cent's worth: (Quite obviously) it was already mentioned that loading thousands of packages can become unmanageable and packages might clash, it also depends on what engine you use (see for instance fontspec - works only for Xe(La)TeX and Lua(La)TeX). Plus you often want to select options when you load a package (of course, a mechanism can be ...
1
As long as this list is, minted is missing. For code syntax highlighting it works really well and includes the long list of languages of pygments. The pieces of code end up looking like this:
\begin{minted}{language}
code
\end{minted}
In Beamer it requires frames to be marked as [fragile], and it takes some skill to set it up on Windows. But the results ...
11
How do packages work?
Packages are an extension mechanism that is standardised in Latex. Latex is itself made out of Tex macros, as are packages, and Latex defines commands and interface structure that allows the packages' Tex code to be executed. There is also a substantial social infrastructure that makes the package mechanism function, through the CTAN ...
27
I would say that it's good that LaTeX doesn't preload a large set of packages. This, as explained by David Carlisle, is due to historic reasons based on the small computing power of 1990's machines, but has very useful consequences.
Let me present an example. Along with LaTeX2e, some packages were released as integral part of any LaTeX distribution, among ...
14
Here are some technicalities:
Depending on your TeX distribution, the packages may or may not already be in your computer. MikTeX comes in "everything included" and "download-on-the-fly" flavors, TeX Live AFAIK does only do "download-on-demand".
If you \usepackage{whatever}, it means that a whatever.sty file is present/will be downloaded on your computer ...
33
Packages are simply tex files with commands as you may define in your own document. Many packages are essentially options where it doesn't make sense to load both font packages: or packages for footnote styles and other layout choices etc.
If LaTeX was being designed now, it would probably have more code in the preloaded format, but in 1993 when LaTeX2e ...
24
One of the beauty of (La)TeX is that it is fully programmable. As a consequence, many people create their own set of commands and, sometimes, release them as packages when they believe they could be useful to others.
I do agree to some extend that some (basic) functionalities could be included in the LaTeX "base", but don't overlook the difficulty of doing ...
0
The other answers provided to this question all suggest to put your .sty files in the folder /texmf/ in your user profile folder (although there doesn't seem to be any agreement on what exactly you need to do after that).
This will, however, not work if you (like me) are using a portable LaTeX program, because then there won't be any such /texmf/ folder on ...
8
While I’m no expert in either XeLaTeX or LuaLaTeX, I’ve used both a bit, so I’ll try to write up some things that I’ve noticed in the “front-end” superficial user level.
fontspec
... is the standard way of using fonts with both engines. I haven’t noticed remarkable differences in the outcome or font selection, but according to the comments to this ...
3
In addition to any package archive you store in any directory, at least these two other files need to be present:
miktex-zzdb1-2.9.tar.lzma
miktex-zzdb2-2.9.tar.lzma
These two contain the complete package list. Once those archives are present, the directory/folder can be specified as local package repository
2
In 2009 I made an overview on "standard" classes (article and book-like, no fancy stuff like CS).
You find it at http://tex.lickert.net/dokumente/classoverview/index_en.html
It seems the english full-version has a bug, but the short versions and the German version are still visible.
If you think, it is from interest I may look for an update.
A ...
2
(This answer shall be Windows-7-and-MiKTeX-centric, and for on-the-fly installing. I work under the assumed belief/model that packages are in one of 3 states, not on the computer, on the computer and not installed, and installed. )
Here are steps that contributed to a solution to my problem:
Check that mirror site that I was having problem with is in ...
3
Third version in reaction to comment (actually off-topic for TeX.SX in my opinion):
For selective connection settings you can install a local proxy server. I never needed one, so I cannot say anything about these, but well-known, renowned examples are Squid and Proxomitron (if you are by any chance German: Der Proxomitron - Deutsche Distribution).
Second ...
4
Yes, it is default behaviour of MiKTeX to install missing packages “on-the-fly”, but this can be changed in the Options dialogue. All in this way installed packages go into %APPDATA%\MiKTeX\<version>\ (<version> is 2.9 at time of writing), the MiKTeX variable is UserInstall. Since Windows Vista %APPDATA% resolves to ...
4
https://lists.dante.de/pipermail/ctan-ann/2013-April/date.html lists all updates and new packages for April on CTAN. If there is no license problem then all new packages will also be on TeXLive 2013
9
Let's say you had a more specific question, like: "what new LaTeX packages are there in TeX Live 2013?"
After TL2013 comes out and you install it side by side to TL2012, assuming you've not changed the default install directory, you could do something like this (UNIX systems only):
ls /usr/local/texlive/2012/texmf-dist/tex/latex/ > 2012list & ls ...
3
The TeX Live user guide contains a section on the highlights that changed from one version to the next.
However it does not show which packages have been updated from the last version.
3
I am a pastor who currently creates an 8 page Booklet style bulletin [2 pages two columns landscape front and back] in LaTeX for every Sunday. It took a little longer to set it up, but now it is a breeze to use.
I do not pretend to be an expert in LaTeX. However, the following code will get the job done. I would not go back to my former program for doing ...
0
Download the MTpro2 Lite package (http://pctex.com/mtpro2.html#MTPro2_Lite). You will get a file mtp2lite.zip.tpm. Despite the ending you can unzip it to some folder e.g. with 7zip. You will get beside other a folder texmf. Open miktex settings and add this texmf folder as a new root. Then either add to your document \pdfmapfile{=mtpro2.map} or add the map ...
1
You can also use the verbatimbox package. In this case, you put the verbatim material into a verbbox before invoking figure, and then recall it with \theverbbox inside the figure.
\documentclass[11pt, double space]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{color}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[english]{babel}
...
4
You must use \cprotect before \caption.
\documentclass[11pt, double space]{article}
\usepackage{graphicx}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{cprotect}
\begin{document}
\begin{figure}[!ht]
\cprotect\caption{Sample 1 \verb+\tau(A) = e^{\chi_0A/(KD_p(K+A))}+ per hour.}
\label{fig:singlecell_chemo}
\end{figure}
\end{document}
BTW: Don't ...
3
\cprotect needs to be specified before \caption:
\cprotect\caption{Sample 1 \verb|\tau(A) = e^{\chi_0A/(KD_p(K+A))}| per hour.}
Then \cprotect puts the argument of \caption inside a file and uses the
file loading command as safer argument for \caption.
Also I have used \verb for use of verbatim inside a text line.
0
I personally write Latex in french in OSX and use utf-8encoding like so
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
Everything the works well. To make sure you set your editor to encode using utf-8. This is how i do using vim.
set fileencoding=utf-8
set encoding=utf-8
1
using xy-pic package available at ctan for automata diagrams.
\documentclass[12pt]{article}
\usepackage[all]{xy}
\begin{document}
\xymatrix@ur@!R=2pc{%
*+<1pc>[o][F-]{q_0} \ar@(l,l)[]^<<<<{start} \ar@/^/[r]^0 \ar@/_/[d]_1
& *+<1pc>[o][F-]{q_1} \ar@(ul,ur)[]^{0} \ar@/^/[d]^1 \\
*+<1pc>[o][F-]{q_2} \ar@(dr,dl)[]^{1} ...
9
While in MiKTeX an installation process is automatically triggered if you have, say, \usepackage{beamer} in a document preamble without the corresponding package installed, there is no such feature on TeX Live.
The last statement is not true actually, as pointed out by wasteofspace in the comments there is the texliveonfly package that implements the on ...
6
The main problem with the option approach is that LaTeX removes the spaces inside the option.
\usepackage[$Id: somefile.tex 259 2013-04-20 13:22:00Z ralfix $]{mysvn}
The package will see:
$Id:somefile.tex2592013-04-2013:22:00Zralfix$
That will make the parsing much more cumbersome. Also curly braces will not help:
\usepackage[{$Id: somefile.tex 259 ...
6
The options passed to the package foo.sty are saved in the macro \opt@foo.sty so you can simply do
\newcommand\alloptionslist[1]{\@nameuse{opt@#1.sty}}
The output is just the contents of the optional argument to \usepackage, without any interpretation. But it's easy to manage a comma separated list.
2
The correct path for local font sources on a TeX Live distribution either
/usr/local/texlive/texmf-local/fonts/source/<package>
for a "all users" installation or, for a "personal" installation
~/texmf/fonts/source/<package>
or
~/Library/texmf/fonts/source/<package>
(for MacTeX installed TeX Live on Mac OS X).
In the first case a ...
Top 50 recent answers are included




