Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

enter image description here

\documentclass[12pt‎ , ‎a4paper]{report}‎
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{xcolor}‎
\usepackage{titlesec}‎‎
\usepackage[top=3cm,bottom=3cm,left=2.2cm,right=6.2‎cm,marginparwidth=4.5‎cm‎,headsep=10pt,a4paper]{geometry}‎
\usepackage{titletoc}
‎\newcommand{\exersize}{‎‎\section*‎{exersize}‎‎‎}‎
%%%%%%%%%%%%%%%%%%%%%%%
‎\begin{document}‎‎‎‎

‎\chapter{Chapter one}‎

‎‎\section{Section 1}‎‎‎‎
\exersize
‎
‎\end{document}‎
share|improve this question
    
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Christian Hupfer Apr 27 at 6:31
    
Please have a look on various possibilities, such as amsthm or tcolorbox etc. –  Christian Hupfer Apr 27 at 6:34

1 Answer 1

An example with a theorem like environment:

\documentclass[12pt,a4paper]{report}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{xcolor}
\usepackage[top=3cm,bottom=3cm,left=2.2cm,right=6.2cm,marginparwidth=4.5cm,headsep=10pt,a4paper]{geometry}
\usepackage{blindtext}

\newmdtheoremenv[%
  outerlinewidth=2,roundcorner=2pt,leftmargin=0,rightmargin=0,
  outerlinecolor=blue,innertopmargin=\topskip,splittopskip=\topskip,
]{exercise}{Exercise}%[section]

\begin{document}
\chapter{Chapter one}
\section{Section 1}

\begin{exercise}[optional argument]
foo bar baz
\end{exercise}

\begin{exercise}
\blindtext
\end{exercise}

\blindtext
\end{document}

enter image description here

share|improve this answer
    
thanks very much. I whant no marginpar like style's marginpar chapter and box just around "Exersize" –  iman Apr 27 at 7:10
    
that is easy: \fcolorbox{blue}{white}{Exercise} –  Herbert Apr 27 at 7:13
    
I whant no Margin –  iman Apr 27 at 7:25
    
@iman: Which margin do you mean? Between the box frame and "Exercise"? Reduce \fboxseprule then when using \fcolorbox. –  Christian Hupfer Apr 27 at 7:31
    
Tanks. I whant no border the page and no fancy for section Exercise. –  iman Apr 27 at 7:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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