0

I've improved my chess diagram command in the manner that it describes the text above the chess diagram. But there was a problem between the distance of the lowest text above ("Place") and the diagram, which is too high (shown by grew line). While the distance between texts could be corrected by the \vspace{-0.3em} command, it doesn't help in the situation. How can I solve it?

The code:

\documentclass[paper=8.5in:11in]{scrartcl}
\usepackage[total={8.5in,11in}, top=1in, bottom=1in, left=0.375in, right=0.375in]{geometry}
\usepackage{pdfpages}
\usepackage{xskak}
\usepackage{texmate}
\usepackage{array}
\usepackage{amssymb}
\addtokomafont{section}{\centering}
\pagenumbering{gobble}
\newcounter{diagrams}
\newcommand\printdiagrams{\refstepcounter{diagrams}\thediagrams}
\setfigfontfamily{merida}
\setboardfontfamily{merida}
\setchessboard{showmover=true, moverstyle=triangle, boardfontsize=20pt}
\newcommand\tacticboard[5][]{%
 \noindent\begin{minipage}[t]{0.49\textwidth}
  \vfill\strut\centering{\bfseries$\square$ #1\par$\blacksquare$ #2}\strut\par\vspace{-0.3em} #3
   \bgroup\centering\Large\par\makebox[1cm][l]{\printdiagrams}\chessboard[#4]\par\egroup
    \bfseries #5\bigskip
     \end{minipage}\hfill\ignorespaces}
\newcommand\introductionboard[3][]{%
 \bgroup\medskip\par\Large\bfseries #1
  \centering\par\printdiagrams\chessboard[#2]\par\egroup\bgroup\centering\large\bfseries #3\par\medskip\egroup}
  \newcommand\introductionboardnonumber[3][]{%
 \bgroup\medskip\par\large\bfseries #1
  \centering\par\chessboard[#2]\par\egroup\bgroup\centering\small\bfseries #3\par\medskip\egroup}

\makeatletter
\newcounter{answers}
\extrarowheight3pt
\newlength\colwidth
\renewcommand*\makegametitle{\par\bigskip\newgame  
    \refstepcounter{answers}%
    \settowidth\colwidth{\fontsize{8mm}{1cm}\bfseries \theanswers}
    \noindent\begin{tabular}{|p{\colwidth}|p{\dimexpr\linewidth-\colwidth-3\tabcolsep-2\arrayrulewidth}@{}}
    \hline
    &
    \strut$\Box$\quad\textbf{\wname}\ \@welo\hfill\\
    \raisebox{0\ht\strutbox}[0pt][0pt]{\fontsize{8mm}{1cm}\bfseries \theanswers}
    &\strut$\blacksquare$\quad\textbf{\bname}\ \@belo\hfill\\
    &\strut\quad\@tourn\hfill\\
    \hline
    \end{tabular}\par\nopagebreak\bigskip\nopagebreak}

\begin{document}


\newpage
\section*{Positions for beginners-1}
\tacticboard[White]{Black}{Place}{setfen=Q7/8/1kpp1p2/Np3n1p/3P4/P1P1q1PK/1r5P/R7 w}{some text}
\tacticboard[White]{Black}{Place}{setfen=Q7/8/1kpp1p2/Np3n1p/3P4/P1P1q1PK/1r5P/R7 w}{salam}
\tacticboard[White]{Black}{Place}{setfen=Q7/8/1kpp1p2/Np3n1p/3P4/P1P1q1PK/1r5P/R7 w}{salam}
\tacticboard[White]{Black}{Place}{setfen=Q7/8/1kpp1p2/Np3n1p/3P4/P1P1q1PK/1r5P/R7 w}{salam}
\end{document}

The picture of the problem:

enter image description here

  • It is solved by negative values of \vspace(), for example, \vspace(-0.3em) – Ulvi Bajarani Mar 30 '20 at 1:46

Your Answer

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

Browse other questions tagged or ask your own question.