2

I am a fairly new LaTeX-user and I've come across a problem I can't solve related to a custom style. I keep getting a Missing \begin{document} error among others and I have no idea why. I am using MikTex 2.9. I am trying to figure out why it is giving me the errors and how to get it to compile.

Style

The .sty I am trying to use is this particular one: http://www.phantasia.org/miju/rpg/harn/harn.sty

Code

The \usepackage for the custom style is the last one before \begin{document}

\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage[finnish]{babel}
\usepackage{float}
\usepackage{listings}
\usepackage{footnote}
\usepackage{amsthm}
\usepackage{enumitem}
\usepackage{icomma}
\usepackage{cancel}
\usepackage{csvsimple}
\usepackage{url}
\makeatletter
\g@addto@macro{\UrlBreaks}{\UrlOrds}
\makeatother
\usepackage{amsfonts}
\title{Title}
\author{Author}
\usepackage{ifthen}
\usepackage{calc}
\usepackage{fancyheadings}
\usepackage{fancybox}
\usepackage{pst-grad}
\usepackage{wrapfig}
\usepackage{harn}

\begin{document}
asd
\end{document}

This works fine if I comment out the harn package which leads me to believe the problem is in there, I just can't find it.

Error log

Here is the error log I get: http://pastebin.com/3X8GNy4Q

I've already tried commenting out empty lines, deleting aux files (usual suspects) with no effect. I really have no idea what could be the problem. Any help would be much appreciated.

  • Thank you for posting a working example! At the same time, much of your code does not seem to be relevant to the question you're asking here. Please limit the example to only the code required for your issue to appear. You can have a look at this guide for how to prune your code for this purpose. – Martin Schröder Mar 1 '16 at 18:26
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Martin Schröder Mar 1 '16 at 18:27
  • you are using pstricks with pdflatex (which does not work) and is the cause of the \c@lor@to@ps error but you may have other errors – David Carlisle Mar 1 '16 at 18:56
2

In addition to Davids comment, that you cannot use pdflatex you have to replace the lines (109-110)

\setlength{\headrulewidth}{0mm}
\setlength{\footrulewidth}{1mm}

in the sty file with

\renewcommand{\headrulewidth}{0mm}
\renewcommand{\footrulewidth}{1mm}
  • Thank you, this solved the problem along with using xelatex(thanks David!)! Also thanks to Martin for the warm welcome. – Grummar Mar 2 '16 at 7:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.