Article View: pl.comp.dtp.tex
Article #16858beamer: blocki w ramkach albo bloki w blokach..?
From: Marek Kozlowski
Date: Mon, 07 Feb 2011 15:21
Date: Mon, 07 Feb 2011 15:21
47 lines
2429 bytes
2429 bytes
:-)
Chciałbym wyróżnić na slajdach przykłady; każdy przykład składa się z
"opisu zadania", podtytułu (id) i pewnego listingu (*nix, CLI)
Wymyśliłem takie coś jak w przykładzie poniżej, jak poniżej, ale ani to
szczególnie ładne ani wygodne, a trzeba jeszcze dbać, aby się zmieściło
na slajdzie.
Na pewno problem jest typowy i istnieje znacznie bardziej eleganckie
rozwiązanie. Wdzięczny będę za pomoc.
Pozdrawiam,
/M
\newcommand{\uxel}[1]{{\color{blue}\texttt{#1}}}
\newcommand{\exmpl}[1]{\begin{framed}\small#1\end{framed}}
\begin{frame}
\frametitle{Key-value options}
\begin{itemize}
\item Some options require additional values.
\end{itemize}
\exmpl{In the following example we sort and display the
\uxel{/etc/passwd} file content. We use the colon symbol as a field
separator (\uxel{-t :}), we sort by the $3^{rd}$ field (\uxel{-k 3}) and
apply numerical sorting (\uxel{-n}):
\begin{block}{A file sorted numerically by the third field (colon
separated)}
\texttt{\$ sort -t : -k 3 -n /etc/passwd}
\end{block}}
\begin{itemize}
\item We can group key-value options provided that values directly
follow the options they refer to and no ambiguity occurs.
\end{itemize}
\exmpl{The following commands are equivalent:
\begin{block}{A file sorted numerically by the third field (colon
separated)}
\texttt{\$ sort -t : -k 3 -n /etc/passwd\\
\$ sort -t: -k3 -n /etc/passwd\\
\$ sort -n -k3 -t: /etc/passwd\\
\$ sort -nk3 -t: /etc/passwd}
\end{block}}
\end{frame}
Technical Details
Message-ID:
<iip2nr$p1f$1@newsread1.aster.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!plix.pl!newsfeed1.plix.pl!news.nask.pl!news.nask.org.pl!nntp.aster.pl!newsread1.aster.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!plix.pl!newsfeed1.plix.pl!news.nask.pl!news.nask.org.pl!nntp.aster.pl!newsread1.aster.pl!not-for-mail From: Marek Kozlowski <kozlowsm@mini.nie.lubie.spamu.pw.edu.pl> Newsgroups: pl.comp.dtp.tex Subject: beamer: blocki w ramkach albo bloki w blokach..? Date: Mon, 07 Feb 2011 16:21:31 +0100 Organization: Aster Sp. z o.o. Lines: 47 Message-ID: <iip2nr$p1f$1@newsread1.aster.pl> NNTP-Posting-Host: 11-mi2-9.acn.waw.pl Mime-Version: 1.0 X-Trace: newsread1.aster.pl 1297092155 25647 85.222.56.11 (7 Feb 2011 15:22:35 GMT) X-Complaints-To: abuse@aster.pl NNTP-Posting-Date: Mon, 7 Feb 2011 15:22:35 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit