MiKTeX and proTeXtPackage Installation

Information and discussion about MikTeX distribution for Windows and the related proTeXt: Installing, updating, configuring
Post Reply
Coral
Posts: 11
Joined: Thu Apr 18, 2013 4:32 pm

Package Installation

Post by Coral »

Dear All,

I'm trying to install the package chemmacros but I cannot. Please, could you check my steps and correct me?
  1. I inserted the line \usepackage{chemmacros} in my class file.
  2. After downloading the bundle I have been looking for the directory where the style files are, but I wasn't able to find it. I have looked for it in "Program Files/MiKTeX 2.9" and in "Program Data/MiKTeX" but not success, I haven't found any "texmf/tex/latex/". So I cannot place "/languages" and "/pictures" in there.
I need to write IUPAC names and I would like to try to write some chemical schemes, if it's possible with my knowledge. Should I define the options of the package or just by inserting \usepackage{chemmacros} in the class and placing the "/pictures" and "/languages" into the directory where the style files are can I just use the commands directly?

Thank you very much for your help.

Coral

Recommended reading 2024:

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

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

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Package Installation

Post by localghost »

Simply install the package by the MiKTeX Package Manager. There is nothing else to do. The usage of the package is described in the package manual. After installation you have direct access via command line.

Code: Select all

texdoc chemmacros
The installation of packages in general has been discussed here so many times that a decent Forum Search should yield useful results, too. See also "Similar Topics" on the bottom of this page (only when logged in).


Thorsten
Coral
Posts: 11
Joined: Thu Apr 18, 2013 4:32 pm

Re: Package Installation

Post by Coral »

Dear Thorsten,

I never had to instal any package like that, that's why I was wondering whether this chemical one was somehow special, and as I am quite new I never heard about MiKTeX Package Manager. Thank you very much for your information.

Best,

Coral
Coral
Posts: 11
Joined: Thu Apr 18, 2013 4:32 pm

Package Installation

Post by Coral »

Morning,

I have already installed the package by MiKTeX, I have refreshed the files name database (Refresh FNDB) via MiKTeX Options (Programs -> MiKTeX -> Maintenance -> Settings)? I have pressed the Update Formats button after having installed the new package, and I flipped 'Install packages on-the-fly' to 'yes'.

My class contains those packages:

Code: Select all

\usepackage{enumerate}
\usepackage[
  circletype, 
  greek, 
  iupac, 
  language=english, 
  method, 
  Nu, 
  strict, 
  synchronize
]{chemmacros} % ‘chemmacros’, ‘chemformula’ and ‘ghsystem’ are loaded
\usepackage{amssymb}
\usepackage{multirow}
\usepackage{color}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc} % Input in ISO 8859-1 (Latin1)

\usepackage{ae}               % Almost european, virtual T1-Font
\usepackage[pdftex]{graphicx}
\usepackage{sidecap}
\usepackage{wrapfig}
\usepackage{vmargin}          % Adjust margins in a simple way
\usepackage{fancyhdr}         % Define simple headings
\usepackage{subfigure}
\usepackage{url}
\usepackage[absolute,overlay]{textpos}
\usepackage{tikz}
\usepackage[english,ngerman]{babel}
\usepackage{algorithm}		  % Code-Listings
\usepackage{algorithmic}	  % Code-Listings
% see http://www.ctan.org/tex-archive/macros/latex/contrib/algorithm2e/algorithm2e.pdf
% for more sophisticated algorithm listings

\usepackage[
  raiselinks=true,
  bookmarks=true,
  bookmarksopenlevel=1,
  bookmarksopen=true,
  bookmarksnumbered=true,
  hyperindex=true,
  plainpages=false,
  pdfpagelabels=true,
  pdfborder={0 0 0.5},
  colorlinks=false,						
  linkbordercolor={0 0.61 0.50},   
  citebordercolor={0 0.61 0.50}
]{hyperref}  %{0.57 0.74 0.57}
						
\usepackage[fixlanguage]{babelbib}	% sets german style for literature entries
\selectbiblanguage{ngerman}			% for \bibliographystyle{babalpha}
%% --- End of Packages ---
I have also installed all these packages from Miktex 2.9: l3kernel and l3packages bundles, siunitx, mathtools, bm, nicefrac and environ. From the group of tikz I have:
tikz-timing
tikz-3dplot
tikz-qtree
tikz-inet
circuitikz
tikzorbital
Do I need another different or some more?

After installing the chemmacros via MiKTeX, having all the packages cited above I was suppose to have direct access via command line. But when I am trying for example \ch{H2O} an "! Undefined control sequence." error comes out.

Could you help me please? In case you need more information, just ask me. Thank you very much in advance.

Best,
Coral
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Package Installation

Post by cgnieder »

With an up to date MiKTeX or TeX Live the document

Code: Select all

\documentclass{article}
\usepackage{chemmacros}
\begin{document}
\ch{H2O}
\end{document}
Should work without the need of any manual installation of packages.
site moderator & package author
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Package Installation

Post by cgnieder »

Coral wrote:when I am trying for example \ch{H2O} an "! Undefined control sequence." error comes out.
It should also say which control sequence is undefined. Could you post a) a complete Infominimal working example that produces the error and b) post the complete error message?

Regards
site moderator & package author
Coral
Posts: 11
Joined: Thu Apr 18, 2013 4:32 pm

Package Installation

Post by Coral »

Thank for your reply.

I've removed expl3 and xpackages and I've update the packages from MiKTeX 2.9 and now using.

Consider this minimal example.

Code: Select all

\documentclass{article}
\usepackage{chemmacros}

\begin{document}
  \ch{H2O}
\end{document}
It gives me this error.

Code: Select all

! LaTeX Error: File `amstext.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.51 \GetIdInfo
$Id: xfrac.dtx 4299 2012-11-09 18:48:51Z joseph $
*** (cannot \read from terminal in nonstop modes)
And when compiling something, TeXmaker reports something I´ve never seen before.
Process started

pdflatex

: The operation could not be completed beause the following package is unknown: pdflatex: pdflatex: amslatex

Process extied with error(s)
Thanks for your help.


Best,
Coral
Last edited by localghost on Fri Jun 21, 2013 5:03 pm, edited 1 time in total.
Coral
Posts: 11
Joined: Thu Apr 18, 2013 4:32 pm

Package Installation

Post by Coral »

There was a problem with the repository I was using to update. Now this works!

Code: Select all

\documentclass{article}
\usepackage{chemmacros}

\begin{document}
  The water is \ch{H2O}
\end{document}
Nice!

I hope not contact you again :)

Thanks again for your time!
Last edited by localghost on Fri Jun 21, 2013 5:05 pm, edited 1 time in total.
Post Reply