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.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

\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}

\section{Introduction}

Sampling, or the conversion from real-life continuous signals to discrete sequences of numbers that represent the original signals, plays a vital role for signal processing. In the typical sampling setup, depicted in figure (), the original continuous-time signal $x(t)$ is filtered prior to being sampled. Typically, the discrete set of values $x[n], n\in\mathbb{Z}$ taken from the original signal $x(t), t\in\mathbb{R}$ are measurements obtained at uniform or arbitrary instants of time. The former is known as uniform sampling, and the samples are taken at equidistant instances, for example every $T$ seconds, i.e. $x[n] = x(nT), T\in\mathbb{R}$. The latter is known as nonuniform or irregular sampling, and the samples are taken at any points in time, $x[n] = x(t_{n}), t_{n}\in\mathbb{R}$.


\renewcommand{\thesection}{Appendix \Alph{section}}
\setcounter{section}{0}
\renewcommand{\theequation}{\Alph{section}.\arabic{equation}}
\setcounter{equation}{0}  % reset counter

\section{Cram\'er Rao Bounds derivations for various kernels}

\subsection*{Cram\'er Rao Bounds for the $\sinc$ kernel}
Now that we have an expression to calculate the Cram\'er Rao bound in general, we are going to focus on the first simplified case in which a closed form can be obtained. This is when we have an input signal composed of a single Dirac, and we sample with a $\sinc$ kernel.

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