7
Pruebas del paquete listings 1 \begin{displaymath} 2 \oint_{S}\vec{E}\cdot d\vec{S}=\frac{q}{\ epsilon_{0}} 3 \end{displaymath} I S ~ E · d ~ S = q 0 1 \begin{trivlist} 2 \item\input{\jobname.exa} 3 \end{trivlist} Let H be a Hilbert space, C be a closed bounded convex subset of H, T a nonex- pansive self map of C. Suppose that as n →∞, a n,k 0 for each k, and γn = k=0 (a n,k+1 - a n,k ) + 0. Then for each x in C, Anx = k=0 a n,k T k x con- verges weakly to a fixed point of T . The numbered equation utt -Δu+u 5 +u |u| p-2 =0 in R 3 ×[0, [ (1) is automatically numbered as equation 2. Let $H$ be a Hilbert space, $C$ be a closed bounded conve a nonexpansive self map of $C$. Suppose that as $n\righta $a_{n,k}\rightarrow0$ for each $k$, and $\gamma_{n}=\sum_ a_{n,k+1}-a_{n,k}\right) ˆ{+}\rightarrow0$. Then for eac $A_{n}x=\sum_{k=0}ˆ{\infty}a_{n,k}Tˆ{k}x$ converges weakl $T$ . The numbered equation \begin{equation} u_{tt}-\Delta u+uˆ{5}+u\left| u\right| ˆ{p-2}=0\text{ i ˆ{3}\times\left[ 0,\infty\right[ \label{eqn1}% \end{equation} is automatically numbered as equation \ref{eqn1}. 1 Let $H$ be a Hilbert space, $C$ be a closed bounded convex subset of $H$, $T$ 2 a nonexpansive self map of $C$. Suppose that as $n\rightarrow\infty$, 3 $a_{n,k}\rightarrow0$ for each $k$, and $\gamma_{n}=\sum_{k=0}ˆ{\infty}\left ( 4 a_{n,k+1}-a_{n,k}\right) ˆ{+}\rightarrow 0$. Then for each $x$ in $C$, 5 $A_{n}x=\sum_{k=0}ˆ{\infty}a_{n,k}Tˆ{k}x$ converges weakly to a fixed point of 6 $T$ . 7 8 The numbered equation 9 \begin{equation} 10 u_{tt}-\Delta u+uˆ{5}+u\left| u\right| ˆ{p-2}=0\text{ in }\mathbf{R} % 11 ˆ{3}\times\left[ 0,\infty\right[ \label{ eqn1} % 12 \end{equation} 13 is automatically numbered as equation \ ref{eqn1}. Let H be a Hilbert space, C be a closed bounded convex subset of H, T a nonex- pansive self map of C. Suppose that as n →∞, a n,k 0 for each k, and γn = k=0 (a n,k+1 - a n,k ) + 0. Then for each x in C, Anx = k=0 a n,k T k x con- verges weakly to a fixed point of T . The numbered equation utt -Δu+u 5 +u |u| p-2 =0 in R 3 ×[0, [ (2) is automatically numbered as equation 2. 1

Ejemplo de uso de listings

Embed Size (px)

DESCRIPTION

Ejemplo de uso de listings

Citation preview

Pruebas del paquete listings

1 \begin{displaymath}2 \oint_{S}\vec{E}\cdot d\vec{S}=\frac{q}{\

epsilon_{0}}3 \end{displaymath}

∮S

~E · d~S =q

ε0

1 \begin{trivlist}2 \item\input{\jobname.exa}3 \end{trivlist}

Let H be a Hilbert space, C be a closedbounded convex subset of H , T a nonex-pansive self map of C. Suppose that asn → ∞, an,k → 0 for each k, and γn =∑∞

k=0 (an,k+1 − an,k)+ → 0. Then foreach x in C, Anx =

∑∞k=0 an,kT

kx con-verges weakly to a fixed point of T .

The numbered equation

utt−∆u+u5+u |u|p−2 = 0 in R3×[0,∞[(1)

is automatically numbered as equation 2.

Let $H$ be a Hilbert space, $C$ be a closed bounded convex subset of $H$, $T$a nonexpansive self map of $C$. Suppose that as $n\rightarrow\infty$,$a_{n,k}\rightarrow0$ for each $k$, and $\gamma_{n}=\sum_{k=0}ˆ{\infty}\left(a_{n,k+1}-a_{n,k}\right) ˆ{+}\rightarrow0$. Then for each $x$ in $C$,$A_{n}x=\sum_{k=0}ˆ{\infty}a_{n,k}Tˆ{k}x$ converges weakly to a fixed point of$T$ .

The numbered equation\begin{equation}u_{tt}-\Delta u+uˆ{5}+u\left| u\right| ˆ{p-2}=0\text{ in }\mathbf{R}%ˆ{3}\times\left[ 0,\infty\right[ \label{eqn1}%\end{equation}is automatically numbered as equation \ref{eqn1}.

1 Let $H$ be a Hilbert space, $C$ be aclosed bounded convex subset of $H$,$T$

2 a nonexpansive self map of $C$. Supposethat as $n\rightarrow\infty$,

3 $a_{n,k}\rightarrow0$ for each $k$, and$\gamma_{n}=\sum_{k=0}ˆ{\infty}\left(

4 a_{n,k+1}-a_{n,k}\right) ˆ{+}\rightarrow0$. Then for each $x$ in $C$,

5 $A_{n}x=\sum_{k=0}ˆ{\infty}a_{n,k}Tˆ{k}x$converges weakly to a fixed point

of6 $T$ .7

8 The numbered equation9 \begin{equation}

10 u_{tt}-\Delta u+uˆ{5}+u\left| u\right|ˆ{p-2}=0\text{ in }\mathbf{R} %

11 ˆ{3}\times\left[ 0,\infty\right[ \label{eqn1} %

12 \end{equation}13 is automatically numbered as equation \

ref{eqn1}.

Let H be a Hilbert space, C be a closedbounded convex subset of H , T a nonex-pansive self map of C. Suppose that asn → ∞, an,k → 0 for each k, and γn =∑∞

k=0 (an,k+1 − an,k)+ → 0. Then foreach x in C, Anx =

∑∞k=0 an,kT

kx con-verges weakly to a fixed point of T .

The numbered equation

utt−∆u+u5+u |u|p−2 = 0 in R3×[0,∞[(2)

is automatically numbered as equation 2.

1

1 \begin{equation}2 \forall x \in \mathbf{R}:3 \qquad xˆ{2} \geq 04 \end{equation}

∀x ∈ R : x2 ≥ 0 (3)

1 \begin{displaymath}2 xˆ{2} \geq 0\qquad3 \textrm{para todo }x\in\mathbb{R}4 \end{displaymath}

x2 ≥ 0 para todo x ∈ R

Codigo de este archivo

\documentclass{article}

\usepackage{amsmath}\usepackage{amsthm}\usepackage[latin1]{inputenc}\usepackage[normalbf,normalem]{ulem}\usepackage{titlesec}\usepackage{titletoc}\usepackage{amsbsy}\usepackage{multicol}\usepackage{fancyhdr}\usepackage{extramarks}\usepackage{amsfonts}\usepackage{amssymb}\usepackage{times}\usepackage[activeacute,spanish]{babel}

\usepackage{color}

\usepackage{verbatim}\usepackage{listings}\definecolor{gray97}{gray}{.97}\definecolor{gray85}{gray}{.95}\definecolor{gray75}{gray}{.75}\definecolor{gray45}{gray}{.45}\definecolor{yellow57}{rgb}{1.00,1.00,0.84}\lstset{ frame=Ltb,

framerule=0pt,aboveskip=0.5cm,framextopmargin=3pt,framexbottommargin=3pt,framexleftmargin=0.4cm,framesep=0pt,

2

rulesep=.4pt,backgroundcolor=\color{gray97},rulesepcolor=\color{black},%stringstyle=\ttfamily,showstringspaces = false,basicstyle=\small\ttfamily,commentstyle=\color{gray45},keywordstyle=\bfseries,%numbers=left,numbersep=15pt,numberstyle=\tiny,numberfirstline = false,breaklines=true,

}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% minimizar fragmentado de listados\lstnewenvironment{listing}[1][]

{\lstset{#1}\pagebreak[0]}{\pagebreak[0]}

\lstdefinestyle{consola}{basicstyle=\scriptsize\bf\ttfamily,backgroundcolor=\color{blue57},

}

\lstdefinestyle{L}{language=TeX,}

% y en la derecha la composici’on.%% \begin{example}% \Large Esto es grande% \end{example}%% Esta parte procede de verbaim.sty de FMi%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\makeatletter\newwrite\solution@stream\openout\solution@stream=\jobname.solutions\newcounter{problem}\newcommand*{\problemname}{Problem}\newcommand{\problem}[1]{%

\refstepcounter{problem}%\problemname˜\theproblem:\enskip#1\par

3

}

\newcommand{\solution}[1]{%\protected@write\solution@stream{}{%

\protect\print@solution{\theproblem}{#1}%}%

}

\newcommand*{\printsolutions}{%\closeout\solution@stream\makeatletter\InputIfFileExists{\jobname.solutions}{}{}%\makeatother

}

\newcommand*{\solutionname}{Solution}\newcommand{\print@solution}[2]{%

\solutionname˜#1:\enskip#2\par

}

%\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\makeatletter%\def\ThisFile{\yorname}%\let\OldInput\input%\renewcommand{\input}[1]{%% \renewcommand{\ThisFile}{#1}%% \OldInput{#1}%%}\newwrite\ejercicio@out\newenvironment{ejercicio}%{\begingroup% Lets Keep the Changes Local\@bsphack\immediate\openout \ejercicio@out \jobname.exa\let\do\@makeother\dospecials\catcode‘\ˆˆM\active\def\verbatim@processline{%

\immediate\write\ejercicio@out{\the\verbatim@line}}%\verbatim@start}%

{\immediate\closeout\ejercicio@out\@esphack\endgroup%%% Y aqu’i lo que se ha a˜nadido%

4

\par\small\addvspace{3ex plus 1ex}\vskip -\parskip\noindent\makebox[0.45\linewidth][l]{%\begin{minipage}[t]{0.45\linewidth}

\vspace*{-2ex}\setlength{\parindent}{0pt}\setlength{\parskip}{1ex plus 0.4ex minus 0.2ex}\begin{trivlist}

\item\input{\jobname.exa}

\end{trivlist}\end{minipage}}%\hfill%\makebox[0.5\linewidth][l]{%\begin{minipage}[t]{0.50\linewidth}

\vspace*{-1ex}\verbatiminput{\jobname.exa}

\end{minipage}}\par\addvspace{3ex plus 1ex}\vskip -\parskip

}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newwrite\example@out\newenvironment{example}%{\begingroup% Lets Keep the Changes Local\@bsphack\immediate\openout \example@out \jobname.exa\let\do\@makeother\dospecials\catcode‘\ˆˆM\active\def\verbatim@processline{%

\immediate\write\example@out{\the\verbatim@line}}%\verbatim@start}%

{\immediate\closeout\example@out\@esphack\endgroup%\makeatother%% Y aqu’i lo que se ha a˜nadido%

\par\small\addvspace{3ex plus 1ex}\vskip -\parskip\noindent\makebox[0.5\linewidth][l]{%\hspace*{+2ex}\setlength{\parindent}{0pt}

\setlength{\parskip}{1ex plus 0.4ex minus 0.7ex}\begin{minipage}[t]{0.50\linewidth}% \vspace*{-1ex}\vspace*{-2ex}

5

\lstinputlisting[style=L, basicstyle=\scriptsize\bf\ttfamily,backgroundcolor=\color{yellow57},]{\jobname.exa}%\verbatiminput{\jobname.exa}\end{minipage}}

\hfill\hspace{10pt}%\makebox[0.45\linewidth][l]{%\begin{minipage}[t]{0.45\linewidth}

\vspace*{-2ex}\setlength{\parindent}{0pt}\setlength{\parskip}{1ex plus 0.4ex minus 0.7ex}\begin{trivlist}

\item\input{\jobname.exa}\end{trivlist}

\end{minipage}}%\par\addvspace{3ex plus 1ex}\vskip -\parskip

}

\begin{document}Pruebas del paquete listings\begin{example}$$\oint_{S}\vec{E}\cdot d\vec{S}=\frac{q}{\epsilon_{0}} $$\end{example}

\begin{lstlisting}[style=L]\begin{trivlist}

\item\input{\jobname.exa}\end{trivlist}

\end{lstlisting}\begin{ejercicio}Let $H$ be a Hilbert space, $C$ be a closed bounded convex subset of $H$, $T$a nonexpansive self map of $C$. Suppose that as $n\rightarrow\infty$,$a_{n,k}\rightarrow0$ for each $k$, and $\gamma_{n}=\sum_{k=0}ˆ{\infty}\left(a_{n,k+1}-a_{n,k}\right) ˆ{+}\rightarrow0$. Then for each $x$ in $C$,$A_{n}x=\sum_{k=0}ˆ{\infty}a_{n,k}Tˆ{k}x$ converges weakly to a fixed point of$T$ .

The numbered equation\begin{equation}u_{tt}-\Delta u+uˆ{5}+u\left| u\right| ˆ{p-2}=0\text{ in }\mathbf{R}%ˆ{3}\times\left[ 0,\infty\right[ \label{eqn1}%\end{equation}is automatically numbered as equation \ref{eqn1}.

6

\end{ejercicio}\begin{example}Let $H$ be a Hilbert space, $C$ be a closed bounded convex subset of $H$, $T$a nonexpansive self map of $C$. Suppose that as $n\rightarrow\infty$,$a_{n,k}\rightarrow0$ for each $k$, and $\gamma_{n}=\sum_{k=0}ˆ{\infty}\left(a_{n,k+1}-a_{n,k}\right) ˆ{+}\rightarrow0$. Then for each $x$ in $C$,$A_{n}x=\sum_{k=0}ˆ{\infty}a_{n,k}Tˆ{k}x$ converges weakly to a fixed point of$T$ .

The numbered equation\begin{equation}u_{tt}-\Delta u+uˆ{5}+u\left| u\right| ˆ{p-2}=0\text{ in }\mathbf{R}%ˆ{3}\times\left[ 0,\infty\right[ \label{eqn1}%\end{equation}is automatically numbered as equation \ref{eqn1}.\end{example}\begin{example}\begin{equation}\forall x \in \mathbf{R}:\qquad xˆ{2} \geq 0\end{equation}\end{example}\begin{example}\begin{displaymath}xˆ{2} \geq 0\qquad\textrm{para todo }x\in\mathbb{R}\end{displaymath}\end{example}

7