TeX - LaTeX Asked by Ulvi Bajarani on May 3, 2021
I try to break the pages with chess diagrams containing the header to the two different columns. The problem is that the command elements are not process processed together. For example, in one of the pages, the header is in another page, while the diagram and notation in another:
Also, I provide the simplified code:
documentclass[paper=7in:10in,DIV=calc,12pt]{scrbook}
usepackage[inner=0.5in, outer=0.25in]{geometry}
usepackage{pdfpages}
usepackage{xskak}
usepackage{texmate}
usepackage{array}
usepackage{amssymb}
usepackage{multicol}
setlength{columnseprule}{0.5pt}
defcolumnseprulecolor{color{black}}
setcounter{secnumdepth}{55}
setcounter{tocdepth}{55}
addtokomafont{section}{centering}
newcounter{diagramsforinstruction}
newcommandprintdiagramsforinstruction{smallrefstepcounter{diagramsforinstruction}thediagramsforinstruction}
newcommandintroductionboard[3][]{%
setchessboard{showmover=true, moverstyle=triangle, boardfontsize=20pt}
bgroupmedskipparlargebfseries #1
centeringparmakebox[1em][l]{printdiagramsforinstruction}chessboard[#2]paregroupbgroupcenteringsmall #3parmedskipegroupvfillnullcolumnbreak}
begin{document}
begin{multicols}{2}
introductionboard[Timofeev vs Dimitrijevic 2004]{setfen=1r1qn1k1/1r1b1pb1/3pp1p1/3N2P1/p2NP3/5P2/1PP4Q/1KBR3R w}{Here, White managed to mate Black after textbf{26. Qh7+ Kf8 27. Qh8+! Bxh8 28. Rxh8+ Kg7 29. Rdh1} and Black resigned due to the threat Rh1-h7#.}
introductionboard[Hlousek vs Novak, 1970, Solingen, match (6)]{setfen=3qb1k1/1n1r2pp/3p1p2/1pnPpN2/2p1P1P1/2P1B2P/QPB2P2/4R1K1 w}{Here, White managed to enter to the opponent's position after textbf{28. Ra1 Rc7 29. Qa8} (changing the defender) textbf{29...Qxa8 30. Rxa8 Kf8 31. Nxg7!} The tactical shot. textbf{31...Rxg7} (if 31...Kg7 then 32.Re8WBetter) textbf{32. Bh6WBetter} Black resigned.}
introductionboard[Timofeev vs Dimitrijevic 2004]{setfen=1r1qn1k1/1r1b1pb1/3pp1p1/3N2P1/p2NP3/5P2/1PP4Q/1KBR3R w}{Here, White managed to mate Black after textbf{26. Qh7+ Kf8 27. Qh8+! Bxh8 28. Rxh8+ Kg7 29. Rdh1} and Black resigned due to the threat Rh1-h7#.}
introductionboard[Hlousek vs Novak, 1970, Solingen, match (6)]{setfen=3qb1k1/1n1r2pp/3p1p2/1pnPpN2/2p1P1P1/2P1B2P/QPB2P2/4R1K1 w}{Here, White managed to enter to the opponent's position after textbf{28. Ra1 Rc7 29. Qa8} (changing the defender) textbf{29...Qxa8 30. Rxa8 Kf8 31. Nxg7!} The tactical shot. textbf{31...Rxg7} (if 31...Kg7 then 32.Re8WBetter) textbf{32. Bh6WBetter} Black resigned.}
introductionboard[Timofeev vs Dimitrijevic 2004]{setfen=1r1qn1k1/1r1b1pb1/3pp1p1/3N2P1/p2NP3/5P2/1PP4Q/1KBR3R w}{Here, White managed to mate Black after textbf{26. Qh7+ Kf8 27. Qh8+! Bxh8 28. Rxh8+ Kg7 29. Rdh1} and Black resigned due to the threat Rh1-h7#.}
introductionboard[Hlousek vs Novak, 1970, Solingen, match (6)]{setfen=3qb1k1/1n1r2pp/3p1p2/1pnPpN2/2p1P1P1/2P1B2P/QPB2P2/4R1K1 w}{Here, White managed to enter to the opponent's position after textbf{28. Ra1 Rc7 29. Qa8} (changing the defender) textbf{29...Qxa8 30. Rxa8 Kf8 31. Nxg7!} The tactical shot. textbf{31...Rxg7} (if 31...Kg7 then 32.Re8WBetter) textbf{32. Bh6WBetter} Black resigned.}
end{multicols}
end{document}
The question is:
How should I change the code of introductionboard so that all elements of the command are handled together and fit in an column?
The possible answer is to use begin{minipage} for the introductionboard command:
newcommandintroductionboard[3][]{%
begin{minipage}{0.44textwidth}
setchessboard{showmover=true, moverstyle=triangle, boardfontsize=20pt}
bgroupmedskipparlargebfseries #1
centeringparmakebox[0.5em][l]{printdiagramsforinstruction}chessboard[#2]paregroupbgroupcenteringsmall #3parmedskipegroup
vfillnullcolumnbreakend{minipage}}
Answered by Ulvi Bajarani on May 3, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP