mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Information & Answers (https://www.mersenneforum.org/forumdisplay.php?f=38)
-   -   LaTeX Typesetting Question (https://www.mersenneforum.org/showthread.php?t=11884)

flouran 2009-05-16 15:33

LaTeX Typesetting Question
 
In LaTeX, to say that a is congruent to 1 (mod b), I use the \equiv command as such:
[tex]a \equiv 1 \pmod b[/tex].

However, what is the LaTeX command for a is *not* congruent to 1 (mod b)? I thought it would be \nequiv, but it isn't.

Also, to show that a | b in LaTeX, I use the pipe symbol. What is the LaTeX command for a is *not* a divisor of b?

Mini-Geek 2009-05-16 16:02

[tex]\not\equiv \not|[/tex]
[code]\not\equiv \not|[/code]
Or:
[tex]\cancel\equiv \cancel|[/tex]
[code]\cancel\equiv \cancel|[/code]
[url]http://www.mersenneforum.org/mimetex.htm#not[/url]
I think the difference is that \cancel can be used on any arbitrary thing, while \not is only for single characters like \equiv, |, or 3. Not entirely sure about that, but it seems right from a quick test.

flouran 2009-05-16 16:18

[CODE]
\not\equiv
[/CODE]
worked for me, but
[CODE]
\not|
[/CODE]
fails. I think that there is a command for the divisor (let's call it \cmd), and thus the code would be \not\cmd. I'll look into it more. I'll post back in a few minutes (or not) when I find it.

Zeta-Flux 2009-05-16 16:20

I use \nmid, for not divides.

flouran 2009-05-16 16:24

[quote=Zeta-Flux;173811]I use \nmid, for not divides.[/quote]
That works!

flouran 2009-05-16 21:19

In LaTeX, equations are autonumbered as (1), (2), (3),..., and so on. How do I make it such that every equation is labeled as such:
(a.b.c)
a = section number
b = subsection number
c = equation number within subsection

For instance, the 5th equation in the 2nd subsection of the 3rd section should be labeled as (3.2.5). I "googled" it, and it says I have to put
[CODE]\numberwithin{equation}{subsection}[/CODE] in the preamble, but that doesn't quite do the trick.

flouran 2009-05-16 21:28

Also, I have an equation that is too long. For the sake of simplicity, let's say I have the equation,
x+y=5,
but that is too long.
Basically, how would I do it in LaTeX such that I have,
x+
y=5

In other words, how do I split an equation? Some of the guides I tried don't work....

CRGreathouse 2009-05-16 22:02

[QUOTE=flouran;173837]Also, I have an equation that is too long. For the sake of simplicity, let's say I have the equation,
x+y=5,
but that is too long.
Basically, how would I do it in LaTeX such that I have,
x+
y=5

In other words, how do I split an equation? Some of the guides I tried don't work....[/QUOTE]

I use

\[
\begin{split}
x&=-b/2\pm\\
&\sqrt{(b/2)^2-c}
\end{split}
\]

Zeta-Flux 2009-05-16 22:23

You can also use \begin{eqnarray}\end{eqnarray}, or \begin{multline}\end{multline}, but I also like split.

flouran 2009-05-16 22:43

[quote=Zeta-Flux;173845]You can also use \begin{eqnarray}\end{eqnarray}, or \begin{multline}\end{multline}, but I also like split.[/quote]
So using the multiline command, to produce the output,
x+
y=5,

I would run:
[CODE]
\begin{multiline}
x+ \\
y=5
\end{multiline}
[/CODE]
??

Zeta-Flux 2009-05-16 23:31

Yep, except it is multline, not multiline. (That, and I like split better, but with multline you get equation numbers for each line.) I'll attach some of the LaTeX help files I have on my computer later tonight.


All times are UTC. The time now is 22:50.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.