Advertisement
scorleo

TeXstudio shortcuts cheat sheet_v1.2b

Apr 19th, 2017
3,399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 11.11 KB | None | 0 0
  1. % ------------------------------------------------ %
  2. % File              shortcuts.tex
  3. % Author            Troy
  4. % Description       TeXstudio shortcuts cheat sheet
  5. %                   Version 1.2b
  6. % Notes:            Inspired by:    https://tex.stackexchange.com/q/365456
  7. %                   See changelog:  https://pastebin.com/U7r8ug5t
  8. % How to use:       1. Place \rowcolor{impt} in front of rows you want to highlight
  9. %                   2. The colour of 'impt' can be changed under `Table settings' -> \definecolor{}
  10. %                   3. Add your own shortcuts in the last table.
  11. %                      Note the shortcut macros defined under `Shortcuts for the shortcuts'.
  12. % Boring Stuff:     Feel free to use this anyway you like. :)
  13. % ------------------------------------------------ %
  14.  
  15. \RequirePackage[l2tabu, orthodox]{nag}
  16. \documentclass[a4paper]{article}
  17. \usepackage[T1]{fontenc}
  18. \usepackage[utf8]{inputenc}
  19. \usepackage{libertine}    
  20. \usepackage[libertine]{newtxmath}
  21. \usepackage[margin=1cm,landscape]{geometry}
  22. \usepackage[protrusion=true,expansion=true]{microtype}
  23. \usepackage{mdframed}
  24. \usepackage[dvipsnames,table]{xcolor}
  25. \usepackage{multicol,booktabs,tabularx}
  26.  
  27. % Shortcuts for the shortcuts
  28. \newcommand{\hlx}{\\\midrule}
  29. \newcommand{\cmd}[1]{\textbf{#1}}
  30. \newcommand{\tbl}{\textbackslash}
  31. \newcommand{\ctrlp}{Ctrl$+$}
  32. \newcommand{\ctrlshiftp}{Ctrl$+$Shift$+$}
  33. \newcommand{\ctrlaltp}{Ctrl$+$Alt$+$}
  34. \newcommand{\altp}{Alt$+$}
  35. \newcommand{\shiftp}{Shift$+$}
  36. \newcommand{\altshiftp}{Alt$+$Shift$+$}
  37. \newcommand*{\altcmd}{\hspace*{1em}\rule[.5ex]{3.5em}{.4pt}}
  38.  
  39. % General document settings
  40. \setlength{\parindent}{0pt}
  41. \newcommand{\spacebtwtables}{%
  42.     \newline%
  43.     \vspace*{1em}%
  44.     \newline%
  45. }
  46. \pagestyle{empty}
  47. \sbox9{\scriptsize\libertine%
  48.     \cmd{\ctrlshiftp \#[0--9]}% Enter the longest command here
  49. }
  50.  
  51. % Mdframed settings
  52. \global\mdfdefinestyle{mystyle}{%
  53.     linecolor=gray,linewidth=1pt,%
  54.     leftmargin=0mm,rightmargin=0mm,skipbelow=0mm,skipabove=0mm
  55. }
  56.  
  57. % Table settings
  58. \renewcommand\arraystretch{1.2}
  59. \renewcommand{\aboverulesep}{0pt}
  60. \renewcommand{\belowrulesep}{0pt}
  61. \newcommand{\headbf}[1]{\Large\textbf{#1}}
  62. \definecolor{impt}{HTML}{E6E7E9}
  63. \newcolumntype{P}{>{\columncolor{white}[0pt][\tabcolsep]}X}
  64. \newcolumntype{L}{>{\columncolor{white}[\tabcolsep][0pt]}m{\wd9}}
  65.  
  66. \begin{document}
  67.     \begin{multicols}{4}
  68.         % Header/Title
  69.         \begin{mdframed}[style=mystyle]
  70.             \begin{center}
  71.                 \fontfamily{pnc}\selectfont
  72.                 \large\scshape
  73.                 TeXstudio \\
  74.                 Default Shortcuts \\\bigskip
  75.                 \footnotesize Last updated: \today
  76.             \end{center}
  77.         \end{mdframed}
  78.         %
  79.         % Main body
  80.         \scriptsize
  81.         \bigskip
  82. % <File>
  83.         \begin{tabularx}{\linewidth}[th]{%
  84.                 @{}P L@{}%
  85.             }
  86.             \multicolumn{2}{@{}l@{}}{\headbf{File}} \\
  87.             \toprule
  88.             New file    & \cmd{\ctrlp N} \hlx
  89.             Open file   & \cmd{\ctrlp O} \hlx
  90.             Save file   & \cmd{\ctrlp S} \hlx
  91.             Save file as    & \cmd{\ctrlaltp S} \hlx
  92.             Save all files  & \cmd{\ctrlaltp Shift$+$S} \hlx
  93.             Close file  & \cmd{\ctrlp W} \hlx
  94.             Print source code   & \cmd{\ctrlp P} \hlx
  95.             Exit TeXstudio  & \cmd{\ctrlp Q} \\
  96.             \bottomrule
  97.         \end{tabularx}
  98.         \spacebtwtables
  99. % <Edit>
  100.         \begin{tabularx}{\linewidth}[th]{%
  101.                 @{}P L@{}%
  102.             }
  103.             \multicolumn{2}{@{}l@{}}{\headbf{Edit}} \\
  104.             \toprule
  105.             Undo    & \cmd{\ctrlp Z} \hlx
  106.             Redo    & \cmd{\ctrlp Y} \hlx
  107.                     & \cmd{\ctrlshiftp Z} \hlx
  108.             Copy    & \cmd{\ctrlp C} \hlx
  109.             Paste   & \cmd{\ctrlp V} \hlx
  110.             Insert unicode character    & \cmd{\ctrlaltp U} \hlx
  111.             \multicolumn{2}{c}{--Selection--} \hlx
  112.             Select all  & \cmd{\ctrlp A} \hlx
  113.             Expand selection to word    & \cmd{\ctrlp D} \hlx
  114.             Expand selection to line    & \cmd{\ctrlp L} \hlx
  115.             \multicolumn{2}{c}{--Line Operations--} \hlx
  116.             \rowcolor{impt}
  117.             Delete line & \cmd{\ctrlp K} \hlx
  118.             Delete to end of line   & \cmd{\altp K} \hlx
  119.             \multicolumn{2}{c}{--Searching--} \hlx
  120.             Find    & \cmd{\ctrlp F} \hlx
  121.             Find next   & \cmd{F3} \hlx
  122.             Find previous   & \cmd{\shiftp F3} \hlx
  123.             Replace & \cmd{\ctrlp R} \hlx
  124.             \multicolumn{2}{c}{--Go To--} \hlx
  125.             Go to line  & \cmd{\ctrlp G} \hlx
  126.             Go to previous change   & \cmd{\ctrlp H} \hlx
  127.             Go to next change   & \cmd{\ctrlshiftp H} \hlx
  128.             Go to previous mark & \cmd{\ctrlp Up} \hlx
  129.             Go to next mark & \cmd{\ctrlp Down} \hlx
  130.             Go back & \cmd{\altp Left} \hlx
  131.             Go forward  & \cmd{\altp Right} \hlx
  132.             Go to bookmark \#[0--9] & \cmd{\ctrlp \#[0--9]} \hlx
  133.             \multicolumn{2}{c}{--Toggle Bookmark--} \hlx
  134.             Toggle (unnamed) bookmark   & \cmd{\ctrlshiftp B} \hlx
  135.             Toggle bookmark \#[0--9]    & \cmd{\ctrlshiftp \#[0--9]} \\
  136.             \bottomrule
  137.         \end{tabularx}
  138.         %\spacebtwtables
  139. % <Idefix>
  140.         \begin{tabularx}{\linewidth}[th]{%
  141.                 @{}P L@{}%
  142.             }
  143.             \multicolumn{2}{@{}l@{}}{\headbf{Idefix}} \\
  144.             \toprule
  145.             Erase word/cmd/env  & \cmd{\altp Del} \hlx
  146.             Paste as LaTeX  & \cmd{\ctrlshiftp V} \hlx
  147.             Preview selection/Parentheses   & \cmd{\altp P} \hlx
  148.             \rowcolor{impt}
  149.             Toggle comment  & \cmd{\ctrlp T} \hlx
  150.             Uncomment   & \cmd{\ctrlp U} \hlx
  151.             Go to previous error    & \cmd{\ctrlshiftp Up} \hlx
  152.             Go to next error    & \cmd{\ctrlshiftp Down} \hlx
  153.             Go to previous bad box  & \cmd{\altshiftp Up} \hlx
  154.             Go to next bad box  & \cmd{\altshiftp Down} \hlx
  155.             Go to definition    & \cmd{\ctrlaltp F} \hlx
  156.             \multicolumn{2}{c}{--Parenthesis--} \hlx
  157.             Jump to match   & \cmd{\ctrlshiftp P, J} \hlx
  158.             Select inner    & \cmd{\ctrlshiftp P, I} \hlx
  159.             Select outer    & \cmd{\ctrlshiftp P, O} \hlx
  160.             Select command  & \cmd{\ctrlshiftp P, C} \hlx
  161.             Select line & \cmd{\ctrlshiftp P, L} \hlx
  162.             Select inverting    & \cmd{\ctrlshiftp P, S} \hlx
  163.             Find mismatch   & \cmd{\ctrlshiftp P, M} \hlx
  164.             \multicolumn{2}{c}{--Complete--} \hlx
  165.             Normal  & \cmd{\ctrlp Space} \hlx
  166.             \tbl begin\{ completion & \cmd{\ctrlaltp Space} \hlx
  167.             Normal text & \cmd{\altshiftp Space} \hlx
  168.             Close latest open environment   & \cmd{\altp Return} \hlx
  169.             Remove placeholders & \cmd{\ctrlshiftp K} \\
  170.             \bottomrule
  171.         \end{tabularx}
  172.         \spacebtwtables
  173. % <Tools>
  174.         \begin{tabularx}{\linewidth}[th]{%
  175.                 @{}P L@{}%
  176.             }
  177.             \multicolumn{2}{@{}l@{}}{\headbf{Tools}} \\
  178.             \toprule
  179.             \rowcolor{impt}
  180.             Build and View  & \cmd{F5} \hlx
  181.             Compile & \cmd{F6} \hlx
  182.             View    & \cmd{F7} \hlx
  183.             Bibliography    & \cmd{F8} \hlx
  184.             Glossary    & \cmd{F9} \hlx
  185.             Check spelling  & \cmd{\ctrlp :} \hlx
  186.             Thesaurus   & \cmd{\ctrlshiftp F8} \\
  187.             \bottomrule
  188.         \end{tabularx}
  189.         %\spacebtwtables
  190. % <LaTeX>
  191.         \begin{tabularx}{\linewidth}[th]{%
  192.                 @{}P L@{}%
  193.             }
  194.             \multicolumn{2}{@{}l@{}}{\headbf{LaTeX}} \\
  195.             \toprule
  196.             Insert \tbl ref to next label   & \cmd{\ctrlaltp R} \hlx
  197.             \multicolumn{2}{c}{--Environments--} \hlx
  198.             \rowcolor{impt}
  199.             \tbl begin\{<environment>\} & \cmd{\ctrlp E} \hlx
  200.             \multicolumn{2}{c}{--List Environments--} \hlx
  201.             \tbl item   & \cmd{\ctrlshiftp I} \hlx
  202.             \multicolumn{2}{c}{--Font Styles--} \hlx
  203.             Emphasis -- \tbl emph   & \cmd{\ctrlshiftp E} \hlx
  204.             Italics -- \tbl textit  & \cmd{\ctrlp I} \hlx
  205.             Slanted -- \tbl textsl  & \cmd{\ctrlshiftp S} \hlx
  206.             Boldface -- \tbl textbf & \cmd{\ctrlp B} \hlx
  207.             Typewriter -- \tbl texttt   & \cmd{\ctrlshiftp T} \hlx
  208.             Small caps -- \tbl textsc   & \cmd{\ctrlshiftp C} \hlx
  209.             Sans Serif -- \tbl textsf   & \cmd{\ctrlshiftp A} \hlx
  210.             \multicolumn{2}{c}{--Vertical Spacing--} \hlx
  211.             New line -- \tbl\tbl    & \cmd{\ctrlp Return} \\
  212.             \bottomrule
  213.         \end{tabularx}
  214.         \spacebtwtables
  215. % <Math>
  216.         \begin{tabularx}{\linewidth}[th]{%
  217.                 @{}P L@{}%
  218.             }
  219.             \multicolumn{2}{@{}l@{}}{\headbf{Math}} \\
  220.             \toprule
  221.             Inline math mode \$\ldots\$ & \cmd{\ctrlshiftp M} \hlx
  222.             Display math mode \tbl[\ldots]\tbl  & \cmd{\altshiftp M} \hlx
  223.             Subscript -- \_\{\,\}   & \cmd{\ctrlshiftp D} \hlx
  224.             Superscript -- \^{}\{\,\}   & \cmd{\ctrlshiftp U} \hlx
  225.             \tbl frac\{\,\}\{\,\}   & \cmd{\altshiftp F} \hlx
  226.             \tbl dfrac\{\,\}\{\,\}  & \cmd{\ctrlshiftp F} \hlx
  227.             \tbl sqrt\{\,\} & \cmd{\ctrlshiftp Q} \hlx
  228.             \tbl left   & \cmd{\ctrlshiftp L} \hlx
  229.             \tbl right  & \cmd{\ctrlshiftp R} \hlx
  230.             \multicolumn{2}{c}{--Math Equations--} \hlx
  231.             env equation    & \cmd{\ctrlshiftp N} \\
  232.             \bottomrule
  233.         \end{tabularx}
  234.         \spacebtwtables
  235. % <View>
  236.         \begin{tabularx}{\linewidth}[th]{%
  237.                 @{}P L@{}%
  238.             }
  239.             \multicolumn{2}{@{}l@{}}{\headbf{View}} \\
  240.             \toprule
  241.             Previous document   & \cmd{\ctrlp PgUp} \hlx
  242.             \altcmd         & \cmd{\ctrlshiftp Tab} \hlx
  243.             Next document   & \cmd{\ctrlp PgDown} \hlx
  244.             \altcmd         & \cmd{\ctrlp Tab} \hlx
  245.             Focus editor    & \cmd{\ctrlaltp Left} \hlx
  246.             Focus viewer    & \cmd{\ctrlaltp Right} \hlx
  247.             Close something & \cmd{Esc} \hlx
  248.             \multicolumn{2}{c}{--Editor Zoom--} \hlx
  249.             Zoom in & \cmd{\ctrlp $+$} \hlx
  250.             Zoom out    & \cmd{\ctrlp $-$} \hlx
  251.             Full screen & \cmd{F11} \\
  252.             \bottomrule
  253.         \end{tabularx}
  254.         %\spacebtwtables
  255. % <PDF-Viewer>
  256.         \begin{tabularx}{\linewidth}[th]{%
  257.                 @{}P L@{}%
  258.             }
  259.             \multicolumn{2}{@{}l@{}}{\headbf{PDF-Viewer}} \\
  260.             \toprule
  261.             \multicolumn{2}{c}{--File--} \hlx
  262.             Close   & \cmd{\ctrlp W} \hlx
  263.             \multicolumn{2}{c}{--Edit--} \hlx
  264.             Find    & \cmd{\ctrlp F} \hlx
  265.             Find again  & \cmd{\ctrlp M} \hlx
  266.             Quick build & \cmd{\ctrlp T} \hlx
  267.             \multicolumn{2}{c}{--View--} \hlx
  268.             First page  & \cmd{Home} \hlx
  269.             Back    & \cmd{\altp L} \hlx
  270.             Forward & \cmd{\altp R} \hlx
  271.             Last page   & \cmd{End} \hlx
  272.             Go to page\ldots    & \cmd{\ctrlp J} \hlx
  273.             Zoom in & \cmd{\ctrlp $+$} \hlx
  274.             Zoom out    & \cmd{\ctrlp $-$} \hlx
  275.             Actual size & \cmd{\ctrlp 1} \hlx
  276.             Fit to width    & \cmd{\ctrlp 2} \hlx
  277.             Fit to text width   & \cmd{\ctrlp 4} \hlx
  278.             Fit to window   & \cmd{\ctrlp 3} \hlx
  279.             Full screen & \cmd{\ctrlshiftp F} \hlx
  280.             Presentation    & \cmd{F5} \hlx
  281.             External viewer & \cmd{\ctrlaltp X} \hlx
  282.             \multicolumn{2}{c}{--Window--} \hlx
  283.             Close something & \cmd{Esc} \hlx
  284.             Go to source    & \cmd{\ctrlp Click} \hlx
  285.             Focus editor    & \cmd{\ctrlaltp Left} \hlx
  286.             \multicolumn{2}{c}{--Help--} \hlx
  287.             About   & \cmd{\ctrlaltp Shift$+$A} \\
  288.             \bottomrule
  289.         \end{tabularx}
  290.         \spacebtwtables
  291. % <Editor>
  292.         \begin{tabularx}{\linewidth}[th]{%
  293.                 @{}P L@{}%
  294.             }
  295.             \multicolumn{2}{@{}l@{}}{\headbf{Editor}} \\
  296.             \toprule
  297.             \multicolumn{2}{c}{--Basic Key Mapping--} \hlx
  298.             Change overwrite mode   & \cmd{Ins} \hlx
  299.             Create cursor mirror down    & \cmd{\ctrlaltp Down} \hlx
  300.             Create cursor mirror up    & \cmd{\ctrlaltp Up} \hlx
  301.             Cut  & \cmd{\ctrlp X} \hlx
  302.             \altcmd  & \cmd{\shiftp Del} \hlx
  303.             Delete left character & \cmd{Backspace} \hlx
  304.             \altcmd               & \cmd{\shiftp Backspace} \hlx
  305.             Delete left word & \cmd{\ctrlp Backspace} \hlx
  306.             Delete right character & \cmd{Del} \hlx
  307.             Delete right word & \cmd{\ctrlp Del} \hlx
  308.             Next placeholder or one word right & \cmd{\ctrlp Right} \hlx
  309.             Previous placeholder or one word left & \cmd{\ctrlp Left} \\
  310.             \bottomrule
  311.         \end{tabularx}
  312.         \spacebtwtables
  313. % <Own Shortcuts/Macros>
  314.         \begin{tabularx}{\linewidth}[th]{%
  315.                 @{}P L@{}%
  316.             }
  317.             \multicolumn{2}{@{}l@{}}{\headbf{Own Shortcuts/Macros}} \\
  318.             \toprule
  319.             Testing example macro 1 & \cmd{\shiftp F1} \hlx
  320.             Testing example macro 2 & \cmd{\ctrlp M, A} \\
  321.             \bottomrule
  322.         \end{tabularx}
  323.         \spacebtwtables
  324.     \end{multicols}
  325. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement