Text FormattingA big digression within a section using ``environment''

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
salehin
Posts: 34
Joined: Wed Jun 10, 2009 1:29 am

A big digression within a section using ``environment''

Post by salehin »

Hello everyone

I have a Section within which I have a big Digression in the middle of it. So for that I have added

Code: Select all

\newtheorem{digression}{Digression}
in the .TeX preamble.

In addition, I have lots of remarks within the 'digression' bit. But it is not very clear whether I'm reading the main texts of the Digression or the remarks on the digression section - mainly because both Digression and Remark are using italic font [, which afaik, supposed to work that way]. I was wondering if it is possible to make the digression texts as normal and keep the remarks as italics.

If you have any idea of writing it up slightly differently, without taking the Digression in a completely different section, please do so. The main reason is that after the digression bit I need to continue with the main topic.
Here is a .tex example.

Code: Select all

\documentclass[a4paper,12pt, final]{article}
\usepackage[margin=2.54cm,top=2.54cm]{geometry}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{array}

\newtheorem{theorem}{Theorem}
\newtheorem{algorithm}{Algorithm}
\newtheorem{axiom}{Axiom}
\newtheorem{case}{Case}
\newtheorem{claim}{Claim}
\newtheorem{conclusion}{Conclusion}
\newtheorem{condition}{Condition}
\newtheorem{conjecture}{Conjecture}
\newtheorem{corollary}{Corollary}
\newtheorem{criterion}{Criterion}
\newtheorem{definition}{Definition}
\newtheorem{digression}{Digression}
\newtheorem{example}{Example}
\newtheorem{exercise}{Exercise}
\newtheorem{lemma}{Lemma}
\newtheorem{notation}{Notation}
\newtheorem{problem}{Problem}
\newtheorem{proposition}{Proposition}
\newtheorem{remark}{Remark}
\newtheorem{solution}{Solution}
\newtheorem{summary}{Summary}
\hypersetup{colorlinks=true, linkcolor=black}

\begin{document}

\title{Dynamic Programming}
\author{My Name \\
My University}
\maketitle

%\keywords{Dynamic programming, Bellman equation, stochastic, Cobb-Douglas, eigenvalue, block matrix}

% \abstract{An example of stochastic Bellman equation (with Investment decision)}

From the outset we should note that in this quadratic approximation method,
there is no possibility of explosive solution because we know where the
steady state is, due to the fact that we are approximating everything around
a steady state. We will get explosive results if we made a bad guess about
the value function.

\section{Setup}

Consider an infinite horizon utility,
\begin{equation}
\max_{\left\{ \left( c_{t},k_{t+1}\right) \right\} _{t=0}^{\infty }}E_{0}
\left[ \sum_{t=0}^{\infty }\beta ^{t}\frac{c_{t}^{1-\theta }-1}{1-\theta }%
\right] ,\qquad \theta >0  \label{life_uitl}
\end{equation}%
subject to%
\begin{eqnarray*}
c_{t}+k_{t+1} &=&z_{t+1}k_{t}^{\alpha }+\left( 1-\delta \right) k_{t}, \\
AR\left( 1\right) :x_{t+1} &=&\rho x_{t}+\varepsilon _{t+1}, \\
\ln \left( z_{t+1}\right) &=&\rho \ln \left( z_{t}\right) +\varepsilon
_{t+1}, \\
\varepsilon _{t} &\overset{i.i.d.}{\sim }&N\left( 0,\sigma _{\varepsilon
}^{2}\right) .
\end{eqnarray*}%
We note that $z_{t}$ is moving around [i.e., stochastic component.]

\begin{remark}[Benefits of $E$]
It allows us to avoid more complicated notations.
\end{remark}

\begin{digression}[2 period model case]
Let us consider a $2$ period model,
\begin{equation}
\max_{\left( c_{0},c_{1}^{H},c_{1}^{L},k_{1}\right) }\frac{c_{0}^{1-\theta }%
}{1-\theta }+\beta \left[ \frac{\left( c^{H}\right) ^{1-\theta }-1}{1-\theta
}\pi +\frac{\left( c^{L}\right) ^{1-\theta }-1}{1-\theta }\left( 1-\pi
\right) \right] ,\qquad \alpha =1  \label{digress}
\end{equation}

\begin{remark}
my 1st remark under digression.
\end{remark}

\begin{remark}
2nd remark under digression.
\end{remark}

[Digression resumes here] Now the FOCs,
\begin{equation}
\frac{\partial \mathcal{L}}{\partial c_{0}}=0\Rightarrow c_{0}^{-\theta
}=\lambda _{0},  \label{1}
\end{equation}
\end{digression}

[Here we resume ourdiscussion for the section \textbf{Setup}] Back to the
infinte horizon case,
\begin{equation}
\frac{\partial \mathcal{L}}{\partial c_{t}}=0\Rightarrow \beta
^{t}c_{t}^{-\theta }=\lambda _{t}  \label{5}
\end{equation}
\begin{equation}
\frac{\partial \mathcal{L}}{\partial k_{t+1}}=0\Rightarrow \lambda _{1}=E_{t}
\left[ \lambda _{t+1}\left( 1+z_{t+1}\right) \left( 1+z_{t+1}\alpha
k_{t+1}^{\alpha }-\delta \right) \right] .  \label{6}
\end{equation}
In eq. (\ref{6}), it is \emph{assumed} that we are at period $t$ and $z_{t}$
has been \emph{revealed}.
\begin{equation}
\overset{(\ref{5})}{\Rightarrow }c_{t}^{-\theta }=\beta E_{t}\left[
c_{t+1}^{-\theta }\left( 1+z_{t+1}\alpha k_{t+1}^{\alpha }-\delta \right) 
\right] .  \label{7}
\end{equation}

\end{document}
Thanks for reading. :)

Ash

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

A big digression within a section using ``environment''

Post by gmedina »

Hi,

you can change the style for your theorem-like environments using the amsthm package (ntheorem gives you even more options); there are three predefined styles: plain (used as default), definition and remark; additionaly, you can create your own styles (refer to the package documentation for details).

A little example using your code:

Code: Select all

\documentclass[a4paper,12pt, final]{article}
\usepackage[margin=2.54cm,top=2.54cm]{geometry}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{array}

\newtheorem{theorem}{Theorem}
\newtheorem{algorithm}{Algorithm}
\newtheorem{axiom}{Axiom}
\newtheorem{case}{Case}
\newtheorem{claim}{Claim}
\newtheorem{conclusion}{Conclusion}
\newtheorem{condition}{Condition}
\newtheorem{conjecture}{Conjecture}
\newtheorem{corollary}{Corollary}
\newtheorem{criterion}{Criterion}
\newtheorem{definition}{Definition}
\newtheorem{example}{Example}
\newtheorem{exercise}{Exercise}
\newtheorem{lemma}{Lemma}
\newtheorem{notation}{Notation}
\newtheorem{problem}{Problem}
\newtheorem{proposition}{Proposition}
\newtheorem{remark}{Remark}
\newtheorem{solution}{Solution}
\newtheorem{summary}{Summary}
\theoremstyle{definition}
\newtheorem{digression}{Digression}

\hypersetup{colorlinks=true, linkcolor=black}


\begin{document}

\title{Dynamic Programming}
\author{My Name \\
My University}
\maketitle

%\keywords{Dynamic programming, Bellman equation, stochastic, Cobb-Douglas, eigenvalue, block matrix}

% \abstract{An example of stochastic Bellman equation (with Investment decision)}

From the outset we should note that in this quadratic approximation method,
there is no possibility of explosive solution because we know where the
steady state is, due to the fact that we are approximating everything around
a steady state. We will get explosive results if we made a bad guess about
the value function.

\section{Setup}

Consider an infinite horizon utility,
\begin{equation}
\max_{\left\{ \left( c_{t},k_{t+1}\right) \right\} _{t=0}^{\infty }}E_{0}
\left[ \sum_{t=0}^{\infty }\beta ^{t}\frac{c_{t}^{1-\theta }-1}{1-\theta }%
\right] ,\qquad \theta >0  \label{life_uitl}
\end{equation}%
subject to%
\begin{eqnarray*}
c_{t}+k_{t+1} &=&z_{t+1}k_{t}^{\alpha }+\left( 1-\delta \right) k_{t}, \\
AR\left( 1\right) :x_{t+1} &=&\rho x_{t}+\varepsilon _{t+1}, \\
\ln \left( z_{t+1}\right) &=&\rho \ln \left( z_{t}\right) +\varepsilon
_{t+1}, \\
\varepsilon _{t} &\overset{i.i.d.}{\sim }&N\left( 0,\sigma _{\varepsilon
}^{2}\right) .
\end{eqnarray*}%
We note that $z_{t}$ is moving around [i.e., stochastic component.]

\begin{remark}[Benefits of $E$]
It allows us to avoid more complicated notations.
\end{remark}

\begin{digression}[2 period model case]
Let us consider a $2$ period model,
\begin{equation}
\max_{\left( c_{0},c_{1}^{H},c_{1}^{L},k_{1}\right) }\frac{c_{0}^{1-\theta }%
}{1-\theta }+\beta \left[ \frac{\left( c^{H}\right) ^{1-\theta }-1}{1-\theta
}\pi +\frac{\left( c^{L}\right) ^{1-\theta }-1}{1-\theta }\left( 1-\pi
\right) \right] ,\qquad \alpha =1  \label{digress}
\end{equation}

\begin{remark}
my 1st remark under digression.
\end{remark}

\begin{remark}
2nd remark under digression.
\end{remark}

[Digression resumes here] Now the FOCs,
\begin{equation}
\frac{\partial \mathcal{L}}{\partial c_{0}}=0\Rightarrow c_{0}^{-\theta
}=\lambda _{0},  \label{1}
\end{equation}
\end{digression}

[Here we resume ourdiscussion for the section \textbf{Setup}] Back to the
infinte horizon case,
\begin{equation}
\frac{\partial \mathcal{L}}{\partial c_{t}}=0\Rightarrow \beta
^{t}c_{t}^{-\theta }=\lambda _{t}  \label{5}
\end{equation}
\begin{equation}
\frac{\partial \mathcal{L}}{\partial k_{t+1}}=0\Rightarrow \lambda _{1}=E_{t}
\left[ \lambda _{t+1}\left( 1+z_{t+1}\right) \left( 1+z_{t+1}\alpha
k_{t+1}^{\alpha }-\delta \right) \right] .  \label{6}
\end{equation}
In eq. (\ref{6}), it is \emph{assumed} that we are at period $t$ and $z_{t}$
has been \emph{revealed}.
\begin{equation}
\overset{(\ref{5})}{\Rightarrow }c_{t}^{-\theta }=\beta E_{t}\left[
c_{t+1}^{-\theta }\left( 1+z_{t+1}\alpha k_{t+1}^{\alpha }-\delta \right) 
\right] .  \label{7}
\end{equation}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
salehin
Posts: 34
Joined: Wed Jun 10, 2009 1:29 am

A big digression within a section using ``environment''

Post by salehin »

Thanks a lot, gmedina. You've been very kind in replying all my queries. That amsthm documentation was very helpful as well.

Cheers :)
Post Reply