0

I am using pdfLaTeX. I am trying to use an align-like environment, and I wish to place a \blacksquare on the last line where a \tag would be.

The problem is that \tag automatically comes with parentheses, i.e. (). The following is what I am working with:

\begin{align*}
A \setminus (B \cup D) & = A \cap (B \cup D)^C\\
& = A \cap (B^C \cap D^C)\\
& = A \cap B^C \cap D^C\\
& = A \cap A \cap B^C \cap D^C\\
& = A \cap B^C \cap A \cap D^C\\
& = (A \cap B^C) \cap (A \cap D^C)\\
& = (A \setminus B) \cap (A \setminus D). \tag{$\blacksquare$}
\end{align*}

Is there a simple way to do this without the \tag having the parentheses? Thanks in advance.

1
  • this question and both answers don't mention anything about this being included at the end of a proof. if a proof is involved, the answer would be different. (not trying to "force"anything -- it's probable that you didn't intend this to be associated with a proof; just a caution.) Jan 19 '18 at 15:27
0

Using this post.

\documentclass{article}
\usepackage{mathtools}% also loads `amsmath'
\usepackage{amssymb}
\newtagform{noparen}{}{}
\usetagform{noparen}

\begin{document}
\begin{align*}
A \setminus (B \cup D) & = A \cap (B \cup D)^C\\
& = A \cap (B^C \cap D^C)\\
& = A \cap B^C \cap D^C\\
& = A \cap A \cap B^C \cap D^C\\
& = A \cap B^C \cap A \cap D^C\\
& = (A \cap B^C) \cap (A \cap D^C)\\
& = (A \setminus B) \cap (A \setminus D). \tag{$\blacksquare$}
\end{align*}
\end{document}
6
  • For me this worked perfectly, and if one wishes to return to normal tagging, one can use \usetagform{default}, as in the aforementioned post
    – cws
    Jan 19 '18 at 4:58
  • @cwr Thanks, I was just about to add this to the answer, but now it's in your comment - even better ;-)
    – user121799
    Jan 19 '18 at 5:00
  • @cws coinsider Texnicians answer instead, no extra packages
    – daleif
    Jan 19 '18 at 11:45
  • @daleif I tried to remove my answer but this is not possible as long as it is accepted.
    – user121799
    Jan 20 '18 at 2:55
  • You'll probably need to wait for the op
    – daleif
    Jan 20 '18 at 6:23
4

A very simple version: Use \tag*. So you could easily use "normal" tags within that align too.

tag*

\documentclass{article}
\usepackage{amsmath,amssymb,amsfonts}

\begin{document}
\begin{align*}
A \setminus (B \cup D) & = A \cap (B \cup D)^C\\
& = A \cap (B^C \cap D^C)\\
& = A \cap B^C \cap D^C\\
& = A \cap A \cap B^C \cap D^C\\
& = A \cap B^C \cap A \cap D^C\\
& = (A \cap B^C) \cap (A \cap D^C)\\
& = (A \setminus B) \cap (A \setminus D). \tag*{$\blacksquare$}
\end{align*}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.