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.

  • 1
    Are you referring to this question?
    – Werner Mod
    Commented Feb 1, 2022 at 3:17
  • 1
    ...are you really sure that the statements are incorrect? I suggest that comments are just for that, to ask for clarification. Then you decide if the answer is worth accepting or not.
    – Rmano
    Commented Feb 1, 2022 at 19:55
  • Werner: Yes. Submitter states "\and" is a title page macro, NOT a logical operator. Submitter states "(" and ")" are typesetting symbols, NOT logical operators. See GUIDE TO LATEX (2004, 4th ed.). Page 193 lists "\and", "(", and ")" as logical operators. This means that depending on context in the TeX script, the three symbols can be logical symbols in a Boolean condition, OR they can be something else. Submitter states that input stream 0 (zero) is reserved for TeX. I cannot find this in GUIDE TO LATEX; LATEX COMPANION (2nd ed., 2004); or THE TEXBOOK (2021 Jubilee ed.). Commented Feb 1, 2022 at 20:49
  • 5
    (, \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.
    – Rmano
    Commented Feb 1, 2022 at 21:00
  • Rmano: I certainly agree that there is a difference between "backslash open-parenthesis" and just a "open-parenthesis"! My backslashes disappeared from my comment, except for "backslash and". Some software gremlin has made me look a fool. I can make my own mistakes without any help! Commented Feb 2, 2022 at 3:08
  • @CaslonMelior How do you format comments in Stack Exchange? - Meta Stack Overflow
    – user202729
    Commented Feb 2, 2022 at 4:23
  • @CaslonMelior Ah, for the specific issue I think a new question would be good - the reason you are confused is I suspect as the Guide to LaTeX is specifically talking about use in the first argument of \ifthenelse, whereas your query is using a \loop construct.
    – Joseph Wright Mod
    Commented Feb 2, 2022 at 10:34
  • 8
    The statements are correct. Why do you say they are wrong? No one mentioned the ifthen package in that post (I do know about that package, I wrote it) Commented Feb 2, 2022 at 17:07
  • 3
    In the texbook and elsewhere you will see a macro \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. Commented Feb 2, 2022 at 17:12
  • @DavidCarlisle Dear Mr. Carlisle, thank you for replying and for your code example, which solved my problem. I will try to explain what I thought was wrong with some statements. You wrote: "( and ) are commands for typesetting math, not for evaluating logical expressions". The GUIDE TO LATEX on page 193 says the symbols can be used in "logical statements", which I take to be the same as "logical expressions". Page 193 gives an example using the symbols in a logical expression in \ifthenelse. So the symbols can be used in two ways, not just one. Commented Feb 3, 2022 at 1:25
  • @DavidCarlisle Dear Mr. Carlisle, my original code opened a file in input stream 0 (zero): "\openin0 = LeftPageParagraphs" What is the difference between an allocated and an unallocated register? Is a TeX "register" different than a TeX "input stream"? I changed my code to use the suggested "\newread". What was wrong with using "\openin"? Commented Feb 3, 2022 at 1:35
  • The backslashes preceding open parenthesis and close parenthesis disappeared AGAIN! The StackExchange editor must be deleting them. Now it looks like I misquoted Mr. Carlisle, when I did not. I read the instructions for comments and they say NOTHING about this. Commented Feb 3, 2022 at 1:39
  • As Joseph says you are free to not accept the answer but the answer is correct. Commented Feb 3, 2022 at 7:35
  • tex commands can have arbitrary number of definitions in different contexts but only one definition at any given place. As used \( would start typesetting math, as I said. In other contexts, such as in verbatim it may have a different definiton, typestting the literal characters \( inside {\def\({red} ...} then \( would typeset red and inside the first argument of the ifthen 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) Commented Feb 3, 2022 at 7:36
  • 2
    Rule of thumb: If submitter was David Carlisle, answer is factually right, might contain typos.
    – Skillmon
    Commented Feb 5, 2022 at 11:55

2 Answers 2


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.

  • 9
    Just 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.
    – moewe
    Commented Feb 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

\(  ..\)

\( will typeset the two characters \( and in


\(...\) 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .