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
This commit is contained in:
parent
8abebdc2e7
commit
8e22565759
|
@ -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}
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue
Block a user