Text FormattingCan I install a pre-update version of Latex?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
sobrio35
Posts: 3
Joined: Sun May 25, 2014 7:53 pm

Can I install a pre-update version of Latex?

Post by sobrio35 »

Hi there-
I am still relatively new to Tex. I accepted an update earlier this year which did away with the amsmath package but I haven't had a problem until now. I am trying to write a piecewise function but it won't compile. I was thinking maybe if I went back to an older version I could get it to work. I've been looking and looking online but don't see this particular problem. I also don't really know how the packages work in Latex. Is there a file I download somewhere to get all the features that were previously available in the amsmath package?
Here is a simple version of my code. Maybe it is the problem.

$$
f(x) =
\begin{cases}
p_i & \text{ if k} \equiv 0 \text{ (mod 2)} \\
p_{i+1} & \text{ if k} \equiv 1 \text{ (mod 2)}
\end{cases}
$$

Any ideas?
-Helpless One

Recommended reading 2024:

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

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Can I install a pre-update version of Latex?

Post by Johannes_B »

You can provide code using the code-button, this way it is clickable in writelatex, see below.
This way, you can find out, if a package version in your document isn't up to date, or the code is wrong.

Code: Select all

\documentclass{article}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}
\[f(x) =
\begin{cases}
p_i & \text{ if k} \equiv 0 \text{ (mod 2)} \\
p_{i+1} & \text{ if k} \equiv 1 \text{ (mod 2)}
\end{cases}\]
\end{document}
Please notice, that i used \[ math \] instead of the double dollars, since it is the recommended way of doing in LaTeX.

btw: the safest way to find the cause for errors is preparing a minimal working example.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
sobrio35
Posts: 3
Joined: Sun May 25, 2014 7:53 pm

Re: Can I install a pre-update version of Latex?

Post by sobrio35 »

The main problem was I needed a file from the amsmath package which was missing after the update, but I also made the switch from $$ to \[, though I'm not sure what the difference is.
Thanks for the speedy reply! Great forum.
:D
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Can I install a pre-update version of Latex?

Post by Johannes_B »

Using $$ <math> $$ is TeX-Syntax, if you are using LaTeX (the format, please be aware of the differences) you should use \[ <math> \]. Using TeX-syntax here can mess up some spacing.
There is something similar for inline math, where $ <math> $ is TeX, and \( <math> \) is LaTeX. But the differences for inline math are not as drastic and most people use the TeX-syntax there as well. There is more behind it, but for now, i think this will suffice. There might be an extended description of the differences over at TeX.SX, but it is currently closed for maintenance.

Feel free to ask more questions.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply