# How can I input endmark?

This is my code

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[thmmarks,standard,thref]{ntheorem}
\usepackage{graphicx}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\theoremseparator{.}
\theoremsymbol{\ensuremath{\square}}
\newtheorem{sol}{Soluttion}

\begin{document}
\begin{sol}
This is an exercise
\end{sol}

\begin{sol}
This is an exercise
$$x^2 - 2(m+1)x - m^2 - 1 = 0.$$
\end{sol}
\end{document}


I input endmark, but after I can not receive endmark.

-
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks , they'll be marked as code, as can be seen in Gonzalo’s edit. You can also highlight the code and click the “code” button (with “{}” on it). – Tobi May 29 '12 at 14:49
Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. – Tobi May 29 '12 at 14:50
I do get both endmarks with your example code. Are you using outdated package(s)? – Gonzalo Medina May 29 '12 at 14:51
That's odd. The example on page 18 of the ntheorem manual leads me to believe that this should work. It seems that one is also supposed to pass the amsmath option to ntheorem after amsmath is loaded, but this does not fix things on my end. – Dylan Moreland May 29 '12 at 17:31
The first run of the document won't show the endamrk at the equation environment; after the second run, the endmark will be placed. Also notice that you should load ntheorem including the amsmath option: \usepackage[amsmath,thmmarks,standard,thref]{ntheorem}. – Gonzalo Medina May 29 '12 at 17:39

## 1 Answer

what you want is already provided by the proof environment of amsthm.

try the following (simplified from your example):

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb} % loads amsfonts automatically

\begin{document}
\begin{proof}[Solution]
This is an exercise
\end{proof}

\begin{proof}[Solution]
This is an exercise
$$x^2 - 2(m+1)x - m^2 - 1 = 0. \qedhere$$
\end{proof}
\end{document}


the proof heading can be changed to "Solution" by adding the code

\renewcommand{\proofname}{Solution}


in the preamble.

only the proof environment is set up to recognize \qedhere`. adding this facility to theorem-class environments is on the ams list of requests for consideration, but isn't likely to be looked at for a while.

-
What's the definition of "a while"?:) – Yiannis Lazarides May 29 '12 at 18:10
@YiannisLazarides -- no earlier than next year. (the department priority list is rather full, and this isn't at the top.) – barbara beeton May 29 '12 at 18:49
Thanks looking forward to the updates. – Yiannis Lazarides May 29 '12 at 18:53
@YiannisLazarides -- so am i ... – barbara beeton May 29 '12 at 18:55
Thank you very much. But, i i use \usepackage[thmmarks,standard,thref]{ntheorem} how must i do? Please help me. – toandhsp May 29 '12 at 23:00