Otazka kolem prostredi tabular v LaTeXu
jan.ruzicka at comtechmobile.com
jan.ruzicka at comtechmobile.com
Thu Nov 15 16:46:45 CET 2001
Nazdar Vsickni
Pri praci s LaTeXem sem objevil problemek. Nemuzu prijit na to jak
vysazet verbatim v prostredi tabular. presneji to se mi povedlo, ale
nedari se mi prevest to do noveho prostredi.
Chtel bych mit zdrojovy text jako :
===========================================================
\begin {command}{activate dsp settings}{Terminal}{NORMAL}{ac}
\begin{terminal}
\begin{verbatim}
Bad Cmd: "61 63 74 69 76 61 74 65 20 64 73 70 20 73 65 74 74 69 6E 67
73 "
Unrecognized command.
>
\end{verbatim}
\end{terminal}
\end {command}
===========================================================
a z tohoto zdrojoveho textu chci mit
tabulku :
activate dsp settings
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
| comand available on |
Terminal
|
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
| Priviledge level |
NORMAL
|
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
| API Line | activate dsp
settings
|
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
| API Interactive |
ac
|
+-------------------------------------+----------------------------------------------------------------------------------------------------------------+
| Transceiver response: | Bad Cmd: "61 63 74 69 76 61
74 65 20 64 73 70 20 73 65 74 74 69 6E 67 73 " |
| |
Unrecognized
command.
|
| |
|
| | >
|
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+
Tady sem si to zkusil sestavit z jednotlivych prikazu:
===========================================================
activate dsp settings
\begin{tabular}{||l|l|l|l||}%
\hline%
comand available on & Terminal\\ \hline%
Priviledge level & NORMAL \\ \hline%
API Line &activate dsp settings\\ \hline%
API Interactive &ac\\ \hline%
Transceiver response: &
\begin{minipage}{\promptlength}
\begin{verbatim}
Bad Cmd: "61 63 74 69 76 61 74 65 20 64 73 70 20 73 65 74 74 69 6E 67
73 "
Unrecognized command.
>
\end{verbatim}
\end{minipage}\\ \hline
\end {tabular}
===========================================================
Cely to funguje a pracuje jak ma.
A tak sem zkusil to rozhodit do prostredi (command,terminal).
LaTeX zacal hazet chyby:
===========================================================
! Extra }, or forgotten \endgroup.
<template> \unskip \hfil }
\hskip \tabcolsep \hskip -.5\arrayrulewidth
\vrule...
l.3 \begin{terminal}
?
===========================================================
chyby se objevi vzdy kdyz se pokusim vlozit do zacatku/konce
prostredi & , \\, nebo \hline .
(zdrojak je na konci mailu, & ,\\ , \hline jsou zapoznamkovany )
Diky za jakoukoliv pomoc.
Honza
\documentclass[twoside]{report}
\usepackage{makeidx}
\makeindex
\newcommand{\tableofcommands}{\def\indexname{Table of Commands}
\printindex
}
\newlength{\promptlength}
\setlength{\promptlength}{6cm}
\newenvironment{command}[4]{ \par \textbf{#1}\index{#1}\\ %
\begin{tabular}{||l|l||}%
\hline%
comand available on & #2\\ \hline%
Priviledge level & #3 \\ \hline%
API Line \\ \hline%
API Interactive \\ \hline% % \end {tabular}\\
}{\\ \hline \end {tabular} %\\ %\par
\vspace{4ex} }
\newenvironment{terminal} {
Transceiver response: %&
\begin{minipage}{\promptlength} } { \end{minipage} %&\\ \hline
}
\newenvironment{action} {
action: %&
\begin{minipage}{\promptlength} }
{\end{minipage} %& \\ \hline
}
\begin{document}
\chapter{Command Reference}
\input{compiledCommands}
\end{document}
More information about the csTeX
mailing list