/usr/share/doc/racket/reference/pretty-print.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>13.6 Pretty Printing</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">The Racket Reference</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2 </td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3 </td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4 </td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5 </td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6 </td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7 </td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8 </td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9 </td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10 </td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11 </td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12 </td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13 </td><td><a href="input-and-output.html" class="tocviewselflink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14 </td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15 </td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16 </td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17 </td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18 </td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">▼</a></td><td>13 </td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">13.1 </td><td><a href="ports.html" class="tocviewlink" data-pltdoc="x">Ports</a></td></tr><tr><td align="right">13.2 </td><td><a href="Byte_and_String_Input.html" class="tocviewlink" data-pltdoc="x">Byte and String Input</a></td></tr><tr><td align="right">13.3 </td><td><a href="Byte_and_String_Output.html" class="tocviewlink" data-pltdoc="x">Byte and String Output</a></td></tr><tr><td align="right">13.4 </td><td><a href="Reading.html" class="tocviewlink" data-pltdoc="x">Reading</a></td></tr><tr><td align="right">13.5 </td><td><a href="Writing.html" class="tocviewlink" data-pltdoc="x">Writing</a></td></tr><tr><td align="right">13.6 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Pretty Printing</a></td></tr><tr><td align="right">13.7 </td><td><a href="Reader_Extension.html" class="tocviewlink" data-pltdoc="x">Reader Extension</a></td></tr><tr><td align="right">13.8 </td><td><a href="Printer_Extension.html" class="tocviewlink" data-pltdoc="x">Printer Extension</a></td></tr><tr><td align="right">13.9 </td><td><a href="serialization.html" class="tocviewlink" data-pltdoc="x">Serialization</a></td></tr><tr><td align="right">13.10 </td><td><a href="fasl.html" class="tocviewlink" data-pltdoc="x">Fast-<wbr></wbr>Load Serialization</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_2");">►</a></td><td>13.6 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Pretty Printing</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">13.6.1 </td><td><a href="#%28part._.Basic_.Pretty-.Print_.Options%29" class="tocviewlink" data-pltdoc="x">Basic Pretty-<wbr></wbr>Print Options</a></td></tr><tr><td align="right">13.6.2 </td><td><a href="#%28part._.Per-.Symbol_.Special_.Printing%29" class="tocviewlink" data-pltdoc="x">Per-<wbr></wbr>Symbol Special Printing</a></td></tr><tr><td align="right">13.6.3 </td><td><a href="#%28part._.Line-.Output_.Hook%29" class="tocviewlink" data-pltdoc="x">Line-<wbr></wbr>Output Hook</a></td></tr><tr><td align="right">13.6.4 </td><td><a href="#%28part._.Value_.Output_.Hook%29" class="tocviewlink" data-pltdoc="x">Value Output Hook</a></td></tr><tr><td align="right">13.6.5 </td><td><a href="#%28part._.Additional_.Custom-.Output_.Support%29" class="tocviewlink" data-pltdoc="x">Additional Custom-<wbr></wbr>Output Support</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-write%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>write</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-display%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>display</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-format%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>format</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-handler%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>handler</span></span></a></td></tr><tr><td><span class="tocsublinknumber">13.6.1<tt> </tt></span><a href="#%28part._.Basic_.Pretty-.Print_.Options%29" class="tocsubseclink" data-pltdoc="x">Basic Pretty-<wbr></wbr>Print Options</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-columns%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>columns</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-depth%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>depth</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-exact-as-decimal%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>exact-<wbr></wbr>as-<wbr></wbr>decimal</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-..-symbol-without-bars%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>.-<wbr></wbr>symbol-<wbr></wbr>without-<wbr></wbr>bars</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-show-inexactness%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>show-<wbr></wbr>inexactness</span></span></a></td></tr><tr><td><span class="tocsublinknumber">13.6.2<tt> </tt></span><a href="#%28part._.Per-.Symbol_.Special_.Printing%29" class="tocsubseclink" data-pltdoc="x">Per-<wbr></wbr>Symbol Special Printing</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-abbreviate-read-macros%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>abbreviate-<wbr></wbr>read-<wbr></wbr>macros</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-style-table~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>style-<wbr></wbr>table?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-current-style-table%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>current-<wbr></wbr>style-<wbr></wbr>table</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-extend-style-table%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>extend-<wbr></wbr>style-<wbr></wbr>table</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-remap-stylable%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>remap-<wbr></wbr>stylable</span></span></a></td></tr><tr><td><span class="tocsublinknumber">13.6.3<tt> </tt></span><a href="#%28part._.Line-.Output_.Hook%29" class="tocsubseclink" data-pltdoc="x">Line-<wbr></wbr>Output Hook</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-newline%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>newline</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-print-line%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>print-<wbr></wbr>line</span></span></a></td></tr><tr><td><span class="tocsublinknumber">13.6.4<tt> </tt></span><a href="#%28part._.Value_.Output_.Hook%29" class="tocsubseclink" data-pltdoc="x">Value Output Hook</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-size-hook%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>size-<wbr></wbr>hook</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-print-hook%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>print-<wbr></wbr>hook</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-pre-print-hook%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>pre-<wbr></wbr>print-<wbr></wbr>hook</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-post-print-hook%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>print-<wbr></wbr>post-<wbr></wbr>print-<wbr></wbr>hook</span></span></a></td></tr><tr><td><span class="tocsublinknumber">13.6.5<tt> </tt></span><a href="#%28part._.Additional_.Custom-.Output_.Support%29" class="tocsubseclink" data-pltdoc="x">Additional Custom-<wbr></wbr>Output Support</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-printing%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pretty-<wbr></wbr>printing</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._make-tentative-pretty-print-output-port%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>tentative-<wbr></wbr>pretty-<wbr></wbr>print-<wbr></wbr>output-<wbr></wbr>port</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._tentative-pretty-print-port-transfer%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">tentative-<wbr></wbr>pretty-<wbr></wbr>print-<wbr></wbr>port-<wbr></wbr>transfer</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._tentative-pretty-print-port-cancel%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">tentative-<wbr></wbr>pretty-<wbr></wbr>print-<wbr></wbr>port-<wbr></wbr>cancel</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="Writing.html" title="backward to "13.5 Writing"" data-pltdoc="x">← prev</a> <a href="input-and-output.html" title="up to "13 Input and Output"" data-pltdoc="x">up</a> <a href="Reader_Extension.html" title="forward to "13.7 Reader Extension"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""pretty-print"">13.6<tt> </tt><a name="(part._pretty-print)"></a><a name="(mod-path._racket/pretty)"></a>Pretty Printing</h4><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/pretty</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The bindings documented in this section are provided by the <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/pretty</span></a> and <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a> libraries, but not <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>[<span class="RktVar">port</span><span class="hspace"> </span><span class="RktVar">quote-depth</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">port</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._current-output-port%29%29" class="RktValLink" data-pltdoc="x">current-output-port</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">quote-depth</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">0</span></td></tr></table></blockquote></div><div class="SIntrapara">Pretty-prints the value <span class="RktVar">v</span> using the same printed form as the
default <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print%29%29" class="RktValLink" data-pltdoc="x">print</a></span> mode, but with newlines and whitespace inserted
to avoid lines longer than <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-columns%29%29" class="RktValLink" data-pltdoc="x">pretty-print-columns</a></span><span class="RktPn">)</span>, as
controlled by <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-current-style-table%29%29" class="RktValLink" data-pltdoc="x">pretty-print-current-style-table</a></span><span class="RktPn">)</span>. The printed
form ends in a newline, unless the <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-columns%29%29" class="RktValLink" data-pltdoc="x">pretty-print-columns</a></span>
parameter is set to <span class="RktVal">'</span><span class="RktVal">infinity</span>. When <span class="RktVar">port</span> has line
counting enabled (see <a href="linecol.html" data-pltdoc="x">Counting Positions, Lines, and Columns</a>), then printing is sensitive
to the column when printing starts—<wbr></wbr>both for determining an initial
line break and indenting subsequent lines.</div></p><p>In addition to the parameters defined in this section,
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span> conforms to the <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print-graph%29%29" class="RktValLink" data-pltdoc="x">print-graph</a></span>,
<span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print-struct%29%29" class="RktValLink" data-pltdoc="x">print-struct</a></span>, <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print-hash-table%29%29" class="RktValLink" data-pltdoc="x">print-hash-table</a></span>,
<span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print-vector-length%29%29" class="RktValLink" data-pltdoc="x">print-vector-length</a></span>, <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print-box%29%29" class="RktValLink" data-pltdoc="x">print-box</a></span>, and
<span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print-as-expression%29%29" class="RktValLink" data-pltdoc="x">print-as-expression</a></span> parameters.</p><p>The pretty printer detects structures that have the
<span class="RktSym"><a href="Printer_Extension.html#%28def._%28%28quote._~23~25kernel%29._prop~3acustom-write%29%29" class="RktValLink" data-pltdoc="x">prop:custom-write</a></span> property and calls the corresponding
custom-write procedure. The custom-write procedure can check the
parameter <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-printing%29%29" class="RktValLink" data-pltdoc="x">pretty-printing</a></span> to cooperate with the
pretty-printer. Recursive printing to the port automatically uses
pretty printing, but if the structure has multiple recursively printed
sub-expressions, a custom-write procedure may need to cooperate more
to insert explicit newlines. Use <span class="RktSym"><a href="linecol.html#%28def._%28%28quote._~23~25kernel%29._port-next-location%29%29" class="RktValLink" data-pltdoc="x">port-next-location</a></span> to
determine the current output column, use <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-columns%29%29" class="RktValLink" data-pltdoc="x">pretty-print-columns</a></span>
to determine the target printing width, and use
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-newline%29%29" class="RktValLink" data-pltdoc="x">pretty-print-newline</a></span> to insert a newline (so that the
function in the <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-print-line%29%29" class="RktValLink" data-pltdoc="x">pretty-print-print-line</a></span> parameter can be
called appropriately). Use
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._make-tentative-pretty-print-output-port%29%29" class="RktValLink" data-pltdoc="x">make-tentative-pretty-print-output-port</a></span> to obtain a port for
tentative recursive prints (e.g., to check the length of the output).</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-write))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-write%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-write</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>[<span class="RktVar">port</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">port</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._current-output-port%29%29" class="RktValLink" data-pltdoc="x">current-output-port</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Same as <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span>, but <span class="RktVar">v</span> is printed like
<span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._write%29%29" class="RktValLink" data-pltdoc="x">write</a></span> instead of like <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print%29%29" class="RktValLink" data-pltdoc="x">print</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-display))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-display%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-display</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>[<span class="RktVar">port</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">port</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._current-output-port%29%29" class="RktValLink" data-pltdoc="x">current-output-port</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Same as <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span>, but <span class="RktVar">v</span> is printed like
<span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._display%29%29" class="RktValLink" data-pltdoc="x">display</a></span> instead of like <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print%29%29" class="RktValLink" data-pltdoc="x">print</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-format))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-format%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-format</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>[<span class="RktVar">columns</span>]<span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">columns</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-columns%29%29" class="RktValLink" data-pltdoc="x">pretty-print-columns</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span>, except that it returns a string containing
the pretty-printed value, rather than sending the output to a port.</div></p><p>The optional argument <span class="RktVar">columns</span> argument is used to
parameterize <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-columns%29%29" class="RktValLink" data-pltdoc="x">pretty-print-columns</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-handler))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-handler%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-handler</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Pretty-prints <span class="RktVar">v</span> if <span class="RktVar">v</span> is not <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=void_undefined.html&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="nobreak"><span class="RktRes">#<void></span></span></a>, or prints
nothing if <span class="RktVar">v</span> is <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=void_undefined.html&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="nobreak"><span class="RktRes">#<void></span></span></a>. Pass this procedure to
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-print%29%29" class="RktValLink" data-pltdoc="x">current-print</a></span> to install the pretty printer into the REPL run
by <span class="RktSym"><a href="eval.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._read-eval-print-loop%29%29" class="RktValLink" data-pltdoc="x">read-eval-print-loop</a></span>.</div></p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""Basic_Pretty-Print_Options"">13.6.1<tt> </tt><a name="(part._.Basic_.Pretty-.Print_.Options)"></a>Basic Pretty-Print Options</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-columns))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-columns%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-columns</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-positive-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-positive-integer?</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">infinity</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-columns%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-columns</a></span></span><span class="hspace"> </span><span class="RktVar">width</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">width</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-positive-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-positive-integer?</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">infinity</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines the default width for pretty printing.</div></p><p>If the display width is <span class="RktVal">'</span><span class="RktVal">infinity</span>, then pretty-printed output
is never broken into lines, and a newline is not added to the end of
the output.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-depth))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-depth%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-depth</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-depth%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-depth</a></span></span><span class="hspace"> </span><span class="RktVar">depth</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">depth</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Parameter that controls the default depth for recursive pretty
printing. Printing to <span class="RktVar">depth</span> means that elements nested more
deeply than <span class="RktVar">depth</span> are replaced with “...”; in particular, a
depth of <span class="RktVal">0</span> indicates that only simple values are printed. A depth of
<span class="RktVal">#f</span> (the default) allows printing to arbitrary
depths.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-exact-as-decimal))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-exact-as-decimal%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-exact-as-decimal</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-exact-as-decimal%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-exact-as-decimal</a></span></span><span class="hspace"> </span><span class="RktVar">as-decimal?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">as-decimal?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines how exact non-integers are printed. If
the parameter’s value is <span class="RktVal">#t</span>, then an exact non-integer with a
decimal representation is printed as a decimal number instead of a
fraction. The initial value is <span class="RktVal">#f</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-..-symbol-without-bars))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-..-symbol-without-bars%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-.-symbol-without-bars</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-..-symbol-without-bars%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-.-symbol-without-bars</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls the printing of the symbol whose print name
is just a period. If set to a true value, then such a symbol is
printed as only the period. If set to a false value, it is printed as
a period with vertical bars surrounding it.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-show-inexactness))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-show-inexactness%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-show-inexactness</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-show-inexactness%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-show-inexactness</a></span></span><span class="hspace"> </span><span class="RktVar">show?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">show?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines how inexact numbers are printed. If the
parameter’s value is <span class="RktVal">#t</span>, then inexact numbers are always
printed with a leading <span class="RktInBG"><span class="hspace"></span><span class="RktIn">#i</span><span class="hspace"></span></span>. The initial value is <span class="RktVal">#f</span>.</div></p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""Per-Symbol_Special_Printing"">13.6.2<tt> </tt><a name="(part._.Per-.Symbol_.Special_.Printing)"></a>Per-Symbol Special Printing</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-abbreviate-read-macros))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-abbreviate-read-macros%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-abbreviate-read-macros</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-abbreviate-read-macros%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-abbreviate-read-macros</a></span></span><span class="hspace"> </span><span class="RktVar">abbrev?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">abbrev?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls whether or not <span class="RktSym">quote</span>,
<span class="RktSym">unquote</span>, <span class="RktSym">unquote-splicing</span>, etc<span class="Sendabbrev">.</span>, are
abbreviated with <span class="RktInBG"><span class="hspace"></span><span class="RktIn">'</span><span class="hspace"></span></span>, <span class="RktInBG"><span class="hspace"></span><span class="RktIn">,</span><span class="hspace"></span></span>, <span class="RktInBG"><span class="hspace"></span><span class="RktIn">,@</span><span class="hspace"></span></span>, etc.
By default, the abbreviations are enabled.</div></p><p>See also <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-remap-stylable%29%29" class="RktValLink" data-pltdoc="x">pretty-print-remap-stylable</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-style-table~3f))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-style-table~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-style-table?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a style table for use with
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-current-style-table%29%29" class="RktValLink" data-pltdoc="x">pretty-print-current-style-table</a></span>, <span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-current-style-table))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-current-style-table%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-current-style-table</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-style-table~3f%29%29" class="RktValLink" data-pltdoc="x">pretty-print-style-table?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-current-style-table%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-current-style-table</a></span></span><span class="hspace"> </span><span class="RktVar">style-table</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">style-table</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-style-table~3f%29%29" class="RktValLink" data-pltdoc="x">pretty-print-style-table?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that holds a table of style mappings. See
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-extend-style-table%29%29" class="RktValLink" data-pltdoc="x">pretty-print-extend-style-table</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-extend-style-table))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-extend-style-table%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-extend-style-table</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">style-table</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">symbol-list</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">like-symbol-list</span><span class="RktPn">)</span></td><td><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-style-table~3f%29%29" class="RktValLink" data-pltdoc="x">pretty-print-style-table?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">style-table</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-style-table~3f%29%29" class="RktValLink" data-pltdoc="x">pretty-print-style-table?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">symbol-list</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">like-symbol-list</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a new style table by extending an existing
<span class="RktVar">style-table</span>, so that the style mapping for each symbol of
<span class="RktVar">like-symbol-list</span> in the original table is used for the
corresponding symbol of <span class="RktVar">symbol-list</span> in the new table. The
<span class="RktVar">symbol-list</span> and <span class="RktVar">like-symbol-list</span> lists must have the
same length. The <span class="RktVar">style-table</span> argument can be <span class="RktVal">#f</span>, in
which case the default mappings are used from the original table (see
below).</div></p><p>The style mapping for a symbol controls the way that whitespace is
inserted when printing a list that starts with the symbol. In the
absence of any mapping, when a list is broken across multiple lines,
each element of the list is printed on its own line, each with the
same indentation.</p><p>The default style mapping includes mappings for the following symbols,
so that the output follows popular code-formatting rules:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktVal">'</span><span class="RktVal">lambda</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">case-lambda</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">define</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">define-macro</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">define-syntax</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">let</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">letrec</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">let*</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">let-syntax</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">letrec-syntax</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">let-values</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">letrec-values</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">let*-values</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">let-syntaxes</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">letrec-syntaxes</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">begin</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">begin0</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">do</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">if</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">set!</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">set!-values</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">unless</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">when</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">cond</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">case</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">and</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">or</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">module</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">syntax-rules</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">syntax-case</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">letrec-syntaxes+values</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">import</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">export</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">link</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">require</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">require-for-syntax</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">require-for-template</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">provide</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">public</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">private</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">override</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">rename</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">inherit</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">field</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">init</span></td></tr><tr><td><span class="RktVal">'</span><span class="RktVal">shared</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">send</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">class</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">instantiate</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">make-object</span></td></tr></table></blockquote><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-remap-stylable))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-remap-stylable%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-remap-stylable</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-remap-stylable%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-remap-stylable</a></span></span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that controls remapping for styles and for the determination of
the reader shorthands.</div></p><p>This procedure is
called with each sub-expression that appears as the first element in a
sequence. If it returns a symbol, the style table is used, as if that
symbol were at the head of the sequence. If it returns <span class="RktVal">#f</span>,
the style table is treated normally.
Similarly, when determining whether to abbreviate reader macros,
this parameter is consulted.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""Line-Output_Hook"">13.6.3<tt> </tt><a name="(part._.Line-.Output_.Hook)"></a>Line-Output Hook</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-newline))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-newline%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-newline</a></span></span><span class="hspace"> </span><span class="RktVar">port</span><span class="hspace"> </span><span class="RktVar">width</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">port</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">width</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Calls the procedure associated with the
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-print-line%29%29" class="RktValLink" data-pltdoc="x">pretty-print-print-line</a></span> parameter to print a newline to
<span class="RktVar">port</span>, if <span class="RktVar">port</span> is the output port that is redirected
to the original output port for printing, otherwise a plain newline is
printed to <span class="RktVar">port</span>. The <span class="RktVar">width</span> argument should be the
target column width, typically obtained from
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-columns%29%29" class="RktValLink" data-pltdoc="x">pretty-print-columns</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-print-line))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-print-line%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-print-line</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">infinity</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-print-line%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-print-line</a></span></span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">proc</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">infinity</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines a procedure for printing the newline
separator between lines of a pretty-printed value. The procedure is
called with four arguments: a new line number, an output port, the old
line’s length, and the number of destination columns. The return value
from <span class="RktVar">proc</span> is the number of extra characters it printed at the
beginning of the new line.</div></p><p>The <span class="RktVar">proc</span> procedure is called before any characters are
printed with <span class="RktVal">0</span> as the line number and <span class="RktVal">0</span> as the old
line length; <span class="RktVar">proc</span> is called after the last character of a
value has been printed with <span class="RktVal">#f</span> as the line number and with the
length of the last line. Whenever the pretty-printer starts a new
line, <span class="RktVar">proc</span> is called with the new line’s number (where the
first new line is numbered <span class="RktVal">1</span>) and the just-finished line’s
length. The destination-columns argument to <span class="RktVar">proc</span> is always
the total width of the destination printing area, or
<span class="RktVal">'</span><span class="RktVal">infinity</span> if pretty-printed values are not broken into lines.</p><p>The default <span class="RktVar">proc</span> procedure prints a newline whenever the line
number is not <span class="RktVal">0</span> and the column count is not
<span class="RktVal">'</span><span class="RktVal">infinity</span>, always returning <span class="RktVal">0</span>. A custom
<span class="RktVar">proc</span> procedure can be used to print extra text before each
line of pretty-printed output; the number of characters printed before
each line should be returned by <span class="RktVar">proc</span> so that the next line
break can be chosen correctly.</p><p>The destination port supplied to <span class="RktVar">proc</span> is generally not the
port supplied to <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span> or <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-display%29%29" class="RktValLink" data-pltdoc="x">pretty-display</a></span> (or
the current output port), but output to this port is ultimately
redirected to the port supplied to <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span> or
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-display%29%29" class="RktValLink" data-pltdoc="x">pretty-display</a></span>.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""Value_Output_Hook"">13.6.4<tt> </tt><a name="(part._.Value_.Output_.Hook)"></a>Value Output Hook</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-size-hook))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-size-hook%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-size-hook</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-size-hook%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-size-hook</a></span></span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">proc</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines a sizing hook for pretty-printing.</div></p><p>The sizing hook is applied to each value to be printed. If the hook
returns <span class="RktVal">#f</span>, then printing is handled internally by the
pretty-printer. Otherwise, the value should be an integer specifying
the length of the printed value in characters; the print hook will be
called to actually print the value (see
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-print-hook%29%29" class="RktValLink" data-pltdoc="x">pretty-print-print-hook</a></span>).</p><p>The sizing hook receives three arguments. The first argument is the
value to print. The second argument is a boolean: <span class="RktVal">#t</span> for
printing like <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._display%29%29" class="RktValLink" data-pltdoc="x">display</a></span> and <span class="RktVal">#f</span> for printing like
<span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._write%29%29" class="RktValLink" data-pltdoc="x">write</a></span>. The third argument is the destination port; the port
is the one supplied to <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span> or
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-display%29%29" class="RktValLink" data-pltdoc="x">pretty-display</a></span> (or the current output port). The sizing hook
may be applied to a single value multiple times during
pretty-printing.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-print-hook))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-print-hook%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-print-hook</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-print-hook%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-print-hook</a></span></span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span><span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines a print hook for pretty-printing. The
print-hook procedure is applied to a value for printing when the
sizing hook (see <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-size-hook%29%29" class="RktValLink" data-pltdoc="x">pretty-print-size-hook</a></span>) returns an integer
size for the value.</div></p><p>The print hook receives three arguments. The first argument is the
value to print. The second argument is a boolean: <span class="RktVal">#t</span> for
printing like <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._display%29%29" class="RktValLink" data-pltdoc="x">display</a></span> and <span class="RktVal">#f</span> for printing like
<span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._write%29%29" class="RktValLink" data-pltdoc="x">write</a></span>. The third argument is the destination port; this port
is generally not the port supplied to <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span> or
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-display%29%29" class="RktValLink" data-pltdoc="x">pretty-display</a></span> (or the current output port), but output to
this port is ultimately redirected to the port supplied to
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span> or <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-display%29%29" class="RktValLink" data-pltdoc="x">pretty-display</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-pre-print-hook))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-pre-print-hook%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-pre-print-hook</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void%29%29" class="RktValLink" data-pltdoc="x">void</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-pre-print-hook%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-pre-print-hook</a></span></span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void%29%29" class="RktValLink" data-pltdoc="x">void</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines a hook procedure to be called just before
an object is printed. The hook receives two arguments: the object and
the output port. The port is the one supplied to <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span>
or <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-display%29%29" class="RktValLink" data-pltdoc="x">pretty-display</a></span> (or the current output port).</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-print-post-print-hook))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-post-print-hook%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-post-print-hook</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void%29%29" class="RktValLink" data-pltdoc="x">void</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-post-print-hook%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-print-post-print-hook</a></span></span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="RktPn"> .</span><span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void%29%29" class="RktValLink" data-pltdoc="x">void</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that determines a hook procedure to be called just after
an object is printed. The hook receives two arguments: the object and
the output port. The port is the one supplied to <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span>
or <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-display%29%29" class="RktValLink" data-pltdoc="x">pretty-display</a></span> (or the current output port).</div></p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""Additional_Custom-Output_Support"">13.6.5<tt> </tt><a name="(part._.Additional_.Custom-.Output_.Support)"></a>Additional Custom-Output Support</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._pretty-printing))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-printing%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-printing</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-printing%29%29" class="RktValDef RktValLink" data-pltdoc="x">pretty-printing</a></span></span><span class="hspace"> </span><span class="RktVar">on?</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">on?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="eval-model.html#%28tech._parameter%29" class="techoutside" data-pltdoc="x"><span class="techinside">parameter</span></a> that is set to <span class="RktVal">#t</span> when the pretty printer calls a
custom-write procedure (see <span class="RktSym"><a href="Printer_Extension.html#%28def._%28%28quote._~23~25kernel%29._prop~3acustom-write%29%29" class="RktValLink" data-pltdoc="x">prop:custom-write</a></span>) for output in
a mode that supports line breaks. When pretty printer calls a
custom-write procedure merely to detect cycles or to try to print on a
single line, it sets this parameter to <span class="RktVal">#f</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._make-tentative-pretty-print-output-port))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._make-tentative-pretty-print-output-port%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-tentative-pretty-print-output-port</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">out</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">width</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">overflow-thunk</span><span class="RktPn">)</span></td><td><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">out</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">width</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">overflow-thunk</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces an output port that is suitable for recursive pretty printing
without actually producing output. Use such a port to tentatively
print when proper output depends on the size of recursive
prints. After printing, determine the size of the tentative output
using <span class="RktSym"><a href="port-buffers.html#%28def._%28%28quote._~23~25kernel%29._file-position%29%29" class="RktValLink" data-pltdoc="x">file-position</a></span>.</div></p><p>The <span class="RktVar">out</span> argument should be a pretty-printing port, such as
the one supplied to a custom-write procedure when
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-printing%29%29" class="RktValLink" data-pltdoc="x">pretty-printing</a></span> is set to true, or another tentative output
port. The <span class="RktVar">width</span> argument should be a target column width,
usually obtained from <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-columns%29%29" class="RktValLink" data-pltdoc="x">pretty-print-columns</a></span>, possibly
decremented to leave room for a terminator. The
<span class="RktVar">overflow-thunk</span> procedure is called if more than
<span class="RktVar">width</span> items are printed to the port or if a newline is
printed to the port via <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print-newline%29%29" class="RktValLink" data-pltdoc="x">pretty-print-newline</a></span>; it can escape from the
recursive print through a continuation as a shortcut, but
<span class="RktVar">overflow-thunk</span> can also return, in which case it is called
every time afterward that additional output is written to the port.</p><p>After tentative printing, either accept the result with
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._tentative-pretty-print-port-transfer%29%29" class="RktValLink" data-pltdoc="x">tentative-pretty-print-port-transfer</a></span> or reject it with
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._tentative-pretty-print-port-cancel%29%29" class="RktValLink" data-pltdoc="x">tentative-pretty-print-port-cancel</a></span>. Failure to accept or
cancel properly interferes with graph-structure printing, calls to
hook procedures, etc. Explicitly cancel the tentative print even when
<span class="RktVar">overflow-thunk</span> escapes from a recursive print.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._tentative-pretty-print-port-transfer))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._tentative-pretty-print-port-transfer%29%29" class="RktValDef RktValLink" data-pltdoc="x">tentative-pretty-print-port-transfer</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">tentative-out</span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">orig-out</span><span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">tentative-out</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">orig-out</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Causes the data written to <span class="RktVar">tentative-out</span> to be transferred as
if written to <span class="RktVar">orig-out</span>. The <span class="RktVar">tentative-out</span> argument
should be a port produced by
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._make-tentative-pretty-print-output-port%29%29" class="RktValLink" data-pltdoc="x">make-tentative-pretty-print-output-port</a></span>, and
<span class="RktVar">orig-out</span> should be either a pretty-printing port (provided to
a custom-write procedure) or another tentative output port.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/pretty..rkt)._tentative-pretty-print-port-cancel))"></a><span title="Provided from: racket/pretty, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._tentative-pretty-print-port-cancel%29%29" class="RktValDef RktValLink" data-pltdoc="x">tentative-pretty-print-port-cancel</a></span></span><span class="hspace"> </span><span class="RktVar">tentative-out</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">tentative-out</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="port-ops.html#%28def._%28%28quote._~23~25kernel%29._output-port~3f%29%29" class="RktValLink" data-pltdoc="x">output-port?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Cancels the content of <span class="RktVar">tentative-out</span>, which was produced by
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fpretty..rkt%29._make-tentative-pretty-print-output-port%29%29" class="RktValLink" data-pltdoc="x">make-tentative-pretty-print-output-port</a></span>. The main effect of
canceling is that graph-reference definitions are undone, so that a
future print of a graph-referenced object includes the defining
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">#</span><span class="hspace"></span></span><span class="sroman">‹<span style="font-style: italic">n</span>›</span><span class="RktInBG"><span class="hspace"></span><span class="RktIn">=</span><span class="hspace"></span></span>.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="Writing.html" title="backward to "13.5 Writing"" data-pltdoc="x">← prev</a> <a href="input-and-output.html" title="up to "13 Input and Output"" data-pltdoc="x">up</a> <a href="Reader_Extension.html" title="forward to "13.7 Reader Extension"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|