Please advise. I asked a question and a submitted answer had code that solves the problem. However, the answer also starts with statements about TeX macros that contradict commonly used TeX documentation. If I accept the answer as is, readers may rely on incorrect information. But the submitter's code solved my problem and could help others. I don't want to offend anybody.
2 Answers
Taking the general question, if you feel there is an issue with an answer then it is always best to comment to that effect. You can for example ask for clarification, point to information that part is incorrect, etc. In particular, I would remember that there is no requirement to accept any answer to a question: you can say that the code works but that you have concerns about the information, for example.
-
9Just to add that if your aim is not to have incorrect/unclear answers on this site, it is much better to comment, so the answer can be improved. Just withholding accepting is probably not going to be seen as a signal that something is wrong (neither by the answerer nor by future readers) as there is a variety of reasons why answers might not be accepted (including that the asker lost interest or simply does not know about accepting answers). Of course if your only worry is about being seen endorsing an incorrect answer, things are different.– moeweFeb 3, 2022 at 7:10
Posting an answer to wrap up the comment thread.
As Joseph says, for the general policy question you are not obliged to accept any answer. You could post your own answer and accept that if you prefer.
However for the specific question that you are asking about, the answer is in fact correct. \(
at that point (as at almost all other points in a LaTeX document) will start typesetting math. \(x+y\)
will put x + y into the PDF it will not do any grouping of actual arithmetic calculations.
Due to the nature of TeX, any command may in fact have different local definitions in different contexts, although you usually don't highlight that every time you mention every command in an answer. For example in
\begin{verbatim}
\( ..\)
\end{verbatim}
\(
will typeset the two characters \(
and in
{
\renewcommand\({A}
\renewcommand\){B}
\(...\)
}
\(...\)
will typeset A...B
It is true that if you load the ifthen
package (that by coincidence I wrote) and use \(
in the first argument of \ifthenelse
it will be used to group any predicates in the test, however there was no reason to consider that package here as it was not mentioned in the question and it is unrelated to any tests used by the \loop
construct under discussion. It did not occur to me to mention it when I wrote the answer and I choose not to add a mention now as it would not add anything to the answer as it is completely unrelated.
(
,\and
and)
can be logical operators inside some macro. In the context where you used them (and yes --- the meaning depends on the context, like in most programming languages) the submitter was perfectly right. And notice that there is a world of difference, in TeX, between\(
and(
. Anyway, it's your opinion; you are free to comment, downvote, accept or not the answer.\ifthenelse
, whereas your query is using a\loop
construct.ifthen
package in that post (I do know about that package, I wrote it)\newread
to allocate streams for use, if you use an unallocated register such a 0 and 1 then it will clash with other unallocated use or other allocated use that happened to get those numbers internally. Some uses will end up being local and so more or less safe but only by luck not by design.\(
would start typesetting math, as I said. In other contexts, such as inverbatim
it may have a different definiton, typestting the literal characters\(
inside{\def\({red} ...}
then\(
would typesetred
and inside the first argument of theifthen
package\ifthenelse
\(
has a grouping usage. However there was no reason to consider these other contexts in this question (ifthenelse did not occur to me even though I wrote it)