char *search,*replace;
} t_sandr;
+/* The order of these arrays is significant. Text search and replace
+ * for each element occurs in order, so earlier changes can induce
+ * subsequent changes even though the original text might not appear
+ * to invoke the latter changes. */
+
const t_sandr_const sandrTeX[] = {
{ "[TT]", "{\\tt " },
{ "[tt]", "}" },
{ "&", "\\&" },
/* The next couple of lines allow true Greek symbols to be written to the
manual, which makes it look pretty */
- { "[GRK]", "$\\" },
- { "[grk]", "$" },
- /* The next two lines used to substitute "|" and "||" to "or", but only
- * g_angle used that functionality, so that was changed to a textual
- * "or" there, so that other places could use those symbols to indicate
- * magnitudes. */
- { "||", "\\textbar{}\\textbar" },
- { "|", "\\textbar{}" }
+ { "[GRK]", "\\ensuremath{\\" },
+ { "[grk]", "}" },
+ { "[MATH]","\\ensuremath{" },
+ { "[math]","}" },
+ { "[CHEVRON]", "\\ensuremath{<}" },
+ { "[chevron]", "\\ensuremath{>}" },
+ { "[MAG]", "\\ensuremath{|}" },
+ { "[mag]", "\\ensuremath{|}" },
+ { "[INT]","\\ensuremath{\\int" },
+ { "[FROM]","_" },
+ { "[from]","" },
+ { "[TO]", "^" },
+ { "[to]", "" },
+ { "[int]","}" },
+ { "[SUM]","\\ensuremath{\\sum" },
+ { "[sum]","}" },
+ { "[SUB]","\\ensuremath{_{" },
+ { "[sub]","}}" },
+ { "[SQRT]","\\ensuremath{\\sqrt{" },
+ { "[sqrt]","}}" },
+ { "[EXP]","\\ensuremath{\\exp{(" },
+ { "[exp]",")}}" },
+ { "[LN]","\\ensuremath{\\ln{(" },
+ { "[ln]",")}}" },
+ { "[LOG]","\\ensuremath{\\log{(" },
+ { "[log]",")}}" },
+ { "[COS]","\\ensuremath{\\cos{(" },
+ { "[cos]",")}}" },
+ { "[SIN]","\\ensuremath{\\sin{(" },
+ { "[sin]",")}}" },
+ { "[TAN]","\\ensuremath{\\tan{(" },
+ { "[tan]",")}}" },
+ { "[COSH]","\\ensuremath{\\cosh{(" },
+ { "[cosh]",")}}" },
+ { "[SINH]","\\ensuremath{\\sinh{(" },
+ { "[sinh]",")}}" },
+ { "[TANH]","\\ensuremath{\\tanh{(" },
+ { "[tanh]",")}}" }
};
#define NSRTEX asize(sandrTeX)
{ "[bb]", "" },
{ "[IT]", "" },
{ "[it]", "" },
+ { "[MATH]","" },
+ { "[math]","" },
+ { "[CHEVRON]","<" },
+ { "[chevron]",">" },
+ { "[MAG]", "|" },
+ { "[mag]", "|" },
+ { "[INT]","integral" },
+ { "[FROM]"," from " },
+ { "[from]","" },
+ { "[TO]", " to " },
+ { "[to]", " of" },
+ { "[int]","" },
+ { "[SUM]","sum" },
+ { "[sum]","" },
+ { "[SUB]","_" },
+ { "[sub]","" },
+ { "[SQRT]","sqrt(" },
+ { "[sqrt]",")" },
+ { "[EXP]","exp(" },
+ { "[exp]",")" },
+ { "[LN]","ln(" },
+ { "[ln]",")" },
+ { "[LOG]","log(" },
+ { "[log]",")" },
+ { "[COS]","cos(" },
+ { "[cos]",")" },
+ { "[SIN]","sin(" },
+ { "[sin]",")" },
+ { "[TAN]","tan(" },
+ { "[tan]",")" },
+ { "[COSH]","cosh(" },
+ { "[cosh]",")" },
+ { "[SINH]","sinh(" },
+ { "[sinh]",")" },
+ { "[TANH]","tanh(" },
+ { "[tanh]",")" },
{ "[PAR]","\n\n" },
{ "[BR]", "\n"},
{ "[GRK]", "" },
{ "[bb]", "'''" },
{ "[IT]", "''" },
{ "[it]", "''" },
+ { "[MATH]","" },
+ { "[math]","" },
+ { "[CHEVRON]","<" },
+ { "[chevron]",">" },
+ { "[MAG]", "|" },
+ { "[mag]", "|" },
+ { "[INT]","integral" },
+ { "[FROM]"," from " },
+ { "[from]","" },
+ { "[TO]", " to " },
+ { "[to]", " of" },
+ { "[int]","" },
+ { "[SUM]","sum" },
+ { "[sum]","" },
+ { "[SUB]","_" },
+ { "[sub]","" },
+ { "[SQRT]","sqrt(" },
+ { "[sqrt]",")", },
+ { "[EXP]","exp(" },
+ { "[exp]",")" },
+ { "[LN]","ln(" },
+ { "[ln]",")" },
+ { "[LOG]","log(" },
+ { "[log]",")" },
+ { "[COS]","cos(" },
+ { "[cos]",")" },
+ { "[SIN]","sin(" },
+ { "[sin]",")" },
+ { "[TAN]","tan(" },
+ { "[tan]",")" },
+ { "[COSH]","cosh(" },
+ { "[cosh]",")" },
+ { "[SINH]","sinh(" },
+ { "[sinh]",")" },
+ { "[TANH]","tanh(" },
+ { "[tanh]",")" },
{ "[PAR]","\n\n" },
{ "[BR]", "\n" },
{ "[GRK]", "&" },
{ "[bb]", "\\fR" },
{ "[IT]", "\\fI " },
{ "[it]", "\\fR" },
+ { "[MATH]","" },
+ { "[math]","" },
+ { "[CHEVRON]","<" },
+ { "[chevron]",">" },
+ { "[MAG]", "|" },
+ { "[mag]", "|" },
+ { "[INT]","integral" },
+ { "[FROM]"," from " },
+ { "[from]","" },
+ { "[TO]", " to " },
+ { "[to]", " of" },
+ { "[int]","" },
+ { "[SUM]","sum" },
+ { "[sum]","" },
+ { "[SUB]","_" },
+ { "[sub]","" },
+ { "[SQRT]","sqrt(" },
+ { "[sqrt]",")", },
+ { "[EXP]","exp(" },
+ { "[exp]",")" },
+ { "[LN]","ln(" },
+ { "[ln]",")" },
+ { "[LOG]","log(" },
+ { "[log]",")" },
+ { "[COS]","cos(" },
+ { "[cos]",")" },
+ { "[SIN]","sin(" },
+ { "[sin]",")" },
+ { "[TAN]","tan(" },
+ { "[tan]",")" },
+ { "[COSH]","cosh(" },
+ { "[cosh]",")" },
+ { "[SINH]","sinh(" },
+ { "[sinh]",")" },
+ { "[TANH]","tanh(" },
+ { "[tanh]",")" },
{ "[PAR]","\n\n" },
{ "\n ", "\n" },
{ "<", "" },
{ "[bb]", "</b>" },
{ "[IT]", "<it>" },
{ "[it]", "</it>" },
+ { "[MATH]","" },
+ { "[math]","" },
+ { "[CHEVRON]","<" },
+ { "[chevron]",">" },
+ { "[MAG]", "|" },
+ { "[mag]", "|" },
+ { "[INT]","integral" },
+ { "[FROM]"," from " },
+ { "[from]","" },
+ { "[TO]", " to " },
+ { "[to]", " of" },
+ { "[int]","" },
+ { "[SUM]","sum" },
+ { "[sum]","" },
+ { "[SUB]","_" },
+ { "[sub]","" },
+ { "[SQRT]","sqrt(" },
+ { "[sqrt]",")", },
+ { "[EXP]","exp(" },
+ { "[exp]",")" },
+ { "[LN]","ln(" },
+ { "[ln]",")" },
+ { "[LOG]","log(" },
+ { "[log]",")" },
+ { "[COS]","cos(" },
+ { "[cos]",")" },
+ { "[SIN]","sin(" },
+ { "[sin]",")" },
+ { "[TAN]","tan(" },
+ { "[tan]",")" },
+ { "[COSH]","cosh(" },
+ { "[cosh]",")" },
+ { "[SINH]","sinh(" },
+ { "[sinh]",")" },
+ { "[TANH]","tanh(" },
+ { "[tanh]",")" },
{ "[PAR]","<p>" },
{ "[BR]", "<br>" },
{ "[GRK]", "&" },
{ "[bb]", "</emp>" },
{ "[IT]", "<it>" },
{ "[it]", "</it>" },
+ { "[MATH]","" },
+ { "[math]","" },
+ { "[CHEVRON]","<" },
+ { "[chevron]",">" },
+ { "[MAG]", "|" },
+ { "[mag]", "|" },
+ { "[INT]","integral" },
+ { "[FROM]"," from " },
+ { "[from]","" },
+ { "[TO]", " to " },
+ { "[to]", " of" },
+ { "[int]","" },
+ { "[SUM]","sum" },
+ { "[sum]","" },
+ { "[SUB]","_" },
+ { "[sub]","" },
+ { "[SQRT]","sqrt(" },
+ { "[sqrt]",")", },
+ { "[EXP]","exp(" },
+ { "[exp]",")" },
+ { "[LN]","ln(" },
+ { "[ln]",")" },
+ { "[LOG]","log(" },
+ { "[log]",")" },
+ { "[COS]","cos(" },
+ { "[cos]",")" },
+ { "[SIN]","sin(" },
+ { "[sin]",")" },
+ { "[TAN]","tan(" },
+ { "[tan]",")" },
+ { "[COSH]","cosh(" },
+ { "[cosh]",")" },
+ { "[SINH]","sinh(" },
+ { "[sinh]",")" },
+ { "[TANH]","tanh(" },
+ { "[tanh]",")" },
{ "[PAR]","</par>\n<par>" },
{ "[BR]", "<br />" },
{ "[GRK]", "" },