# Style when mixing arguments/methods from a computer program with text and math

I'm working on a document that is a cross of user's guide and a technical manual. I describe a system which has variables that I handle normally, then introduce an R package that I've written which deals with some of the same variable. My question is how to deal with the computer package-related components. For (1) the name of the package, (2) function (method) names, and (3) variable/parameter/argument names: Should they be set in a `\texttt`/`\verb` style inline and in equations? Should they be capitalized at the beginning of a sentence? Or should I avoid using them at the beginnings of sentences?

Essentially, I'm asking a broader version of How to typeset variables and other code?.

-
There's no right answer to this. One pointer though, pick a convention and define it clearly (I mean real hand holding) at the beginning of your manual. The `listings` package is your friend for code, math should be math. Avoid changing the case of your method/function/variable names at the beginning of sentences. –  qubyte Feb 10 '12 at 9:33
There's no right answer to this. One pointer though, pick a convention and define it clearly (I mean real hand holding) at the beginning of your manual. The `listings` package is your friend for code, math should be math. Avoid changing the case of your method/function/variable names at the beginning of sentences.
I would also recommend defining new macros for each different component such as `\MyFunction{}`, `\MyMethod{}`, `\MyPackage{}`, so as to be consistent across the document but also allow styles to be altered later. –  Peter Grill Mar 4 '12 at 18:30