// Version 11-November-2007
//
// This  is  a part of the BeanShell macro script LaTeX.bsh (the extension .bsh
// has  been  replaced  by .c in order to avoid this file to be an entry of the
// macro menu and in order to preserve colored syntax).
//
// If  you want to customize this file, you should read the HTML documentation:
// - doc/help.html#paths
// - doc/customization.html
//
// In  principle this file is automatically edited the first time the LaTeX.bsh
// macro is invoked (or if isConfigured = false;, see below).
//
// You  can  add  markers to this file using the regular expression  [_A-Z]{7,}
// in the latexMarkers dialog (for navigation using the Markers menu).

//##############################################################################
// DIALOG_LAYOUT
//##############################################################################

// Dialog window name can be replaced
   JDialog frame = new JDialog(view, "LaTeX", false);

// Size of the dialog window
   int d_width = 150;
   int d_height = 450;

// Position "left", "right" or "bottom"
   String d_position = "right";

// Maximum number of panels and buttons per panel
   JComponent[][] f = new JComponent[8][70];

// Number of rows of buttons per pannel
   int nbrow = 16;

// Number of pixels between buttons
   int buttonPadding = 1;

// Background color of panes
   Color paneBgColor = new Color(0,0,0);

// Relative path to icons from directory containing this macro
   String path2icons = "imagescol";

// Definition of the strings appearing on the tabs
   String[] tabn = new String[10];
      tabn[0] = "Gene1";
      tabn[1] = "Gene2";
      tabn[2] = "Pres";
      tabn[3] = "Perso";
      tabn[4] = "Math1";
      tabn[5] = "Math2";
      tabn[6] = "Greek";
      tabn[7] = "Cmds";
      tabn[8] = "Tab9";  // not used
      tabn[9] = "Tab10"; // not used

// Definition of tooltips for tabs
   String[] tabnTooltips = new String[10];
      tabnTooltips[0] = "Documents, breakings, cross references";
      tabnTooltips[1] = "Environments, tabular, fonts";
      tabnTooltips[2] = "Presentations: beamer, (x)color";
      tabnTooltips[3] = "Panel for your own commands";
      tabnTooltips[4] = "Equations, matrices, quantifiers";
      tabnTooltips[5] = "Math fonts, inequalities, sets, arrows, functions";
      tabnTooltips[6] = "Greek, Hebrew letters";
      tabnTooltips[7] = "Compilation, viewers, parsers, spelling, print, help";
      tabnTooltips[8] = "Tab9";  // not used
      tabnTooltips[9] = "Tab10"; // not used

// Personal colors definition
// (name should be 'mySomeThing')
   Color myLightRed    = new Color(255,230,230);
   Color myLightFushia = new Color(255,230,255);
   Color myLightGreen  = new Color(210,255,195);
   Color myLightViolet = new Color(225,230,255);
   Color myLightBlue   = new Color(230,245,255);
   Color myLightOrange = new Color(249,224,140);
   Color myLightYellow = new Color(255,255,240);

//##############################################################################
// CONFIGURATION OF THE COMMANDS INVOKED BY THE CONTROL PANEL.
//##############################################################################
// If the field between "BEGIN and END automatic configuration" reduces to
// "isConfigured = false", the first time you run the LaTeX macro this field
// will be filled by the definition of several strings (Linux/Unix and Windows).
//
// The strings given (or to be defined) in this field are used for defining some
// actions performed via the "TAB_Commands" section of this file.
//
// If some buttons of the "TAB_Commands" are not well configured, edit manually
// the strings given between "BEGIN and END automatic configuration" using the
// examples given in the HTML help file (see ./jedit/macros/LaTeX/doc/help.html).
// Mac users MUST configure manually these strings.
//
// If you want to re-run the automatic configuration routine, change
// "isConfigured = true" to "isConfigured = false". You can also run the
// macro "latexMacroPathConfiguration" from the Macros menu.
//
// Don't remove the keywords "BEGIN and END automatic configuration",
// "isConfigured" must always be defined between these keywords (= true or false).
//##############################################################################

// BEGIN_automatic_configuration
   isConfigured   = false;
// END_automatic_configuration

   if (!isConfigured) Macros.getMacro("LaTeX/latexMacroPathConfiguration").invoke(view);

// Actions requiring Perl (isPerl defined in LaTeX.bsh from versions >= june 2007)
   if (isPerl) {
       labelParserString   = "Macros.getMacro(\"LaTeX/latexLabelParser\").invoke(view);";
       logFileParserString = "Macros.getMacro(\"LaTeX/latexLogFileParser\").invoke(view);";
       goToString          = "Macros.getMacro(\"LaTeX/latexGoto\").invoke(view);";
       searchBibString     = "Macros.getMacro(\"LaTeX/goodies/latexOpenBiblioInBrowser\").invoke(view);";
       refString           = "Macros.getMacro(\"LaTeX/latexInsertRef\").invoke(view);";
   } else {
       labelParserString   = "Macros.message(view,\"This action needs Perl\\n(not found in system path)\")";
       logFileParserString = "Macros.message(view,\"This action needs Perl\\n(not found in system path)\")";
       goToString          = "Macros.message(view,\"This action needs Perl\\n(not found in system path)\")";
       searchBibString     = "Macros.message(view,\"This action needs Perl\\n(not found in system path)\")";
       refString           = "Macros.message(view,\"This action needs Perl\\n(not found in system path)\")";
   }

// Tooltips for aspell buttons
   asp1 = aspellString1.indexOf("-d");
   asp1tt = "TT:No tooltip";
   if (asp1 > 0) asp1tt = "TT:"+aspellString1.substring(asp1+3,asp1+5);
   asp2 = aspellString2.indexOf("-d");
   asp2tt = "TT:No tooltip";
   if (asp2 > 0) asp2tt = "TT:"+aspellString2.substring(asp2+3,asp2+5);

//##############################################################################
// DEFINITION OF THE COMMAND_CLIPPER PANELS.
//##############################################################################
// Each row contains 3 to 5 strings.
// 1st string: "et", "ei", "ct", "ci", "lt", "li", "st" or "si"
//   "e" means empty, "c" clipper command, "l" local command, "s" system command
//   "t" means text, "i" "icon".
// 2nd string: command that can be of "clipper", "local" or "system" type
//   "clipper" example "{\\bf |}" (| will be replaced by the selected text)
//   "local"   example "frame.dispose()"
//   "system"  example "dvips -o |.ps |" (| will be replaced by master doc)
// 3rd string: "text" or "icon" name (.gif) to apear on button
// 4th string: optional, foreground color (case "t") or background color (case "i")
// 5th string: optional, background color (case "t")
//##############################################################################

String[][][] tabx =
  {
     { // TAB_GENE_1
       {"et","","<html><b>Document</b></html>","white","black"},
       {"lt","Macros.getMacro(\"LaTeX/latexNewDocument\").invoke(view);","<html><b>New</b></html>","black","myLightGreen","TT:<html>New LaTeX main file: article,<br> report, book, beamer, letter</html>"},
       {"lt","Macros.getMacro(\"LaTeX/latexSetMasterFile\").invoke(view);","<html><b>Master</b></html>","black","myLightGreen","TT:Define project master file","TT:<html>Defines the project main file<br>for non-main files assumed<br>to be in main file directory</html>"},
       {"lt","Macros.getMacro(\"LaTeX/latexBrowseAndLink\").invoke(view);","<html><b>Link</b></html>","black","myLightGreen","TT:<html>Links files like .eps and .pdf images,<br>.latex pictures from xfig, .bib, .tex files</html>"},
       {"ct","\\tabelofcontents","ToC","black","TT:Table of contents"},
       {"ct","\\listoffigures","LoFig","black","TT:List of figures"},
       {"ct","\\listoftables","LoTab","black","TT:List of tables"},
       {"ct","\\printindex","Add index","black","TT:Adds index"},
       // SECTIONING
       {"et","","<html><b>Sectioning</b></html>","white","black"},
       {"lt","Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","<html><b>List of</b></html>","black","myLightGreen","TT:<html>All sectioning possibilities<br>via a dialog</html>"},
       //{"lt","jEdit.setProperty(\"sectioningChoice\",\"part\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","Part","black"},
       {"lt","jEdit.setProperty(\"sectioningChoice\",\"chapter\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","Chapter","black"},
       {"lt","jEdit.setProperty(\"sectioningChoice\",\"section\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","Sec.","black"},
       {"lt","jEdit.setProperty(\"sectioningChoice\",\"subsection\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","sSec.","black"},
       {"lt","jEdit.setProperty(\"sectioningChoice\",\"subsubsection\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","ssSec.","black"},
       //{"lt","jEdit.setProperty(\"sectioningChoice\",\"paragraph\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","Paragr.","black"},
       //{"lt","jEdit.setProperty(\"sectioningChoice\",\"subparagraph\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","sParagr.","black"},
       {"ct","\\addcontentsline{toc}{section}{|}","Add2ToC","black","TT:\\addcontentsline"},
       {"lt","Macros.getMacro(\"LaTeX/latexMarkers\").invoke(view);","<html><b>Markers</b></html>","black","myLightGreen","TT:<html>Add/remove markers in front<br>of chapters, sections.... For<br>navigation with Markers menu</html>"},
       {"lt","jEdit.setProperty(\"sectionToChapterChoice\",\"++\");Macros.getMacro(\"LaTeX/latexSectionToChapter\").invoke(view);","<html><b>Sec ++</b></html>","black","myLightGreen","TT:section to chapter and so on"},
       {"lt","jEdit.setProperty(\"sectionToChapterChoice\",\"--\");Macros.getMacro(\"LaTeX/latexSectionToChapter\").invoke(view);","<html><b>Sec --</b></html>","black","myLightGreen","TT:chapter to section and so on"},
       // End sectioning
       // BREAK_PAGES_LINES
       {"et","","<html><b>Breaks</b></html>","white","black"},
       {"ct","\n\\vspace{2mm}","v. space","black","TT:\\vspace{2mm}"},
       {"ct","\\clearpage","clear pge","black","TT:\\clearpage"},
       {"ct","\\newline","newline","black","TT:\\newline"},
       {"ct","\\cleardoublepage","clear 2p","black","TT:\\cleardoublepage"},
       {"ct","\\noindent","noindent","black","TT:\\noindent"},
       // CROSS_REFERENCES
       {"et","","<html><b>CrossRef</b></html>","white","black"},
       // Reference from .labelTeX.tex file
       {"lt",refString,"<html><b>\\ref{}</b></html>","black","myLightGreen","TT:<html>Inserts \\ref{} or \\pageref{} or both. To<br>be used after label parsing (Cmds tab)</html>"},
       // Clipper commands for references
       {"ct","\\ref{|}","ref","blue","TT:\\ref{}"},
       {"ct","(\\ref{|})","(ref)","blue","TT:(\\ref{})"},
       {"ct","page \\pageref{|}","pageref","blue","TT:page \\pageref{}"},
       {"ct","\\label{|}","label","blue","TT:\\label{}"},
       {"ct","\\cite{|}","cite","blue","TT:\\cite{}"},
       {"ct","\\index{|}","index","blue","TT:\\index{}"},
     } ,
     { // TAB_GENE_2
       // ENVIRONMENTS
       {"et","","<html><b>Environ.</b></html>","white","black"},
       {"lt","Macros.getMacro(\"LaTeX/latexEnvironments\").invoke(view);","<html><b>List of</b></html>","black","myLightGreen","TT:Select an environment in a list"},
       {"ct","\\begin{center}\n|\n\\end{center}","center"},
       {"ct","\\footnote{|}","footnote"},
       //{"ct","\\begin{table}[htbp]\n\\begin{center}\n\\begin{tabular}{\\|c\\|}  \\hline\n   |\n\\\\ \\hline\n\n\\\\ \\hline \\end{tabular}\n\\end{center}\n\\caption{\\label{tab-}}\n\\end{table}","tabular"},
       {"ct","\\begin{table}[htbp]\n\\begin{center}\n|\n\\end{center}\n\\caption{\\label{tab-}}\n\\end{table}","table"},
       {"ct","\\begin{figure}\\begin{center}\n\\includegraphics[width=10cm,height=10cm,angle=0]{|}\n\\caption{\\label{fig-}}\n\\end{center}\\end{figure}","figure"},
       //{"ct","\\begin{quote}\n|\n\\end{quote}","quote"},
       {"ct","\\verb\"|\"","verb"},
       {"ct","\\begin{verbatim}\n|\n\\end{verbatim}","verbatim"},
       //{"ct","\\end{verbatim}\n|\n\\begin{verbatim}","antiverb"},
       {"lt","jEdit.setProperty(\"itemizeChoice\",\"itemize\");Macros.getMacro(\"LaTeX/latexItemize\").invoke(view);","<html><b>Itemize</b></html>","black","myLightGreen","TT:Select items separated by a blank line"},
       {"lt","jEdit.setProperty(\"itemizeChoice\",\"enumerate\");Macros.getMacro(\"LaTeX/latexItemize\").invoke(view);","<html><b>Enum.</b></html>","black","myLightGreen","TT:Select items separated by a blank line"},
       {"lt","jEdit.setProperty(\"itemizeChoice\",\"description\");Macros.getMacro(\"LaTeX/latexItemize\").invoke(view);","<html><b>Descr.</b></html>","black","myLightGreen","TT:Select items separated by a blank line"},
       {"lt","Macros.getMacro(\"LaTeX/latexBeamerItem\").invoke(view);","<html><b>Item</b></html>","black","myLightGreen","TT:<html>Adds an item inside an itemize,<br>enumerate or description environment</html>"},
       //{"ct","\\item","item","black"},
       // TABULAR
       {"et","","<html><b>Tabular</b></html>","white","black"},
       {"lt","Macros.getMacro(\"LaTeX/latexTabular\").invoke(view);","<html><b>Wizard</b></html>","black","myLightGreen","TT:<html>Supports \\hline, \\columnspan, width<br>of columns. For more commands,<br>see below and the xcolor section</html>"},
       {"ct","\\resizebox{8cm}{4cm}{\n|\n}","resize","TT:<html><font color=\"red\">\\resizebox{5cm}{5cm}{some object}</font><br>e.g; for resizing a table (tabular object)</html>"},
       {"ct","@{|}","@{}","TT:<html>Extra horizontal alignment<br>possibilities, see documentation</html>"},
       {"ct","\\cline{|}","cline","TT:<html><font color=\"red\">\\cline{i-j}</font>: Replaces \\hlines, for<br>horizontal line fromcell i to cell j</html>"},
       {"ct","\\multirow{2}{*}{|}","multirow","TT:<html><font color=\"red\">\\multirow{i}{*}{some text}</font>:<br>Vertical concatenation<br>of cells (i-1 empty cells below)</html>"},
       // FONTS_SIZE_WEIGHT
       {"et","","<html><b>Fonts</b></html>","white","black"},
       {"lt","Macros.getMacro(\"LaTeX/latexFontSize\").invoke(view);","<html><b>Sizes</b></html>","black","myLightGreen","TT:Select a font size in a list"},
       {"ct","\\begin{tiny}|\\end{tiny}","tiny"},
       //{"ct","\\begin{footnotesize}|\\end{footnotesize}","footnote"},
       {"ct","\\begin{small}|\\end{small}","small"},
       //{"ct","\\begin{normalsize}|\\end{normalsize}","norm"},
       {"ct","\\begin{large}|\\end{large}","large"},
       //{"ct","\\begin{Large}|\\end{Large}","Large"},
       //{"ct","\\begin{LARGE}|\\end{LARGE}","LARGE"},
       //{"ct","\\begin{huge}|\\end{huge}","huge"},
       {"ct","\\emph{|}","em","blue"},
       {"ct","\\textrm{|}","rm","blue"},
       {"ct","\\textbf{|}","bf","blue"},
       {"ct","\\textsf{|}","sf","blue"},
       {"ct","\\texttt{|}","tt","blue"},
       {"ct","\\textmd{|}","md","blue"},
       {"ct","\\textit{|}","it","blue"},
       {"ct","\\textsc{|}","sc","blue"},
       {"ct","\\textsl{|}","sl","blue"},
     } ,
     { // TAB_PRESENTATIONS
        // BEAMER_SECTION
       {"et","","<html><b>Beamer</b></html>","white","black"},
       {"lt","Macros.getMacro(\"LaTeX/latexBeamerTutorial\").invoke(view);","<html><b>Tutorial</b></html>","black","myLightGreen","TT:<html>Opens a new buffer containing<br>a Beamer tutorial</html>"},
       {"lt","Macros.getMacro(\"LaTeX/latexBeamerThemeSelection\").invoke(view);","<html><b>Themes</b></html>","black","myLightGreen","TT:Theme illustration and selection"},
       {"lt","Macros.getMacro(\"LaTeX/latexBeamerTransition\").invoke(view);","<html><b>Transition</b></html>","black","myLightGreen","TT:Inserts a transition command"},
       {"ct","\\beamersetaveragebackground{|}\n","Bg color","black","TT:e.g., \\beamersetaveragebackground{yellow!30}"},
       {"ct","\\beamertemplateshadingbackground{|}{}\n","Shading bg","black","TT:e.g., \\beamertemplateshadingbackground{orange!50}{yellow!50}"},
       {"ct","\\beamertemplatetransparentcovereddynamic\n","Transp.","black","TT:Next overlays are transparent but visible"},
       {"ct","\\beamertemplateballitem\n","Bullets","black","TT:Nice bullets for enumerate"},
       {"ct","\\frame{\\tableofcontents}","ToC frame","black","TT:Table of contents frame"},
       {"ct","\\frame{\\tableofcontents[current]}","ToCF curr.","black","TT:<html>Table of contents frame (to insert<br>inside sectioning environment)</html>"},
       {"ct","\\begin{frame}\n\\frametitle{Title}\n|\n\\end{frame}","Frame","black","TT:Frame with \\frametitle"},
       {"ct","\\begin{columns}[t]\n\\begin{column}{5cm}\n|\n\\end{column}\n\n\\begin{column}{5cm}\n\n\\end{column}\n\\end{columns}","Columns","black","TT:<html>Two columns<br><font color=\"red\">Select first column</font></html>"},
       {"ct","\\begin{beamerboxesrounded}[shadow=true]{Title}\n|\n\\end{beamerboxesrounded}","Round box","black","TT:<html>Rounded box. For colors see next<br><font color=\"red\">Select content</font></html>"},
       {"ct","\\setbeamercolor{uppercol}{fg=white,bg=green}\n\\setbeamercolor{lowercol}{fg=black,bg=white}\n\\begin{beamerboxesrounded}[upper=uppercol,lower=lowercol,shadow=true]{Title}\n|\n\\end{beamerboxesrounded}","RBox color","TT:<html>Rounded box with color definition<br><font color=\"red\">Select content</font></html>"},
       {"et","","<html><b>Overlays</b></html>","white","black"},
       {"lt","Macros.getMacro(\"LaTeX/latexBeamerOverlaysIncrement\").invoke(view);","<html><b>Overlay++</b></html>","black","myLightGreen","TT:Increments/decrements overlays"},
       {"lt","jEdit.setProperty(\"beamerItemizeChoice\",\"itemize\");Macros.getMacro(\"LaTeX/latexBeamerItemize\").invoke(view);","<html><b>Itemize</b></html>","black","myLightGreen","TT:<html>Select items separated by a blank line.<br>The first selected line might be 1-,1,-1,<br>+- or -+ for defining overlay behavior.</html>"},
       {"lt","jEdit.setProperty(\"beamerItemizeChoice\",\"enumerate\");Macros.getMacro(\"LaTeX/latexBeamerItemize\").invoke(view);","<html><b>Enum.</b></html>","black","myLightGreen","TT:<html>Select items separated by a blank line.<br>The first selected line might be 1-,1,-1,<br>+- or -+ for defining overlay behavior.</html>"},
       {"lt","jEdit.setProperty(\"beamerItemizeChoice\",\"description\");Macros.getMacro(\"LaTeX/latexBeamerItemize\").invoke(view);","<html><b>Desc.</b></html>","black","myLightGreen","TT:<html>Select items separated by a blank line.<br>The first selected line might be 1-,1,-1,<br>+- or -+ for defining overlay behavior.</html>"},
       {"lt","Macros.getMacro(\"LaTeX/latexBeamerItem\").invoke(view);","<html><b>Item</b></html>","black","myLightGreen","TT:<html>Adds an item with automatic<br>overlay increment</html>"},
       {"ct","\\pause\n","pause","black"},
       {"ct","\\only<2>{|}","only","black","TT:e.g., \\only<i>{Selected_Text} for viewing Selected_Text only at overlay number i"},
       // XCOLOR_SECTION
       {"et","","<html><b>[x]Colors</b></html>","white","black"},
       {"et","",""},
       {"lt","Macros.getMacro(\"LaTeX/latexColorPicker\").invoke(view);","<html><b>Def color</b></html>","black","myLightGreen","TT:<html>Defines colors using the<br>color picker</html>"},
       {"lt","Macros.getMacro(\"LaTeX/latexXColorMixer\").invoke(view);","<html><b>Colorize</b></html>","black","myLightGreen","TT:<html>Colorizes text and boxes,<br>mixes named colors...</html>"},
       {"ct","\\rowcolor{|}","Row color","black","TT:<HTML>For tabular environment,<br>colorize a row. Example<br><font color=\"red\">\\rowcolor{red} a & b & c\\\\</font></html>"},
       {"ct",">{\\columncolor{|}}","Col color","black","TT:<HTML>For tabular environment,<br>colorize column. Example<br><font color=\"red\">{tabular}{l l >{\\columncolor{red}} l}</font></html>"},
       {"ct","\\cellcolor{|}","Cell color","black","TT:<HTML>For tabular environment,<br>colorize a cell. Example<br><font color=\"red\">a & \\cellcolor{red} b & c\\\\</font></html>"},
       {"ct","\\arrayrulecolor{blue}{\n|\n}","Lines color","black","TT:<HTML>For tabular environment, colorize<br>the lines (select tabular object). Example,<br><font color=\"red\">\\arrayrulecolor{red}{tabular environment}</font></html>"},
     } ,
     { // ######################### PERSONAL_COMMANDS ##########################
        {"et","","<html><b>Your panel</b></html>","white","black"},
        {"lt","jEdit.openFile(view,scriptPath2);","<html><b>Edit macro</b></html>","black","myLightBlue","TT:Opens the LaTeX macro configuration file"},
        {"lt","jEdit.setProperty(\"helpChoice\",\"customization.html#perso\"); Macros.getMacro(\"LaTeX/latexMacroHelp\").invoke(view);","<html><b>Help</b></html>","black","myLightBlue","TT:<html>Get help for the LaTeX macro.<br>Configure the Info Viewer plugin<br>for using an external browser</html>"},
        // Copy and paste here the lines corresponding to the most used commands
        // and/or add your own commands.
     } ,
     { // TAB_MATH_1
       {"ct","\\begin{equation}\n\\label{eq-}\n|\n\\end{equation}","equ","black","myLightBlue"},
       {"ct","\\begin{eqnarray}\n\\label{eqn1-}\n%\\nonumber\n|\\\\\n\\label{eqn2-}\n\\end{eqnarray}","eqn","black","myLightBlue"},
       {"ct","\\[\n|\n\\]","\\[  \\]","black","myLightBlue"},
       {"ct","$|$","$$","black","myLightBlue"},
       {"lt","Macros.getMacro(\"LaTeX/latexArray\").invoke(view);","<html><b>array</b></html>","black","myLightGreen","TT:Matrix / array wizard"},
       {"ct","[|]","[ ]"},
       {"ct","\\{|\\}","\\{ \\}"},
       {"ct","{|}","{ }"},
       {"ci","\\sum_{|}^{}","sum"},
       {"ci","\\prod_{|}^{}","prod"},
       {"ci","\\int_{|}^{}","int"},
       //{"ci","\\oint","oint"},
       {"ci","\\iint","iint"},
       //{"ci","\\iiint","iiint"},
       {"ct","\\frac{d |}{dt}","d/dt"},
       {"ci","\\partial","partial"},
       {"ci","\\nabla","nabla"},
       {"ci","\\triangle","triangle"},
       {"ci","\\widetilde{|}","widetilde"},
       {"ci","\\widehat{|}","widehat"},
       //{"ci","\\overleftarrow{|}","overleftarrow"},
       {"ci","\\dot{|}","dot"},
       {"ci","\\overrightarrow{|}","overrightarrow"},
       {"ci","\\overline{|}","overline"},
       {"ci","\\sqrt{|}","sqrt"},
       //{"ci","\\sqrt[n]{|}","sqrtn"},
       {"ci"," |^{-1}","inv"},
       {"ci","\\frac{|}{}","frac"},
       {"ci","^{|}","power"},
       {"ci","_{|}","indice"},
       {"ci","\\forall","forall"},
       {"ci","\\exists","exists"},
       {"ci","\\nexists","nexists"},
       {"ci","\\mathbb{R}","mathbbr"},
       {"ci","\\mathbb{R}^{| \\times }","mathbbRpower"},
       {"ci","\\mathbb{C}","mathbbc"},
       {"ci","\\mathbb{C}^{| \\times }","mathbbCpower"},
       {"ci","\\Re","mRe"},
       {"ci","\\Im","mIm"},
       {"ci","\\complement","complement"},
       {"ci","\\ldots","ldots"},
       {"ci","\\cdots","cdots"},
       {"ci","\\ddots","ddots"},
       {"ci","\\vdots","vdots"},
       {"ci","\\subset","subset"},
       {"ci","\\in","in"},
       {"ci","\\notin","notin"},
       {"ci","\\cap","cap"},
       {"ci","\\equiv","equiv"},
       {"ci","\\simeq","simeq"},
       {"ci","\\approx","approx"},
       {"ci","\\neq","neq"},
       {"ci","\\triangleq","triangleq"},
       {"ci","\\pm","pm"},
       {"ci","\\wedge","wedge"},
       {"ci","\\vee","vee"},
       {"ci","\\times","times"},
       {"ci","\\ast","ast"},
       {"ci","\\circ","circ"},
       {"ci","\\bullet","bullet"},
       {"ci","\\oplus","oplus"},
       {"ci","\\otimes","otimes"},
       {"ci","\\odot","odot"},
       {"ci","\\infty","infty"},
       {"ci","\\leq","leq"},
       {"ci","\\ll","ll"},
       {"ci","\\geq","geq"},
       {"ci","\\gg","gg"},
     } ,
     { // TAB_MATH_2
       {"ct","\\mathbf{|}","bf","black","myLightBlue"},
       {"ct","\\mathcal{|}","cal","black","myLightBlue"},
       {"ct","\\mathrm{|}","rm","black","myLightBlue"},
       {"ct","\\mathmm{|}","mm","black","myLightBlue"},
       {"ci","\\leq","leq"},
       {"ci","\\ll","ll"},
       {"ci","\\geq","geq"},
       {"ci","\\gg","gg"},
       {"ci","\\angle","angle"},
       //{"ci","\\neg","neg"},
       //{"ci","\\surd","surd"},
       {"ci","\\top","top"},
       {"ci","\\bot","bot"},
       {"ci","\\backslash","backslash"},
       {"ci","\\subset","subset"},
       {"ci","\\subseteq","subseteq"},
       {"ci","\\in","in"},
       {"ci","\\notin","notin"},
       {"ci","\\supset","supset"},
       {"ci","\\supseteq","supseteq"},
       {"ci","\\ni","ni"},
       {"ci","\\cap","cap"},
       {"ci","\\cup","cup"},
       {"ci","\\bigcup","bigcup"},
       {"ci","\\bigcap","bigcap"},
       {"ci","\\emptyset","emptyset"},
       //{"ci","\\coprod","coprod"},
       //{"ci","\\bigsqcup","bigsqcup"},
       //{"ci","\\bigvee","bigvee"},
       //{"ci","\\bigwedge","bigwedge"},
       //{"ci","\\bigodot","bigodot"},
       //{"ci","\\bigotimes","bigotimes"},
       //{"ci","\\bigoplus","bigoplus"},
       //{"ci","\\biguplus","biguplus"},
       {"ci","\\longrightarrow","longrightarrow"},
       {"ci","\\longleftarrow","longleftarrow"},
       {"ci","\\longleftrightarrow","longleftrightarrow"},
       {"ci","\\longmapsto","longmapsto"},
       {"ci","\\hookleftarrow","hookleftarrow"},
       {"ci","\\hookrightarrow","hookrightarrow"},
       {"ci","\\Longrightarrow","mLongrightarrow"},
       {"ci","\\Longleftarrow","mLongleftarrow"},
       {"ci","\\Longleftrightarrow","mLongleftrightarrow"},
       {"ci","\\nRightarrow","nmRightarrow"},
       {"ci","\\nLeftarrow","nmLeftarrow"},
       {"ci","\\nLeftrightarrow","nmLeftrightarrow"},
       {"ci","\\Downarrow","mDownarrow"},
       {"ci","\\Uparrow","mUparrow"},
       {"ci","\\Updownarrow","mUpdownarrow"},
       //{"ct","\\mbox{Im}","Im","red"},
       //{"ct","\\mbox{Ker}","Ker","red"},
       {"ct","\\mbox{|}","mbox","black","myLightBlue"},
       {"ct","\\arccos","acos","black","myLightGreen"},
       {"ct","\\arcsin","asin","black","myLightGreen"},
       {"ct","\\arctan","atan","black","myLightGreen"},
       {"ct","\\arg","arg","blue"},
       {"ct","\\cos","cos","black","myLightGreen"},
       {"ct","\\cosh","cosh","black","myLightViolet"},
       //{"ct","\\cot","cot","blue"},
       {"ct","\\coth","coth","black","myLightViolet"},
       //{"ct","\\csc","csc","blue"},
       {"ct","\\deg","deg","blue"},
       {"ct","\\det","det","blue"},
       {"ct","\\dim","dim","blue"},
       {"ct","\\exp","exp","blue"},
       //{"ct","\\gcd","gcd","blue"},
       //{"ct","\\hom","hom","blue"},
       {"ct","\\mbox{Im}","Im"},
       {"ct","\\inf","inf","black","myLightYellow"},
       {"ct","\\mbox{Ker}","Ker"},
       //{"ct","\\lg","lg","blue"},
       {"ct","\\lim","lim","blue"},
       //{"ct","\\liminf","l.inf","blue"},
       //{"ct","\\limsup","l.sup","blue"},
       {"ct","\\ln","ln","blue"},
       {"ct","\\log","log","blue"},
       {"ct","\\max","max","black","myLightYellow"},
       {"ct","\\min","min","black","myLightYellow"},
       //{"ct","\\Pr","Pr","blue"},
       //{"ct","\\sec","sec","blue"},
       {"ct","\\sin","sin","black","myLightGreen"},
       {"ct","\\sinh","sinh","black","myLightViolet"},
       {"ct","\\sup","sup","black","myLightYellow"},
       {"ct","\\tan","tan","black","myLightGreen"},
       {"ct","\\tanh","tanh","black","myLightViolet"},
     } ,
     { // TAB_GREEK
       {"ci","\\alpha","alpha"},
       {"ci","\\beta","beta"},
       {"ci","\\gamma","gamma"},
       {"ci","\\delta","delta"},
       {"ci","\\epsilon","epsilon"},
       {"ci","\\varepsilon","varepsilon"},
       {"ci","\\zeta","zeta"},
       {"ci","\\eta","eta"},
       {"ci","\\theta","theta"},
       {"ci","\\vartheta","vartheta"},
       {"ci","\\iota","iota"},
       {"ci","\\kappa","kappa"},
       {"ci","\\lambda","lambda"},
       {"ci","\\mu","mu"},
       {"ci","\\nu","nu"},
       {"ci","\\xi","xi"},
       {"ci","\\pi","pi"},
       {"ci","\\varpi","varpi"},
       {"ci","\\rho","rho"},
       {"ci","\\varrho","varrho"},
       {"ci","\\sigma","sigma"},
       {"ci","\\varsigma","varsigma"},
       {"ci","\\tau","tau"},
       {"ci","\\upsilon","upsilon"},
       {"ci","\\phi","phi"},
       {"ci","\\varphi","varphi"},
       {"ci","\\chi","chi"},
       {"ci","\\psi","psi"},
       {"ci","\\omega","omega"},
       {"ei","",""},
       {"ci","\\Gamma","mGamma"},
       {"ci","\\Delta","mDelta"},
       {"ci","\\Theta","mTheta"},
       {"ci","\\Lambda","mLambda"},
       {"ci","\\Xi","mXi"},
       {"ci","\\Pi","mPi"},
       {"ci","\\Sigma","mSigma"},
       {"ci","\\Upsilon","mUpsilon"},
       {"ci","\\Phi","mPhi"},
       {"ci","\\Psi","mPsi"},
       {"ci","\\Omega","mOmega"},
       {"et","",""},
       {"ci","\\aleph","aleph"},
       {"ci","\\beth","beth","TT:requires amssymb package"},
       {"ci","\\daleth","daleth","TT:requires amssymb package"},
       {"ci","\\gimel","gimel","TT:requires amssymb package"},
       {"et","",""},
       {"et","",""},
     } ,
     // { // Non ascii characters
     //  {"ci","\\\"a","auml"},
     //  {"ci","\\\"A","mAuml"},
     //  {"ci","\\^a","acirc"},
     //  {"ci","\\^A","mAcirc"},
     //  {"ci","\\`a","aacute"},
     //  {"ci","\\`A","mAacute"},
     //  {"ci","\\aa{}","aring"},
     //  {"ci","\\AA{}","mAring"},
     //  {"ci","\\ae{}","aelig"},
     //  {"ci","\\AE{}","mAelig"},
     //  {"ci","\\\"e","eulm"},
     //  {"ci","\\'E","mEulm"},
     //  {"ci","\\'e","eacute"},
     //  {"ci","\\'E","mEacute"},
     //  {"ci","\\`e","egrave"},
     //  {"ci","\\`E","mEgrave"},
     //  {"ci","\\^e","ecirc"},
     //  {"ci","\\^E","mEcirc"},
     //  {"ci","\\\"{\\i}","iulm"},
     //  {"ci","\\^i","icirc"},
     //  {"ci","\\^I","mIcirc"},
     //  {"ci","\\\"o","ouml"},
     //  {"ci","\\\"O","mOuml"},
     //  {"ci","\\^o","ocirc"},
     //  {"ci","\\^O","mOcirc"},
     //  {"ci","\\o{}","oslash"},
     //  {"ci","\\O{}","mOslash"},
     //  {"ci","\\oe{}","oelig"},
     //  {"ci","\\OE{}","mOelig"},
     //  {"ci","\\\"u","uulm"},
     //  {"ci","\\\"U","mUulm"},
     //  {"ci","\\`u","ugrave"},
     //  {"ci","\\`U","mUgrave"},
     //  {"ci","\\^u","ucirc"},
     //  {"ci","\\^U","mUcirc"},
     //  {"ci","\\ss{}","szlig"},
     //  {"ci","\\~n","ntilde"},
     //  {"ci","\\c{c}","ccedil"},
     //},
     { // TAB_COMMANDS
       // COMPILATION_AND_VIEWERS
       {"et","","<html><b>Compile</b></html>","white","black"},
       {"et","","<html><b>View</b></html>","white","black"},
       {"st",latexString,"<html><b>LaTeX</b></html>","black","myLightGreen"},
       {"st",xdviString,"Yap","TT:View DVI (run LaTeX before)"},
       {"st",bibtexString,"<html><b>BibTeX</b></html>","black","myLightGreen","TT:Generates biblio (run LaTeX before and after)"},
       {"lt",searchBibString,"Search bib","black","myLightFushia","TT:Search bibliography in a web browser"},
       {"st",dvipsString,"<html><b>Dvips</b></html>","black","myLightGreen","TT:dvips: generates ps file"},
       {"st",ghostviewString,"Ghostv","TT:View PostScript (run Dvips before)"},
       {"st",pdflatexString,"<html><b>pdfTeX</b></html>","black","myLightGreen","TT:pdflatex: generates pdf file"},
       {"st",acroreadString,"Acrobat","TT:View PDF in Acrobat reader (run pdfTeX before)"},
       {"st",indexString,"<html><b>Index</b></html>","black","myLightGreen","TT:Generates index (run LaTeX before)"},
       {"st",pdfString,"Pdf","TT:Alternative pdf viewer (run pdfTeX before)"},
       {"st",ps2pdfString,"<html><b>Ps2pdf</b></html>","black","myLightGreen","TT:<html>Run before dvips. The pdf file<br>generation might be quite long</html>"},
       {"et"," "," "},
       // PARSE_LABELS_AND_ERRORS
       {"et","","<html><b>Labels</b></html>","white","black"},
       {"et","","<html><b>Errors</b></html>","white","black"},
       // Label parser
       {"lt",labelParserString,"<html><b>Parse</b></html>","black","myLightBlue","TT:Perl-based label parser."},
       // Error parser
       {"lt",logFileParserString,"<html><b>Errors</b></html>","black","myLightBlue","TT:Errors and warnings (Perl-based)"},
       // Label Go to macro
       {"lt",goToString,"<html><b>Go to</b></html>","black","myLightBlue","TT:<html>Navigate project after use<br>of \"Parse\" or \"Error\".</html>"},
       // Log file
       {"lt","Macros.getMacro(\"LaTeX/latexOpenLogFile\").invoke(view);","<html><b>Log</b></html>","black","myLightBlue","TT:Open log file"},
       // PRINTERS_AND_ASPELL
       {"et","","<html><b>Printers</b></html>","white","black"},
       {"et","","<html><b>Spelling</b></html>","white","black"},
       {"st",printString1,"Print","TT:Run Dvips before printing"},
       {"st",aspellString1,"<html><font color=\"black\">Aspell</font> <b>1</b></html>","red",asp1tt},
       //{"et","",""},
       {"st",printString2,"<html><font color=\"red\">P</font><font color=\"green\">ri</font><font color=\"blue\">nt</font></html>","TT:Run Dvips before printing"},
       {"st",aspellString2,"<html><font color=\"black\">Aspell</font> <b>2</b></html>","red",asp2tt},
       // THE LATEX MACRO
       {"et","","<html><b>LaTeX.bsh</b></html>","white","black"},
       {"et","","","white","black"},
       {"lt","Macros.getMacro(\"LaTeX/latexMacroHelp\").invoke(view);","<html><b>Help</b></html>","black","myLightBlue","TT:<html>Get help for the LaTeX macro.<br>Configure the Info Viewer plugin<br>for using an external browser</html>"},
       {"lt","jEdit.openFile(view,scriptPath2);","<html><b>Edit macro</b></html>","black","myLightBlue","TT:Opens the LaTeX macro configuration file"},
       {"lt","view.getDockableWindowManager().toggleDockableWindow(\"console\");","Console","black","myLightBlue","TT:<html>Toggle the console. Click here<br>if the caret has disappeared</html>"},
       {"lt","frame.dispose();","<html><b>Close</b></html>","black","myLightOrange","TT:Exit the LaTeX macro"},
     },
  };