Hi all, I am using and enjoying a lot, the markstat command written by German Rodriguez. I have successfully installed pandoc, whereis and downloaded the stata.sty file. Everything works fine when I try to compile an HTML or DOCX file, the issue starts when I try to generate a PDF using MixTeX (2.9 updated) which is my LaTeX installation.

When I run the "simpleScript.stmd" example from the markstat documentation page with the command:
Code:
markstat using simpleScript, pdf
the pdf does not compile, but a Tex file is created. I show here the preamble of the TeX document
Code:
\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere

\PassOptionsToPackage{hyphens}{url}

%

\documentclass[
\usepackage{stata}
]{article}

\usepackage{lmodern}

\usepackage{amssymb,amsmath}

\usepackage{ifxetex,ifluatex}

\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex

\usepackage[T1]{fontenc}

\usepackage[utf8]{inputenc}

\usepackage{textcomp} % provides euro and other symbols

\else % if luatex or xelatex

\usepackage{unicode-math}

...
You will notice that for some reason that I cannot understand
Code:
\usepackage{stata}
is within the square brackets of the \documentclass. This is causing all the trouble. If I manually take it out of the brackets the PDF compiles just fine. So not a huge issue, but it is a bit annoying and in any case, I would like to understand what is causing the issue.

Any idea?