| 1 | % Reference Card for GNU Emacs Calc 2.02 |
| 2 | %**start of header |
| 3 | \newcount\columnsperpage |
| 4 | |
| 5 | % The format for this file is adapted from the GNU Emacs reference |
| 6 | % card version 1.9, by Stephen Gildea. |
| 7 | |
| 8 | % This file can be printed with 1, 2, or 3 columns per page (see below). |
| 9 | % Specify how many you want here. |
| 10 | |
| 11 | \columnsperpage=3 |
| 12 | |
| 13 | % PDF output layout. 0 for A4, 1 for letter (US), a `l' is added for |
| 14 | % a landscape layout. |
| 15 | |
| 16 | \input pdflayout.sty |
| 17 | \pdflayout=(1l) |
| 18 | |
| 19 | % Nothing else needs to be changed. |
| 20 | % Typical command to format: tex calccard.tex |
| 21 | % Typical command to print (3 cols): dvips -t landscape calccard.dvi |
| 22 | |
| 23 | % Copyright (C) 1987, 1992, 2001-2011 Free Software Foundation, Inc. |
| 24 | |
| 25 | % This file is part of GNU Emacs. |
| 26 | |
| 27 | % GNU Emacs is free software: you can redistribute it and/or modify |
| 28 | % it under the terms of the GNU General Public License as published by |
| 29 | % the Free Software Foundation, either version 3 of the License, or |
| 30 | % (at your option) any later version. |
| 31 | |
| 32 | % GNU Emacs is distributed in the hope that it will be useful, |
| 33 | % but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 34 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 35 | % GNU General Public License for more details. |
| 36 | |
| 37 | % You should have received a copy of the GNU General Public License |
| 38 | % along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 39 | |
| 40 | % This file is intended to be processed by plain TeX (TeX82). |
| 41 | % |
| 42 | % The final reference card has six columns, three on each side. |
| 43 | % This file can be used to produce it in any of three ways: |
| 44 | % 1 column per page |
| 45 | % produces six separate pages, each of which needs to be reduced to 80%. |
| 46 | % This gives the best resolution. |
| 47 | % 2 columns per page |
| 48 | % produces three already-reduced pages. |
| 49 | % You will still need to cut and paste. |
| 50 | % 3 columns per page |
| 51 | % produces two pages which must be printed sideways to make a |
| 52 | % ready-to-use 8.5 x 11 inch reference card. |
| 53 | % For this you need a dvi device driver that can print sideways. |
| 54 | % Which mode to use is controlled by setting \columnsperpage above. |
| 55 | % |
| 56 | % Author (Calc reference card): |
| 57 | % Dave Gillespie |
| 58 | % UUCP: uunet!synaptx!daveg |
| 59 | % Internet: daveg@synaptics.com |
| 60 | % |
| 61 | % Author (refcard.tex format): |
| 62 | % Stephen Gildea |
| 63 | % UUCP: mit-erl!gildea |
| 64 | % Internet: gildea@stop.mail-abuse.org |
| 65 | |
| 66 | \def\emacsversionnumber{23} |
| 67 | \def\year{2011} % latest copyright year |
| 68 | |
| 69 | \def\shortcopyrightnotice{\vskip 1ex plus 2 fill |
| 70 | \centerline{\small \copyright\ \year\ Free Software Foundation, Inc. |
| 71 | Permissions on back.}} |
| 72 | |
| 73 | \def\copyrightnotice{ |
| 74 | \vskip 1ex plus 2 fill\begingroup\small |
| 75 | \centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.} |
| 76 | \centerline{designed by Dave Gillespie and Stephen Gildea,} |
| 77 | \centerline{for GNU Emacs Calc.} |
| 78 | |
| 79 | Permission is granted to make and distribute copies of |
| 80 | this card provided the copyright notice and this permission notice |
| 81 | are preserved on all copies. |
| 82 | |
| 83 | %For copies of the GNU Emacs Calc manual, write to the Free Software |
| 84 | %Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
| 85 | %MA 02110-1301, USA. |
| 86 | % |
| 87 | \endgroup} |
| 88 | |
| 89 | % make \bye not \outer so that the \def\bye in the \else clause below |
| 90 | % can be scanned without complaint. |
| 91 | \def\bye{\par\vfill\supereject\end} |
| 92 | |
| 93 | \newdimen\intercolumnskip |
| 94 | \newbox\columna |
| 95 | \newbox\columnb |
| 96 | |
| 97 | \def\ncolumns{\the\columnsperpage} |
| 98 | |
| 99 | \message{[\ncolumns\space |
| 100 | column\if 1\ncolumns\else s\fi\space per page]} |
| 101 | |
| 102 | \def\scaledmag#1{ scaled \magstep #1} |
| 103 | |
| 104 | % This multi-way format was designed by Stephen Gildea |
| 105 | % October 1986. |
| 106 | \if 1\ncolumns |
| 107 | \hsize 4in |
| 108 | \vsize 10in |
| 109 | \voffset -.7in |
| 110 | \font\titlefont=\fontname\tenbf \scaledmag3 |
| 111 | \font\headingfont=\fontname\tenbf \scaledmag2 |
| 112 | \font\smallfont=\fontname\sevenrm |
| 113 | \font\smallsy=\fontname\sevensy |
| 114 | |
| 115 | \footline{\hss\folio} |
| 116 | \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}} |
| 117 | \else |
| 118 | \hsize 3.2in |
| 119 | \vsize 7.95in |
| 120 | \hoffset -.75in |
| 121 | \voffset -.745in |
| 122 | \font\titlefont=cmbx10 \scaledmag2 |
| 123 | \font\headingfont=cmbx10 \scaledmag1 |
| 124 | \font\smallfont=cmr6 |
| 125 | \font\smallsy=cmsy6 |
| 126 | \font\eightrm=cmr8 |
| 127 | \font\eightbf=cmbx8 |
| 128 | \font\eightit=cmti8 |
| 129 | \font\eighttt=cmtt8 |
| 130 | \font\eightsy=cmsy8 |
| 131 | \textfont0=\eightrm |
| 132 | \textfont2=\eightsy |
| 133 | \def\rm{\eightrm} |
| 134 | \def\bf{\eightbf} |
| 135 | \def\it{\eightit} |
| 136 | \def\tt{\eighttt} |
| 137 | \normalbaselineskip=.8\normalbaselineskip |
| 138 | \normallineskip=.8\normallineskip |
| 139 | \normallineskiplimit=.8\normallineskiplimit |
| 140 | \normalbaselines\rm %make definitions take effect |
| 141 | |
| 142 | \if 2\ncolumns |
| 143 | \let\maxcolumn=b |
| 144 | \footline{\hss\rm\folio\hss} |
| 145 | \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}} |
| 146 | \else \if 3\ncolumns |
| 147 | \let\maxcolumn=c |
| 148 | \nopagenumbers |
| 149 | \else |
| 150 | \errhelp{You must set \columnsperpage equal to 1, 2, or 3.} |
| 151 | \errmessage{Illegal number of columns per page} |
| 152 | \fi\fi |
| 153 | |
| 154 | \intercolumnskip=.46in |
| 155 | \def\abc{a} |
| 156 | \output={% |
| 157 | % This next line is useful when designing the layout. |
| 158 | %\immediate\write16{Column \folio\abc\space starts with \firstmark} |
| 159 | \if \maxcolumn\abc \multicolumnformat \global\def\abc{a} |
| 160 | \else\if a\abc |
| 161 | \global\setbox\columna\columnbox \global\def\abc{b} |
| 162 | %% in case we never use \columnb (two-column mode) |
| 163 | \global\setbox\columnb\hbox to -\intercolumnskip{} |
| 164 | \else |
| 165 | \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi} |
| 166 | \def\multicolumnformat{\shipout\vbox{\makeheadline |
| 167 | \hbox{\box\columna\hskip\intercolumnskip |
| 168 | \box\columnb\hskip\intercolumnskip\columnbox} |
| 169 | \makefootline}\advancepageno} |
| 170 | \def\columnbox{\leftline{\pagebody}} |
| 171 | |
| 172 | \def\bye{\par\vfill\supereject |
| 173 | \if a\abc \else\null\vfill\eject\fi |
| 174 | \if a\abc \else\null\vfill\eject\fi |
| 175 | \end} |
| 176 | \fi |
| 177 | |
| 178 | % we won't be using math mode much, so redefine some of the characters |
| 179 | % we might want to talk about |
| 180 | \catcode`\^=12 |
| 181 | \catcode`\_=12 |
| 182 | |
| 183 | \chardef\\=`\\ |
| 184 | \chardef\{=`\{ |
| 185 | \chardef\}=`\} |
| 186 | |
| 187 | \hyphenation{mini-buf-fer} |
| 188 | |
| 189 | \parindent 0pt |
| 190 | \parskip 1ex plus .5ex minus .5ex |
| 191 | |
| 192 | \def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip} |
| 193 | |
| 194 | \outer\def\newcolumn{\vfill\eject} |
| 195 | |
| 196 | \outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex} |
| 197 | |
| 198 | \outer\def\section#1{\par\filbreak |
| 199 | \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}% |
| 200 | \vskip 2ex plus 1ex minus 1.5ex} |
| 201 | |
| 202 | \newdimen\keyindent |
| 203 | |
| 204 | \def\beginindentedkeys{\keyindent=1em} |
| 205 | \def\endindentedkeys{\keyindent=0em} |
| 206 | \endindentedkeys |
| 207 | |
| 208 | \def\paralign{\vskip\parskip\halign} |
| 209 | |
| 210 | \def\<#1>{$\langle${\rm #1}$\rangle$} |
| 211 | |
| 212 | \def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows |
| 213 | |
| 214 | \def\beginexample{\par\leavevmode\begingroup |
| 215 | \obeylines\obeyspaces\parskip0pt\tt} |
| 216 | {\obeyspaces\global\let =\ } |
| 217 | \def\endexample{\endgroup} |
| 218 | |
| 219 | \def\key#1#2{\leavevmode\hbox to \hsize{\vtop |
| 220 | {\hsize=.75\hsize\rightskip=1em |
| 221 | \hskip\keyindent\relax#1}\kbd{#2}\hfil}} |
| 222 | |
| 223 | \newbox\metaxbox |
| 224 | \setbox\metaxbox\hbox{\kbd{M-x }} |
| 225 | \newdimen\metaxwidth |
| 226 | \metaxwidth=\wd\metaxbox |
| 227 | |
| 228 | \def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize |
| 229 | {\hskip\keyindent\relax#1\hfil}% |
| 230 | \hskip -\metaxwidth minus 1fil |
| 231 | \kbd{#2}\hfil}} |
| 232 | |
| 233 | \def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad |
| 234 | &\kbd{#3}\quad\cr} |
| 235 | |
| 236 | % |
| 237 | % Calc-specific commands here: |
| 238 | % |
| 239 | |
| 240 | \let\^=^ |
| 241 | \let\_=_ |
| 242 | \catcode`\^=7 |
| 243 | \catcode`\_=8 |
| 244 | |
| 245 | % Redefine to make spaces a bit smaller |
| 246 | \let\wkbd=\kbd |
| 247 | \def\kbd#1{{\spaceskip=.37em\tt#1}\null} |
| 248 | |
| 249 | \def\wkey#1#2{\leavevmode\hbox to \hsize{\vtop |
| 250 | {\hsize=.75\hsize\rightskip=1em |
| 251 | \hskip\keyindent\relax#1}\wkbd{#2}\hfil}} |
| 252 | \def\wthreecol#1#2#3{\hskip\keyindent\relax#1\hfil&\wkbd{#2}\quad |
| 253 | &\wkbd{#3}\quad\cr} |
| 254 | |
| 255 | \def\stkkey#1#2#3#4{\par\line{\hskip1em\rlap{\kbd{#1}}\hskip4.5em% |
| 256 | \rlap{{#2}}\hskip7.5em\rlap{{#3}}\hskip7.5em\rlap{{#4}}\hfill}\par} |
| 257 | \def\S#1{$S_{\scriptscriptstyle #1}$} |
| 258 | \def\swap{$\leftrightarrow$} |
| 259 | |
| 260 | \def\calcprefix{C-x *\ } |
| 261 | \def\,{{\rm ,\hskip.55em}\ignorespaces} |
| 262 | \def\lesssectionskip{\vskip-1.5ex} |
| 263 | |
| 264 | \def\iline#1{\par\line{\hskip1em\relax #1\hfill}\par} |
| 265 | |
| 266 | \if 1\ncolumns |
| 267 | \else |
| 268 | \font\eighti=cmmi8 |
| 269 | \textfont1=\eighti |
| 270 | \fi |
| 271 | |
| 272 | %**end of header |
| 273 | \f |
| 274 | |
| 275 | % Column 1 |
| 276 | |
| 277 | \title{GNU Calc Reference Card} |
| 278 | |
| 279 | \centerline{(for GNU Emacs version \emacsversionnumber)} |
| 280 | |
| 281 | \section{Starting and Stopping} |
| 282 | |
| 283 | \wkey{start/stop standard Calc}{\calcprefix c} |
| 284 | \wkey{start/stop X keypad Calc}{\calcprefix k} |
| 285 | \wkey{\quad start/stop either: \kbd{\calcprefix *}}{} |
| 286 | \wkey{stop standard Calc}{q} |
| 287 | |
| 288 | \wkey{Calc tutorial}{\calcprefix t} |
| 289 | \wkey{run Calc in other window}{\calcprefix o} |
| 290 | \wkey{quick calculation in minibuffer}{\calcprefix q} |
| 291 | |
| 292 | \section{Getting Help} |
| 293 | |
| 294 | \lesssectionskip |
| 295 | The \kbd{h} prefix key is Calc's analogue of \kbd{C-h} in Emacs. |
| 296 | |
| 297 | \key{quick summary of keys}{?} |
| 298 | \key{describe key briefly}{h c} |
| 299 | \key{describe key fully}{h k} |
| 300 | \key{describe function or command}{h f} |
| 301 | \key{read on-line manual}{h i{\rm\enskip or\enskip}\calcprefix i} |
| 302 | \key{read full Calc summary}{h s{\rm\enskip or\enskip}\calcprefix s} |
| 303 | |
| 304 | \section{Error Recovery} |
| 305 | |
| 306 | \key{abort command in progress}{C-g} |
| 307 | \key{display recent error messages}{w} |
| 308 | \key{undo last operation}{U} |
| 309 | \key{redo last operation}{D} |
| 310 | \key{recall last arguments}{M-RET} |
| 311 | \key{edit top of stack}{`} |
| 312 | \wkey{reset Calc to initial state}{\calcprefix 0 {\rm (zero)}} |
| 313 | |
| 314 | \section{Transferring Data} |
| 315 | |
| 316 | \wkey{grab region from a buffer}{\calcprefix g} |
| 317 | \wkey{grab rectangle from a buffer}{\calcprefix r} |
| 318 | \wkey{grab rectangle, summing columns}{\calcprefix :} |
| 319 | \wkey{grab rectangle, summing rows}{\calcprefix \_} |
| 320 | |
| 321 | \wkey{yank data to a buffer}{\calcprefix y} |
| 322 | |
| 323 | Also, try \kbd{C-k}/\kbd{C-y} or X cut and paste. |
| 324 | |
| 325 | \section{Examples} |
| 326 | |
| 327 | \lesssectionskip |
| 328 | In RPN, enter numbers first, separated by \kbd{RET} if necessary, |
| 329 | then type the operator. To enter a calculation in algebraic form, |
| 330 | press the apostrophe first. |
| 331 | |
| 332 | \beginindentedkeys |
| 333 | \paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt\hfil\quad&#\hfil\cr |
| 334 | \wthreecol{ }{{\bf RPN style:}}{{\bf algebraic style:}} |
| 335 | \wthreecol{Example:}{2 RET 3 +}{' 2+3 RET} |
| 336 | \wthreecol{Example:}{2 RET 3 + 4 *}{' (2+3)*4 RET} |
| 337 | \wthreecol{Example:}{2 RET 3 RET 4 + *}{' 2*(3+4) RET} |
| 338 | \wthreecol{Example:}{3 RET 6 + Q 3 \^}{' sqrt(3+6)\^3 RET} |
| 339 | \wthreecol{Example:}{P 3 / n S}{' sin(-pi/3) RET =} |
| 340 | } |
| 341 | \endindentedkeys |
| 342 | |
| 343 | \shortcopyrightnotice |
| 344 | |
| 345 | % Column 2 |
| 346 | |
| 347 | \section{Arithmetic} |
| 348 | |
| 349 | \key{add, subtract, multiply, divide}{+\, -\, *\, /} |
| 350 | \key{raise to a power, {\it n\/}th root}{\^\, I \^} |
| 351 | \key{change sign}{n} |
| 352 | \key{reciprocal $1/x$}{\&} |
| 353 | \key{square root $\sqrt x$}{Q} |
| 354 | |
| 355 | \key{set precision}{p} |
| 356 | \key{round off last two digits}{c 2} |
| 357 | \key{convert to fraction, float}{c F\, c f} |
| 358 | |
| 359 | \wkey{enter using algebraic notation}{' 2+3*4} |
| 360 | \wkey{refer to previous result}{' 3*\$\^2} |
| 361 | \wkey{refer to higher stack entries}{' \$1*\$2\^2} |
| 362 | \key{finish alg entry without evaluating}{LFD} |
| 363 | \key{set mode where alg entry used by default}{m a} |
| 364 | |
| 365 | \section{Stack Commands} |
| 366 | |
| 367 | \lesssectionskip |
| 368 | Here \S{n} is the $n$th stack entry, and $N$ is the size of the stack. |
| 369 | |
| 370 | \vskip.5ex |
| 371 | \stkkey{\it key}{\it no prefix}{\it prefix $n$}{\it prefix $-n$} |
| 372 | \stkkey{RET}{copy \S{1}}{copy \S{1..n}}{copy \S{n}} |
| 373 | \stkkey{LFD}{copy \S{2}}{copy \S{n}}{copy \S{1..n}} |
| 374 | \stkkey{DEL}{delete \S{1}}{delete \S{1..n}}{delete \S{n}} |
| 375 | \stkkey{M-DEL}{delete \S{2}}{delete \S{n}}{delete \S{1..n}} |
| 376 | \stkkey{TAB}{swap \S{1}\swap\S{2}}{roll \S{1} to \S{n}}{roll \S{n} to \S{N}} |
| 377 | \stkkey{M-TAB}{roll \S{3} to \S{1}}{roll \S{n} to \S{1}}{roll \S{N} to \S{n}} |
| 378 | |
| 379 | With a 0 prefix, these copy, delete, or reverse the entire stack. |
| 380 | |
| 381 | \section{Display} |
| 382 | |
| 383 | \wkey{scroll horizontally, vertically}{< >\, \{ \}} |
| 384 | \key{home cursor}{o} |
| 385 | \key{line numbers on/off}{d l} |
| 386 | \key{trail display on/off}{t d} |
| 387 | |
| 388 | \key{scientific notation}{d s} |
| 389 | \key{fixed-point notation}{d f} |
| 390 | \key{floating-point (normal) notation}{d n} |
| 391 | \key{group digits with commas}{d g} |
| 392 | |
| 393 | For display mode commands, \kbd{H} prefix prevents screen redraw |
| 394 | and \kbd{I} prefix temporarily redraws top of stack. |
| 395 | |
| 396 | \section{Notations} |
| 397 | |
| 398 | \wkey{scientific notation}{6.02e23} |
| 399 | \wkey{minus sign in numeric entry}{\_23{\rm\quad or\quad}23 n} |
| 400 | \wkey{fractions}{3:4} |
| 401 | \wkey{complex numbers}{({\it x}, {\it y})} |
| 402 | \wkey{polar complex numbers}{({\it r}; $\theta$)} |
| 403 | \wkey{vectors (commas optional)}{[1, 2, 3]} |
| 404 | \wkey{matrices (or nested vectors)}{[1, 2; 3, 4]} |
| 405 | \wkey{error forms (\kbd{p} key)}{100 +/- 0.5} |
| 406 | \wkey{interval forms}{[2 ..\ 5)} |
| 407 | \wkey{modulo forms (\kbd{M} key)}{6 mod 24} |
| 408 | \wkey{HMS forms}{5@ 30' 0"} |
| 409 | \wkey{date forms}{<Jul 4, 1992>} |
| 410 | \wkey{infinity, indeterminate}{inf\, nan} |
| 411 | |
| 412 | % Column 3 |
| 413 | |
| 414 | \section{Scientific Functions} |
| 415 | |
| 416 | \key{ln, log${}_{\scriptscriptstyle 10}$, log${}_b$}{L\, H L\, B} |
| 417 | \key{exponential {\it e}${}^x$, 10${}^x$}{E\, H E} |
| 418 | \key{sin, cos, tan}{S\, C\, T} |
| 419 | \key{arcsin, arccos, arctan}{I S\, I C\, I T} |
| 420 | \key{inverse, hyperbolic prefix keys}{I\, H} |
| 421 | \key{two-argument arctan}{f T} |
| 422 | \key{degrees, radians modes}{m d\, m r} |
| 423 | \key{pi ($\pi$)}{P} |
| 424 | |
| 425 | \key{factorial, double factorial}{!\, k d} |
| 426 | \key{combinations, permutations}{k c\, H k c} |
| 427 | \key{prime factorization}{k f} |
| 428 | \key{next prime, previous prime}{k n\, I k n} |
| 429 | \key{GCD, LCM}{k g\, k l} |
| 430 | \key{random number, shuffle}{k r\, k h} |
| 431 | \key{minimum, maximum}{f n\, f x} |
| 432 | |
| 433 | \key{error functions erf, erfc}{f e\, I f e} |
| 434 | \key{gamma, beta functions}{f g\, f b} |
| 435 | \key{incomplete gamma, beta functions}{f G\, f B} |
| 436 | \key{Bessel $J_\nu$, $Y_\nu$ functions}{f j\, f y} |
| 437 | |
| 438 | \key{complex magnitude, arg, conjugate}{A\, G\, J} |
| 439 | \key{real, imaginary parts}{f r\, f i} |
| 440 | \key{convert polar/rectangular}{c p} |
| 441 | |
| 442 | \section{Financial Functions} |
| 443 | |
| 444 | \key{enter percentage}{M-\%} |
| 445 | \key{convert to percentage}{c \%} |
| 446 | \key{percentage change}{b \%} |
| 447 | |
| 448 | \key{present value}{b P} |
| 449 | \key{future value}{b F} |
| 450 | \key{rate of return}{b T} |
| 451 | \key{number of payments}{b \#} |
| 452 | \key{size of payments}{b M} |
| 453 | \key{net present value, int.\ rate of return}{b N\, b I} |
| 454 | |
| 455 | Above computations assume payments at end of period. Use \kbd{I} |
| 456 | prefix for beginning of period, or \kbd{H} for a lump sum investment. |
| 457 | |
| 458 | \key{straight-line depreciation}{b S} |
| 459 | \key{sum-of-years'-digits}{b Y} |
| 460 | \key{double declining balance}{b D} |
| 461 | |
| 462 | \section{Units} |
| 463 | |
| 464 | \wkey{enter with units}{' 55 mi/hr} |
| 465 | \key{convert to new units, base units}{u c\, u b} |
| 466 | \key{convert temperature units}{u t} |
| 467 | \key{simplify units expression}{u s} |
| 468 | \key{view units table}{u v} |
| 469 | |
| 470 | Common units: |
| 471 | \iline{distance: \kbd{m}, \kbd{cm}, \kbd{mm}, \kbd{km}; |
| 472 | \kbd{in}, \kbd{ft}, \kbd{mi}, \kbd{mfi}; |
| 473 | \kbd{point}, \kbd{lyr}} |
| 474 | \iline{volume: \kbd{l} or \kbd{L}, \kbd{ml}; |
| 475 | \kbd{gal}, \kbd{qt}, \kbd{pt}, \kbd{cup}, \kbd{floz}, |
| 476 | \kbd{tbsp}, \kbd{tsp}} |
| 477 | \iline{mass: \kbd{g}, \kbd{mg}, \kbd{kg}, \kbd{t}; |
| 478 | \kbd{lb}, \kbd{oz}, \kbd{ton}} |
| 479 | \iline{time: \kbd{s} or \kbd{sec}, \kbd{ms}, \kbd{us}, \kbd{ns}, \kbd{min}, |
| 480 | \kbd{hr}, \kbd{day}, \kbd{wk}} |
| 481 | \iline{temperature: \kbd{degC}, \kbd{degF}, \kbd{K}} |
| 482 | |
| 483 | % Column 4 |
| 484 | |
| 485 | \newcolumn |
| 486 | \title{GNU Calc Reference Card} |
| 487 | |
| 488 | \section{Programmer's Functions} |
| 489 | |
| 490 | \key{binary, octal, hex display}{d 2\, d 8\, d 6} |
| 491 | \key{decimal, other radix display}{d 0\, d r} |
| 492 | \key{display leading zeros}{d z} |
| 493 | \key{entering non-decimal numbers}{16\#7FFF} |
| 494 | |
| 495 | \key{binary word size}{b w} |
| 496 | \key{binary AND, OR, XOR}{b a\, b o\, b x} |
| 497 | \key{binary DIFF, NOT}{b d\, b n} |
| 498 | \key{left shift}{b l} |
| 499 | \key{logical right shift}{b r} |
| 500 | \key{arithmetic right shift}{b R} |
| 501 | |
| 502 | \key{integer quotient, remainder}{\\\, \%} |
| 503 | \key{integer square root, logarithm}{f Q\, f I} |
| 504 | \key{floor, ceiling, round to integer}{F\, I F\, R} |
| 505 | |
| 506 | \section{Variables} |
| 507 | |
| 508 | \lesssectionskip |
| 509 | Variable names are single digits or whole words. |
| 510 | |
| 511 | \key{store to variable}{s t} |
| 512 | \key{store and keep on stack}{s s} |
| 513 | \key{recall from variable}{s r} |
| 514 | \key{shorthands for digit variables}{t {\it n}\, s {\it n}\, r {\it n}} |
| 515 | \key{unstore, exchange variable}{s u\, s x} |
| 516 | \key{edit variable}{s e} |
| 517 | |
| 518 | \section{Vector Operations} |
| 519 | |
| 520 | \key{vector of 1, 2, $\ldots\mskip\thinmuskip$, {\it n}}{v x {\it n}} |
| 521 | \key{vector of {\it n} counts from {\it a} by {\it b}}{C-u v x} |
| 522 | \key{vector of copies of a value}{v b} |
| 523 | \key{concatenate into vector}{|} |
| 524 | \key{pack many stack items into vector}{v p} |
| 525 | \key{unpack vector or object}{v u} |
| 526 | |
| 527 | \key{length of vector (list)}{v l} |
| 528 | \key{reverse vector}{v v} |
| 529 | \key{sort, grade vector}{V S\, V G} |
| 530 | \key{histogram of vector data}{V H} |
| 531 | \key{extract vector element}{v r} |
| 532 | |
| 533 | \key{matrix determinant, inverse}{V D\, \&} |
| 534 | \key{matrix transpose, trace}{v t\, V T} |
| 535 | \key{cross, dot products}{V C\, *} |
| 536 | \key{identity matrix}{v i} |
| 537 | \key{extract matrix row, column}{v r\, v c} |
| 538 | |
| 539 | \key{intersection, union, diff of sets}{V \^\, V V\, V -} |
| 540 | \key{cardinality of set}{V \#} |
| 541 | |
| 542 | \key{add vectors elementwise (i.e., map \kbd{+})}{V M +} |
| 543 | \key{sum elements in vector (i.e., reduce \kbd{+})}{V R +} |
| 544 | \key{sum rows in matrix}{V R \_ +} |
| 545 | \key{sum columns in matrix}{V R : +} |
| 546 | \key{sum elements, accumulate results}{V U +} |
| 547 | |
| 548 | % Column 5 |
| 549 | |
| 550 | \section{Algebra} |
| 551 | |
| 552 | \wkey{enter an algebraic formula}{' 2x+3y\^2} |
| 553 | \wkey{enter an equation}{' 2x\^2=18} |
| 554 | |
| 555 | \key{symbolic (vs.\ numeric) mode}{m s} |
| 556 | \key{fractions (vs.\ float) mode}{m f} |
| 557 | \key{suppress evaluation of formulas}{m O} |
| 558 | \key{simplify formulas automatically}{m S} |
| 559 | \key{return to default evaluation rules}{m D} |
| 560 | |
| 561 | \key{``Big'' display mode}{d B} |
| 562 | \key{C, Pascal, FORTRAN modes}{d C\, d P\, d F} |
| 563 | \key{\TeX, La\TeX, eqn modes}{d T\, d L\, d E} |
| 564 | \key{Maxima}{d X} |
| 565 | \key{Unformatted mode}{d U} |
| 566 | \key{Normal language mode}{d N} |
| 567 | |
| 568 | \key{simplify formula}{a s} |
| 569 | \key{put formula into rational form}{a n} |
| 570 | \key{evaluate variables in formula}{=} |
| 571 | \key{evaluate numerically}{N} |
| 572 | \key{let variable equal a value in formula}{s l {\it x\/}={\it val}} |
| 573 | \key{declare properties of variable}{s d} |
| 574 | \iline{Common decls: \kbd{pos}, \kbd{int}, \kbd{real}, |
| 575 | \kbd{scalar}, \kbd{[{\it a}..{\it b}\hskip.1em]}.} |
| 576 | |
| 577 | \key{expand, collect terms}{a x\, a c} |
| 578 | \key{factor, partial fractions}{a f\, a a} |
| 579 | \key{polynomial quotient, remainder, GCD}{a \\\, a \%\, a g} |
| 580 | \key{derivative, integral}{a d\, a i} |
| 581 | \key{taylor series}{a t} |
| 582 | |
| 583 | \key{principal solution to equation(s)}{a S} |
| 584 | \key{list of solutions}{a P} |
| 585 | \key{generic solution}{H a S} |
| 586 | \key{apply function to both sides of eqn}{a M} |
| 587 | |
| 588 | \key{rewrite formula}{a r} |
| 589 | \iline{Example: \wkbd{a r a*b + a*c := a*(b+c)}} |
| 590 | \iline{Example: \wkbd{a r sin(x)\^2 := 1-cos(x)\^2}} |
| 591 | \iline{Example: \wkbd{a r cos(n pi) := 1 ::\ integer(n) ::\ n\%2 = 0}} |
| 592 | \iline{Example: \wkbd{a r [f(0) := 1, f(n) := n f(n-1) ::\ n > 0]}} |
| 593 | \iline{Put rules in \kbd{EvalRules} to have them apply automatically.} |
| 594 | \iline{Put rules in \kbd{AlgSimpRules} to apply during \kbd{a s} |
| 595 | command.} |
| 596 | \iline{Common markers: \kbd{opt}, \kbd{plain}, \kbd{quote}, \kbd{eval}, |
| 597 | \kbd{let}, \kbd{remember}.} |
| 598 | |
| 599 | \section{Numerical Computations} |
| 600 | |
| 601 | \key{sum formula over a range}{a +} |
| 602 | \key{product of formula over a range}{a *} |
| 603 | \key{tabulate formula over a range}{a T} |
| 604 | \key{integrate numerically over a range}{a I} |
| 605 | \key{find zero of formula or equation}{a R} |
| 606 | \key{find local min, max of formula}{a N\, a X} |
| 607 | \key{fit data to line or curve}{a F} |
| 608 | |
| 609 | \key{mean of data in vector or variable}{u M} |
| 610 | \key{median of data}{H u M} |
| 611 | \key{geometric mean of data}{u G} |
| 612 | \key{sum, product of data}{u +\, u *} |
| 613 | \key{minimum, maximum of data}{u N\, u X} |
| 614 | \key{sample, pop.\ standard deviation}{u S\, I u S} |
| 615 | |
| 616 | % Column 6 |
| 617 | |
| 618 | \section{Selections} |
| 619 | |
| 620 | \key{select subformula under cursor}{j s} |
| 621 | \key{select {\it n\/}th subformula}{j {\it n}} |
| 622 | \key{select more}{j m} |
| 623 | \key{unselect this, all formulas}{j u\, j c} |
| 624 | |
| 625 | \key{copy indicated subformula}{j RET} |
| 626 | \key{delete indicated subformula}{j DEL} |
| 627 | |
| 628 | \key{commute selected terms}{j C} |
| 629 | \key{commute term leftward, rightward}{j L\, j R} |
| 630 | \key{distribute, merge selection}{j D\, j M} |
| 631 | \key{isolate selected term in equation}{j I} |
| 632 | \key{negate, invert term in context}{j N\, j \&} |
| 633 | \key{rewrite selected term}{j r} |
| 634 | |
| 635 | \section{Graphics} |
| 636 | |
| 637 | \key{graph function or data}{g f} |
| 638 | \key{graph 3D function or data}{g F} |
| 639 | \key{replot current graph}{g p} |
| 640 | \key{print current graph}{g P} |
| 641 | \key{add curve to graph}{g a} |
| 642 | \key{set number of data points}{g N} |
| 643 | \key{set line, point styles}{g s\, g S} |
| 644 | \key{set log vs.\ linear {\it x, y} axis}{g l\, g L} |
| 645 | \key{set range for {\it x, y} axis}{g r\, g R} |
| 646 | \key{close graphics window}{g q} |
| 647 | |
| 648 | \section{Programming} |
| 649 | |
| 650 | \key{begin, end recording a macro}{C-x (\, C-x )} |
| 651 | \key{replay keyboard macro}{X} |
| 652 | \wkey{read region as written-out macro}{\calcprefix m} |
| 653 | \key{if, else, endif}{Z [\, Z :\, Z ]} |
| 654 | \key{equal to, less than, member of}{a =\, a <\, a \{} |
| 655 | \key{repeat {\it n} times, break from loop}{Z <\, Z >\, Z /} |
| 656 | \key{``for'' loop: start, end; body, step}{Z (\, Z )} |
| 657 | \key{save, restore mode settings}{Z `\, Z '} |
| 658 | \key{query user during macro}{Z \#} |
| 659 | \key{put finished macro on a key}{Z K} |
| 660 | |
| 661 | \key{define function with formula}{Z F} |
| 662 | \key{edit definition}{Z E} |
| 663 | |
| 664 | \key{record user-defined command permanently}{Z P} |
| 665 | \key{record variable value permanently}{s p} |
| 666 | \key{record mode settings permanently}{m m} |
| 667 | |
| 668 | \copyrightnotice |
| 669 | |
| 670 | \bye |
| 671 | \f |
| 672 | % Local variables: |
| 673 | % compile-command: "pdftex calccard" |
| 674 | % End: |
| 675 | |