bkyk8rc3zvpnsf5inmcqq4n3k98cv6hj-my-site-hyper-literate-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 8e22565759dbb817c661c4c7161f1609e4011db0
parent 8abebdc2e7fd268fbffc572dbb80766d6def98db
Author: Leif Andersen <leif@leifandersen.net>
Date:   Wed, 12 Apr 2017 17:40:16 -0400

Add optional SHyphen Latex macro to prevent hyphens from appearing in @racket[...] identifiers

* Prevent hyphens from appearing in @racket[...] identifiers when they overflow.

* Add SHyphen command.

A style file can redefine SHyphen to toggle how they want to
hyphen their text

* Add documentation
Diffstat:
Mscribble-doc/scribblings/scribble/config.scrbl | 19+++++++++++++++++++
Mscribble-lib/scribble/racket.tex | 5++++-
2 files changed, 23 insertions(+), 1 deletion(-)

diff --git 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 @@ -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}