HumanReadableLogsPackageSuggestions.ts 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. type Suggestion = [string, { name: string; command: string }]
  2. const commandSuggestions: Suggestion[] = [
  3. [
  4. '\\includegraphics',
  5. { name: 'graphicx', command: '\\usepackage{graphicx}' },
  6. ],
  7. ['\\toprule', { name: 'booktabs', command: '\\usepackage{booktabs}' }],
  8. ['\\midrule', { name: 'booktabs', command: '\\usepackage{booktabs}' }],
  9. ['\\bottomrule', { name: 'booktabs', command: '\\usepackage{booktabs}' }],
  10. ['\\cmidrule', { name: 'booktabs', command: '\\usepackage{booktabs}' }],
  11. ['\\multirow', { name: 'multirow', command: '\\usepackage{multirow}' }],
  12. ['\\justifying', { name: 'ragged2e', command: '\\usepackage{ragged2e}' }],
  13. ['\\tag', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  14. ['\\notag', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  15. ['\\text', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  16. ['\\boldsymbol', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  17. ['\\eqref', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  18. ['\\iint', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  19. ['\\iiint', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  20. ['\\nmid', { name: 'amssymb', command: '\\usepackage{amssymb}' }],
  21. ['\\varnothing', { name: 'amssymb', command: '\\usepackage{amssymb}' }],
  22. ['\\Box', { name: 'amssymb', command: '\\usepackage{amssymb}' }],
  23. ['\\citep', { name: 'natbib', command: '\\usepackage{natbib}' }],
  24. ['\\citet', { name: 'natbib', command: '\\usepackage{natbib}' }],
  25. ['\\citepalias', { name: 'natbib', command: '\\usepackage{natbib}' }],
  26. ['\\citetalias', { name: 'natbib', command: '\\usepackage{natbib}' }],
  27. ['\\url', { name: 'url', command: '\\usepackage{url}' }],
  28. ['\\href', { name: 'hyperref', command: '\\usepackage{hyperref}' }],
  29. ['\\texorpdfstring', { name: 'hyperref', command: '\\usepackage{hyperref}' }],
  30. ['\\phantomsection', { name: 'hyperref', command: '\\usepackage{hyperref}' }],
  31. ['\\arraybackslash', { name: 'array', command: '\\usepackage{array}' }],
  32. ['\\includesvg', { name: 'svg', command: '\\usepackage{svg}' }],
  33. ]
  34. const environmentSuggestions: Suggestion[] = [
  35. ['justify', { name: 'ragged2e', command: '\\usepackage{ragged2e}' }],
  36. ['align', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  37. ['align*', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  38. ['split', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  39. ['gather', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  40. ['cases', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  41. ['matrix', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  42. ['pmatrix', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  43. ['bmatrix', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  44. ['subequations', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  45. ]
  46. const packageSuggestionsForCommands = new Map(commandSuggestions)
  47. const packageSuggestionsForEnvironments = new Map(environmentSuggestions)
  48. export { packageSuggestionsForCommands, packageSuggestionsForEnvironments }