Math & Scienceamsthm | Customized Proof Environment

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

amsthm | Customized Proof Environment

Post by patricia__88 »

Does anyone know how can I write "Proof" in normal letters, not cursive? And with colon, I mean "Proof:". And concurrently end mark "ckd." in the last line of a proof? I use the report class. 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}

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
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

amsthm | Customized Proof Environment

Post by localghost »

Get used to always providing a proper minimal example in order to give an adequate problem description.

The below code shows an approach.

Code: Select all

\documentclass[polish]{article}
\usepackage[T1]{fontenc}
\usepackage{selinput}   % semi-automatic detection
\SelectInputMappings{   % of input encoding by
  cacute={ć},           % a list of selected glyphs
  lslash={ł},           % see: http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt
  Euro={€}
}
\usepackage{babel}
\usepackage{mathtools}  % loads »amsmath«
\usepackage{amsthm}

\renewcommand*{\qedsymbol}{ckd.}
\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
  \pushQED{\qed}%
  \normalfont \topsep6\p@\@plus6\p@\relax
  \trivlist
  \item[\hskip\labelsep
        \upshape
    #1\@addpunct{:}]\ignorespaces
}{%
  \popQED\endtrivlist\@endpefalse
}
\makeatother

\begin{document}
  \begin{proof}
    Proof text.
  \end{proof} 
\end{document}
This question overlaps with the one you asked in another topic [1]. I wonder why the discussion can't continue there, particularly as you got very similar advice here. Perhaps you can explain.

[1] View topic: The end mark of proof


Thorsten
patricia__88
Posts: 13
Joined: Wed Mar 14, 2012 10:20 am

amsthm | Customized Proof Environment

Post by patricia__88 »

Ok it's work in new file. When I copy to my preamble my ckd. it's ok, it's in last line of proof, but my proof it's look like this:
Proof::
I don't know why it's ona more colon, only the first proof it's ok it's Proof:
but next all proof it's like this Proof::
And I can't use this

Code: Select all

\usepackage{babel}
because then is some problem.

And sory to this new topic, but there I was some own idea, but it doesn't work, and I complicate this, so some users maybe will not understand what I want.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: amsthm | Customized Proof Environment

Post by localghost »

There is still no useful information. Unfortunately, you did neither follow the links in my last reply nor did you give a comprehensible problem description for the critical parts of your document. So it seems to me like I have wasted my time with my explanations. For the time being I will have a look at other topics and see if I can help there. m(
patricia__88
Posts: 13
Joined: Wed Mar 14, 2012 10:20 am

Re: amsthm | Customized Proof Environment

Post by patricia__88 »

I don't know English language very well so I don't know what is your problem?!
So i can't read your link. Maybe you don't understand what i need in my document?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

amsthm | Customized Proof Environment

Post by Stefan Kottwitz »

Hi Patricia,

I think Thorsten understood what you said. However, he gave suggestions which you did not follow. Your choice, but don't wonder why he or I don't deal much with your problem then. The same happened to me, I gave at least three suggestions in your other thread, but they have been ignored. So why should I write more then? Again, you posted an incomplete example, but included many unnecessary code, obviously did not read what's behind the given links.

No problems with mistakes, but it would be good to read what people write and to try to understand and to improve information in questions. That makes it easier for readers to provide help.

Usually, I would give such moderator's advice in a private message. However, here it's already a topic.

Let's hope other readers are willing to help, good luck!
I guess Thorsten and I would join again and help when we feel our suggestions have been understood. We are not resentful. ;-)

Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

amsthm | Customized Proof Environment

Post by localghost »

patricia__88 wrote:I don't know English language very well so I don't know what is your problem?!
So i can't read your link. Maybe you don't understand what i need in my document?
So the main problem here seems to be a language barrier. But we can't help you with that. So you either improve your English or refer to a LaTeX forum where your mother tongue is the official language.

I understand what you need in your document. But due to missing information I am not able to comprehend the problem you are facing when trying to achieve what you want. Your homework is reduce the problem to what we call a minimal example. This example contains only the problematic code but at the same time is compilable for everybody without any modifications. This example shall reproduce the undesired behaviour that you described. All these things are explained in detail if you follow the given links which have the necessary instructions for you. The purpose of these links is to refer to information so that we don't have to explain again and again.

If you don't master the English language in speech and writing, you are quite at a loss here. All explanations and instructions are given in English. And package manuals are generally written in English. So the mastery of this language is essential. By the way, my mother tongue is German.
patricia__88
Posts: 13
Joined: Wed Mar 14, 2012 10:20 am

Re: amsthm | Customized Proof Environment

Post by patricia__88 »

Heh my language is polish, but my problem is gone;) Your code, which you write here help me. Earlier I don't cancel something. So thanks a lot, I tire which this from few days, and now it work! Thanks a lot again:)
Post Reply