# Is there a format for parens that are not delimiters?

Authors will sometimes number a list with numbers in the format 1) then 2) and so on. I sometimes have to quote these lists, and when I do of course they show up as delimiter errors. They do not block the file from compiling as I want, but they do interfere with my performing delimiter checks.

Is there a way to format 1) and 2) and so on, so that they will not appear as delimiters when I do delimiter checks?

Responding to a comment, here is an MWE. It gives a list with one entry, and the 1) appears as a delimiter error (as it should, of course).

\documentclass{article}
\begin{document}
1) Dog.
\end{document}


@ShreevatsaR Correctly says delimiter checks are an editor feature, not LaTeX. That is why I do not ask here about changing the delimiter check. I ask about LaTeX code.

• You can define a command like \newcommand\rp{) } and then do 1\rp first item. – Sergei Golovan Aug 27 '17 at 19:07
• Then you can use something like \char41. – Sergei Golovan Aug 27 '17 at 19:26
• Where do you do the “delimiter checks”? Where do the “delimiter errors” appear? I think this is not a feature of (or question about) TeX/LaTeX, but of some editor or checking tool you use… what is it? – ShreevatsaR Aug 27 '17 at 19:30
• your example document produces no error so I do not understand this question at all. – David Carlisle Aug 27 '17 at 19:38
• It is not clear what you mean by "delimiter checks" but if these checks are giving warnings on correct input, then it is the checks that are in error not the document. – David Carlisle Aug 27 '17 at 19:42

The document is not in error. If your editor (erroneously) complains about mis-matched parens, you can probably do

\documentclass{article}
\begin{document}
%(
1) Dog.
\end{document}


Although this is not a LaTeX problem and your editor/tool problem, this is the sort of thing you could make your editor smarter about: for example, you could use a heuristic like: A line indicates a numbered list if:

1. it starts with a run of whitespace characters, a (small) sequence of digits, and a ), or in other words a regular expression like ^\s+[0-9]{1,2}\), and
2. it either has more indentation than the previous non-empty line, or it has the same indentation as the previous non-empty line which itself indicates a numbered list.

Then you could write

\documentclass{article}
\begin{document}
1) Dog.

2) Cat.
\end{document}


and your heuristics would correctly ignore these )s and not treat them as mismatched closing parentheses.


Of course the proper way would be to use an environment for the list, say using the enumerate package (read documentation: see author :)) as follows:

\documentclass{article}
\usepackage{enumerate}
\begin{document}
%( -- need this if your editor cannot be told to ignore parentheses inside the optional argument to enumerate
\begin{enumerate}[1)]
\item Dog.
\item Cat.
\end{enumerate}
\end{document}


This produces numbers like 1) and 2) in the output, though the typeset output of LaTeX isn't exactly easy to customize so if you need it to appear different you may find it hard to use.

• You can use the starred version and write \renewcommand*{\(}{} – user94293 Aug 28 '17 at 1:39