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.

flouran 2009-07-06 16:39

Another question. I was looking at [URL="http://math.dartmouth.edu/~carlp/PDF/paper32.pdf"]one of Pomerance's papers[/URL], and I was wondering how Pomerance's notation for the pseudoprime counting function could be typeset in LaTeX?

Zeta-Flux 2009-07-06 17:51

flouran,

Sorry for forgetting about those help files. I tried attaching them, but they exceed the file size limit. Sorry.

As for your question: I've never seen that symbol before. I would probably use \mathcal{P}, which isn't nearly as fancy, but works. Or maybe \mathfrak{P}.

frmky 2009-07-06 18:12

[QUOTE=flouran;179939]Another question. I was looking at [URL="http://math.dartmouth.edu/~carlp/PDF/paper32.pdf"]one of Pomerance's papers[/URL], and I was wondering how Pomerance's notation for the pseudoprime counting function could be typeset in LaTeX?[/QUOTE]

Reasonable approximations are

\usepackage{mathrsfs}
$\mathscr{P}_b(x)$

or

\usepackage{eucal}
$\mathcal{P}_b(x)$

CRGreathouse 2009-07-06 18:57

1 Attachment(s)
[QUOTE=frmky;179946]\usepackage{mathrsfs}
$\mathscr{P}_b(x)$[/QUOTE]

Yeah, that's a pretty good approximation.

flouran 2009-08-01 00:35

Equation Numbering
 
All of my equations for all of my LaTeX documents are automatically labeled (for instance, the first equation is (1), the second equation is (2), etc.). But, I was wondering how I could prevent only one equation from not being labeled....

CRGreathouse 2009-08-01 00:40

[QUOTE=flouran;183608]All of my equations for all of my LaTeX documents are automatically labeled (for instance, the first equation is (1), the second equation is (2), etc.). But, I was wondering how I could prevent only one equation from not being labeled....[/QUOTE]

You can't prevent one from not being labeled because none of them are not labeled, by your description. But you can use \[ ... \] instead of \begin{equation} ... \end{equation} to stop one from being labeled.

flouran 2009-08-01 00:44

[quote=CRGreathouse;183609]You can't prevent one from not being labeled because none of them are not labeled, by your description. But you can use \[ ... \] instead of \begin{equation} ... \end{equation} to stop one from being labeled.[/quote]
Yep, that works! Thanks!

Zeta-Flux 2009-08-01 14:14

You can also use \begin{equation*} \end{equation*}. This works with split, eqnarray, etc... as well.

flouran 2009-08-01 15:01

Theorem, Conjecture, and Lemma numbering
 
Hi,
I was wondering, how do I keep the numbering for theorems, conjectures, and lemmas separate? Typically, when I have a conjecture (say it is the first conjecture, so it will be denoted by Conjecture 1), I use:
\begin{conj}
\end{conj}
Then, say I state a lemma right afterwards, using \begin{lemma} \end{lemma}, LaTeX denotes it as Lemma 2 rather than Lemma 1. And if I have a theorem right afterwards, using \begin{theorem} \end{theorem}, LaTeX denotes it as Theorem 3 rather than Theorem 1. So, how do I circumvent this and have the numbering of theorems, lemmas, and conjectures distinct within their own group?

Zeta-Flux 2009-08-02 03:12

You do that in the header, by defining different theorem types.

That said, I have to say that I have never liked it when papers do that. It is so much easier to find a result if everything is numbered sequentially. What is even worse is when Lemmas and Theorems have their own numbers, AND they depend on the section (or subsection). It gets convoluted.

Just have them go in increasing order.

There are certain exceptions to this rule:
1. If you have a list of questions/ conjectures at the end.
2. If you have a list of axioms in the middle.

I think the following is what you put in the header:

\newtheorem{thm}{Theorem}
\newtheorem{lemma}[thm]{Lemma}
\newtheorem{axiom}{Axiom}

This would have Theorem and Lemma numbered together, separate from Axiom.

flouran 2009-08-19 18:32

Remove Page Numbers?
 
How do I make it such that my output pdf does not have any page numbers?

Zeta-Flux 2009-08-19 19:58

I just tried figuring that out a few minutes ago!

I used \pagestyle{empty}, and that got rid of all the page numbers, except the first page (but that might because of the documentclass I'm using).

flouran 2009-08-19 20:01

[QUOTE=Zeta-Flux;186588]I just tried figuring that out a few minutes ago!

I used \pagestyle{empty}, and that got rid of all the page numbers, except the first page (but that might because of the documentclass I'm using).[/QUOTE]

What documentclass are you using?

Zeta-Flux 2009-08-19 20:04

amsart

flouran 2009-08-19 20:07

[QUOTE=Zeta-Flux;186591]amsart[/QUOTE]

What's wrong with article?:
[CODE]
\documentclass[12pt,reqno]{article}
[/CODE]
And all of my page numbers were removed....

Zeta-Flux 2009-08-19 20:55

I actually like the fact it kept one page number. But it was just strange that it didn't remove them all. I like amsart a lot for some things (like small references) and I like article for other things.

flouran 2009-09-19 00:44

In this [URL="http://projecteuclid.org/DPubS/Repository/1.0/Disseminate?view=body&id=pdf_1&handle=euclid.pja/1195511292"]paper[/URL], there is a function (which we shall call [TEX]f_k(n)[/TEX] for now since I do not know how to typeset it) that is defined as [TEX]f_k(n) = \prod_{p}\left(1-\frac{\rho(p)-1}{p-1}\right)[/TEX], and I was wondering how I could typeset the symbol for that function in LaTeX.

Zeta-Flux 2009-09-19 01:54

The following is a great reference for most symbols. [url]http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf[/url]

The one you linked to looks either like a gothic letter, or a german s, or something like that.

frmky 2009-09-19 01:58

I believe that's simply $\mathfrak{G}_k(n)$ although the [TEX]\TeX[/TEX] mode here gets it wrong, [TEX]\mathfrak{G}_k(n)[/TEX]

flouran 2009-09-19 02:08

[quote=frmky;190280]I believe that's simply $\mathfrak{G}_k(n)$[/quote]
That works. Thanks! :smile:

flouran 2009-09-29 03:46

1 Attachment(s)
On page 5 of the attached paper: [ATTACH]4171[/ATTACH]

In the equation after the sentence, "The major arcs are non overlapping. Set", there is a set theory symbol in the shape of a capital U (sorry, I don't know what it is called). I was wondering how I could typeset it in LaTeX?

I thought it was originally \cup, but this is wrong.

Thanks!

frmky 2009-09-29 04:05

[TEX]\bigcup[/TEX]

paleseptember 2009-09-29 04:11

\bigcup

Zeta-Flux 2009-09-29 06:27

To answer your (implicit) question, it is the symbol for union.

flouran 2009-10-04 23:21

How do I typeset the || symbol in n || p?

flouran 2009-10-04 23:34

In LaTeX, how does one write the symbol for "section"?

In many math papers, like in the one I attached to [URL="http://mersenneforum.org/showpost.php?p=191398&postcount=32"]this post[/URL] a symbol (I dunno the name of it) is used in place of section. Thus, to refer to Section 6, I would instead use "symbol" 6.

paleseptember 2009-10-05 00:25

To typeset the norm symbol is \|

To typeset the section symbol is \s (possibly capital S, I don't have a working LaTeX environment on this computer to check that one.)

flouran 2009-10-05 00:36

[quote=paleseptember;191882]To typeset the norm symbol is \|
[/quote]
The symbol I was referring to was not the norm symbol, but it has to do with divisibility.
[quote=paleseptember;191882]
To typeset the section symbol is \s (possibly capital S, I don't have a working LaTeX environment on this computer to check that one.)[/quote]
\S works for me, thanks! :smile:

Zeta-Flux 2009-10-05 03:00

flouran,

You are not doing your homework. These last few questions you asked are all answered in that .pdf file I linked to earlier.

In table 3 is \S.

If you search for \mid (which you already know gives one vertical line) you get to table 62, in which you find \parallel for two vertical lines.

P.S. If you get the right editor (I like WinEDT) then it has tables of the most common symbols built in.

flouran 2009-10-05 03:05

[quote=Zeta-Flux;191886]
You are not doing your homework. These last few questions you asked are all answered in that .pdf file I linked to earlier.
[/quote]
My bad :blush: I should have looked more closely at the pdf. Sorry.

Zeta-Flux 2009-10-05 03:14

Your humility is sufficient to quench my wrath. :pals:

paleseptember 2009-10-05 03:47

[quote=flouran;191883]The symbol I was referring to was not the norm symbol, but it has to do with divisibility.
[/quote]

Sorry, I looked in the paper you'd linked earlier, but couldn't find the usage.

[quote=Zeta-Flux;191886]
P.S. If you get the right editor (I like WinEDT) then it has tables of the most common symbols built in.[/quote]

WinEdt is very good, tis highly recommended from me too. However, I used TexShop on the Mac for a while, which was quite good. TexnicCenter (sp?) is a good free alternative.

flouran 2009-10-05 03:49

[quote=paleseptember;191892]Sorry, I looked in the paper you'd linked earlier, but couldn't find the usage.
[/quote]
No worries, my friend.

[quote=paleseptember;191892]
WinEdt is very good, tis highly recommended from me too. However, I used TexShop on the Mac for a while, which was quite good. TexnicCenter (sp?) is a good free alternative.[/quote]
One of my friends started using TeXShop a few weeks ago (he has just started out with LaTeX), and I often (jokingly) ridicule him for using TeXShop rather than vi. :smile:

Zeta-Flux 2009-10-06 15:54

flouran,

You are gonna love this site:

[url]http://detexify.kirelabs.org/classify.html[/url]

You draw the LaTeX symbol you want, and it finds it for you.

It isn't perfect, but hopefully it is helpful.

Cheers,
Pace

Jeff Gilchrist 2009-10-06 16:27

[QUOTE=paleseptember;191892]WinEdt is very good, tis highly recommended from me too. However, I used TexShop on the Mac for a while, which was quite good. TexnicCenter (sp?) is a good free alternative.[/QUOTE]

Another good free Windows editor is LEd:
[url]http://www.latexeditor.org/[/url]

Jeff.

flouran 2009-10-07 01:48

[QUOTE=Zeta-Flux;192023]flouran,

You are gonna love this site:

[url]http://detexify.kirelabs.org/classify.html[/url]

You draw the LaTeX symbol you want, and it finds it for you.

It isn't perfect, but hopefully it is helpful.

Cheers,
Pace[/QUOTE]
Wow! Thanks! This is awesome!

Hopefully I can return the favor sometime :smile:

flouran 2009-10-07 01:49

[QUOTE=Jeff Gilchrist;192024]Another good free Windows editor is LEd:
[url]http://www.latexeditor.org/[/url]

Jeff.[/QUOTE]

I am not a big Windows fan myself. I typically use vim as my editor under Linux.

CRGreathouse 2009-10-07 03:22

vim, of course, won't help you find the symbols, making it fairly irrelevant for this thread. :smile:

I don't suppose you have any experience with custom vim syntax highlighting files, flouran? I'm writing one at the moment.

flouran 2009-10-07 03:26

[QUOTE=CRGreathouse;192056]vim, of course, won't help you find the symbols, making it fairly irrelevant for this thread. :smile:
[/QUOTE]
I wasn't trying to say that it was, Charles :smile:
I was saying that I just like using it as an editor (and at the same time expressing my dislike for anything that runs on Windows).
[QUOTE=CRGreathouse;192056]
I don't suppose you have any experience with custom vim syntax highlighting files, flouran? I'm writing one at the moment.[/QUOTE]
Nope. May I ask why you are writing one?

flouran 2009-11-07 22:56

1. When I have an overhead bar, i.e.:

[TEX]\bar{ab}[/TEX],

my LaTeX compiler does not have the line cover both the letters. Instead it only covers the middle part of the two letters (and does not extend all the way). Does anyone else have similar problems or is it just something that I can't fix?

frmky 2009-11-07 23:50

Wow, [URL="http://www.mersenneforum.org/showthread.php?t=12680"]déjà vu[/URL]! Use \overline{}: [TEX]\overline{x^2+y^2}[/TEX]

flouran 2009-11-07 23:53

[QUOTE=frmky;195161]Wow, [URL="http://www.mersenneforum.org/showthread.php?t=12680"]déjà vu[/URL]! Use \overline{}: [TEX]\overline{x^2+y^2}[/TEX][/QUOTE]

Thanks!

flouran 2009-12-28 18:31

On pg. 591 (or page 5 of the pdf file) of this paper: [url]http://math.dartmouth.edu/~carlp/PDF/paper32.pdf[/url]
the following relation is given:
[TEX]\frac{1}{x}\Psi(x,y) ? \frac{1}{\pi(x)}\Psi'(x,y)[/TEX].

How do I typeset the symbol in place of ?.

CRGreathouse 2009-12-28 20:07

\asymp, naturally.

flouran 2009-12-28 20:20

[QUOTE=CRGreathouse;200151]\asymp, naturally.[/QUOTE]

I obviously assumed it meant "asymptotically" but I had never seen the symbol used before to mean that. Good to know, thanks! :smile:

CRGreathouse 2009-12-28 20:32

I hope to eradicate all use of that symbol in favor of the more modern swung dash U+223C.

flouran 2009-12-29 02:13

[QUOTE=CRGreathouse;200155]I hope to eradicate all use of that symbol in favor of the more modern swung dash U+223C.[/QUOTE]

For you, I shall use the swung dash instead :wink:

Happy Holidays,
The (La)TeX Maker

CRGreathouse 2009-12-29 05:08

[QUOTE=flouran;200178]For you, I shall use the swung dash instead[/QUOTE]

When my acolytes are burning the Old Books, your paper will be safe from the holy conflagration.

Zeta-Flux 2011-01-27 16:31

Does anyone know how to get BibTeX to output a dash between multiple citations? For example, I want to cite papers [1], [2], [3], and [4]. How do I get it to output [1-4]?

frmky 2011-01-27 17:41

[QUOTE=Zeta-Flux;249964]Does anyone know how to get BibTeX to output a dash between multiple citations? For example, I want to cite papers [1], [2], [3], and [4]. How do I get it to output [1-4]?[/QUOTE]

\usepackage[sort&compress]{natbib}


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

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