24.5.12

Change \abovecaptionskip for some floats only

I'd like to change the \abovecaptionskip (space between figure and caption) for the listing floats of the minted package only.


Use package caption and its \captionsetup. For listing it must be inside a group to hold it local or alternetively use the new environment mylisting. For a default figureenvironment it can be inside and is then local by default.







\documentclass{article}
\usepackage{minted}
\usepackage{caption}
\newenvironment{mylisting}[1][H]
  {\captionsetup{aboveskip=-0.2\normalbaselineskip}\begin{listing}[#1]}
  {\end{listing}}
\begin{document}
\bgroup
\captionsetup{aboveskip=-0.2\normalbaselineskip}
\begin{listing}[H]
\begin{minted}{c}
for i:=maxint to 0 do
begin
  { do nothing }
end;\end{minted}
\caption{Example of a listing.}\label{lst:example}
\end{listing}
\egroup
\begin{mylisting}[H]
\begin{minted}{c}
for i:=maxint to 0 do
begin
  { do nothing }
end;\end{minted}
\caption{Example of a listing.}\label{lst:example}
\end{mylisting}
\begin{figure}[!ht]
\captionsetup{aboveskip=60pt}
\centering
\rule{1cm}{1cm}% placeholder
\caption{A figure}
\end{figure}
\end{document}

Ecuaciones en color en beamer


Open publication - Free publishing - More beamer

El código en SWP 5.5


\documentclass[notes=show]{beamer}%
\usepackage{hyperref}
\usepackage{multimedia}
\usepackage{color}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{empheq}
\usepackage{xcolor}
\usepackage{lipsum}%
\setcounter{MaxMatrixCols}{30}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{CSTFile=beamer.cst}
%TCIDATA{Created=Tuesday, November 29, 2011 12:16:07}
%TCIDATA{LastRevised=Monday, April 23, 2012 11:35:56}
%TCIDATA{}
%TCIDATA{}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\newenvironment{stepenumerate}{\begin{enumerate}[<+->]}{\end{enumerate}}
\newenvironment{stepitemize}{\begin{itemize}[<+->]}{\end{itemize} }
\newenvironment{stepenumeratewithalert}{\begin{enumerate}[<+-| alert@+>]}{\end{enumerate}}
\newenvironment{stepitemizewithalert}{\begin{itemize}[<+-| alert@+>]}{\end{itemize} }
\usetheme{Madrid}
\everydisplay{\color{MidnightBlue}}
\definecolor[named]{PowderBlue}{HTML}{B0E0E6}
\definecolor[named]{MidnightBlue}{HTML}{191970}
\definecolor[named]{GreenTea}{HTML}{CAE8A2}
\definecolor[named]{MilkTea}{HTML}{C5A16F}
\definecolor[named]{SaddleBrown}{HTML}{8B4513}
\DeclareMathSizes{10}{18}{12}{8}
\usefonttheme{professionalfonts}
%BeginMSIPreambleData
\ifx\pdfoutput\relax\let\pdfoutput=\undefined\fi
\newcount\msipdfoutput
\ifx\pdfoutput\undefined\else
\ifcase\pdfoutput\else
\msipdfoutput=1
\ifx\paperwidth\undefined\else
\ifdim\paperheight=0pt\relax\else\pdfpageheight\paperheight\fi
\ifdim\paperwidth=0pt\relax\else\pdfpagewidth\paperwidth\fi
\fi\fi\fi
%EndMSIPreambleData
\begin{document}

\title{Color in equations in Beamer in \textsl{Scientific WorkPlace}}
\subtitle{Impressive slide presentations}
\author{Dario Castro\ Castro}
\institute{The
%TCIMACRO{\TeXButton{\LaTeX{} }{\LaTeX{} } }%
%BeginExpansion
\LaTeX{}
%EndExpansion
Expert!}
\date{%

%TCIMACRO{\TeXButton{\today}{\today}}%
%BeginExpansion
\today
%EndExpansion
}
\maketitle

\section{Creating Beamer presentations in Scientific WorkPlace and Scientific
Word}

\subsection{Slides - Beamer}%

%TCIMACRO{\TeXButton{BeginFrame}{\begin{frame}}}%
%BeginExpansion
\begin{frame}%
%EndExpansion
%

%TCIMACRO{\QTR{frametitle}{Slides - Beamer}}%
%BeginExpansion
\frametitle{Slides - Beamer}%
%EndExpansion
%

\begin{equation}
\textcolor{purple}{f(x)}=\int\limits_{1}^{\infty}%
\textcolor{red}{\frac{1}{x^2}}\,\mathrm{d}x=1
\end{equation}


Math: ${\color{yellow}\alpha}+{\color{blue}\beta}={\color{cyan}\gamma}$ Math:
${\color{magenta}\alpha}+{\color{yellow}\beta}={\color{black}\gamma}$

\bigskip%

\begin{equation}
\textcolor{blue}{A}\color{green}=\textcolor{red}{B}\color{purple}+\textcolor{yellow}{C}\normalcolor.
\end{equation}%
\begin{equation}
\color{MilkTea}u_{tt}-\Delta u+u^{5}+u\left\vert u\right\vert ^{p-2}=0\text{
in }\mathbf{R}^{3}\times\left[  0,\infty\right[
\end{equation}%
\begin{equation}
\color{SaddleBrown}%
%TCIMACRO{\TeXButton{large}{\large}}%
%BeginExpansion
\large
%EndExpansion
\vec{F}_{i}=k\sum_{j=1}^{n}\frac{q_{i}q_{j}}{r_{ij}^{2}}\hat{r}_{ij}%
\normalcolor
\end{equation}
%

%TCIMACRO{\TeXButton{EndFrame}{\end{frame}}}%
%BeginExpansion
\end{frame}%
%EndExpansion


\subsection{Beamer Files}%

%TCIMACRO{\TeXButton{BeginFrame}{\begin{frame}}}%
%BeginExpansion
\begin{frame}%
%EndExpansion
%

%TCIMACRO{\QTR{frametitle}{Beamer Files}}%
%BeginExpansion
\frametitle{Beamer Files}%
%EndExpansion


\begin{itemize}
\item The document class base file for this shell is \texttt{beamer.cls}.

\item To see the available class options, choose \textsf{Typeset, }choose
\textsf{Options and Packages}, select the \textsf{Class Options} tab, and then
click the \textsf{Modify} button.

\item This shell specifies showing all notes but otherwise uses the default
class options.

\item The typesetting specification for this shell document uses these options
and packages with the defaults indicated:
\end{itemize}

\begin{center}
\
\begin{tabular}
[c]{ll}%
\textbf{Options and Packages} & \textbf{Defaults}\\\hline
Document class options & Show notes\\
Packages: & \\
\quad hyperref & Standard\\
\quad mathpazo & None\\
\quad multimedia & None\\\hline
\end{tabular}

\end{center}

%

%TCIMACRO{\TeXButton{EndFrame}{\end{frame}}}%
%BeginExpansion
\end{frame}%
%EndExpansion


\subsection{Using This Shell}%

%TCIMACRO{\TeXButton{BeginFrame}{\begin{frame}}}%
%BeginExpansion
\begin{frame}%
%EndExpansion
%

%TCIMACRO{\QTR{frametitle}{Using This Shell}}%
%BeginExpansion
\frametitle{Using This Shell}%
%EndExpansion


\begin{itemize}
\item The front matter of this shell has a number of sample entries that you
should replace with your own.

\item Replace the body of this document with your own text. To start with a
blank document, delete all of the text in this document.

\item Changes to the typeset format of this shell and its associated \LaTeX{}
formatting file (\texttt{beamer.cls}) are not supported by MacKichan Software,
Inc. If you want to make such changes, please consult the \LaTeX{} manuals or
a local \LaTeX{} expert.

\item If you modify this document and export it as \textquotedblleft Slides -
Beamer.shl\textquotedblright\ in the \texttt{Shells%
%TCIMACRO{\TEXTsymbol{\backslash}}%
%BeginExpansion
$\backslash$%
%EndExpansion
Other%
%TCIMACRO{\TEXTsymbol{\backslash}}%
%BeginExpansion
$\backslash$%
%EndExpansion
SW} directory, it will become your new Slides - Beamer shell.
\end{itemize}

%

%TCIMACRO{\TeXButton{EndFrame}{\end{frame}}}%
%BeginExpansion
\end{frame}%
%EndExpansion


\subsection{What is Beamer?}%

%TCIMACRO{\TeXButton{BeginFrame}{\begin{frame}}}%
%BeginExpansion
\begin{frame}%
%EndExpansion
%

%TCIMACRO{\QTR{frametitle}{What is Beamer?}}%
%BeginExpansion
\frametitle{What is Beamer?}%
%EndExpansion


\begin{itemize}
\item Beamer is a
%TCIMACRO{\TeXButton{LaTeX}{\LaTeX{}} }%
%BeginExpansion
\LaTeX{}
%EndExpansion
document class that produces beautiful \textsc{pdf}%
%TCIMACRO{\TeXButton{LaTeX}{\LaTeX{}} }%
%BeginExpansion
\LaTeX{}
%EndExpansion
presentations and transparency slides.

\item Beamer presentations feature

\begin{stepitemize}
\item \textsc{pdf}%
%TCIMACRO{\TeXButton{LaTeX}{\LaTeX{}} }%
%BeginExpansion
\LaTeX{}
%EndExpansion
output

\item Global and local control of layout, color, and fonts

\item List items that can appear one at a time

\item Overlays and dynamic transitions between slides

\item Standard
%TCIMACRO{\TeXButton{LaTeX}{\LaTeX{}} }%
%BeginExpansion
\LaTeX{}
%EndExpansion
constructs

\item Typeset text, mathematics $\frac{-b\pm\sqrt{b^{2}-4ac}}{2a}$, and graphics
\end{stepitemize}

\item To produce a sample presentation in \textsl{SWP }or \textsl{SW}, typeset
this shell document with \textsc{pdf}%
%TCIMACRO{\TeXButton{LaTeX}{\LaTeX{}} }%
%BeginExpansion
\LaTeX{}
%EndExpansion
.
\end{itemize}

%

%TCIMACRO{\TeXButton{EndFrame}{\end{frame}}}%
%BeginExpansion
\end{frame}%
%EndExpansion


\subsection{Creating frames}%

%TCIMACRO{\TeXButton{BeginFrame}{\begin{frame}}}%
%BeginExpansion
\begin{frame}%
%EndExpansion
%

%TCIMACRO{\QTR{frametitle}{Creating frames}}%
%BeginExpansion
\frametitle{Creating frames}%
%EndExpansion


\begin{stepitemize}
\item All the information in a Beamer\emph{\ }presentation is contained in
\textit{frames.}

\item Each frame corresponds to a single presentation slide.

\item To create frames in a Beamer document,

\begin{stepenumerate}
\item Apply a frame fragment:

\begin{stepitemize}
\item The \textbf{Frame with title and subtitle} fragment starts and ends a
new frame and includes a title and subtitle.

\item The \textbf{Frame with title }fragment starts and ends a new frame and
includes a title.

\item The \textbf{Frame} fragment starts and ends a new frame.
\end{stepitemize}

\item Place the text for the frame between the BeginFrame and EndFrame fields.

\item Enter the frame title and subtitle.

If you used the Frame fragment, apply the Frame title and Frame subtitle text
tags as necessary.
\end{stepenumerate}
\end{stepitemize}

%

%TCIMACRO{\TeXButton{EndFrame}{\end{frame}}}%
%BeginExpansion
\end{frame}%
%EndExpansion


\subsection{Learn more about Beamer}%

%TCIMACRO{\TeXButton{BeginFrame}{\begin{frame}}}%
%BeginExpansion
\begin{frame}%
%EndExpansion
%

%TCIMACRO{\QTR{frametitle}{Learn more about Beamer}}%
%BeginExpansion
\frametitle{Learn more about Beamer}%
%EndExpansion


\begin{itemize}
\item This shell and the associated fragments provide basic support for Beamer
in \textsl{SWP }and \textsl{SW}.

\item To learn more about Beamer, see SWSamples/PackageSample-beamer.tex in
your program installation.

\item For complete information, read the BeamerUserGuide.pdf manual found via
a link at the end of SWSamples/PackageSample-beamer.tex.

\item For support, contact \textbf{support@mackichan.com}.
\end{itemize}

%

%TCIMACRO{\TeXButton{EndFrame}{\end{frame}}}%
%BeginExpansion
\end{frame}%
%EndExpansion

\end{document}

Cambiando el fondo e Beamer

22.5.12

Cómo hago que TeX no parta nunca las palabras?


Una forma de conseguir que TeX no corte casi nunca, (y así de paso se evita que corte mal) es poner:
\pretolerance=2000
\tolerance=3000
al principio. Si se quiere que ésto ocurra únicamente en un párrafo o en una región, debe encerrarse lo anterior y la región deseada entre llaves,
{\pretolerance=2000
\tolerance=3000
el párrafo o región
}