diff --git a/scribble-doc/scribblings/scribble/config.scrbl b/scribble-doc/scribblings/scribble/config.scrbl index 7289afb1..f867fcd4 100644 --- a/scribble-doc/scribblings/scribble/config.scrbl +++ b/scribble-doc/scribblings/scribble/config.scrbl @@ -640,6 +640,25 @@ style: ] +Additionally, the @filepath{racket.tex} Latex configuration +includes several macros that you can redefine to adjust the +output style of Racket code: + +@itemlist[ + @item{@ltxd[2]{SColorize} --- Sets the color scheme of + Racket code. Can be redefined to create black and white + code. The first argument is the requested color, and the + second argument is the text for that color.} + @item{@ltxd[1]{SHyphen} --- Enables or Disables the ability + for identifiers and keywords in Racket code from being + hyphenated. Defaults to enabled (for compatibility). + Redefine to disable or change the hyphenation behavior. For + example, to cause the text to overfill rather than hyphen, + it can be redefined to: + @tt["\\renewcommand{\\SHyphen}[1]{\\mbox{#1}}"]. The first + argument is an identifier or keyword inside of a code + block.}] + @; ------------------------------------------------------------ @section[#:tag "latex-prefix"]{Latex Prefix Support} diff --git a/scribble-lib/scribble/racket.tex b/scribble-lib/scribble/racket.tex index fae0ceb7..6cce813c 100644 --- a/scribble-lib/scribble/racket.tex +++ b/scribble-lib/scribble/racket.tex @@ -2,7 +2,10 @@ % Redefine \SColorize to produce B&W Scheme text \newcommand{\SColorize}[2]{\color{#1}{#2}} -\newcommand{\inColor}[2]{{\Scribtexttt{\SColorize{#1}{#2}}}} +% Redefine SHyphen to allow identifiers to be hyphenated +\newcommand{\SHyphen}[1]{#1} + +\newcommand{\inColor}[2]{{\SHyphen{\Scribtexttt{\SColorize{#1}{#2}}}}} \definecolor{PaleBlue}{rgb}{0.90,0.90,1.0} \definecolor{LightGray}{rgb}{0.90,0.90,0.90} \definecolor{CommentColor}{rgb}{0.76,0.45,0.12}