Document Classes ⇒ achemso math environment problem
achemso math environment problem
I am trying to format a paper using achemso.cls and found a fairly bizarre error. The compiled .dvi does not display numerals or the "-" sign while in the math environment, both in line using $..$ and using /equation and the like. These are the only characters I've tried that are affected - letters, +, =, and commands display fine. I can get numerals and "-" to display using \textrf, but I would rather not have to put in that command every time I need to write negative signs in an equation. Since I just learned LaTeX yesterday, I have a very fresh install of both the Ubuntu Tex Live package and the achemso files, but not the deepest understanding of how to use them. I think it's some kind of install or package issue, but LaTeX throws no errors when compiling, and inclusion of other math related packages doesn't seem to help. When I compile the same code with article.cls there are a few errors due to unrecognized commands (/acknowledgements and such) but the numerals and - signs display properly in the math environment. Has anyone else seen this problem or know how I might go about fixing it?
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Site Moderator
- Posts: 814
- Joined: Tue Jul 01, 2008 2:19 pm
Re: achemso math environment problem
Post an example here of what you are doing. As shown in the demo file for the achemso class, standard math(s) does work just fine. Also consider posting your log, so we can see what is going on.
Joseph Wright
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
achemso math environment problem
Sounds to me not like a specific problem of the achemso class. Build a minimal working example (MWE) and attach the source code, log file and final output to your next post. You can put all the files into a RAR or ZIP archive.
Best regards and welcome to the board
Thorsten¹
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: achemso math environment problem
Thanks for the interest, everyone!
Here's an example. Example1 is compiled using achemso.cls, example2 is using article.cls.
Incidentally, when I compile the demo file it has the same problem, which is why I believe this is a problem with my install - I just don't know what to do about it.
Here's an example. Example1 is compiled using achemso.cls, example2 is using article.cls.
Incidentally, when I compile the demo file it has the same problem, which is why I believe this is a problem with my install - I just don't know what to do about it.
- Attachments
-
- Latex.zip
- I included all output files and both input .tex
- (7.04 KiB) Downloaded 133 times
-
- Site Moderator
- Posts: 814
- Joined: Tue Jul 01, 2008 2:19 pm
achemso math environment problem
There is nothing wrong with the output in either of your examples, and there are also no unexpected warning in the log. I looks to me as if you expect the wrong outcome. Traditional typography uses different symbols for a hyphen and a minus sign: the later is longer and thinner. TeX knows that, so in mathematical content uses a proper minus symbol where you type a hyphen (keyboards tend not to have immediate access to the appropriate symbol). I'd also point out that your superscript 2 is the wrong size when you do
Again, TeX is resizing in:
as super- and subscripts are normally smaller than text on the line. Take a look at a published journal article and pay real attention to the appearance of the equations.
I think you are looking at what people type into a word processor and expecting TeX to do the same. It does not, and those in the know also make the same changes when using a word processor (I certainly do). The tools have different aims: TeX is a typesetting engine, and is intended for getting it right.
Code: Select all
Code, edit and compile here:
\begin{equation}a^{\textrm{2}} + b \textrm{ - 18 = 0}\end{equation}
I think you are looking at what people type into a word processor and expecting TeX to do the same. It does not, and those in the know also make the same changes when using a word processor (I certainly do). The tools have different aims: TeX is a typesetting engine, and is intended for getting it right.
Joseph Wright
Re: achemso math environment problem
It sounds as though you might not be seeing the problem I'm having - it is not the one you just described.
In the example.div I posted, when I view the first line of the file, it reads
a +b =c
There are no numerals displayed at all, regardless of size or typesetting. The only way I could get them to display was by exiting the math environment using \textrm. Could this be a problem with my install of evince, perhaps? Do you happen to know what font is used for numerals in the math environment for achemso or where I could find out? It might not be installed on my machine.
In the example.div I posted, when I view the first line of the file, it reads
a +b =c
There are no numerals displayed at all, regardless of size or typesetting. The only way I could get them to display was by exiting the math environment using \textrm. Could this be a problem with my install of evince, perhaps? Do you happen to know what font is used for numerals in the math environment for achemso or where I could find out? It might not be installed on my machine.
-
- Site Moderator
- Posts: 814
- Joined: Tue Jul 01, 2008 2:19 pm
achemso math environment problem
Okay, I think the issue is your font installation. Can you try a simple file such as
achemso uses the Times font via the mathptmx package. I wonder if your system has bad font maps, which would not show up for me as the DVI viewer on my system will find the fonts when requested. Can you try converting the DVI to PDF and posting the log files for that process?
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage{mathptmx}\begin{document}$a^2 - b = c$\end{document}
Joseph Wright
Re: achemso math environment problem
Thanks for the help - it's definitely a font issue. Your suggested file displays the same problem that achemso does. Using pdflatex produces the correct output. The log file from running pdflatex on my example.tex shows some font shape replacement for unavailable shapes, but that's as much as I can get out of it. Open Office also does not have Times available, though I don't know if that's indicative of anything. I tried reinstalling the texlive recommended fonts package and refreshing the font cache, but that didn't help. Do you happen to know how I can figure out where my LaTeX install is looking for its fonts?
- Attachments
-
- example.log
- (15.17 KiB) Downloaded 255 times