6

How do I add a \square (or anything else) at the end of a paragraph and align it to the right as if it is the end of proof (without \begin{proof} at the beginning). I don't want to see the "proof" at the beginning.

And at the same time, I only need a local/temporary change. I don't want to change the "proof" environment at the beginning. I still want to use \begin{proof} normally in other places

0

2 Answers 2

7

You just declare \qed at the end of the paragraph, which is essentially what \end{proof} does automatically (with some more bells and whistles you don't need for your situation).

\documentclass{article} \usepackage{amsthm} \begin{document} A paragraph with a QED symbol at the far end. Let's go on with nonsense words just to get a few lines. Let's go on with nonsense words just to get a few lines. Let's go on with nonsense words just to get a few lines.\qed \end{document} 

enter image description here

You can locally change the QED symbol. I suggest a special command for the task you want (a triangle instead of the square).

\documentclass{article} \usepackage{amsthm} \newcommand{\triangleqed}{% \begingroup \renewcommand{\qedsymbol}{\ensuremath{\triangle}}% \qed \endgroup } \begin{document} A paragraph with a QED symbol at the far end. Let's go on with nonsense words just to get a few lines. Let's go on with nonsense words just to get a few lines. Let's go on with nonsense words just to get a few lines.\qed A paragraph with a QED symbol at the far end. Let's go on with nonsense words just to get a few lines. Let's go on with nonsense words just to get a few lines. Let's go on with nonsense words just to get a few lines.\triangleqed A paragraph with a QED symbol at the far end. Let's go on with nonsense words just to get a few lines. Let's go on with nonsense words just to get a few lines. Let's go on with nonsense words just to get a few lines.\qed \end{document} 

enter image description here

3
  • Thanks, and what is the easiest way to replay \qed with other symbols like $\triangle$ temporally that still do the same job (pushed to the end of a line)? Commented Sep 9, 2022 at 22:03
  • @NoOne I added a possible way. Commented Sep 9, 2022 at 22:14
  • @NoOne You should edit the question to also reflect the added requirement. Commented Sep 9, 2022 at 22:23
2

Do you mean like this:

\documentclass{article} \usepackage{lipsum} \usepackage{amssymb} \begin{document} \lipsum[2] \unskip\nobreak\hfill $\square$ \end{document} 

Output: enter image description here

This shows how output has been produced: enter image description here

2
  • 2
    You perhaps meant not to have a blank line before \hfill$\square$. However, this doesn't guarantee that the square falls at the end of the line. And the symbol used by amsthm is not $\square$. Commented Sep 9, 2022 at 21:23
  • 1
    Yes, e.g. with \lipsum[8] the square would go to the start of the next line. Commented Sep 9, 2022 at 21:28

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.