1:14 AM
@SašoŽivanović Thanks for sending the prooftrees version, especially. It is helping when I get stuck. However, can you tell me why this doesn't work?
for name/.process={OwO4w4}{proof tree proof line no}{just ##1}{proof tree proof line no}{just}{just options}{y}{% from Sašo's anti-pgfmath version - rhaid ddweud proof tree proof line no yn ddwywaith ?! dim yn bosibl i ailddefnyddio'r gyntaf ?!
if={(strequal(content(),""))||(strequal(content(),"##2"))}{%
content={##2},
}{%
content+'={\foresteregister{merge delimiter}##2},
TeX={\PackageWarning{prooftrees}{Merging conflicting justifications for line ##1! Please examine the output carefully and …
I know what this does - sort of, anyway. But I don't know why the
strequal
version doesn't work. I should say that it works in many cases, but not all. With my current test file, I get my first error after 1500 lines. It happens if two justifications for the same line include macros defined with \ensuremath
, such as \tnot
or \liff
. However, defining them without \ensuremath
doesn't work either.
1:41 AM
@SašoŽivanović The documentation for
.option
currently says only that it can capture the value of the option at the current node. I gather from the code you sent that it can also use the value of option at another node e.g. !uu
or whatever. Is this new? Do you plan to update the description with this? (Is the same true for .register
?)
2 hours later…
10 hours later…
1:19 PM
9 hours later…
10:06 PM
@SašoŽivanović If I'm using
sort by'
in define long step
, then I need ##1
for w
rather than #1
because this is essentially defining a macro? That is, define long step
could take arguments and #1
would then be the first argument, hence the doubling. Is that correct?
define long step={proof tree camau}{}{% from saso's code (forest2-saso-ptsz.tex) & chat.stackexchange.com/transcript/message/28321501#28321501 r, sort by'={{O}{y},{Ow}{x}{-##1}}, sort'={filter'={descendants}{{OO!&}{proof tree rhifo}{proof tree phantom}}}% },
which seems to work. However, I notice that you've written
sort by'
with an additional +d
. Is there a reason for this (speed?)? Similarly, I notice that where I have, say, if line numbering={2}{1}
, you've changed it to if line numbering={n=2}{n=1}
, but I'm not at all sure why.
By the way, I found
The numerical modifier is not allowed.
very confusing. I couldn't think what this meant. This despite the fact that I understood from the syntax specification that !
could not be followed by *n*
.
I'm also a bit unclear about the explanation of what a number means when the instruction does not take an optional numerical modifier. Something like
I am guessing that this would indicate 3 arguments, each to be expanded once. But the current description in terms of repeating instructions suggests that a single argument might be expanded 3 times.
10:46 PM
11:12 PM
@cfr I must admit I'm very glad to hear that. I was quite afraid you'll find it too complicated. Actually, when I read your first yesterday's message in the morning, which starts "Thank you. It is awful.", I was sure you were referring to the new
.process
. ;-)))
Anyways, thanks a lot for digging in and all the comments! I'll start working through them now. I was already thinking about your comment on speed and did a couple of fast tests ... I'm not impressed by myself, I thought it's gonna be faster. I need to test some ideas I have about optimizing.
@cfr I was thinking about how to reuse as well. I did implement a "duplicate" instruction (
*
) but that's obviously not what we need here. I was thinking about swap
but I'm not sure what would be the best behaviour. Right now, you can reuse simply by wrapping more arguments, and honestly, this might turn out to be the best option in the end. So, instead of:
11:43 PM
@cfr I was having some
strequal
trouble myself. My trouble was caused by the fact that pgfmath seems to expand everything while forest's comparisons (both if option
/if register
and =
of .process
) don't. Look at this, maybe your example boils down to something like it as well.
\documentclass{article} \usepackage{forest} \begin{document} \forestset{ test1/.style={ if={strequal(temptoksa(),"#1")}{TeX=yes}{TeX=no}, }, test2/.style={ if temptoksa={#1}{TeX=yes}{TeX=no}, }, test3/.style={ if'={{R_=}{temptoksa}{#1}}{TeX=yes}{TeX=no}, }, test/.style={test1=#1,test2=#1,test3=#1}, TeX={\def\blabla{blabla}}, temptoksa={}, test, TeX={---}, % temptoksa={}, test={}, TeX={\\}, temptoksa={blabla}, test=blabla, TeX={---}, temptoksa={blabla}, test=\blabla,
@cfr You're quite right about all this. Specifically, I should have written, about repeating, that repetition walks forward in the argument list. However, all this might be obsolete, as I'm thinking that not having the number as the optional argument of all instructions might speed up things. In the end, is it really too much work to say
OOOOw4
instead of O4w4
? Anyways, measurements await ...
« first day (147 days earlier) ← previous day next day → last day (412 days later) »