Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.69 KB | None | 0 0
  1. documentclass[10pt,landscape]{article}
  2.  
  3. usepackage{multicol}
  4. usepackage{array}
  5. newcolumntype{L}{>{ttfamilycolor{red!50}}l}
  6.  
  7. usepackage[landscape]{geometry}
  8. geometry{paperwidth=508mm,paperheight=286mm,top=1cm,left=3cm,right=3cm,bottom=1cm}
  9.  
  10. usepackage{xcolor}
  11. pagecolor{black}
  12. color{yellow!50}
  13.  
  14. makeatletter
  15. renewcommand{subsection}{@startsection{subsection}{2}{z@}%
  16. {-3.25ex@plus -1ex @minus -.2ex}%
  17. {1.5ex @plus .2ex}%
  18. {normalfontlargebfseriescolor{cyan!75}}}
  19. makeatother
  20.  
  21. setcounter{secnumdepth}{0}
  22. setlength{parindent}{0pt}
  23. setlength{parskip}{0pt plus 0.5ex}
  24.  
  25. newcommand{textpink}[1]{textcolor{red!50}{texttt{#1}}}
  26. newcommand{textyellow}[1]{textcolor{yellow!50}{textbf{#1}}}
  27.  
  28.  
  29. begin{document}
  30.  
  31. begin{multicols*}{4}
  32.  
  33. setlength{premulticols}{1pt}
  34. setlength{postmulticols}{1pt}
  35. setlength{multicolsep}{1pt}
  36. setlength{columnsep}{2pt}
  37.  
  38. begin{center}
  39. color{cyan!75}
  40. Largetextbf{GNU Emacs Reference Card} \
  41. normalsize (for version 23)\
  42. end{center}
  43.  
  44. subsection{Starting Emacs}
  45. To enter GNU Emacs 23, just type its name:quadtextpink{emacs}
  46.  
  47. subsection{Leaving Emacs}
  48. begin{tabular}{@{}p{7cm}L@{}}
  49. suspend Emacs (or iconify under X) & C-z \
  50. exit Emacs permanently & C-x C-c \
  51. end{tabular}
  52.  
  53. subsection{Files}
  54. begin{tabular}{@{}p{7cm}L@{}}
  55. textbf{read} a file into Emacs & C-x C-f \
  56. textbf{save} a file back to disk & C-x C-s \
  57. save textbf{all} files & C-x s \
  58. insert contents of another file into this buffer & C-x i \
  59. dots \
  60. end{tabular}
  61.  
  62. subsection{Motion}
  63. begin{tabular}{@{}p{5.75cm}LL@{}}
  64. textbf{entity to move over } & textyellow{backward} & textyellow{forward} \
  65. character & C-b & C-f \
  66. dots \
  67. scroll to next screen & multicolumn{2}{c}{textpink{C-v}} \
  68. dots \
  69. end{tabular}
  70.  
  71. end{multicols*}
  72. end{document}
  73.  
  74. usepackage{xcolor}
  75. pagecolor{black}
  76. color{yellow}
  77. % https://tex.stackexchange.com/a/36457/15717
  78. definecolor{ttcolor}{RGB}{255,110,120}
  79. % redefinition of texttt
  80. letOldtexttttexttt
  81. renewcommandtexttt[1]{{ttfamilycolor{ttcolor}#1}}
  82. % redefinition of verb
  83. makeatletter
  84. defverb{relaxifmmodehboxelseleavevmodenullfi
  85. bgroupcolor{ttcolor}
  86. verb@eol@error letdo@makeother dospecials
  87. verbatim@font@noligs
  88. @ifstar@sverb@verb}
  89. makeatother
  90.  
  91. renewcommand{section}{@startsection{section}{1}{0mm}%
  92. {-1ex plus -.5ex minus -.2ex}%
  93. {0.5ex plus .2ex}%x
  94. {normalfontlargebfseriescolor{cyan}}}
  95.  
  96. % compile with lualatex
  97. documentclass[11pt,svgnames]{article}
  98. usepackage{fixltx2e,fontspec,microtype,multicol,textcomp,xcolor}
  99. setmainfont[ItalicFont=LucidaBrightOT-Italic.otf,BoldFont=LucidaBrightOT-Demi.otf,BoldItalicFont=LucidaBrightOT-DemiItalic.otf,]{LucidaBrightOT.otf}
  100. setmonofont[ItalicFont=LucidaSansTypewriterOT-Oblique.otf,StylisticSet=1]{LucidaSansTypewriterOT.otf}
  101. linespread{1.02}
  102. usepackage[centering,columnsep=1.5em,margin=1.5em,paperheight=1024pt,paperwidth=1280pt]{geometry}
  103. definecolor{head}{HTML}{606060}
  104. % definecolor{head}{HTML}{72B247}
  105. definecolor{task}{HTML}{255C2A}
  106. definecolor{command}{HTML}{47B252}
  107. definecolor{bg}{HTML}{030804}
  108. setcounter{secnumdepth}{0}
  109. usepackage[compact,noindentafter]{titlesec}
  110. titleformat{section}
  111. {Largebfseriescolor{head}}{thesection}{}{}
  112. titleformat{subsection}
  113. {largebfseriescolor{head}}{thesubsection}{}{}
  114. titleformat{subsubsection}
  115. {normalsizecolor{head}}{thesubsubsection}{}{}
  116. setlength{parindent}{0pt}
  117. setlength{parskip}{1ex plus .2ex minus .2ex}
  118. newcommand{kbd}[1]{textcolor{command}{texttt{#1}}}
  119. pagestyle{empty}
  120. begin{document}
  121. pagecolor{bg}
  122. color{task}
  123. begin{center}
  124. Hugetextcolor{head}{Emacs Help}
  125. end{center}
  126.  
  127. bigskip
  128.  
  129. begin{multicols}{4}
  130. section{Files}
  131. save textbf{all} fileshfillkbd{C-x s}\
  132. replace this file with the file you really wanthfillkbd{C-x C-v}\
  133. write buffer to a specified filehfillkbd{C-x C-w}\
  134. toggle read-only status of bufferhfillkbd{C-x C-q}
  135.  
  136. section{Buffers}
  137. select another bufferhfillkbd{C-x b}\
  138. list all buffershfillkbd{C-x C-b}\
  139. kill a bufferhfillkbd{C-x k}
  140.  
  141. section{Getting Help}
  142. For the help system, type kbd{C-h} or kbd{F1} and follow the
  143. directions. For a textbf{tutorial}, type kbd{C-h t}.
  144.  
  145. remove help windowhfillkbd{C-x 1}\
  146. scroll help windowhfillkbd{C-M-v}\
  147. apropos: show commands matching a stringhfillkbd{C-h a}\
  148. describe the function a key runshfillkbd{C-h k}\
  149. describe a functionhfillkbd{C-h f}\
  150. get mode-specific informationhfillkbd{C-h m}
  151.  
  152. subsection{Info}
  153. enter the Info documentation readerhfillkbd{C-h i}\
  154. find specified function or variable in Infohfillkbd{C-h S}
  155.  
  156. subsubsection{Moving within a node}
  157. scroll forwardhfillkbd{SPC}\
  158. scroll reversehfillkbd{DEL}\
  159. beginning of nodehfillkbd{.} (dot)
  160.  
  161. subsubsection{Moving between nodes}
  162. textbf{next} nodehfillkbd{n}\
  163. textbf{previous} nodehfillkbd{p}\
  164. move textbf{up}hfillkbd{u}\
  165. select menu item by namehfillkbd{m}\
  166. select textit{n}th menu item by number (1–9)hfillkbd{itshape n}\
  167. follow cross reference (return with kbd{l})hfillkbd{f}\
  168. return to last node you sawhfillkbd{l}\
  169. return to directory nodehfillkbd{d}\
  170. go to top node of Info filehfillkbd{t}\
  171. go to any node by namehfillkbd{g}
  172.  
  173. subsubsection{Other}
  174. run Info textbf{tutorial}hfillkbd{h}\
  175. look up a subject in the indiceshfillkbd{i}\
  176. search nodes for regexphfillkbd{s}\
  177. textbf{quit} Infohfillkbd{q}
  178.  
  179. section{In the Minibuffer}
  180. complete as much as possiblehfillkbd{TAB}\
  181. complete up to one wordhfillkbd{SPC}\
  182. complete and executehfillkbd{RET}\
  183. show possible completionshfillkbd{?}\
  184. fetch previous minibuffer inputhfillkbd{M-p}\
  185. fetch later minibuffer input or defaulthfillkbd{M-n}\
  186. regexp search backward through historyhfillkbd{M-r}\
  187. regexp search forward through historyhfillkbd{M-s}\
  188. abort commandhfillkbd{C-g}
  189.  
  190. Type kbd{C-x ESC ESC} to edit and repeat the last command that
  191. used the minibuffer.
  192.  
  193. section{Error Recovery}
  194. textbf{abort} partially typed or executing commandhfillkbd{C-g}\
  195. textbf{recover} files after crashhfillkbd{M-x recover-session}\
  196. textbf{undo} unwanted changehfillkbd{C-x u}, kbd{C-_} or kbd{C-/}\
  197. restore original contentshfillkbd{M-x revert-buffer}\
  198. redraw garbaged screenhfillkbd{C-l}
  199.  
  200. section{Motion}
  201. begin{tabular*}{1linewidth}{@{}l@{extracolsep{fill}}ll@{}}
  202. bfseries entity to move over & bfseries backward & bfseries forward\
  203. word & kbd{M-b} & kbd{M-f}\
  204. line & kbd{C-p} & kbd{C-n}\
  205. sentence & kbd{M-a} & kbd{M-e}\
  206. paragraph & kbd{M-{} & kbd{M-}}\
  207. page & kbd{C-x [} & kbd{C-x ]}\
  208. sexp & kbd{C-M-b} & kbd{C-M-f}
  209. end{tabular*}
  210.  
  211. scroll lefthfillkbd{C-x <}\
  212. scroll righthfillkbd{C-x >}
  213.  
  214. section{Marking}
  215. set mark herehfillkbd{C-@} or kbd{C-SPC}\
  216. exchange point and markhfillkbd{C-x C-x}\
  217. set mark textit{arg} textbf{words} awayhfillkbd{M-@}\
  218. mark textbf{paragraph}hfillkbd{M-h}\
  219. mark textbf{page}hfillkbd{C-x C-p}\
  220. mark textbf{sexp}hfillkbd{C-M-@}\
  221. mark textbf{function}hfillkbd{C-M-h}\
  222. mark entire textbf{buffer}hfillkbd{C-x h}
  223.  
  224. section{Killing}
  225. begin{tabular*}{1linewidth}{@{}l@{extracolsep{fill}}ll@{}}
  226. bfseries entity to kill & bfseries backward & bfseries forward\
  227. word & kbd{M-DEL} & kbd{M-d}\
  228. line (to end of) & kbd{M-0 C-k} & kbd{C-k}\
  229. sentence & kbd{C-x DEL} & kbd{M-k}\
  230. sexp & kbd{M-mbox{}- C-M-k} & kbd{C-M-k}\
  231. end{tabular*}
  232.  
  233. kill textbf{region}hfillkbd{C-w}\
  234. copy region to kill ringhfillkbd{M-w}\
  235. kill through next occurrence of textit{char}hfillkbd{M-z} textit{char}\
  236. yank back last thing killedhfillkbd{C-y}\
  237. replace last yank with previous killhfillkbd{M-y}
  238.  
  239. section{Spelling}
  240. check current wordhfillkbd{M-$}
  241.  
  242. section{Transposing}
  243. transpose textbf{characters}hfillkbd{C-t}\
  244. transpose textbf{words}hfillkbd{M-t}\
  245. transpose textbf{lines}hfillkbd{C-x C-t}\
  246. transpose textbf{sexps}hfillkbd{C-M-t}
  247.  
  248. section{Incremental Search}
  249. search forwardhfillkbd{C-s}\
  250. search backwardhfillkbd{C-r}\
  251. regular expression searchhfillkbd{C-M-s}\
  252. reverse regular expression searchhfillkbd{C-M-r}\
  253. select previous search stringhfillkbd{M-p}\
  254. select next later search stringhfillkbd{M-n}\
  255. exit incremental searchhfillkbd{RET}\
  256. undo effect of last characterhfillkbd{DEL}\
  257. abort current searchhfillkbd{C-g}
  258.  
  259. Repeat kbd{C-s} or kbd{C-r} to repeat the search. If Emacs is still
  260. searching, kbd{C-g} cancels only the part not matched.
  261.  
  262. section{Query Replace}
  263. interactively replace a text stringhfillkbd{M-%}\
  264. using regular expressionshfillkbd{C-M-%}
  265.  
  266. Valid responses are:
  267.  
  268. textbf{replace} this one, go on to nexthfillkbd{SPC}\
  269. replace this one, don’t movehfillkbd{,}\
  270. textbf{skip} to next without replacinghfillkbd{DEL}\
  271. replace all remaining matcheshfillkbd{!}\
  272. textbf{back up} to the previous matchhfillkbd{^{}}\
  273. textbf{exit} query-replacehfillkbd{RET}\
  274. enter recursive edit (kbd{C-M-c} to exit)hfillkbd{C-r}
  275.  
  276. section{Regular Expressions}
  277. any single character except a newlinehfillkbd{.} (dot)\
  278. zero or more repeatshfillkbd{*}\
  279. one or more repeatshfillkbd{+}\
  280. zero or one repeathfillkbd{?}\
  281. quote regular expression special character textit{c}hfillkbd{textbackslashitshape c}\
  282. alternative (β€œor”)hfillkbd{textbackslash|}\
  283. groupinghfillkbd{textbackslash( ... )}\
  284. same text as textit{n}th grouphfillkbd{textbackslashitshape n}\
  285. at word breakhfillkbd{textbackslash b}\
  286. not at word breakhfillkbd{textbackslash B}
  287.  
  288. begin{tabular*}{1linewidth}{@{}l@{extracolsep{fill}}ll@{}}
  289. bfseries entity & bfseries match start & bfseries match end\
  290. line & kbd{^{}} & kbd{$}\
  291. word & kbd{<} & kbd{>}\
  292. buffer & kbd{`} & kbd{'}\[.5ex]
  293. bfseries class of characters & bfseries match these & bfseries match others\
  294. explicit set & kbd{[ ... ]} & kbd{[^{} ... ]}\
  295. word-syntax character & kbd{w} & kbd{W}\
  296. character with syntax textit{c} & kbd{s}textit{c} & kbd{S}textit{c}
  297. end{tabular*}
  298.  
  299. section{Tags}
  300. find a tag (a definition)hfillkbd{M-.}\
  301. find next occurrence of taghfillkbd{C-u M-.}\
  302. specify a new tags filehfillkbd{M-x visit-tags-table}\
  303. regexp search all files in tags tablehfillkbd{M-x tags-search}\
  304. query-replace in the fileshfillkbd{M-x tags-query-replace}\
  305. continue last tags search or query-replacehfillkbd{M-,}
  306.  
  307. section{Formatting}
  308. indent current textbf{line} (mode-dependent)hfillkbd{TAB}\
  309. indent textbf{region} (mode-dependent)hfillkbd{C-M-textbackslash}\
  310. indent textbf{sexp} (mode-dependent)hfillkbd{C-M-q}\
  311. indent region rigidly textit{arg} columnshfillkbd{C-x TAB}\
  312. move rest of line vertically downhfillkbd{C-M-o}\
  313. delete blank lines around pointhfillkbd{C-x C-o}\
  314. join line with previous (with arg, next)hfillkbd{M-^{}}\
  315. delete all white space around pointhfillkbd{M-textbackslash}\
  316. set fill column to textit{arg}hfillkbd{C-x f}\
  317. set prefix each line starts withhfillkbd{C-x .}\
  318. set facehfillkbd{M-o}
  319.  
  320. section{Case Change}
  321. uppercase wordhfillkbd{M-u}\
  322. lowercase wordhfillkbd{M-l}\
  323. capitalize wordhfillkbd{M-c}\
  324. uppercase regionhfillkbd{C-x C-u}\
  325. lowercase regionhfillkbd{C-x C-l}
  326.  
  327. section{Rectangles}
  328. copy rectangle to registerhfillkbd{C-x r r}\
  329. kill rectanglehfillkbd{C-x r k}\
  330. yank rectanglehfillkbd{C-x r y}\
  331. open rectangle, shifting text righthfillkbd{C-x r o}\
  332. blank out rectanglehfillkbd{C-x r c}\
  333. prefix each line with a stringhfillkbd{C-x r t}
  334.  
  335. section{Multiple Windows}
  336. When two commands are shown, the second is a similar command for a
  337. frame instead of a window.
  338.  
  339. begin{tabular*}{1linewidth}{@{}l@{extracolsep{fill}}ll@{}}
  340. delete all other windows & kbd{C-x 1} & kbd{C-x 5 1}\
  341. split window, above and below & kbd{C-x 2} & kbd{C-x 5 2}\
  342. delete this window & kbd{C-x 0} & kbd{C-x 5 0}
  343. end{tabular*}
  344.  
  345. split window, side by sidehfillkbd{C-x 3}\
  346. scroll other windowhfillkbd{C-M-v}
  347.  
  348. begin{tabular*}{1linewidth}{@{}l@{extracolsep{fill}}ll@{}}
  349. switch cursor to another window & kbd{C-x o} & kbd{C-x 5 o}\
  350. select buffer in other window & kbd{C-x 4 b} & kbd{C-x 5 b}\
  351. find file in other window & kbd{C-x 4 f} & kbd{C-x 5 f}\
  352. find file read-only in other window & kbd{C-x 4 r} & kbd{C-x 5 r}\
  353. run Dired in other window & kbd{C-x 4 d} & kbd{C-x 5 d}\
  354. find tag in other window & kbd{C-x 4 .} & kbd{C-x 5 .}
  355. end{tabular*}
  356.  
  357. grow window tallerhfillkbd{C-x ^{}}\
  358. shrink window narrowerhfillkbd{C-x {}\
  359. grow window widerhfillkbd{C-x }}
  360.  
  361. section{Shells}
  362. execute a shell commandhfillkbd{M-!}\
  363. run a shell command on the regionhfillkbd{M-|}\
  364. filter region through a shell commandhfillkbd{C-u M-|}\
  365. start a shell in window kbd{*shell*}hfillkbd{M-x shell}
  366.  
  367. section{Abbrevs}
  368. add global abbrevhfillkbd{C-x a g}\
  369. add mode-local abbrevhfillkbd{C-x a l}\
  370. add global expansion for this abbrevhfillkbd{C-x a i g}\
  371. add mode-local expansion for this abbrevhfillkbd{C-x a i l}\
  372. explicitly expand abbrevhfillkbd{C-x a e}\
  373. expand previous word dynamicallyhfillkbd{M-/}
  374.  
  375. section{Registers}
  376. save region in registerhfillkbd{C-x r s}\
  377. insert register contents into bufferhfillkbd{C-x r i}\
  378. save value of point in registerhfillkbd{C-x r SPC}\
  379. jump to point saved in registerhfillkbd{C-x r j}
  380.  
  381. section{Keyboard Macros}
  382. textbf{start} defining a keyboard macrohfillkbd{C-x (}\
  383. textbf{end} keyboard macro definitionhfillkbd{C-x )}\
  384. textbf{execute} last-defined keyboard macrohfillkbd{C-x e}\
  385. append to last keyboard macrohfillkbd{C-u C-x (}\
  386. name last macrohfillkbd{M-x name-last-kbd-macro}\
  387. insert definition in bufferhfillkbd{M-x insert-kbd-macro}
  388. end{multicols}
  389. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement