Some help with LaTeX and Preview on this forum please

  • LaTeX
  • Thread starter Old Person
  • Start date
In summary, the user is seeking help for using LaTeX on the forum. They have found a help article but it is not working for them. They have tried using different delimiters but still cannot get the preview to work. Another user suggests refreshing the page and the original user confirms that this workaround worked for them. They also mention an old bug that can cause issues with equations.
  • #1
Old Person
31
10
Hi.

I'm trying to get some mathematics on this forum. I've found this help article: https://www.physicsforums.com/help/latexhelp/
but.... it doesn't seem to working.

In that article the delimiters for a block of LaTeX are supposed to be hash tags or dollar symbols for example ## X^2 = 3 ## or $$ X^2 = 3 $$ and supposedly I can see the final display by clicking the preview button. Sadly, I don't - I just see the thing with the hash or dollar symbols. I've also tried [tex] x^2 = 3 [/tex] since those start and end tags are used in some other forums. That didn't work either.

Any advice would be appreciated. Thank you.
 
Physics news on Phys.org
  • #2
Ummm... for some reason, although it didn't work in the preview, it looks ok when posted.
is the preview feature broken? Is there no way to check the tex before posting?
 
  • #3
You have to update (F5) the page sometimes to give the interpreter a kick.
 
  • Like
Likes Old Person
  • #4
ok. Thank you. I will try that.
 
  • Like
Likes berkeman
  • #5
Old Person said:
Ummm... for some reason, although it didn't work in the preview, it looks ok when posted.
is the preview feature broken? Is there no way to check the tex before posting?
This is an old bug. See here: https://www.physicsforums.com/threads/latex-help.1046932/post-6816969

This can seriously mess up your equations if you write numerous equations and then refresh the page. The LaTeX will be rendered as symbols, and you will be left to cry, without an option to undo.

The workaround is to first write some simple LaTeX, like some simple Greek letters, and refresh the page. This will load the MathJax resource and LaTeX will start rendering. Now you may start writing what you want, and Preview will work well.
 
  • Like
  • Informative
Likes Old Person, topsquark, berkeman and 1 other person

FAQ: Some help with LaTeX and Preview on this forum please

How do I get started with LaTeX?

To get started with LaTeX, you'll need a text editor and a LaTeX distribution. Popular text editors include TeXShop for macOS, TeXworks for Windows, and Overleaf, which is an online editor. For the LaTeX distribution, you can use TeX Live for most platforms or MiKTeX for Windows. Once installed, you can start writing your LaTeX document by creating a .tex file and compiling it to produce a PDF.

How can I include images in my LaTeX document?

To include images in your LaTeX document, you need to use the graphicx package. Add \usepackage{graphicx} to the preamble of your document. Then, use the \includegraphics{filename} command to insert the image, where "filename" is the name of your image file. Make sure your image is in the same directory as your .tex file or provide the relative path.

Why is my LaTeX document not compiling?

There can be several reasons why your LaTeX document is not compiling. Common issues include missing packages, syntax errors, or incorrect file paths. Check the log file generated during compilation for specific error messages. Ensure all required packages are included in the preamble and that your code follows proper LaTeX syntax. Correct any errors and try compiling again.

How can I preview my LaTeX document while editing?

Many LaTeX editors offer a built-in preview feature. For example, Overleaf provides real-time preview as you type. In TeXShop, you can compile your document and view the output in the preview window. TeXworks also has a built-in PDF viewer. If you prefer, you can use an external PDF viewer to open the compiled PDF file and refresh it after each compilation.

How do I create a bibliography in LaTeX?

To create a bibliography in LaTeX, you can use the BibTeX or the biblatex package. First, create a .bib file containing your references. Then, add \bibliographystyle{style} and \bibliography{filename} commands to your document, where "style" is the bibliography style you want to use (e.g., plain, unsrt) and "filename" is the name of your .bib file. Compile your document with LaTeX, then BibTeX, and then LaTeX twice more to ensure all references are correctly included.

Similar threads

Replies
8
Views
2K
Replies
4
Views
2K
Replies
5
Views
2K
Replies
9
Views
2K
Replies
12
Views
2K
Replies
5
Views
1K
Replies
36
Views
2K
Replies
8
Views
2K
Replies
11
Views
1K
Back
Top