Text Formattingdisplaying numbers

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
felixelus
Posts: 3
Joined: Tue Oct 27, 2009 7:08 pm

displaying numbers

Post by felixelus »

Hi,
So I've looked around online and in various help manuals but this is a really basic stupid thing that I can't find anything on!
I'm currently writing a paper and Latex won't display "00". It will only have one "0" there in the PDF when I've put two in the tex file...
What am I doing wrong? I've tried surrounding them with $'s since that usually solves it but that just causes the whole sequence to go wrong (i.e. go italic and miss other symbols in that line).
Please help?

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

displaying numbers

Post by Stefan Kottwitz »

Hi,

that's not the standard behavior. Try:

Code: Select all

\documentclass[a4paper,10pt]{article}
\begin{document}
00
\end{document}
Post compilable example code that shows your problem. Or try a workaround like 0{}0 or {0}{0}.

Stefan
LaTeX.org admin
felixelus
Posts: 3
Joined: Tue Oct 27, 2009 7:08 pm

displaying numbers

Post by felixelus »

ok so I've tried that code you wrote there and that worked. I also tried those work arounds you suggested and they didn't work.
Heres the bit:

Code: Select all

 (LH: $10^\textit{h} 50 +57^\degree 00$  see \cite{lonsdale03}) 
So there's quite a lot that can go wrong there.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Re: displaying numbers

Post by Stefan Kottwitz »

Perhaps the \degree macro takes the 0 - how is it defined in your code?

Stefan
LaTeX.org admin
felixelus
Posts: 3
Joined: Tue Oct 27, 2009 7:08 pm

Re: displaying numbers

Post by felixelus »

That seems to have been the problem! I couldn't find how \degree is defined (I didn't write the whole code...just the contents) but I put a third "0" in and now it displays "00" like I wanted it to.

Thanks for your help!
Post Reply