Skip to content

Commit

Permalink
fix: partial fix for 1710: added missing \arcsec, etc.. commands
Browse files Browse the repository at this point in the history
  • Loading branch information
arnog committed Nov 12, 2022
1 parent 932af51 commit 9481cfb
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/addons/definitions-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ metadata('Trigonometry', ['\\cos', '\\sin', '\\tan'], SUPERCOMMON);
metadata(
'Trigonometry',
[
'\\arcsin',
'\\arccos',
'\\arcsin',
'\\arctan',
'\\arctg',
'\\arcctg',
Expand Down
10 changes: 8 additions & 2 deletions src/core-definitions/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ defineFunction(
'cos',
'cosh',
'cot',
'cotg', // Not LaTeX standard. Used in France
'coth',
'ctg', // Not LaTeX standard. Used in France
'cth',
'cotg', // Not LaTeX standard. Used in France
'csc', // Not LaTeX standard. \cth
'cosec', // Not LaTeX standard.
'deg',
Expand All @@ -35,7 +35,6 @@ defineFunction(
'hom',
'inf',
'ker',
'lg',
'lb', // Not LaTeX standard. US Dept of Commerce recommendation for log2
'lg', // Not LaTeX standard. In German and Russian literature, log10.
// Sometimes used as the log2
Expand All @@ -51,6 +50,13 @@ defineFunction(
'tanh',
'tg', // Not LaTeX standard. Used in France
'th', // Not LaTeX standard. \tanh
'arcsec',
'arccsc',
'arsinh',
'arcosh',
'artanh',
'arcsech',
'arccsch',
],
'',
{
Expand Down
33 changes: 27 additions & 6 deletions src/editor/shortcuts-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,37 @@ export const INLINE_SHORTCUTS: Record<string, InlineShortcutDefinition> = {
'arcsin': '\\arcsin',
'arccos': '\\arccos',
'arctan': '\\arctan',
'sin': '\\sin',
'arcsec': '\\arcsec',
'arccsc': '\\arccsc',

'arsinh': '\\arsinh',
'arcosh': '\\arcosh',
'artanh': '\\artanh',
'arcsech': '\\arcsech',
'arccsch': '\\arccsch',
'arg': '\\arg',
'ch': '\\ch',
'cosec': '\\cosec',
'cosh': '\\cosh',
'cot': '\\cot',
'cotg': '\\cotg',
'coth': '\\coth',
'csc': '\\csc',
'ctg': '\\ctg',
'cth': '\\cth',
'sec': '\\sec',
'sinh': '\\sinh',
'sh': '\\sh',
'tanh': '\\tanh',
'tg': '\\tg',
'th': '\\th',

'sin': '\\sin',
'cos': '\\cos',
'cosh': '\\cosh',
'tan': '\\tan',
'tanh': '\\tanh',
'sec': '\\sec',
'csc': '\\csc',
'cot': '\\cot',

'lg': '\\lg',
'lb': '\\lb',
'log': '\\log',
'ln': '\\ln',
'exp': '\\exp',
Expand Down

0 comments on commit 9481cfb

Please sign in to comment.