Ok I know that my question is quite local, however, I have struggled with it for a long time and I could not find the answer, so I decided to post it here.

I have to rewrite a book (which was written using Word) by LaTeX, without changing the structure and the content.

This book is divided into 2 parts; part 1 has 2 chapters and part 2 has 3 chapters. Chapters are numbered by alphabet letter like Chapter A, Chapter B,... and theorems in each chapter are numbered depending in its chapter like Theorem A1, Theorem B7,...

I have searched on the Internet for book templates, but I found nothing that fully appropriate with this style of book. Every time I tried I got troubles with numbering theorem, with index and content.... :|

Could you please help me to write the appropriate LaTeX code? Please do not tell me that I should change the way the book behaves, since the author want to keep it, and I am just an editor only.

Thank for reading my question!

update : Here is the picture that I made : enter image description here

For the theorem, I number it by hand, as the following code :

   \indent \textbf{Định lý A1.}
    (Thales thuận dạng hình học)\emph{Nếu ba đường thẳng đôi một song song $a, b, c$ cùng bị hai đường thẳng $\Delta, \Delta'$ tương ứng cắt tại $A, B, C; A’, B’, C’$ thì $\dfrac{AB}{BC}=\dfrac{A'B'}{B'C'}$. }  
  • 3
    I think you should show a picture. – karathan Apr 3 '13 at 7:30
  • 1
    One thing to pay attention the next time: do not write $a, b, c$, write the longer $a$, $b$, $c$ instead. Here you enumerate the three variables a, b and c and thus the comma needs to be outside the math environment to get the spacing correct. – Peater de Xel Apr 3 '13 at 9:52

Here is a very basic way, using the book-class and the amsmath-commands:


\usepackage{mathtools} % loads the ams-packages and provides some fixes
\usepackage{lipsum} % for dummy text only

\renewcommand{\thechapter}{\Alph{chapter}} % change chapter numbering to A, B, C, ...
\newtheorem{mytheorem}{Theorem} % define new theorem style


\chapter{Lorem Ipsum}

\begin{mytheorem} %first theorem - this will be "A.1"


\chapter{Lorem Ipsum}

\begin{mytheorem} %second theorem - this will be B.1





Based on your screenshot, try the following – you have to remove the old definition of mytheorem from the previous example, then add:

\usepackage{chngcntr} %allows you to reset counters within others

\newcounter{mytheoremcounter} %create a counter for your theorems
\setcounter{mytheoremcounter}{0}%set them to zero. At the begin of every theorem
    %, this gets increased by one, so the first theorem will be '1'
\counterwithin{mytheoremcounter}{chapter} % reset the counter in every chapter

    \indent\textbf{Theorem \thechapter\arabic{mytheoremcounter}.}

Then write the following:

(Lorem Ipsum Dolor Sit Amet) \emph{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
Ut purus elit, vestibu- lum ut, placerat ac, adipiscing vitae, felis. $\Delta$, $\Delta'$ 
Curabitur dictum gravida mauris. $A, B, C; A’, B’, C’$ mollis ac, nulla
$\dfrac{AB}{BC}=\dfrac{A'B'}{B'C'}$. }  

This produces:

enter image description here

Edit 2

The same result with an improved interface:

    \indent\textbf{Theorem \thechapter\arabic{mytheoremcounter}.} (#1) \em

Use it like this:

\begin{mytheorem}{The title}
    The theorem

With the \em you do not need to write the \emph{...} every time.

  • Thank you ralfix for your answer, but I do not mean the theorem is labeled by (A1), but I mean it is Theorem A1 : $a^2+b^2=c^2$. So how can I numbering the theorem ? – Knumber10 Apr 3 '13 at 9:14
  • 1
    If you replace the line \newtheorem{mytheorem}{Theorem} by \newtheorem{mytheorem}{Theorem}[chapter], the theorem heading will be of the form "Theorem A.1". – jub0bs Apr 3 '13 at 9:43
  • It surely is more "fitting" to use the amsthm package in such a case – but defining the environment himself it is possible to exactly match the given style without needing to define a new theorem style (if @NguyễnDuyKhánh wants the dot after the number, not as separator e.g.) – Peater de Xel Apr 3 '13 at 9:56
  • 2
    @ralfix: You can format the chapter heading as @NguyễnDuyKhánh requested by adding \usepackage{titlesec} and \titleformat{\chapter}[hang]{\bf\huge}{\Alph{chapter}.}{1pc}{} in the preamble. – Dominikus K. Apr 3 '13 at 10:52
  • @ralfix you can add the following lines to your preamble to produce the desired sectional unit headers: \usepackage{titlesec} \titleformat{\chapter}[block] {\normalfont\LARGE\bfseries\filcenter}{\thechapter.}{0.4em}{} \titleformat{\section} {\normalfont\Large\bfseries\filcenter}{\thesection.}{0.4em}{} \titlespacing*{\chapter} {0pt}{40pt}{20pt} – Gonzalo Medina Apr 4 '13 at 2:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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