GeneralProblem with specific package 'hexgame'

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
nbaron
Posts: 5
Joined: Fri Oct 16, 2009 2:34 am

Problem with specific package 'hexgame'

Post by nbaron »

Hi all,

I've been trying to use the hexgame package to create a simple hexboard:

Code: Select all

\documentclass{article}
\usepackage{hexgame}
\begin{document}

	\begin{hexgame}{5}
		\colorhex{2}{playerone}
		\colorhex{4}{playertwo}
		\colorhex{6}{playertwo}
		\colorhex{25}{playerone}
		\labelhex{23}{37}
	\end{hexgame}
	
\end{document}
Whenever I try to compile it though, I get the error message:

! Argument of \special@length has an extra }.
<inserted text>
\par
l.5 \begin{hexgame}{5}

?

I'm relatively new to TeX, but I've played around with different packages for hours trying to find the problem and can't - can anyone help?

Thanks in advance.

Recommended reading 2024:

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Problem with specific package 'hexgame'

Post by gmedina »

Hi,

perhaps your problem comes from using pdflatex directly? Try compiling with latex to get a dvi file which then can be converted to a postscript document (.ps) which finally can be turn to a pdf file.

I attach the pdf file I got after compiling your test code following the route I indicated.
Attachments
test.pdf
(6.33 KiB) Downloaded 230 times
1,1,2,3,5,8,13,21,34,55,89,144,233,...
nbaron
Posts: 5
Joined: Fri Oct 16, 2009 2:34 am

Re: Problem with specific package 'hexgame'

Post by nbaron »

Thanks for the reply. I'm using TeXShop to edit, and under preferences I did set typesetting to TeX + DVI.

However, I am still getting the same error message.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Problem with specific package 'hexgame'

Post by gmedina »

Then, maybe your system uses old versions of some packages? Compile the following code

Code: Select all

\listfiles
\documentclass{article}
\usepackage{hexgame}
\begin{document}

   \begin{hexgame}{5}
      \colorhex{2}{playerone}
      \colorhex{4}{playertwo}
      \colorhex{6}{playertwo}
      \colorhex{25}{playerone}
      \labelhex{23}{37}
   \end{hexgame}
   
\end{document}
as I indicated in my previous response, and post here (as an attachment) the .log file obtained.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
nbaron
Posts: 5
Joined: Fri Oct 16, 2009 2:34 am

Re: Problem with specific package 'hexgame'

Post by nbaron »

Here it is.
Attachments
test3.log
(4 KiB) Downloaded 222 times
nbaron
Posts: 5
Joined: Fri Oct 16, 2009 2:34 am

Problem with specific package 'hexgame'

Post by nbaron »

Update: I can successfully compile code using pstricks packages into pdf using TeX + DVI. The following code works:

Code: Select all

\listfiles
\documentclass{article}
\usepackage{pstricks}
\usepackage{hexgame}
\begin{document}

\begin{pspicture}(0,0)(2,2)

\psline(2,1)
\end{pspicture}


\end{document}
However, as soon as I try to use the \begin{hexgame}{5} command, I get the same error as before:
! Argument of \special@length has an extra }.
<inserted text>
\par
l.5 \begin{hexgame}{5}
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Problem with specific package 'hexgame'

Post by gmedina »

Hi,

are you sure that the log file that you attached is complete? I think that part of that file is missing.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Problem with specific package 'hexgame'

Post by Stefan Kottwitz »

Hi nbaron,

your pst-poly package is too old. You can download an update for instance here.

Stefan
LaTeX.org admin
nbaron
Posts: 5
Joined: Fri Oct 16, 2009 2:34 am

Re: Problem with specific package 'hexgame'

Post by nbaron »

It works! Thank you both for the help!
Attachments
Thanks.pdf
(3.47 KiB) Downloaded 225 times
Post Reply