// Version 4-September-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).
//##############################################################################
// MISCELLANEOUS_DEFINITIONS
//##############################################################################
// Dialog window name can be replaced
JDialog frame = new JDialog(view, "LaTeX", false);
// Size of the dialog window
int d_width = 185;
int d_height = 800;
// Position "left", "right" or "bottom"
String d_position = "right";
// Maximum number of panels and buttons per panel
JComponent[][] f = new JComponent[6][200];
// Number of rows of buttons per pannel
int nbrow = 32;
// 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[8];
tabn[0] = "General";
tabn[1] = "Math";
tabn[2] = "Commands";
// 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);
Color myBlue = new Color(0,0,80);
//##############################################################################
// 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 = true;
latexString = "latex -interaction nonstopmode -file-line-error-style | ";
pdflatexString = "pdflatex -interaction nonstopmode -file-line-error-style | ";
bibtexString = "bibtex | ";
dvipsString = "dvips -o |.ps | ";
xdviString = "xdvi | & ";
ps2pdfString = "pstopdf |.ps & ";
indexString = "makeindex -s /home/dera/magni/.jedit/macros/LaTeX/latexIndex.ist | ";
ghostviewString = "gv |.ps & ";
acroreadString = "acroread |.pdf & ";
pdfString = "xpdf |.pdf & ";
printString1 = "lp -dlgr |.ps & ";
printString2 = "lp -dljr |.ps & ";
aspellString1 = "xterm -sb -bg black -fg white -e aspell -d en -t -c $f ";
aspellString2 = "xterm -sb -bg black -fg white -e aspell -d fr -t -c $f ";
// 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);";
} 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)\")";
}
// Others
jabrefString = "Macros.message(view,\"<html>Downnload and install Jabref.<br>Click the <b>Edit macro</b> button which will open LaTeX3.c<br>Define <b>jabrefString</b> as suggested in LaTeX.c</html>\")";
//jabrefString = "jabref";
jpicedtString = "Macros.message(view,\"<html>Downnload and install jPicEdt.<br>Click the <b>Edit macro</b> button which will open LaTeX3.c<br>Define <b>jpicedtString</b> as suggested in LaTeX.c</html>\")";
//jpicedtString = "jpicedt &";
//##############################################################################
// CUSTOMIZATION OF THE COMMANDS/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","myBlue"},
{"lt","Macros.getMacro(\"LaTeX/latexNewDocument\").invoke(view);","<html><b>New</b></html>","black","myLightBlue","TT:<html>New LaTeX main file: article,<br> report, book, beamer, letter</html>"},
{"lt","setMasterFile();","<html><b>Master</b></html>","black","myLightBlue","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","myLightBlue","TT:<html>Links files like .eps and .pdf images,<br>.latex pictures from xfig, .bib, .tex files</html>"},
// Sectioning (macro, to go back to clipper commands comment/uncomment below)
//{"ct","\\part{|}\n\\label{part-}","Part","black"},
{"lt","jEdit.setProperty(\"sectioningChoice\",\"part\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","Part","black"},
//{"ct","\\chapter{|}\n\\label{chap-}","Chapter","black"},
{"lt","jEdit.setProperty(\"sectioningChoice\",\"chapter\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","Chapter","black"},
//{"ct","\\section{|}\n\\label{sec-}","Sec.","black"},
{"lt","jEdit.setProperty(\"sectioningChoice\",\"section\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","Sec.","black"},
//{"ct","\\subsection{|}\n\\label{ssec-}","sSec.","black"},
{"lt","jEdit.setProperty(\"sectioningChoice\",\"subsection\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","sSec.","black"},
//{"ct","\\subsubsection{|}\n\\label{sssec-}","ssSec.","black"},
{"lt","jEdit.setProperty(\"sectioningChoice\",\"subsubsection\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","ssSec.","black"},
//{"ct","\\paragraph{|}","Paragr.","black"},
{"lt","jEdit.setProperty(\"sectioningChoice\",\"paragraph\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","Paragr.","black"},
//{"ct","\\subparagraph{|}","sParagr.","black"},
//{"lt","jEdit.setProperty(\"sectioningChoice\",\"subparagraph\");Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","sParagr.","black"},
{"lt","Macros.getMacro(\"LaTeX/latexSectionings\").invoke(view);","<html><b>Sectioning</b></html>","black","myLightBlue","TT:<html>Open a dialog</html>"},
// End sectioning
{"lt","Macros.getMacro(\"LaTeX/latexMarkers\").invoke(view);","<html><b>Markers</b></html>","black","myLightBlue","TT:<html>Add/remove markers in front<br>of chapters, sections....</html>"},
{"lt","Macros.getMacro(\"LaTeX/latexColorPicker\").invoke(view);","<html><b>Def color</b></html>","black","myLightBlue","TT:<html>Defines colors using the<br>color picker</html>"},
{"lt","Macros.getMacro(\"LaTeX/latexTxtColor\").invoke(view);","<html><b>Colorize</b></html>","black","myLightBlue","TT:<html>Colorizes text and boxes,<br>mixes named colors...</html>"},
// LAYOUT
{"et","","<html><b>Breaks</b></html>","white","myBlue"},
{"ct","\\newline","newline","black"},
{"ct","\\noindent","noindent","black"},
{"ct","\\clearpage","clear pge","black"},
{"ct","\\cleardoublepage","clear 2p","black"},
{"ct","\n\\vspace{2mm}","v. space","black"},
// ENVIRONMENTS
//{"ct","\n\\vspace{2mm}\\noindent\\textbf{|}","paragr.","black"},
{"et","","<html><b>Environ.</b></html>","white","myBlue"},
{"lt","Macros.getMacro(\"LaTeX/latexEnvironments\").invoke(view);","<html><b>List</b></html>","black","myLightBlue","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{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","Macros.getMacro(\"LaTeX/latexItemize\").invoke(view);","<html><b>itemize</b></html>","black","myLightBlue","TT:Select items separated by a blank line"},
{"lt","Macros.getMacro(\"LaTeX/latexEnumerate\").invoke(view);","<html><b>enum.</b></html>","black","myLightBlue","TT:Select items separated by a blank line"},
{"lt","Macros.getMacro(\"LaTeX/latexDescription\").invoke(view);","<html><b>descr.</b></html>","black","myLightBlue","TT:Select items separated by a blank line"},
{"ct","\n\\item","item","black"},
// CROSS_REFERENCES
{"et","","<html><b>CrossRef</b></html>","white","myBlue"},
{"ct","\\ref{|}","ref","blue"},
{"ct","page \\pageref{|}","pge ref","blue"},
{"ct","\\label{|}","label","blue"},
{"ct","\\cite{|}","cite","blue"},
{"ct"," |\\index{|}","index","blue"},
// FONTS_SIZE_WEIGHT
{"et","","<html><b>Fonts</b></html>","white","myBlue"},
{"lt","Macros.getMacro(\"LaTeX/latexFontSize\").invoke(view);","<html><b>Sizes</b></html>","black","myLightBlue","TT:Select a font size in a list"},
{"ct","\\begin{tiny}|\\end{tiny}","tiny"},
{"ct","\\begin{small}|\\end{small}","small"},
{"ct","\\begin{large}|\\end{large}","large"},
{"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"},
// BEAMER_SECTION
{"et","","<html><b>Beamer</b></html>","white","myBlue"},
{"lt","Macros.getMacro(\"LaTeX/latexBeamerTutorial\").invoke(view);","<html><b>Tutorial</b></html>","black","myLightBlue","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","myLightBlue","TT:Theme illustration and selection"},
{"ct","\\begin{frame}\n \\frametitle{Title}\n |\n\\end{frame}","frame","black"},
{"lt","Macros.getMacro(\"LaTeX/latexBeamerItemize\").invoke(view);","<html><b>Itemize</b></html>","black","myLightBlue","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","myLightBlue","TT:<html>Adds one item with automatic<br>overlay ranking increment.</html>"},
{"lt","Macros.getMacro(\"LaTeX/latexBeamerOverlaysIncrement\").invoke(view);","<html><b>Overlay++</b></html>","black","myLightBlue","TT:<html>Increments/decrements overlays<br>in selection or frame</html>"},
{"ct","\\pause\n","pause","black"},
{"lt","Macros.getMacro(\"LaTeX/latexBeamerTransition\").invoke(view);","<html><b>Transition</b></html>","black","myLightBlue","TT:Inserts a transition command"},
{"ct","\\only<|>","only","black","TT:Click and insert overlay number at caret position"},
{"ct","\\begin{columns}[t]\n \\begin{column}{5cm}\n |\n \\end{column}\n \\begin{column}{5cm}\n \n \\end{column}\n\\end{columns}","columns","black"},
{"ct","\\begin{beamerboxesrounded}[shadow=true]{title}|\\end{beamerboxesrounded}","round box","black"},
} ,
{ // TAB_MATH_1
{"ct","\\begin{equation}\n\\label{eq-}\n|\n\\end{equation}","<html><b>equ</b></html>","black","myLightBlue"},
{"ct","\\begin{eqnarray}\n\\label{eqn1-}\n%\\nonumber\n|\\\\\n\\label{eqn2-}\n\\end{eqnarray}","<html><b>eqn</b></html>","black","myLightBlue"},
{"ct","\\[\n|\n\\]","<html><b>\\[ \\]</b></html>","black","myLightBlue"},
{"ct","$|$","<html><b>$$</b></html>","black","myLightBlue"},
{"et","","","white","myLightBlue"},
{"ct","\\mbox{|}","<html><b>mbx</b></html>","black","myLightBlue"},
{"ct","\\mathbf{|}","<html><b>bf</b></html>","black","myLightBlue"},
{"ct","\\mathit{|}","<html><b>it</b></html>","black","myLightBlue"},
{"ct","\\mathtt{|}","<html><b>tt</b></html>","black","myLightBlue"},
{"ct","\\mathcal{|}","<html><b>cal</b></html>","black","myLightBlue"},
{"ct","\\mathrm{|}","<html><b>rm</b></html>","black","myLightBlue"},
{"ct","\\mathmm{|}","<html><b>mm</b></html>","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"},
{"et","",""},
{"et","",""},
{"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"},
{"ci","\\angle","angle"},
{"ci","\\neg","neg"},
{"ci","\\surd","surd"},
{"ci","\\top","top"},
{"ci","\\bot","bot"},
{"ci","\\backslash","backslash"},
{"ci","\\ldots","ldots"},
{"ci","\\cdots","cdots"},
{"ci","\\ddots","ddots"},
{"ci","\\vdots","vdots"},
{"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"},
{"et","",""},
{"et","",""},
{"et","",""},
{"ct","\\mbox{Im}","Im","red"},
{"ct","\\mbox{Ker}","Ker","red"},
{"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"},
{"et","",""},
{"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"},
{"et","",""},
{"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"},
{"ci","\\aleph","aleph"},
} ,
// { // 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","myBlue"},
{"et","","<html><b>Viewers</b></html>","white","myBlue"},
{"st",latexString,"<html><b>LaTeX</b></html>","black","myLightGreen"},
{"si",xdviString,"xdvi"},
{"st",bibtexString,"<html><b>BibTeX</b></html>","black","myLightGreen"},
{"si",jabrefString,"jabref","TT:External program: Jabref"},
{"et","",""},
{"li","Macros.getMacro(\"LaTeX/goodies/latexOpenBiblioInBrowser\").invoke(view);","firefox","TT:View biblio in Firefox"},
{"st",dvipsString,"<html><b>Dvips</b></html>","black","myLightGreen"},
{"si",ghostviewString,"gv"},
{"st",pdflatexString,"<html><b>pdfTeX</b></html>","black","myLightGreen"},
{"si",acroreadString,"acroread","TT:View in Acrobat reader"},
{"et","",""},
{"si",pdfString,"pdf","TT:View in xpdf"},
{"st",indexString,"<html><b>Index</b></html>","black","myLightGreen"},
{"et","",""},
{"lt","view.getDockableWindowManager().toggleDockableWindow(\"console\");","<html><b>Console</b></html>","black","myLightGreen","TT:Toggle the console"},
{"et","",""},
// CONVERTERS_GRAPHICS
{"et","",""},{"et","",""},
{"et","","<html><b>Converters</b></html>","white","myBlue"},
{"et","","<html><b>Graphics</b></html>","white","myBlue"},
{"st","tex2pdf | ","Tex2pdf","black","myLightViolet"},
{"si","xfig &","xfig","myLightFushia","TT:External program: xfig"},
{"st","ps2pdfwr |.ps ","Ps2pdf","black","myLightViolet"},
{"st",jpicedtString,"jPicEdt","black","myLightFushia","TT:External program:jPicEdt"},
{"st","latex2html | ","latex2html","black","myLightViolet"},
{"et","",""},
// PARSE_LABELS_AND_ERRORS
{"et","",""},{"et","",""},
{"et","","<html><b>Labels</b></html>","white","myBlue"},
{"et","","<html><b>Errors</b></html>","white","myBlue"},
// Label parser
{"lt","Macros.getMacro(\"LaTeX/latexLabelParser\").invoke(view);","Parse","black","myLightBlue","TT:Perl-based label parser"},
// Error parser
{"lt","Macros.getMacro(\"LaTeX/latexLogFileParser\").invoke(view);","Errors","black","myLightBlue","TT:Perl-based errors and warnings parser"},
// Label Go to macro
{"lt","Macros.getMacro(\"LaTeX/latexGoto\").invoke(view);","Go to","black","myLightBlue","TT:Navigate project after parsing"},
{"lt","Macros.getMacro(\"LaTeX/latexOpenLogFile\").invoke(view);","Log file","black","myLightBlue","TT:Open log file"},
// PRINTERS_AND_ASPELL
{"et","",""},{"et","",""},
{"et","","<html><b>Spelling</b></html>","white","myBlue"},
{"et","","<html><b>Printers</b></html>","white","myBlue"},
{"st",aspellString1,"<html><font color=\"black\">Aspell</font> <b>fr</b></html>","red"},
{"st","lp -dlgr |.ps &","<html><font color=\"black\">Print</font> <b>dlgr</b></html>","red"},
{"st",aspellString2,"<html><font color=\"black\">Aspell</font> <b>en</b></html>","red"},
{"st","lp -dljr |.ps &","<html><font color=\"black\">Print</font> <b>dljr</b></html>","red"},
{"et","",""},
{"st","lp -dlwr |.ps &","<html><font color=\"black\">Print</font> <b>dlwr</b></html>","red"},
// THE LATEX MACRO
{"et","",""},{"et","",""},
{"et","","<html><b>LaTeX.bsh</b></html>","white","myBlue"},
{"et",""," ","white","myBlue"},
{"lt","help();","Help","black","myLightBlue","TT:Get help for the LaTeX macro"},
{"lt","jEdit.openFile(view,scriptPath2);","Edit macro","black","myLightBlue","TT:Opens the LaTeX macro configuration file"},
{"et","",""},{"et","",""},{"et","",""},{"et","",""},{"et","",""},{"et","",""},
{"lt","frame.dispose();","<html><b>Close</b></html>","black","myLightOrange","TT:Exit the LaTeX macro"},
{"lt","frame.dispose();","<html><b>Close</b></html>","black","myLightOrange","TT:Exit the LaTeX macro"},
{"et","",""},{"et","",""},{"et","",""},{"et","",""},
},
};
//##############################################################################
// USER_DEFINED_ACTIONS
//##############################################################################
void setMasterFile() {
// Master document: interactive definition in Emacs style
String buffername = textArea.buffer.name.toLowerCase();
int testTex = buffername.indexOf(".tex");
if (testTex > 0) {
main = Macros.input(view,"Name of master document \n(without \".tex\" extension)");
if(main != null){
textArea.goToBufferEnd(false);
textArea.setSelectedText("\n\n%%% Local Variables:\n%%% mode: latex\n%%% TeX-master: \""+main+"\"\n%%% End:");
}
} else {
Macros.message(view,"The file: " + textArea.buffer.name + " is a not a LaTeX file");
}
}
void help() {
// Help
fullPath = scriptPath;
for (i = 0; i < fullPath.length(); i++){
if (fullPath.substring(i,i+1).equals("\\"))
fullPath = fullPath.substring(0,i) + "/" + fullPath.substring(i+1,fullPath.length());
if (fullPath.substring(i,i+1).equals("/"))
fp0 = fullPath.substring(0,i);
};
fullURL = "file:///" + fp0 + "/doc/help.html";
infoviewer.InfoViewerPlugin.openURL(view, fullURL);
}