[R] [OT] getting a ~ character in LaTeX

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Jan 16 22:45:49 CET 2001


Douglas Bates <bates at stat.wisc.edu> writes:

> I am writing course notes in LaTeX.  In the part where I am describing
> model-fitting functions in R I want to use a ~ character inline.  If I
> am displaying an example of R code in its own environment I use the
> alltt environment, which protects the ~ character.  I have forgotten
> how to protect the ~ when I am writing something like
>   The operator `~' is used to define a model formula in \R.
>   The left hand side is evaluated as the response.  The right hand
>   side can consist of several \Emph{terms} with special meanings
> 
> I welcome suggestions.

I have at a similar spot:

As mentioned earlier, e.g.\ in connection with boxplots and
stripplots, the argument to |lm| is a \emph{model formula}, in which
the  tilde symbol (|~|) should be read as ``described by''.

(with \usepackage{shortvrb} and \MakeShortVerb| )

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list