0

I have the following code

\documentclass{book}
\usepackage[fleqn]{amsmath}

\usepackage{amsmath,amssymb}

\usepackage{mathrsfs}

\usepackage{imakeidx}

\makeindex

\begin{document}

\chapter{Preface}

\chapter{Some set theory} \end{document}

But now I'm getting Preface numbered as a chapter 1. How can I avoid this ?

To make things faster I have 2 not completely related questions : How can I insert a TeX source A.tex without \begin{document} to a master file and how can I number equations generally and consistently for all such inserted documents ? I.e. if the Chapter number is 2, then the equation in it should be

`2.3.1

2.3.2` etc.

user2925716
  • 1,940
  • 1
    There are two ways to avoid numbering the preface. (1) After \begin{document} insert \frontmatter, and just before the first \chapter, insert \mainmatter. (2) Enter the preface as \chapter*. Off topic: you have loaded amsmath twice; it''s a good thing the option fleqn was entered with the first load, otherwise it would be ignored. – barbara beeton May 20 '23 at 19:21
  • @barbarabeeton Please how do I achieve a consistent numbering across pages. I'm getting this but I need something like 1.1. ZF 1.2 ZF....1.3 for some finitely many elements 1.4.for all other i. So I need that every equation in a chapter 1 is preceeded by 1 . and that a second coordinate is always increased by 1 in that chapter 1. – user2925716 May 20 '23 at 20:38
  • 1
    Please don't ask several unrelated questions in the same "question". – pst May 20 '23 at 22:24
  • If a subsidiary file begins with \chapter, you can incorporate it with \include{A}. If the file begins with something else, use \input{A}. To number equations withing sections, specify \counterwithin{equation}{section}. You should really look at a reference manual. There are some good xuggestions here: Which manuals are on your "TeX Reference" shelf? – barbara beeton May 20 '23 at 22:29
  • @barbarabeeton Sorry my English is poor to read a manual. Where should I put/specify this command \counterwithin{equation}{section} it doesn't seem to work properly. – user2925716 May 21 '23 at 09:25
  • @barbarabeeton Note that I need to number enumerate not eqyation. – user2925716 May 21 '23 at 09:31
  • @barbarabeeton I have put it at both places, at the top of include{A} and under and above the chapter. Nothing works. – user2925716 May 21 '23 at 09:38
  • Numbering enumerate can't be done with counterwithin. Please ask a new question about that. – barbara beeton May 21 '23 at 14:42

0 Answers0