I need to describe keywords in a TeX document. It should look similar like the keyword section of the C# specification:
I need some advice on how I can achieve this. Is this a transparent table? Can I use the syntax package here?
As noted in my comment, I used \sffamily
for the keyword style, and tabular
to array the keywords. If a fixed-width font is required, then \ttfamily
can be used in lieu of \sffamily
.
\documentclass{article}
\begin{document}
\textit{keyword::} one of
{\centering\sffamily\tabcolsep=2.5ex\relax
\begin{tabular}{lllll}
abstract & as & base& bool& break\\
byte & case & catch & char & checked\\
class & const & continue & decimal & default\\
delegate & do & double & delse & enum\\
...&&&&\\
unsafe & ushort & using & virtual & void\\
volatile & while&&&
\end{tabular}\par}\smallskip
\noindent The following identifiers have special meaning in the syntactic grammar but they
are not keywords: \textsf{add} (\S17.7), \textsf{alias} (\S16.3),...
\end{document}
\sffamily
(or, if fixed spacing is required,\ttfamily
). A left-alignedtabular
environment should be able to achieve it simply.