🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #4709

C program styles for TeX

#4709
From: Dominick Samperi
Date: Sat, 14 May 1988 20:39
19 lines
1239 bytes
Are there style files for typesetting C programs with TeX? I'm
trying to use LaTeX for this purpose, and it seems to be very
messy. For example, to describe something very simple like
printf("%s", "Hello, World\n"), I'm using

	{\bf printf}("\%s", "Hello, World$\backslash$n"),

and it turns out that the backslash is not the right size. The
LaTeX book recommends that programs be described using the
tabbing environment, but then there are problems with symbols
like <, >, [, ], etc. In particular, the [] in argv[] are too
big. I guess I'll use the \verbatim environment until I find
something better. Any suggestions would be gratefully appreciated.

-- 
Dominick Samperi, Manhattan College, NYC
    manhat!samperi@NYU.EDU           ihnp4!rutgers!nyu.edu!manhat!samperi
    philabs!cmcl2!manhat!samperi     ihnp4!rutgers!hombre!samperi
              (^ that's an ell)      uunet!swlabs!mancol!samperi
Technical Details
Message-ID: <385@mancol.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!cmcl2!phri!manhat!mancol!samperi

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!cmcl2!phri!manhat!mancol!samperi
From: samperi@mancol.UUCP (Dominick Samperi)
Newsgroups: comp.text
Subject: C program styles for TeX
Keywords: styles, TeX, LaTeX
Message-ID: <385@mancol.UUCP>
Date: 14 May 88 20:39:00 GMT
Organization: Manhattan College, NYC, USA
Lines: 19