| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | |
| 3 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| 4 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 5 | |
| 6 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
| 7 | <head> |
| 8 | <title>GAPDoc Style Chooser</title> |
| 9 | <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
| 10 | <meta name="generator" content="GAPDoc2HTML" /> |
| 11 | <link rel="stylesheet" type="text/css" href="manual.css" /> |
| 12 | <script src="manual.js" type="text/javascript"></script> |
| 13 | <script type="text/javascript"> |
| 14 | |
| 15 | <!-- find current value of name nam in form --> |
| 16 | function currval(nam) { |
| 17 | var chform = document.forms[0].elements; |
| 18 | for (var i=0; chform.length > i; i++) { |
| 19 | if (chform[i].name == nam && chform[i].type == "radio" && |
| 20 | chform[i].checked == true) |
| 21 | return chform[i].value; |
| 22 | } |
| 23 | return ""; |
| 24 | } |
| 25 | |
| 26 | <!-- load dark appearance either explicitly or via the OS preference --> |
| 27 | function writeAppearanceStyle(mode) { |
| 28 | if (mode == "dark") { |
| 29 | document.writeln('<link rel="stylesheet" type="text/css" href="dark.css" />'); |
| 30 | } else if (mode != "light") { |
| 31 | document.writeln('<style type="text/css">@import "dark.css" (prefers-color-scheme: dark);</style>'); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | <!-- find style from current values in form --> |
| 36 | function getstyle() { |
| 37 | var choices = ["toggle","colorprompt","tocside","font","justify","appearance"]; |
| 38 | var style = ""; |
| 39 | for (var i=0; choices.length > i; i++) { |
| 40 | var a = currval(choices[i]); |
| 41 | if (a.length > 0) { |
| 42 | if (style.length > 0) |
| 43 | style = style + ","; |
| 44 | style = style + a; |
| 45 | } |
| 46 | } |
| 47 | if (style.length == 0) |
| 48 | style = "default"; |
| 49 | return style; |
| 50 | } |
| 51 | |
| 52 | <!-- adjust the back link --> |
| 53 | function f() { |
| 54 | addr = window.location.search.split("=")[1]; |
| 55 | addr = addr + "?GAPDocStyle=" + getstyle(); |
| 56 | document.getElementsByName("backLINK")[0].href = addr; |
| 57 | } |
| 58 | function resetf() { |
| 59 | addr = window.location.search.split("=")[1]; |
| 60 | addr = addr + "?GAPDocStyle=default"; |
| 61 | document.getElementsByName("backLINK")[0].href = addr; |
| 62 | } |
| 63 | |
| 64 | <!-- initialize form from GAPDocStyle cookie --> |
| 65 | function initform() { |
| 66 | var style = valueString(document.cookie, "GAPDocStyle"); |
| 67 | if (style == 0 || style == "default") |
| 68 | writeAppearanceStyle(""); |
| 69 | if (style != 0 && style.length > 0 && style.length != "default") { |
| 70 | stlist = style.split(","); |
| 71 | var chform = document.forms[0].elements; |
| 72 | var appearance = ""; |
| 73 | for (var i=0; chform.length > i; i++) { |
| 74 | if (chform[i].type == "radio") { |
| 75 | for (var j=0; stlist.length > j; j++) { |
| 76 | if (stlist[j] == "dark" || stlist[j] == "light") |
| 77 | appearance = stlist[j]; |
| 78 | if (chform[i].value == stlist[j]) |
| 79 | chform[i].checked = true; |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | writeAppearanceStyle(appearance); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | </script> |
| 88 | </head> |
| 89 | <body class="chooser"> |
| 90 | |
| 91 | <h2>Setting preferences for GAPDoc manuals</h2> |
| 92 | |
| 93 | <form name="SetGAPDocHTMLStyle" action=""> |
| 94 | <p> |
| 95 | <input name="reset" type="reset" value="Reset to defaults" |
| 96 | onclick="javascript:resetf()"/> |
| 97 | </p> |
| 98 | <p> |
| 99 | Unfold subsections in menus only by mouse clicks: |
| 100 | <input type="radio" name="toggle" value="" checked="checked" |
| 101 | onclick="javascript:f()"/> no (default) |
| 102 | |
| 103 | <input type="radio" name="toggle" value="toggless" |
| 104 | onclick="javascript:f()"/> yes |
| 105 | </p> |
| 106 | <p> |
| 107 | Show GAP examples as in sessions with <code>ColorPrompt(true)</code>: |
| 108 | <input type="radio" name="colorprompt" value="" checked="checked" |
| 109 | onclick="javascript:f()"/> yes |
| 110 | (default) |
| 111 | <input type="radio" name="colorprompt" value="nocolorprompt" |
| 112 | onclick="javascript:f()"/> no |
| 113 | </p> |
| 114 | <p> |
| 115 | Display side of table of contents within chapters: |
| 116 | <input type="radio" name="tocside" value="" checked="checked" |
| 117 | onclick="javascript:f()"/> right (default) |
| 118 | <input type="radio" name="tocside" value="lefttoc" |
| 119 | onclick="javascript:f()"/> left |
| 120 | </p> |
| 121 | <p> |
| 122 | Main document font: |
| 123 | <input type="radio" name="font" value="" checked="checked" |
| 124 | onclick="javascript:f()"/> Helvetica/sans |
| 125 | serif (default) |
| 126 | <input type="radio" name="font" value="times" |
| 127 | onclick="javascript:f()"/> Times/serif |
| 128 | </p> |
| 129 | <p> |
| 130 | Paragraph formatting: |
| 131 | <input type="radio" name="justify" value="" checked="checked" |
| 132 | onclick="javascript:f()"/> left-right |
| 133 | justified (default) |
| 134 | <input type="radio" name="justify" value="ragged" |
| 135 | onclick="javascript:f()"/> ragged right |
| 136 | </p> |
| 137 | <p> |
| 138 | Appearance: |
| 139 | <input type="radio" name="appearance" value="" |
| 140 | onclick="javascript:f()"/> system (default) |
| 141 | <input type="radio" name="appearance" value="light" checked="checked" |
| 142 | onclick="javascript:f()"/> light |
| 143 | <input type="radio" name="appearance" value="dark" |
| 144 | onclick="javascript:f()"/> dark |
| 145 | </p> |
| 146 | </form> |
| 147 | <p> |
| 148 | <a name="backLINK" href=""><strong>Apply settings to last page.</strong></a> |
| 149 | </p> |
| 150 | <script type="text/javascript"> |
| 151 | initform(); |
| 152 | f(); |
| 153 | </script> |
| 154 | |
| 155 | </body> |
| 156 | </html> |