I am trying to assemble my thesis with the standalone package. I am attempting to input my old LaTeX document, lna_achemso.tex, into thesis.tex.
The standalone package works well when both documents have the same class.
However, my thesis, which is
\documentclass[12pt]{report}
while the lna_achemso.tex is
\documentclass[
%journal=ancac3, % for ACS Nano
%journal=acbcct, % for ACS Chem. Biol.
journal=jpcbfk, % for undefined journal
manuscript=article]{achemso}
which gives the error
! LaTeX Error: Environment acknowledgement undefined.
I copied the files achemso.sty, achemso.cls, which contain the definitions for acknowledgement variable and wrote
\usepackage{achemso}
in the thesis' preamble but this does nothing.
How can I get the environment loaded?
This sounds so trivial but the solution eludes me.
-Dave
Best Answer
EDIT: The only way to load the environment is to replace
report
withachemso
.Command
\usepackage
includes only the packageachemso.sty
, not the classachemso.cls
.Unfortunatly there are some commands and environments defined in
achemso.cls
but not inachemso.sty
nor inreport.cls
. Those commands and environments won't work in a document that does not include classachemso.cls
like yours:In order to work in class
report
you should "translate" your document: you should replace commands and environments defined only inachemso.cls
with their counterparts defined inreport.cls
, or directlyLaTeX
commands. Most of them can be replaced, for exampleachemso
environmentacknowledgement
can be replaced by a\thanks{
my acknowledgement}
nested in a\title{}
, or you can set up your ownacknowledgement
environment. Here is a MWE with an environment definition:In order to "translate" the document you have basically to repeat this procedure for every command and environment uknown to
report.cls
. Nowpdflatex
becomes istantly your best friend: it is sufficient to remove all the errors produced in compiling process. That's debugging.