Math & ScienceThe end mark of proof

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
patricia__88
Posts: 13
Joined: Wed Mar 14, 2012 10:20 am

The end mark of proof

Post by patricia__88 »

This is my preamble:

Code: Select all

\documentclass[12pt,a4paper,oneside]{report}
\linespread{1.3}
\usepackage[utf8]{inputenc}
\usepackage{polski} 
\usepackage[T1]{fontenc}
\usepackage{indentfirst}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{color}
\newtheorem{tw}{Twierdzenie}[chapter]
\newtheorem{lem}{Lemat}[chapter]
\newtheorem{wn}{Wniosek}[chapter]
\theoremstyle{definition}
\newtheorem{deff}{Definicja}[chapter]
%\renewcommand{\thedeff}{\!\!}
\newtheorem{ft}{Fakt}[chapter]
\newtheorem{ex}{Przykład}[chapter]
\newtheorem{uw}{Uwaga}[chapter]
\newtheorem{zad}{Zadanie}[chapter]
\newtheorem{wl}{Własność}[chapter]
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{enumerate}
\geometry{vmargin=2.5cm, inner=3.0cm, outer=2.5cm, includehead, includefoot}
\usepackage{amsfonts}
\usepackage[centertags]{amsmath}
\numberwithin{equation}{chapter}
\usepackage{fancyhdr}
\usepackage{ifsym}
\pagestyle{fancy}
\fancyhead[L,RO]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\qedsymbol}{ckd.}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\Large\bfseries\center}{\chaptertitlename\ \thechapter}{0pt}{\Large}
\titlespacing*{\chapter}{0pt}{0pt}{40pt}
\setlength\arraycolsep{2pt}
\makeatletter
\newcommand{\labitem}[2]{
\def\@itemlabel{\textbf{#1}}
\item
\def\@currentlabel{#1}\label{#2}}
\makeatother
\titleformat{\section}
{\normalfont\large\bfseries}{\thesection}{1em}{\large}
\renewenvironment{proof}{\noindent Dowód:}{\hfill ckd.}
How can I move the end mark of proof from the next line to the last line of proof?
I'm trying

Code: Select all

qedhere
but it does'nt work.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

The end mark of proof

Post by Stefan Kottwitz »

Hi,

this code does not show this problem. Even if I add

Code: Select all

\begin{document}
\begin{proof}
text
\end{proof}
\end {document}
to this preamble, it can be seen that the end mark is at the end of the last line.

That's why I suggest, in this case and in all cases of problems:
  • Post a complete example, which is either compilable or shows the error when compiled, if the problem is an error.
  • Before you post the example, remove all what is not related to the problem. In this example, nobody needs to know that you load fancyhdr, graphicx, enumerate etc. and many more definitions from the preamble. The code could become very short this way, so it can easily be tested an fixed.
Have a look at the "Infominimal working example" explanation to learn why and how. Perhaps post such a better example if you would like readers to fix that.

Stefan
LaTeX.org admin
patricia__88
Posts: 13
Joined: Wed Mar 14, 2012 10:20 am

The end mark of proof

Post by patricia__88 »

Sory, I want mark ckd. to the end of proof not a box, so I write this:

Code: Select all

\renewcommand{\qedsymbol}{ckd.}
And I want a colon after a word "proof", it's mean "Proof:".
I write this:

Code: Select all

\renewenvironment{proof}{\noindent Proof:}{\hfill ckd.}
but then my "ckd." was at next line. I write

Code: Select all

\qedhere
to move the end mark from the next line, to the last proof line, but it's does'nt work.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

The end mark of proof

Post by Stefan Kottwitz »

Well, it works for me, as you can see here:
proof.png
proof.png (1.64 KiB) Viewed 6814 times
So your situation is somehow different, which your code doesn't show. Perhaps you mean a situation where a proof ends with displayed math, I can imagine there's an undersired vertical skip.

Unfortunately, you did not follow my advice regarding a good example, seems like I have wasted time explaining this, so I will deal with other topics.

Stefan
LaTeX.org admin
patricia__88
Posts: 13
Joined: Wed Mar 14, 2012 10:20 am

The end mark of proof

Post by patricia__88 »

I know it's something wrong, because in first proof it's work, but in the next proof, irrespective of the proof is end by text or displayed math, the end mark is in the next line.
Example:

Code: Select all

\begin{proof}
Ponieważ $d$ jest funkcją multiplikatywną, więc
\begin{displaymath}
d(n)=d\left( \prod_{i=1}^{s}p_{i}^{\phantom{i}\alpha_{i}} \right)=\prod_{i=1}^{s}d \left(p_{i}^{\phantom{i}\alpha_{i}} \right).
\end{displaymath}
Dodatnimi dzielnikami wyrażenia $p_{i}^{\phantom{i}\alpha_{i}}$ są liczby: $1, p_{i}, p_{i}^{2}, \ldots , p_{i}^{\phantom{i}\alpha_{i}}$, więc $d(p_{i}^{\phantom{i} \alpha_{i}})=\alpha_{i}+1$, stąd
\begin{displaymath}
d(n)=\prod_{i=1}^{s}\left(\alpha_{i}+1\right), \ \qedhere
\end{displaymath}
\end{proof}
User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

The end mark of proof

Post by Stefan Kottwitz »

This can be solved with ntheorem, which provides better placement of endmarks following displayed math.

Stefan
LaTeX.org admin
patricia__88
Posts: 13
Joined: Wed Mar 14, 2012 10:20 am

The end mark of proof

Post by patricia__88 »

Ok never mind, how can I write "Proof:"
I write this

Code: Select all

\begin{proof}[\normalfont Dowód:] text \end{proof}
, but I see "Proof:."
How can I delete "."?
Post Reply