Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

I wish you humans would leave me alone.


computers / comp.text.tex / Re: Chessboard package: LSBC4 font, decoration behind piece?

SubjectAuthor
* Chessboard package: LSBC4 font, decoration behind piece?Olav Landsverk
`- Re: Chessboard package: LSBC4 font, decoration behind piece?Ulrike Fischer

1
Chessboard package: LSBC4 font, decoration behind piece?

<b95834d3-4afe-4c1c-a4df-696b5ea808f6n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=4621&group=comp.text.tex#4621

  copy link   Newsgroups: comp.text.tex
X-Received: by 2002:a05:620a:45a8:: with SMTP id bp40mr9955184qkb.48.1643512382190;
Sat, 29 Jan 2022 19:13:02 -0800 (PST)
X-Received: by 2002:a05:6830:13cd:: with SMTP id e13mr8548796otq.193.1643512381940;
Sat, 29 Jan 2022 19:13:01 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.text.tex
Date: Sat, 29 Jan 2022 19:13:01 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=84.208.103.245; posting-account=cCvRXwoAAAATXsqKNqKmIt2DldlPkqeg
NNTP-Posting-Host: 84.208.103.245
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b95834d3-4afe-4c1c-a4df-696b5ea808f6n@googlegroups.com>
Subject: Chessboard package: LSBC4 font, decoration behind piece?
From: olav.lan...@gmail.com (Olav Landsverk)
Injection-Date: Sun, 30 Jan 2022 03:13:02 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 30
 by: Olav Landsverk - Sun, 30 Jan 2022 03:13 UTC

Hi, I have the following MWE

\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage[LSBC4, T1]{fontenc}
\usepackage{xcolor}
\usepackage{chessboard}
\definecolor{darkfield}{RGB}{181, 136, 99}
\definecolor{lightfield}{RGB}{240, 217, 181}
\setchessboard{
boardfontencoding=LSBC4,
blackfieldmaskcolor=darkfield,
whitefieldmaskcolor=lightfield,
setfontcolors,
showmover=false}
% \begin{document}
\setchessboard{
pgfstyle={[fill]circle},
padding=-0 ex,color=red}
\chessboard[
markfields={e4},
setwhite={Re4}]
\chessboard[
backfields={e4},
setwhite={Re4}]
\end{document}

which produces https://imgur.com/a/0hDQIAi

However, I need the red circle to be behind the rook (but above the chessboard). How can I achieve this? It's important to keep the chosen layout of the chessboard.

Re: Chessboard package: LSBC4 font, decoration behind piece?

<1lxm0apkrt5ao$.dlg@nililand.de>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=4627&group=comp.text.tex#4627

  copy link   Newsgroups: comp.text.tex
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: new...@nililand.de (Ulrike Fischer)
Newsgroups: comp.text.tex
Subject: Re: Chessboard package: LSBC4 font, decoration behind piece?
Date: Sun, 30 Jan 2022 17:57:47 +0100
Lines: 62
Message-ID: <1lxm0apkrt5ao$.dlg@nililand.de>
References: <b95834d3-4afe-4c1c-a4df-696b5ea808f6n@googlegroups.com>
Reply-To: news3@nililand.de
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Trace: individual.net +VVMJavNTNlf8Ac17efKpgXH7LMABh5jXJMu/Z1nNXmrOefG6O
Cancel-Lock: sha1:V896PLhLl+VBizjR1DdT5Lfy3XI=
User-Agent: 40tude_Dialog/2.0.15.41de
 by: Ulrike Fischer - Sun, 30 Jan 2022 16:57 UTC

Am Sat, 29 Jan 2022 19:13:01 -0800 (PST) schrieb Olav Landsverk:

> Hi, I have the following MWE

> However, I need the red circle to be behind the rook (but above
> the chessboard). How can I achieve this? It's important to keep
> the chosen layout of the chessboard.

Well in your encoding the board background is part of the piece. So
it is not trivial to sneak something between board and piece. You
can try something like the following but be aware that the circle
should not be larger than the square as the following square would
overlap them

\documentclass{standalone}
\usepackage[LSBC4, T1]{fontenc}
\usepackage{xcolor}
\usepackage{chessboard}
\definecolor{darkfield}{RGB}{181, 136, 99}
\definecolor{lightfield}{RGB}{240, 217, 181}
\colorlet{circlecolor}{white}
\setchessboard{
boardfontencoding=LSBC4,
blackfieldmaskcolor=darkfield,
whitefieldmaskcolor=lightfield,
blackpiecemaskcolor=red,
setfontcolors,
showmover=false}
% \usepackage{tikz,etoolbox}

\begin{document}
\makeatletter
\newbool{showcircle}
\renewcommand\cfss@composefmpcolorchar[4]{%range layer. fm, p
\makebox[0pt][l]{%
\csname cfss@#1fieldmaskcolor\endcsname#2}%
\ifbool{showcircle}{%
\tikz[overlay]{\fill[circlecolor] (0.5em,0.5em)
circle[radius=0.5em]}}%
{}%
{\csname cfss@#3piececolor\endcsname#4}}%
\makeatother

\chessboard[
emphstyle={\booltrue{showcircle}},
emphfield=f5,

emphstyle={\booltrue{showcircle}\colorlet{circlecolor}{red}},
emphfield=e4,

emphstyle={\booltrue{showcircle}\colorlet{circlecolor}{green}},
emphfield=c6,
setwhite={Re4,Nf5,kc6,Qd5}]
\end{document}

--
Ulrike Fischer
https://www.troubleshooting-tex.de/

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor