True WYSIWYG LaTeX System
Windows     Mac     Linux  

BaKoMa TeX
Macro Examples

Setup and Use of these examples

Setup macros
Setup these macros may be done by simple saving the files into Macro folder C:\BaKoMa.TeX\LOCAL\Macro (Windows).

Alternative way is open Macro / Managing Macros ..., Create new macro using [+] button. Then edit new macro using [/] (pen) replace entire body by desired macros.

Executing macro
Centaur menu -> Macro -> Execute Macro (Alt+M X) Select Macro Name: MacroName Repetition Count: 1 Click the button [Execute]
Binding macro to key
Also you can bind the macro to any key: Centaur menu -> Macro -> Managin Macros Select MacroName in 'Macro List'. Click button with Keybord settings Select desired key and click [Bind] button.

Extended moving ...

GotoBOFAll - Goto beginning of file in all Windows
This macros is answer for Feature request: Move cursor position in all source files to top

%exec - forces execution instead of insertion.
% GotoBOFAll - execute GotoBOF (goto Beginning of Buffer) for all windows.

% Helper function which executes Proc for every window.
/InAllWindows { % { Proc } InAllWindows -
      { dup exec } stopped { handleerror } if 
    } forallviews
  } forallbuffers
} bind udef

{ GotoBOF updateview } InAllWindows 

% Similar: GotoEOF in all Windows
% { GotoEOF updateview } InAllWindows 

Download the file: GotoBOFAll.ctr
JumpToSource - Opens (from TeXWord) current file at current line/col in Centaur
This macros is answer for Feature request: Click live preview to jump to place in code in external editor

%exec - forces execution instead of insertion.
% Open current file at current line in centaur.
% NOTE: You can adapt this macro for own editor.

% There is location of our editor
/Editor (centaur) findapp not { () } if pstack udef

% Get filename, line, column (1 based
currentbuffer getcursor computelinecol 
1 add exch 1 add exch pstack

% Make command line ...
$Buffer StrClr Editor StrArg ( -c) StrCat StrXCat 
( -l) StrCat StrXCat ( ) StrCat StrArg

% Run it.
CurStr 0 wxExecute pstack 

%* EOF

Download the file: