🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.dtp.tex
3 messages
3 total messages Started by Marek Kozlowski Mon, 07 Feb 2011 15:21
beamer: blocki w ramkach albo bloki w blokach..?
#16858
Author: Marek Kozlowski
Date: Mon, 07 Feb 2011 15:21
47 lines
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}
Re: beamer: blocki w ramkach albo bloki w blokach..?
#16859
Author: AMX
Date: Fri, 11 Feb 2011 22:38
21 lines
1316 bytes
On Mon, 07 Feb 2011 16:21:31 +0100, Marek Kozlowski <kozlowsm@mini.nie.lubie.spamu.pw.edu.pl> wrote:

> Na pewno problem jest typowy i istnieje znacznie bardziej eleganckie
> rozwiązanie. Wdzięczny będę za pomoc.
[..]
>
> \newcommand{\uxel}[1]{{\color{blue}\texttt{#1}}}
> \newcommand{\exmpl}[1]{\begin{framed}\small#1\end{framed}}
>

Jak na razie nie mogę zobaczyć co chciałeś osiągnąć:


! LaTeX Error: Environment framed undefined.

  AMX


-- 
adres w rot13
Nyrxfnaqre Znghfmnx r-znk@b2.cy
Re: beamer: blocki w ramkach albo bloki w blokach..?
#16860
Author: Marek Kozlowski
Date: Sat, 12 Feb 2011 11:04
22 lines
1566 bytes
On 02/11/11 23:38, AMX wrote:
> On Mon, 07 Feb 2011 16:21:31 +0100, Marek Kozlowski <kozlowsm@mini.nie.lubie.spamu.pw.edu.pl> wrote:
> 
>> Na pewno problem jest typowy i istnieje znacznie bardziej eleganckie
>> rozwiązanie. Wdzięczny będę za pomoc.
> [..]
>>
>> \newcommand{\uxel}[1]{{\color{blue}\texttt{#1}}}
>> \newcommand{\exmpl}[1]{\begin{framed}\small#1\end{framed}}
>>
> 
> Jak na razie nie mogę zobaczyć co chciałeś osiągnąć:
> 
> 
> ! LaTeX Error: Environment framed undefined.

Sorki!

\usepackage{framed}

Pozdrawiam,
/M
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads