HumanReadableLogsPackageSuggestions.ts 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. ]
  33. const environmentSuggestions: Suggestion[] = [
  34. ['justify', { name: 'ragged2e', command: '\\usepackage{ragged2e}' }],
  35. ['align', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  36. ['align*', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  37. ['split', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  38. ['gather', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  39. ['cases', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  40. ['matrix', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  41. ['pmatrix', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  42. ['bmatrix', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  43. ['subequations', { name: 'amsmath', command: '\\usepackage{amsmath}' }],
  44. ]
  45. const packageSuggestionsForCommands = new Map(commandSuggestions)
  46. const packageSuggestionsForEnvironments = new Map(environmentSuggestions)
  47. export { packageSuggestionsForCommands, packageSuggestionsForEnvironments }