; Date: 01.01.2019 ; Author: Johannes Ziegmann ; Mail: Johannes.Ziegmann@gmail.com ; ////////////////////////////////////////////////////////////////////////////////////// ; ONLY IF TeXnicCenter Windows is active ; ////////////////////////////////////////////////////////////////////////////////////// SetTitleMatchMode, regex GroupAdd, TXC, ^.*TeXnicCenter.*$ ahk_class ^Afx:.+:.:.+:.+:.*$ #IfWinActive, ahk_group TXC ; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a ; semicolon, such as this one, are comments. They are not executed. ; This script has a special filename and path because it is automatically ; launched when you run the program directly. Also, any text file whose ; name ends in .ahk is associated with the program, which means that it ; can be launched simply by double-clicking it. You can have as many .ahk ; files as you want, located in any folder. You can also run more than ; one .ahk file simultaneously and each will get its own tray icon. ; ////////////////////////////////////////////////////////////////////////////////////// ; TUTORIAL ... https://ahkde.github.io/docs/Tutorial.htm ; Übersicht ... https://ahkde.github.io/docs/AutoHotkey.htm ; Example ... http://www.uweziegenhagen.de/?tag=autohotkey ; Example ... https://tex.stackexchange.com/questions/61547/using-autohotkey-to-streamline-latex-document-authoring ; ////////////////////////////////////////////////////////////////////////////////////// ; USED SYNTAX EXPLANATION ; :o: omit ending character ; :?: triggers hotstring even between characters ; :c: case sensitive ; ^ CTRL ; # Windows ; ! ALT ; + Umschalt ; & zwei beliebige Tasten oder Maustasten zu Hotkey kombinieren ; ////////////////////////////////////////////////////////////////////////////////////// #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. ; ////////////////////////////////////////////////////////////////////////////////////// ; SCRIPT SETTINGS #a::Suspend, Toggle ; toggle suspend script #Hotstring EndChars `t ; tab is the only endchar for hotstrings ; ////////////////////////////////////////////////////////////////////////////////////// ; GENERAL ; ////////////////////////////////////////////////////////////////////////////////////// ; ******************************************************************** ; -> GENERAL ... ^4:: Send $${Left} ^3:: Send {{}{}}{Left} ; ******************************************************************** ; -> EQUATION ... :o:baln::\begin{{}align{}}`r`r\end{{}align{}}{Up}`t ; align :o:bgas::\begin{{}align{}}\begin{{}split{}}`r`r\end{{}split{}}\end{{}align{}}{Up}`t ; align with split ^e:: Send \begin{{}align{}} {Enter} {Enter}\end{{}align{}} {Left 14} {tab} ; Text(e.g. "enum") + CRT + Space :*:enum#::\begin{{}enumerate{}}`r\item `r\item `r\item `r\end{{}enumerate{}}{UP 3} :*:item#::\begin{{}itemize{}}`r\item `r\item `r\item `r\end{{}itemize{}}{UP 3} ; ******************************************************************** ; -> FORMAT ... ; \section :o:sc::%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%`r\section{{}•{}}`r\label{{}sec:xxx{}}`r%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%{Left 97}+{Left} ; \subsection :o:ss::%==============================================================================`r\subsection{{}•{}}`r\label{{}subsec:xxx{}}`r%=============================================================================={Left 100}+{Left} ; \subsubsection :o:sss::%------------------------------------------------------------------------------`r\subsubsection{{}•{}}`r\label{{}subsubsec:xxx{}}`r%------------------------------------------------------------------------------{Left 103}+{Left} ; \paragraph :o:par::%-----------------------------------------`r\paragraph{{}•{}}`r\label{{}par:xxx{}}`r%-----------------------------------------{Left 60}+{Left} ; \clearpage :o:clp::\clearpage ; ******************************************************************** ; -> TEXT FORMAT (math) ... :o:tx::\text{{}•{}}{Left}+{Left} ; \text :o:tbf::\textbf{{}•{}}{Left}+{Left} ; \textbf :o:bf::\mathbf{{}•{}}{Left}+{Left} ; \mathbf :o:cal::\mathcal{{}•{}}{Left}+{Left} ; \mathcal :o:bb::\mathbb{{}•{}}{Left}+{Left} ; \mathbb :o:bbm::\mathbbm{{}•{}}{Left}+{Left} ; \mathbbm ; ******************************************************************** ; -> Math helpers ... :o?:^::{^}{{}{}}{Left} ; ^{} :o?:_::_{{}{}}{Left} ; _{} :o:exp::e{^}{{}{}}{Left} ; e^{} :o:fra::\frac{{}•{}}{{}•{}}{Left 4}+{Left} ; \frac{}{} :o:ovs::\overset{{}•{}}{{}•{}}{Left 4}+{Left} ; \overset :o:sum::\sum_{{}•{}}{^}{{}•{}}{Left 5}+{Left} ; \sum :o:pro::\prod_{{}•{}}{^}{{}•{}}{Left 5}+{Left} ; \prod :o:int::\int_{{}•{}}{^}{{}•{}}{Left 5}+{Left} ; \int :o:del::\partial ; \partial :o:inf::\infty :o:<=>::\Leftrightarrow :o:=>::\Rightarrow :o:->::\rightarrow :o:!=::\overset{{}{!}{}}{{}={}} :o:°::{^}\circ :o:qd::\quad :o:qq::\qquad :o:=::\ =\{Space} ; ******************************************************************** ; BRACKETS ^8:: Send \left( \right) {Left 9} ; \left( \right) ^9:: Send \left[ \right] {Left 9} ; \left[ \right] ^<:: Send \left< \right> {Left 9} ; \left< \right> ^7:: Send \left\{{} \right\{}} {Left 10} ; \left{ \right} ; ******************************************************************** ; MATRICES, VECTORS, ... ^m:: Send \begin{{}matrix{}}\end{{}matrix{}}{Left 12} ^b:: Send \begin{{}{}} {Enter}\end{{}{}}{Left 10} :o:pm2::\begin{{}pmatrix{}}`r0 & 0 \\`r0 & 0 \\`r\end{{}pmatrix{}}{Left 13}{Up}`t{Left}{Up}`t :o:bm2::\begin{{}bmatrix{}}`r0 & 0 \\`r0 & 0 \\`r\end{{}bmatrix{}}{Left 13}{Up}`t{Left}{Up}`t :o:pm3::\begin{{}pmatrix{}}`r0 & 0 & 0 \\`r0 & 0 & 0 \\`r0 & 0 & 0 \\`r\end{{}pmatrix{}}{Left 13}{Up}`t{Left}{Up}`t{Left}{Up}`t :o:bm3::\begin{{}bmatrix{}}`r0 & 0 & 0 \\`r0 & 0 & 0 \\`r0 & 0 & 0 \\`r\end{{}bmatrix{}}{Left 13}{Up}`t{Left}{Up}`t{Left}{Up}`t :o:pm4::\begin{{}pmatrix{}}`r0 & 0 & 0 & 0 \\`r0 & 0 & 0 & 0 \\`r0 & 0 & 0 & 0 \\`r0 & 0 & 0 & 0 \\`r\end{{}pmatrix{}}{Left 13}{Up}`t{Left}{Up}`t{Left}{Up}`t{Left}{Up}`t :o:bm4::\begin{{}bmatrix{}}`r0 & 0 & 0 & 0 \\`r0 & 0 & 0 & 0 \\`r0 & 0 & 0 & 0 \\`r0 & 0 & 0 & 0 \\`r\end{{}bmatrix{}}{Left 13}{Up}`t{Left}{Up}`t{Left}{Up}`t{Left}{Up}`t :o:lgs::\begin{{}cases{}}\;`r\begin{{}matrix{}}`rf & = & a & b \\`rf & = & c & d \\`r\end{{}matrix{}}`r\end{{}cases{}}{Left 11}{Up 2}`t{Left}{Up}`t :o:v2::\begin{{}pmatrix{}}`r0 \\`r0 \\`r\end{{}pmatrix{}}{Left 13}{Up}`t{Left}{Up}`t :o:v3::\begin{{}pmatrix{}}`r0 \\`r0 \\`r0 \\`r\end{{}pmatrix{}}{Left 13}{Up}`t{Left}{Up}`t{Left}{Up}`t :o:v4::\begin{{}pmatrix{}}`r0 \\`r0 \\`r0 \\`r0 \\`r\end{{}pmatrix{}}{Left 13}{Up}`t{Left}{Up}`t{Left}{Up}`t{Left}{Up}`t ; ////////////////////////////////////////////////////////////////////////////////////// ; GREEK :o:a::\alpha :o:b::\beta :o:c::\chi :oc:d::\delta :oc:D::\Delta :o:e::\epsilon :o:ve::\varepsilon :oc:f::\phi :oc:F::\Phi :o:vf::\varphi :oc:g::\gamma :oc:G::\Gamma :o:h::\eta :o:i::\iota :o:k::\kappa :oc:l::\lambda :oc:L::\Lambda :o:m::\mu :o:n::\nu :oc:p::\pi :oc:P::\Pi :oc:q::\theta :oc:Q::\Theta :o:vq::\vartheta :o:r::\rho :oc:s::\sigma :oc:S::\Sigma :o:t::\tau :oc:u::\upsilon :oc:U::\Upsilon :o:v::\digamma :oc:w::\omega :oc:W::\Omega :oc:x::\xi :oc:X::\Xi :oc:y::\psi :oc:Y::\Psi :o:z::\zeta ; ////////////////////////////////////////////////////////////////////////////////////// ; ONLY IF TeXnicCenter Windows is active ; ////////////////////////////////////////////////////////////////////////////////////// #IfWinExist