4

Consider the following code:

\documentclass{article}
\usepackage{chessboard} 
\storechessboardstyle{8x8}{maxfield=h8} 
\usepackage{graphicx} 

\begin{document}

\begin{tabular}{cc}
    \chessboard[pgfstyle=straightmove, style=8x8, markmoves={
        a8-c7, c7-b5, b5-d6, d6-e8, e8-g7, g7-h5, h5-f6, f6-e4,
        e4-g3, g3-h1, h1-f2, f2-d1, d1-b2, b2-c4, c4-a3, a3-c2,
        c2-a1, a1-b3, b3-d4, d4-e2, e2-g1, g1-h3, h3-f4, f4-e6,
        e6-g5, g5-h7, h7-f8, f8-d7, d7-b8, b8-a6, a6-c5, c5-a4,
        a4-c3, c3-b1, b1-d2, d2-f1, f1-h2, h2-g4, g4-e3, e3-f5, 
        f5-h6, h6-g8, g8-e7, e7-d5, d5-b6, b6-c8, c8-a7, a7-c6, 
        c6-a5, a5-b7, b7-d8, d8-f7, f7-h8, h8-g6, g6-h4, h4-g2, 
        g2-e1, e1-f3, f3-e5, e5-d3, d3-c1, c1-a2, a2-b4}, setwhite={Na8}, linewidth=0.01em, showmover = false]
\end{tabular}

\end{document}

How do I change the arrows into normal lines in the code above?

3
  • 3
    And what package(s) do you use for that? Is part of the challenge to guess the right packages? :) Please complete your snippet into a complete, minimal document. Sep 4 '15 at 2:49
  • \usepackage{maths-default} \usepackage{chessboard} \storechessboardstyle{8x8}{maxfield=h8} \usepackage{graphicx} These are the packages which I have used. Sep 4 '15 at 3:13
  • Instead of adding the information in a comment, it's better to edit the question and add there this information so it's available for everyone. I took the liberty of doing it for you. Sep 4 '15 at 3:31
5

Use arrow={}:

\documentclass{article}
\usepackage{chessboard} 
\storechessboardstyle{8x8}{maxfield=h8} 
\usepackage{graphicx} 

\begin{document}

\begin{tabular}{cc}
    \chessboard[pgfstyle=straightmove, style=8x8, arrow={},markmoves={
        a8-c7, c7-b5, b5-d6, d6-e8, e8-g7, g7-h5, h5-f6, f6-e4,
        e4-g3, g3-h1, h1-f2, f2-d1, d1-b2, b2-c4, c4-a3, a3-c2,
        c2-a1, a1-b3, b3-d4, d4-e2, e2-g1, g1-h3, h3-f4, f4-e6,
        e6-g5, g5-h7, h7-f8, f8-d7, d7-b8, b8-a6, a6-c5, c5-a4,
        a4-c3, c3-b1, b1-d2, d2-f1, f1-h2, h2-g4, g4-e3, e3-f5, 
        f5-h6, h6-g8, g8-e7, e7-d5, d5-b6, b6-c8, c8-a7, a7-c6, 
        c6-a5, a5-b7, b7-d8, d8-f7, f7-h8, h8-g6, g6-h4, h4-g2, 
        g2-e1, e1-f3, f3-e5, e5-d3, d3-c1, c1-a2, a2-b4}, setwhite={Na8}, linewidth=0.01em, showmover = false]
\end{tabular}

\end{document}

enter image description here

2
  • @PunalaKiripitige You're welcome. Don't forget that you can accept an answer that you consider solved your problem by clicking the checkmark to its left. In case of doubt, please see How do you accept an answer?. Sep 4 '15 at 3:37
  • You example seems to work without graphicsx. Why should we include that call?
    – dantopa
    Aug 2 '18 at 21:21
4

With a bit care you can insert tikz code to draw lines:

\documentclass{article}
\usepackage{chessboard}
\storechessboardstyle{8x8}{maxfield=h8}
\usepackage{graphicx,tikz}

\begin{document}

\begin{tabular}{cc}
    \chessboard[pgfstyle=straightmove, 
    addpgf={\tikz[overlay]\draw[red,line width=0.1em](b1)--(c3)node[fill,blue,circle,inner sep=0.1em]{}--(d5)--(c7)--(e6);},
    style=8x8,, setwhite={Nb1}, linewidth=, showmover = false]
\end{tabular}

\end{document}

enter image description here

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.