0

With the following code :

\documentclass[a4paper,twocolumn]{article}
\usepackage{xskak}
\usepackage{lipsum}
\usepackage{parskip}
\usepackage{multicol}

\begin{document}

\lipsum[5]

\begin{multicols}{2} \chessboard[setfen=8/8/5K2/2p3Bk/2P1R3/8/8/8 b - - 0 1,tinyboard,margin=false,showmover=false]\footnotesize{\lipsum[1]} \end{multicols}

\lipsum[5]

\end{document}

I get the following result :

enter image description here

I would like the chessboard to span the entire width of the column, and the text that follows not to bite into the a-h letters of the chessboard files...

I would also like the 1-8 rank numbers of the chessboard not to be shifted to the left but to be aligned with the left side of the column...

I have not managed to achieve this ... Your help is welcome! Thank you!

halogenr
  • 125

1 Answers1

1

I am not sure that using a multicols environment inside a twocolumn layout is a good idea (and the package issues a warning, so I guess, you should be very careful), but you can actually make use of the good ideas from this nice answer to your previous question and do something like the following:

\documentclass[a4paper,twocolumn]{article}
\usepackage{xskak,adjustbox}
\usepackage{lipsum}
\usepackage{parskip}
\usepackage{multicol}

\renewcommand{\adjboxvtop}{1ex}

\begin{document}

\lipsum[5]

\begin{multicols}{2} \begin{minipage}[t]{\linewidth} \hfill% \adjustbox{width={\linewidth-0.5em},valign=t}{% \chessboard[% setfen=8/8/5K2/2p3Bk/2P1R3/8/8/8 b - - 0 1, tinyboard, margin=false, showmover=false ]}% \end{minipage}\par% \footnotesize \lipsum[5] \end{multicols}

\lipsum[5]

\end{document}

enter image description here

  • Thanks ! Exactly what I needed. I’ll make the effort to understand how I could come up with such a solution by myself… – halogenr Mar 01 '23 at 20:32
  • Is there a mode or a package in LaTeX that draws the outline of all boxes ? That’d be helpful for debugging… – halogenr Mar 01 '23 at 20:34
  • @halogenr You could try with \fbox, but it adds some padding. But see: https://tex.stackexchange.com/q/2083/47927 – Jasper Habicht Mar 01 '23 at 20:40