LaTeX How to post this Latex code on forum?

  • Thread starter Thread starter darkestar
  • Start date Start date
  • Tags Tags
    Code Forum Latex
AI Thread Summary
The discussion revolves around a user seeking assistance with posting their first LaTeX document on a forum. The document includes a mathematical proof demonstrating that an odd function, which is strictly increasing on the interval [0, ∞), is strictly increasing on the entire real line. The user successfully compiles the document using TeXWorks but struggles with formatting it for forum submission. Key points include the need to use specific tags, such as [tex] for math mode, and the clarification that certain LaTeX commands and environments (like \begin{document} and \begin{proof}) are unnecessary for forum posts. Suggestions provided include separating text from math content using the appropriate tags and considering posting a PDF link instead.
darkestar
Messages
12
Reaction score
0
Hello!

I just finished typing up my first Latex document for a proof I worked on. Now, I'm having trouble posting it on these forums. Here is the source code...

\begin{document}
$f : \mathbb{R} \Rightarrow \mathbb{R}$ is odd $\;\Longleftrightarrow \;f(-x) = -f(x) \;\forall x$.
Show that if $f : \mathbb{R} \Rightarrow \mathbb{R}$ is odd and with a retriction to $[0, \infty)$ is strictly increasing, then $f : \mathbb{R} \Rightarrow \mathbb{R}$ is stricly increasing.
\begin{proof}
Suppose $f : \mathbb{R} \Rightarrow \mathbb{R}$ is odd and strictly increasing on $[0, \infty)$. Consider $x_n, x_{n+1} \in [0, \infty)$, where $n \in \mathbb{N}$ and $x_{n+1} > x_n$. Since $f$ is strictly increasing in $[0, \infty)$, then $f(x_{n+1}) > f(x_n)$. Additionally, since $f$ is odd, $f(-x_n) = -f(x_n)$ and $f(-x_{n+1}) = -f(x_{n+1})$. Thus,
\begin{align*}
\\f(x_{n+1}) > f(x_n)
\\\Rightarrow -f(x_n) > -f(x_{n+1})
\\\Rightarrow f(-x_n) > f(-x_{n+1})
\\\Rightarrow -x_n > -x_{n+1}
\end{align*}
\\Therefore, $f$ is strictly increasing on $(-\infty, 0) \cup [0, \infty)$. Hence, $f : \mathbb{R} \Rightarrow \mathbb{R}$ is strictly increasing.
\end{proof}
\end{document}


It compiles fine using TeXWorks, although I'm not sure how to modify it so I can post it here. Thanks for the help!
 
Physics news on Phys.org
This forum uses [tex ] and [/tex ] without the space to enclose latex code.
 
Thanks, although I already knew that. I was hoping for a different explanation because I tried to simply put those tags in but it's not working.
 
You need to put tex tags wherever you have $ signs. All the spacing using slashes is irrelevant for the forum, as are things like \begin{document} or \begin{proof}
 
The [ tex ] tags provides a subset of LaTeX. The underlying engine places LaTeX in math mode. Your document is in LR mode, not math mode.

A couple of alternatives:
1. Write your text outside of the [ tex ] tags, using those tags for math mode stuff. You can use the [ itex ] tags for inline math mode (e.g., $ f(x) $), but that doesn't work quite as nicely as it does in LaTeX.

2. Generate a pdf and post it as a link.
 
Last edited:
Back
Top