I need to describe keywords in a TeX document. It should look similar like the keyword section of the C# specification:

enter image description here

I need some advice on how I can achieve this. Is this a transparent table? Can I use the syntax package here?

  • 2
    The font style is \sffamily (or, if fixed spacing is required, \ttfamily). A left-aligned tabular environment should be able to achieve it simply. – Steven B. Segletes Jan 12 '17 at 14:24
  • Works great! Can you turn your comment into an answer - I will accept it then... – Vertexwahn Jan 12 '17 at 14:41

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.

\textit{keyword::} one of

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&&&

\noindent The following identifiers have special meaning in the syntactic grammar but they
are not keywords: \textsf{add} (\S17.7), \textsf{alias} (\S16.3),...

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.