Text FormattingChanging section format

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
juriguen
Posts: 5
Joined: Sun Dec 27, 2009 1:28 pm

Changing section format

Post by juriguen »

Hi

Lets see if someone is able to help me. I am trying to write some appendices to a document, and I don't want to use the "Appendix" package. The reason is that I haven't been able to find a good way to control de options, remove the blank pages in between the other text and the appendices, etc.

So my idea was to change the section header just before writing the appendices, which should be just fine. What I have used is the following:
\renewcommand{\thesection}{Appendix \Alph{section}}
\setcounter{section}{0}
\renewcommand{\theequation}{A.\arabic{equation}}
\setcounter{equation}{0}

It does what I want, i.e. "Appendix A BLABLABLA" and sets equations numbers as I want. However, I get a couple of errors when I compile with "Latex Editor (LED)" and I don't know why. Plus the document is properly generated... I do it at the end of the document, so that might be a problem...

Any help?

Thanks
Jose

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Changing section format

Post by meho_r »

For starters, please read Board Rules and follow its guidelines.
juriguen
Posts: 5
Joined: Sun Dec 27, 2009 1:28 pm

Re: Changing section format

Post by juriguen »

I am sorry if I posted it wrong. What should I change? I will try to have a look at the guidelines asap.

Meanwhile, if anybody has any suggestion, it would be great!
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Changing section format

Post by meho_r »

1. We have no idea which document class you're using
2. We have no idea which customizations have you made, and where
3. We have no idea what kind of errors you encountered
4. Since there's no example code we're unable to do any tests...

So, if you want someone to answer your question, simply follow Board Rules and always provide a Minimal Working Example (MWE) (even for the most simple cases) which shows the problem clearly.
juriguen
Posts: 5
Joined: Sun Dec 27, 2009 1:28 pm

Changing section format

Post by juriguen »

Sorry it took me so long to answer. I have been quite busy doing the doc content itself. Thanks for the answers so far.

I have a working example now, and I still get the error and warning when I compile it. It says that I use the same section id twice, section 1.1, which is true. But I don't know how to have full control over the Appendix section doing it differently. In my document, there's an error, but the pdf is generated, and the output is what I am looking for.

Here's the code

Code: Select all

Code, edit and compile here:
\documentclass{book}
\author{
\textsc{Jose Antonio Urig\"uen}
}
\date{\today}
\usepackage[paper = a4paper, dvips, top = 2.5cm, left = 2.5cm, right = 2cm, head = 1cm, foot = 1cm, bottom = 2cm]{geometry}
\usepackage{enumerate}
\usepackage{amssymb, amsmath}
\usepackage{mathabx}
\usepackage{paralist}
\usepackage{graphicx}
\usepackage[hang,small,bf]{caption}
\usepackage{subfigure}
\usepackage{listings}
\usepackage{hyperref}
\usepackage{calc}
\usepackage{booktabs}
\usepackage{fancyhdr}
\usepackage[page]{appendix}
\renewcommand{\thefootnote}{(\roman{footnote})}
\newcommand{\suchthat}{\bigm|}
\pagestyle{fancy}
\fancyhf[ROH,LEH]{}
\fancyhf[REH]{\nouppercase\leftmark}
\fancyhf[LOH]{\nouppercase\rightmark} % \leftmark prints the current section
\fancyhf[ROF,LEF]{\thepage}
\fancyhf[REF,LOF,C]{}
\DeclareMathOperator{\sinc}{sinc}
\DeclareMathOperator{\rect}{rect}
\begin{document}
\chapter{Sampling at the rate of innovation: Theory and applications}
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Thanks
Jose
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Changing section format

Post by meho_r »

This issue is related to hyperref package, but I don't think it will cause some serious problems, at least not in printed material (maybe bookmarks/links in pdf output will not be all correct though). So, it's rather a warning than an error. You may copy the exact error and search for it to obtain more infos (e.g., you may start here).
juriguen
Posts: 5
Joined: Sun Dec 27, 2009 1:28 pm

Re: Changing section format

Post by juriguen »

Thanks a lot. I will try to solve it that way!

Jose
Post Reply