Am Samstag, 22. September 2018 09:24:18 CEST schrieb Jürgen Spitzmüller <sp...@lyx.org>: > Kornel, I have some comments and questions: > > Am Donnerstag, den 23.08.2018, 12:17 +0200 schrieb Kornel Benko: > > commit 28770327918a38fc8f4fc14a4239d1fe1adb8b66 > > Author: Kornel Benko <kor...@lyx.org> > > Date: Thu Aug 23 11:58:32 2018 +0200 > > > > Replacement for chess support > > This layout does not use lyxskak.sty, which depends on skak.sty > > Instead it uses chessboard.sty, depending on chessfss and xskak. > > Does it really use chessboard.sty? Or rather xskak directly? I don't > see chessboard.sty loading anywhere.
I see it in the log of chessboard-article.lyx > > +++ b/lib/layouts/chessboard.layout > > @@ -0,0 +1,132 @@ > > +#% Do not delete the line below; configure depends on this > > +# \DeclareLaTeXClass[scrartcl]{Chessboard} > > +# \DeclareCategory{Articles} > > +# chessboard article textclass definition file. > > Please add your name an email address as layout author (see other > layouts) OK. > > + > > +Format 69 > > + > > +Requires chessfss > > + > > +ClassOptions > > + Other "parskip" > > +End > > Why this as default? Shouldn't this depend on the user's settings? Maybe, I used the values according to the use in tex-snippets in chessboard.pdf > > + > > +Preamble > > + \usepackage{xskak} > > Rather add xskak to latexfeatures and use Requires. Do you mean probably 'simplefeatures' in ./src/LaTeXFeatures.cpp? > > + \pagestyle{empty} > > Again, why force these settings? Same (no-)reason as before. > > + \AtBeginDocument{ > > + \newchessgame > > + \setchessboard{pgfstyle=straightmove, > > arrow=to,linewidth=0.1em, smallboard} > > + } > > Is there a reason for these defaults? Why not go with the defaults and > let users specify styles if they wish? Good point. But for a first shot it seemed OK. > > +InsetLayout Flex:Mainline > > + LyXType custom > > + LatexType Command > > + LatexName mainline > > + Decoration Classic > > + LabelString "Mainline:" > > + PassThru 1 > > + ParbreakIsNewline 1 > > + LabelFont > > + Color blue > > + Series bold > > + EndFont > > + Font > > + Color blue > > + EndFont > > + Argument 1 > > + LabelString id > > + ToolTip "'invar' or 'outvar'" > > I find "id" unclear. Also, invar and outvar are only two of eight > possible options to \mainline. > > I'd suggest > > LabelString "Opts" > ToolTip "See xskak manual for possible options" OK > > + Decoration Conglomerate > > + EndArgument > > + Argument 2 > > + Mandatory 1 > > + LabelString "Moves" > > + Decoration Conglomerate > > + EndArgument > > + Argument 3 > > + LabelString "Comment" > > + Mandatory 1 > > + LeftDelim "{ " > > Why this blank after brace? Because it is difficult to add space at start of comment. > > + Font > > + Color Green > > + EndFont > > + Decoration Conglomerate > > + EndArgument > > +End > > + > > +InsetLayout Flex:Variation > > + CopyStyle Flex:Mainline > > + LatexName variation > > + LabelString Variation > > +End > > + > > +InsetLayout Flex:ChessBoard > > + LyXType custom > > + LatexType Command > > + LatexName chessboard > > + LabelString "[chessboard]" > > + Decoration Classic > > + KeepEmpty 1 > > + LabelFont > > + Color Red > > + EndFont > > + Argument 1 > > + LabelString "Arrows" > > + ToolTip "Comma separated list of the form from- > > to (like d2-d4)" > > + LeftDelim "[pgfstyle=straightmove,markmoves={" > > + RightDelim "}," > > Ouch. Use PresetArgs here rather than this ugly LeftDelim. For a more > flexible use, I would not preset any options at all. How? I'd like to, but was unable to find a way. > > + DefaultArg " " > > + PassThru 1 > > + Decoration Conglomerate > > + EndArgument > > + Argument 2 > > + LabelString "Knigt" > > Knight? Ouch. > > + ToolTip "List of knight moves (crooked arrows) > > g1-e2, g1-h3" > > + LeftDelim "pgfstyle=knightmove,markmove={" > > + RightDelim "}," > > See above. > > > + Decoration Conglomerate > > + EndArgument > > + Argument 3 > > + LabelString "Mark" > > + ToolTip "Comma separated list of fields to be > > marked with a circle (like d4,f4,c7)" > > + DefaultArg " " > > + LeftDelim "pgfstyle=circle,markfields={" > > + RightDelim "}]" > > See above. > > > + Decoration Conglomerate > > + EndArgument > > +End > > + > > +InsetLayout Flex:ChessBoardStore > > + CopyStyle Flex:ChessBoard > > + ResetArgs 1 > > + LabelString "StoreChessboard" > > + Argument 1 > > + LabelString "Store FEN" > > + ToolTip "Store the 'FEN' under the given name" > > + LeftDelim "[print=false,storefen={" > > + RightDelim "}]" > > See above. > > > + EndArgument > > +End > > + > > +InsetLayout Flex:ChessBoardRestore > > + CopyStyle Flex:ChessBoard > > + ResetArgs 1 > > + LabelString "RestoreChessboard" > > + Argument 1 > > + LabelString "Restore FEN" > > + ToolTip "Restore the 'FEN' to the version saved > > under the given name" > > + LeftDelim "[print=false,restorefen={" > > + RightDelim "}]" > > See above. > > Thanks > Jürgen > > > + EndArgument > > +End > > + > Thanks for looking into this. Kornel
signature.asc
Description: This is a digitally signed message part.