HumanReadableLogsRules.tsx 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255
  1. /* eslint-disable no-useless-escape */
  2. import {
  3. packageSuggestionsForCommands,
  4. packageSuggestionsForEnvironments,
  5. } from './HumanReadableLogsPackageSuggestions'
  6. interface Rule {
  7. ruleId: string
  8. types?: string[]
  9. cascadesFrom?: string[]
  10. newMessage?: string
  11. regexToMatch: RegExp
  12. contentRegex?: RegExp
  13. improvedTitle?: (
  14. currentTitle: string,
  15. details?: string[]
  16. ) => string | [string, JSX.Element]
  17. package?: string
  18. highlightCommand?: (contentDetails: string[]) => string | undefined
  19. }
  20. const rules: Rule[] = [
  21. {
  22. ruleId: 'hint_misplaced_alignment_tab_character',
  23. regexToMatch: /Misplaced alignment tab character &/,
  24. },
  25. {
  26. ruleId: 'hint_extra_alignment_tab_has_been_changed',
  27. regexToMatch: /Extra alignment tab has been changed to \\cr/,
  28. },
  29. {
  30. ruleId: 'hint_display_math_should_end_with',
  31. regexToMatch: /Display math should end with \$\$/,
  32. },
  33. {
  34. ruleId: 'hint_missing_inserted',
  35. regexToMatch: /Missing [{$] inserted\./,
  36. },
  37. {
  38. ruleId: 'hint_reference_undefined',
  39. regexToMatch: /Reference.+undefined/,
  40. },
  41. {
  42. ruleId: 'hint_there_were_undefined_references',
  43. regexToMatch: /There were undefined references/,
  44. },
  45. {
  46. ruleId: 'hint_citation_on_page_undefined_on_input_line',
  47. regexToMatch: /Citation .+ on page .+ undefined on input line .+/,
  48. },
  49. {
  50. ruleId: 'hint_label_multiply_defined_labels',
  51. regexToMatch: /(Label .+)? multiply[ -]defined( labels)?/,
  52. },
  53. {
  54. ruleId: 'hint_float_specifier_changed',
  55. regexToMatch: /`!?h' float specifier changed to `!?ht/,
  56. },
  57. {
  58. ruleId: 'hint_no_positions_in_optional_float_specifier',
  59. regexToMatch: /No positions in optional float specifier/,
  60. },
  61. {
  62. ruleId: 'hint_undefined_control_sequence',
  63. regexToMatch: /Undefined control sequence/,
  64. // Match the last control sequence in the line
  65. contentRegex: /^[^\n]*(\\\S+)\s*[\n]/,
  66. improvedTitle: (currentTitle: string, details?: string[]) => {
  67. if (!details?.length) {
  68. return currentTitle
  69. }
  70. const command = details[0]
  71. const suggestion = packageSuggestionsForCommands.get(command)
  72. if (suggestion) {
  73. return [
  74. `Is ${suggestion.command} missing?`,
  75. // eslint-disable-next-line react/jsx-key
  76. <span>
  77. Is <code>{suggestion.command}</code> missing?
  78. </span>,
  79. ]
  80. }
  81. return currentTitle
  82. },
  83. highlightCommand(contentDetails) {
  84. return contentDetails[0]
  85. },
  86. },
  87. {
  88. ruleId: 'hint_undefined_environment',
  89. regexToMatch: /LaTeX Error: Environment .+ undefined/,
  90. contentRegex: /\\begin\{(\S+)\}/,
  91. improvedTitle: (currentTitle: string, details?: string[]) => {
  92. if (!details?.length) {
  93. return currentTitle
  94. }
  95. const environment = details[0]
  96. const suggestion = packageSuggestionsForEnvironments.get(environment)
  97. if (suggestion) {
  98. return [
  99. `Is ${suggestion.command} missing?`,
  100. // eslint-disable-next-line react/jsx-key
  101. <span>
  102. Is <code>{suggestion.command}</code> missing?
  103. </span>,
  104. ]
  105. }
  106. return currentTitle
  107. },
  108. },
  109. {
  110. ruleId: 'hint_file_not_found',
  111. regexToMatch: /File .+ not found/,
  112. },
  113. {
  114. ruleId: 'hint_unknown_graphics_extension',
  115. regexToMatch: /LaTeX Error: Unknown graphics extension: \..+/,
  116. },
  117. {
  118. ruleId: 'hint_unknown_float_option_h',
  119. regexToMatch: /LaTeX Error: Unknown float option `H/,
  120. },
  121. {
  122. ruleId: 'hint_unknown_float_option_q',
  123. regexToMatch: /LaTeX Error: Unknown float option `q/,
  124. },
  125. {
  126. ruleId: 'hint_math_allowed_only_in_math_mode',
  127. regexToMatch: /LaTeX Error: \\math.+ allowed only in math mode/,
  128. },
  129. {
  130. ruleId: 'hint_mismatched_environment',
  131. types: ['environment'],
  132. regexToMatch: /Error: `([^']{2,})' expected, found `([^']{2,})'.*/,
  133. newMessage: 'Error: environment does not match \\begin{$1} ... \\end{$2}',
  134. },
  135. {
  136. ruleId: 'hint_mismatched_brackets',
  137. types: ['environment'],
  138. regexToMatch: /Error: `([^a-zA-Z0-9])' expected, found `([^a-zA-Z0-9])'.*/,
  139. newMessage: "Error: brackets do not match, found '$2' instead of '$1'",
  140. },
  141. {
  142. ruleId: 'hint_can_be_used_only_in_preamble',
  143. regexToMatch: /LaTeX Error: Can be used only in preamble/,
  144. },
  145. {
  146. ruleId: 'hint_missing_right_inserted',
  147. regexToMatch: /Missing \\right inserted/,
  148. },
  149. {
  150. ruleId: 'hint_double_superscript',
  151. regexToMatch: /Double superscript/,
  152. },
  153. {
  154. ruleId: 'hint_double_subscript',
  155. regexToMatch: /Double subscript/,
  156. },
  157. {
  158. ruleId: 'hint_no_author_given',
  159. regexToMatch: /No \\author given/,
  160. },
  161. {
  162. ruleId: 'hint_somethings_wrong_perhaps_a_missing_item',
  163. regexToMatch: /LaTeX Error: Something's wrong--perhaps a missing \\item/,
  164. },
  165. {
  166. ruleId: 'hint_misplaced_noalign',
  167. regexToMatch: /Misplaced \\noalign/,
  168. },
  169. {
  170. ruleId: 'hint_no_line_here_to_end',
  171. regexToMatch: /LaTeX Error: There's no line here to end/,
  172. },
  173. {
  174. ruleId: 'hint_verb_ended_by_end_of_line',
  175. regexToMatch: /LaTeX Error: \\verb ended by end of line/,
  176. },
  177. {
  178. ruleId: 'hint_illegal_unit_of_measure_pt_inserted',
  179. regexToMatch: /Illegal unit of measure (pt inserted)/,
  180. },
  181. {
  182. ruleId: 'hint_extra_right',
  183. regexToMatch: /Extra \\right/,
  184. },
  185. {
  186. ruleId: 'hint_missing_begin_document',
  187. regexToMatch: /Missing \\begin{document}/,
  188. },
  189. {
  190. ruleId: 'hint_mismatched_environment2',
  191. types: ['environment'],
  192. cascadesFrom: ['environment'],
  193. regexToMatch:
  194. /Error: `\\end\{([^\}]+)\}' expected but found `\\end\{([^\}]+)\}'.*/,
  195. newMessage: 'Error: environments do not match: \\begin{$1} ... \\end{$2}',
  196. },
  197. {
  198. ruleId: 'hint_mismatched_environment3',
  199. types: ['environment'],
  200. cascadesFrom: ['environment'],
  201. regexToMatch:
  202. /Warning: No matching \\end found for `\\begin\{([^\}]+)\}'.*/,
  203. newMessage: 'Warning: No matching \\end found for \\begin{$1}',
  204. },
  205. {
  206. ruleId: 'hint_mismatched_environment4',
  207. types: ['environment'],
  208. cascadesFrom: ['environment'],
  209. regexToMatch:
  210. /Error: Found `\\end\{([^\}]+)\}' without corresponding \\begin.*/,
  211. newMessage: 'Error: found \\end{$1} without a corresponding \\begin{$1}',
  212. },
  213. ]
  214. const errors: Rule[] = [
  215. {
  216. ruleId: 'hint_character_invalid_at_this_point',
  217. regexToMatch: /^Package calc error: `(.+?)' invalid at this point/,
  218. package: 'calc',
  219. },
  220. {
  221. ruleId: 'hint_command_allowed_only_in_math_mode',
  222. regexToMatch: /^Package amsmath error: (.+?) allowed only in math mode/,
  223. package: 'amsmath',
  224. },
  225. {
  226. ruleId: 'hint_command_undefined',
  227. regexToMatch: /^LaTeX error: (.+?) undefined/,
  228. package: 'LaTeX',
  229. },
  230. {
  231. ruleId: 'hint_lt_in_mid_line',
  232. regexToMatch: /^LaTeX error: \\< in mid line/,
  233. package: 'LaTeX',
  234. },
  235. {
  236. ruleId: 'hint_a_box_was_supposed_to_be_here',
  237. regexToMatch: /^A <Box> was supposed to be here/i, // note: can be <box>
  238. package: 'TeX',
  239. },
  240. {
  241. ruleId: 'hint_accent_not_provided_by_font_family',
  242. regexToMatch:
  243. /^Package textcomp error: Accent (.+?) not provided by font family (.+)/,
  244. package: 'textcomp',
  245. },
  246. {
  247. ruleId: 'hint_argument_of_has_an_extra',
  248. regexToMatch: /^Argument of (.+?) has an extra }/,
  249. package: 'TeX',
  250. },
  251. {
  252. ruleId: 'hint_bad_line_or_vector_argument',
  253. regexToMatch: /^LaTeX error: Bad \\line or \\vector argument/,
  254. package: 'LaTeX',
  255. },
  256. {
  257. ruleId: 'hint_bad_math_environment_delimiter',
  258. regexToMatch: /^LaTeX error: Bad math environment delimiter/,
  259. package: 'LaTeX',
  260. },
  261. {
  262. ruleId: 'hint_begin_env_allowed_only_in_paragraph_mode',
  263. regexToMatch:
  264. /^Package amsmath error: \\begin{(.+?)} allowed only in paragraph mode/,
  265. package: 'amsmath',
  266. },
  267. {
  268. ruleId: 'hint_begin_env_on_input_line_x_ended_by_end_x',
  269. regexToMatch:
  270. /^LaTeX error: \\begin{(.+?)} on input line (.+?) ended by \\end{(.+?)}/,
  271. package: 'LaTeX',
  272. },
  273. {
  274. ruleId: 'hint_begin_split_wont_work_here',
  275. regexToMatch: /^Package amsmath error: \\begin{split} won't work here/,
  276. package: 'amsmath',
  277. },
  278. {
  279. ruleId: 'hint_can_be_used_only_in_preamble',
  280. regexToMatch: /^LaTeX error: Can be used only in preamble/,
  281. package: 'LaTeX',
  282. },
  283. {
  284. ruleId: 'hint_cannot_be_used_in_preamble',
  285. regexToMatch: /^LaTeX error: Cannot be used in preamble/,
  286. package: 'LaTeX',
  287. },
  288. {
  289. ruleId: 'hint_unicode_character',
  290. regexToMatch: /^LaTeX Error: Unicode character /,
  291. package: 'LaTeX',
  292. },
  293. {
  294. ruleId: 'hint_cannot_define_unicode_char_value_lt_00a0',
  295. regexToMatch:
  296. /^Package inputenc error: Cannot define Unicode char value < 00A0/,
  297. package: 'inputenc',
  298. },
  299. {
  300. ruleId: 'hint_cannot_determine_size_of_graphic_in_file',
  301. regexToMatch:
  302. /^Package (graphics|graphicx) error: Cannot determine size of graphic in (.+)/,
  303. package: 'graphics/graphicx',
  304. },
  305. {
  306. ruleId: 'hint_cannot_include_graphics_of_type',
  307. regexToMatch:
  308. /^Package (graphics|graphicx) error: Cannot include graphics of type\s*: (.+)/,
  309. package: 'graphics/graphicx',
  310. },
  311. {
  312. ruleId: 'hint_caption_outside_float',
  313. regexToMatch: /^LaTeX error: \\caption outside float/,
  314. package: 'LaTeX',
  315. },
  316. {
  317. ruleId: 'hint_command_already_defined',
  318. regexToMatch: /^LaTeX error: Command (.+?) already defined/,
  319. package: 'LaTeX',
  320. },
  321. {
  322. ruleId: 'hint_command_invalid_in_math_mode',
  323. regexToMatch: /^LaTeX error: Command (.+?) invalid in math mode/,
  324. package: 'LaTeX',
  325. },
  326. {
  327. ruleId: 'hint_command_not_defined_as_a_math_alphabet',
  328. regexToMatch: /^LaTeX error: Command (.+?) not defined as a math alphabet/,
  329. package: 'LaTeX',
  330. },
  331. {
  332. ruleId: 'hint_corrupted_nfss_tables',
  333. regexToMatch: /^LaTeX error: Corrupted NFSS tables/,
  334. package: 'LaTeX',
  335. },
  336. {
  337. ruleId: 'hint_counter_too_large',
  338. regexToMatch: /^LaTeX error: Counter too large/,
  339. package: 'LaTeX',
  340. },
  341. {
  342. ruleId: 'hint_dimension_too_large',
  343. regexToMatch: /^Dimension too large/,
  344. package: 'TeX',
  345. },
  346. {
  347. ruleId: 'hint_displaybreak_cannot_be_applied_here',
  348. regexToMatch:
  349. /^Package amsmath error: \\displaybreak cannot be applied here/,
  350. package: 'amsmath',
  351. },
  352. {
  353. ruleId: 'hint_division_by_0',
  354. regexToMatch: /^Package (graphics|graphicx) error: Division by 0/,
  355. package: 'graphics/graphicx',
  356. },
  357. {
  358. ruleId: 'hint_double_subscript',
  359. regexToMatch: /^Double subscript/,
  360. package: 'TeX',
  361. },
  362. {
  363. ruleId: 'hint_double_superscript',
  364. regexToMatch: /^Double superscript/,
  365. package: 'TeX',
  366. },
  367. {
  368. ruleId: 'hint_encoding_file_not_found',
  369. regexToMatch: /^Package fontenc error: Encoding file `(.+?)' not found/,
  370. package: 'fontenc',
  371. },
  372. {
  373. ruleId: 'hint_encoding_scheme_unknown',
  374. regexToMatch: /^LaTeX error: Encoding scheme `(.+?)' unknown/,
  375. package: 'LaTeX',
  376. },
  377. {
  378. ruleId: 'hint_environment_undefined',
  379. regexToMatch: /^LaTeX error: Environment (.+?) undefined/,
  380. package: 'LaTeX',
  381. },
  382. {
  383. ruleId: 'hint_erroneous_nesting_of_equation_structures',
  384. regexToMatch:
  385. /^Package amsmath error: Erroneous nesting of equation structures/,
  386. package: 'amsmath',
  387. },
  388. {
  389. ruleId: 'hint_extra_on_this_line',
  390. regexToMatch: /^Package amsmath error: Extra & on this line/,
  391. package: 'amsmath',
  392. },
  393. {
  394. ruleId: 'hint_extra_alignment_tab_has_been_changed_to_cr',
  395. regexToMatch: /^Extra alignment tab has been changed to \\cr/,
  396. package: 'TeX',
  397. },
  398. {
  399. ruleId: 'hint_extra_endgroup',
  400. regexToMatch: /^Extra \\endgroup/,
  401. package: 'TeX',
  402. },
  403. {
  404. ruleId: 'hint_extra_or',
  405. regexToMatch: /^Extra \\or/,
  406. package: 'TeX',
  407. },
  408. {
  409. ruleId: 'hint_extra_right',
  410. regexToMatch: /^Extra \\right/,
  411. package: 'TeX',
  412. },
  413. {
  414. ruleId: 'hint_extra_or_forgotten',
  415. regexToMatch: /^Extra }, or forgotten \$/,
  416. package: 'TeX',
  417. },
  418. {
  419. ruleId: 'hint_extra_or_forgotten_endgroup',
  420. regexToMatch: /^Extra }, or forgotten \\endgroup/,
  421. package: 'TeX',
  422. },
  423. {
  424. ruleId: 'hint_file_not_found',
  425. regexToMatch: /^LaTeX error: File `(.+?)' not found/,
  426. package: 'LaTeX',
  427. },
  428. {
  429. ruleId: 'hint_file_ended_while_scanning',
  430. regexToMatch: /^File ended while scanning (.+)/,
  431. package: 'TeX',
  432. },
  433. {
  434. ruleId: 'hint_float_lost',
  435. regexToMatch: /^LaTeX error: Float\(s\) lost/,
  436. package: 'LaTeX',
  437. },
  438. {
  439. ruleId: 'hint_font_family_unknown',
  440. regexToMatch: /^LaTeX error: Font family `(.+?)\+(.+?)' unknown/,
  441. package: 'LaTeX',
  442. },
  443. {
  444. ruleId: 'hint_font_not_found',
  445. regexToMatch: /^LaTeX error: Font (.+?) not found/,
  446. package: 'LaTeX',
  447. },
  448. {
  449. ruleId: 'hint_font_not_loaded_not_enough_room_left',
  450. regexToMatch: /^Font (.+?)=(.+?) not loaded: Not enough room left/,
  451. package: 'TeX',
  452. },
  453. {
  454. ruleId: 'hint_font_shape_not_found',
  455. regexToMatch: /^LaTeX error: Font shape (.+?) not found/,
  456. package: 'LaTeX',
  457. },
  458. {
  459. ruleId: 'hint_i_cant_find_file',
  460. regexToMatch: /^I can't find file `(.+?)'/,
  461. package: 'TeX',
  462. },
  463. {
  464. ruleId: 'hint_i_cant_write_on_file',
  465. regexToMatch: /^I can't write on file `(.+?)'/,
  466. package: 'TeX',
  467. },
  468. {
  469. ruleId: 'hint_illegal_character_in_array_arg',
  470. regexToMatch: /^LaTeX error: Illegal character in array arg/,
  471. package: 'LaTeX',
  472. },
  473. {
  474. ruleId: 'hint_illegal_parameter_number_in_definition_of',
  475. regexToMatch: /^Illegal parameter number in definition of (.+)/,
  476. package: 'TeX',
  477. },
  478. {
  479. ruleId: 'hint_illegal_unit_of_measure_pt_inserted',
  480. regexToMatch: /^Illegal unit of measure \(pt inserted\)/,
  481. package: 'TeX',
  482. },
  483. {
  484. ruleId: 'hint_improper_argument_for_math_accent',
  485. regexToMatch: /^Package amsmath error: Improper argument for math accent/,
  486. package: 'amsmath',
  487. },
  488. {
  489. ruleId: 'hint_improper_discretionary_list',
  490. regexToMatch: /^Improper discretionary list/,
  491. package: 'TeX',
  492. },
  493. {
  494. ruleId: 'hint_improper_hyphenation',
  495. regexToMatch: /^Improper \\hyphenation/,
  496. package: 'TeX',
  497. },
  498. {
  499. ruleId: 'hint_improper_prevdepth',
  500. regexToMatch: /^Improper \\prevdepth/,
  501. package: 'TeX',
  502. },
  503. {
  504. ruleId: 'hint_improper_spacefactor',
  505. regexToMatch: /^Improper \\spacefactor/,
  506. package: 'TeX',
  507. },
  508. {
  509. ruleId: 'hint_include_cannot_be_nested',
  510. regexToMatch: /^LaTeX error: \\include cannot be nested/,
  511. package: 'LaTeX',
  512. },
  513. {
  514. ruleId: 'hint_incompatible_list_cant_be_unboxed',
  515. regexToMatch: /^Incompatible list can't be unboxed/,
  516. package: 'TeX',
  517. },
  518. {
  519. ruleId: 'hint_incomplete_all_text_was_ignored_after_line',
  520. regexToMatch: /^Incomplete (.+?); all text was ignored after line (.+)/,
  521. package: 'TeX',
  522. },
  523. {
  524. ruleId: 'hint_infinite_glue_shrinkage_found',
  525. regexToMatch: /^Infinite glue shrinkage found (.+)/,
  526. package: 'TeX',
  527. },
  528. {
  529. ruleId: 'hint_interruption',
  530. regexToMatch: /^Interruption/,
  531. package: 'TeX',
  532. },
  533. {
  534. ruleId: 'hint_invalid_use_of_commande',
  535. regexToMatch: /^Package amsmath error: Invalid use of (.+)/,
  536. package: 'amsmath',
  537. },
  538. {
  539. ruleId: 'hint_keyboard_character_used_is_undefined_in_input_encoding',
  540. regexToMatch:
  541. /^Package inputenc error: Keyboard character used is undefined in input encoding (.+)/,
  542. package: 'inputenc',
  543. },
  544. {
  545. ruleId: 'hint_language_definition_file_not_found',
  546. regexToMatch:
  547. /^Package babel error: Language definition file (.+?)\.ldf not found /,
  548. package: 'babel',
  549. },
  550. {
  551. ruleId: 'hint_limit_controls_must_follow_a_math_operator',
  552. regexToMatch: /^Limit controls must follow a math operator/,
  553. package: 'TeX',
  554. },
  555. {
  556. ruleId: 'hint_loadclass_in_package_file',
  557. regexToMatch: /^LaTeX error: \\LoadClass in package file/,
  558. package: 'LaTeX',
  559. },
  560. {
  561. ruleId: 'hint_lonely_item_perhaps_a_missing_list_environment',
  562. regexToMatch:
  563. /^LaTeX error: Lonely \\item--perhaps a missing list environment/,
  564. package: 'LaTeX',
  565. },
  566. {
  567. ruleId: 'hint_math_alphabet_identifier_is_undefined_in_math_version',
  568. regexToMatch:
  569. /^LaTeX error: Math alphabet identifier (.+?) is undefined in math version (.+)/,
  570. package: 'LaTeX',
  571. },
  572. {
  573. ruleId: 'hint_math_version_is_not_defined',
  574. regexToMatch: /^LaTeX error: Math version (.+?) is not defined/,
  575. package: 'LaTeX',
  576. },
  577. {
  578. ruleId: 'hint_misplaced_alignment_tab_character',
  579. regexToMatch: /^Misplaced alignment tab character &/,
  580. package: 'TeX',
  581. },
  582. {
  583. ruleId: 'hint_misplaced_cr',
  584. regexToMatch: /^Misplaced \\cr/,
  585. package: 'TeX',
  586. },
  587. {
  588. ruleId: 'hint_misplaced_crcr',
  589. regexToMatch: /^Misplaced \\crcr/,
  590. package: 'TeX',
  591. },
  592. {
  593. ruleId: 'hint_misplaced_noalign',
  594. regexToMatch: /^Misplaced \\noalign/,
  595. package: 'TeX',
  596. },
  597. {
  598. ruleId: 'hint_misplaced_omit',
  599. regexToMatch: /^Misplaced \\omit/,
  600. package: 'TeX',
  601. },
  602. {
  603. ruleId: 'hint_missing_begin_document',
  604. regexToMatch: /^LaTeX error: Missing \\begin{document}/,
  605. package: 'LaTeX',
  606. },
  607. {
  608. ruleId: 'hint_missing_control_sequence_inserted',
  609. regexToMatch: /^Missing control sequence inserted/,
  610. package: 'TeX',
  611. },
  612. {
  613. ruleId: 'hint_missing_cr_inserted',
  614. regexToMatch: /^Missing \\cr inserted/,
  615. package: 'TeX',
  616. },
  617. {
  618. ruleId: 'hint_missing_delimiter_inserted',
  619. regexToMatch: /^Missing delimiter \(. inserted\)/,
  620. package: 'TeX',
  621. },
  622. {
  623. ruleId: 'hint_missing_endcsname_inserted',
  624. regexToMatch: /^Missing \\endcsname inserted/,
  625. package: 'TeX',
  626. },
  627. {
  628. ruleId: 'hint_missing_number_treated_as_zero',
  629. regexToMatch: /^Missing number, treated as zero/,
  630. package: 'TeX',
  631. },
  632. {
  633. ruleId: 'hint_missing_p_arg_in_array_arg',
  634. regexToMatch: /^LaTeX error: Missing p-arg in array arg/,
  635. package: 'LaTeX',
  636. },
  637. {
  638. ruleId: 'hint_missing_exp_in_array_arg',
  639. regexToMatch: /^LaTeX error: Missing @-exp in array arg/,
  640. package: 'LaTeX',
  641. },
  642. {
  643. ruleId: 'hint_missing_inserted_in_alignment_preamble',
  644. regexToMatch: /^Missing # inserted in alignment preamble/,
  645. package: 'TeX',
  646. },
  647. {
  648. ruleId: 'hint_missing_inserted_for_ifnum',
  649. regexToMatch: /^Missing = inserted for \\ifnum/,
  650. package: 'TeX',
  651. },
  652. {
  653. ruleId: 'hint_missing_inserted_for_ifdim',
  654. regexToMatch: /^Missing = inserted for \\ifdim/,
  655. package: 'TeX',
  656. },
  657. {
  658. ruleId: 'hint_missing_inserted',
  659. regexToMatch: /^Missing \$ inserted/,
  660. package: 'TeX',
  661. },
  662. {
  663. ruleId: 'hint_missing_endgroup_inserted',
  664. regexToMatch: /^Missing \\endgroup inserted/,
  665. package: 'TeX',
  666. },
  667. {
  668. ruleId: 'hint_missing_right_inserted',
  669. regexToMatch: /^Missing \\right\. inserted/,
  670. package: 'TeX',
  671. },
  672. {
  673. ruleId: 'hint_missing_inserted',
  674. regexToMatch: /^Missing \{ inserted/,
  675. package: 'TeX',
  676. },
  677. {
  678. ruleId: 'hint_missing_inserted',
  679. regexToMatch: /^Missing } inserted/,
  680. package: 'TeX',
  681. },
  682. {
  683. ruleId: 'hint_multiple_labels_label_tiquette_will_be_lost',
  684. regexToMatch:
  685. /^Package amsmath error: Multiple \\label's: label (.+?) will be lost/,
  686. package: 'amsmath',
  687. },
  688. {
  689. ruleId: 'hint_multiple_tag',
  690. regexToMatch: /^Package amsmath error: Multiple \\tag/,
  691. package: 'amsmath',
  692. },
  693. {
  694. ruleId: 'hint_no_counter_defined',
  695. regexToMatch: /^LaTeX error: No counter '(.+?)' defined/,
  696. package: 'LaTeX',
  697. },
  698. {
  699. ruleId: 'hint_no_cyrillic_encoding_definition_files_were_found',
  700. regexToMatch:
  701. /^Package babel error: No Cyrillic encoding definition files were found/,
  702. package: 'babel',
  703. },
  704. {
  705. ruleId: 'hint_no_declaration_for_shape',
  706. regexToMatch: /^LaTeX error: No declaration for shape (.+)/,
  707. package: 'LaTeX',
  708. },
  709. {
  710. ruleId: 'hint_no_driver_specified',
  711. regexToMatch:
  712. /^Package (color|graphics|graphicx) error: No driver specified/,
  713. package: 'color/graphics/graphicx',
  714. },
  715. {
  716. ruleId: 'hint_no_room_for_a_new_register',
  717. regexToMatch: /^No room for a new (.+)/,
  718. package: 'TeX',
  719. },
  720. {
  721. ruleId: 'hint_no_title_given',
  722. regexToMatch: /^LaTeX error: No \\title given/,
  723. package: 'LaTeX',
  724. },
  725. {
  726. ruleId: 'hint_not_a_letter',
  727. regexToMatch: /^Not a letter/,
  728. package: 'TeX',
  729. },
  730. {
  731. ruleId: 'hint_not_in_outer_par_mode',
  732. regexToMatch: /^LaTeX error: Not in outer par mode/,
  733. package: 'LaTeX',
  734. },
  735. {
  736. ruleId: 'hint_number_too_big',
  737. regexToMatch: /^Number too big/,
  738. package: 'TeX',
  739. },
  740. {
  741. ruleId: 'hint_ok_see_the_transcript_file',
  742. regexToMatch: /^OK \(see the transcript file\)/,
  743. package: 'TeX',
  744. },
  745. {
  746. ruleId: 'hint_old_form_should_be_begin',
  747. regexToMatch:
  748. /^Package amsmath error: Old form (.+?) should be \\begin{(.+?)} /,
  749. package: 'amsmath',
  750. },
  751. {
  752. ruleId: 'hint_only_one_is_allowed_per_tab',
  753. regexToMatch: /^Only one # is allowed per tab/,
  754. package: 'TeX',
  755. },
  756. {
  757. ruleId: 'hint_option_clash_for_package',
  758. regexToMatch: /^LaTeX error: Option clash for package (.+)/,
  759. package: 'LaTeX',
  760. },
  761. {
  762. ruleId: 'hint_page_height_already_too_large',
  763. regexToMatch: /^LaTeX error: Page height already too large/,
  764. package: 'LaTeX',
  765. },
  766. {
  767. ruleId: 'hint_paragraph_ended_before_command_was_complete',
  768. regexToMatch: /^Paragraph ended before (.+?) was complete/,
  769. package: 'TeX',
  770. },
  771. {
  772. ruleId: 'hint_please_type_a_command_or_say_end',
  773. regexToMatch: /^\(Please type a command or say `\\end'\)/,
  774. package: 'TeX',
  775. },
  776. {
  777. ruleId: 'hint_pushtabs_and_poptabs_dont_match',
  778. regexToMatch: /^LaTeX error: \\pushtabs and \\poptabs don't match/,
  779. package: 'LaTeX',
  780. },
  781. {
  782. ruleId: 'hint_requirepackage_or_loadclass_in_options_section',
  783. regexToMatch:
  784. /^LaTeX error: \\RequirePackage or \\LoadClass in Options Section/,
  785. package: 'LaTeX',
  786. },
  787. {
  788. ruleId: 'hint_rotation_not_supported',
  789. regexToMatch: /^Package (graphics|graphicx) error: Rotation not supported/,
  790. package: 'graphics/graphicx',
  791. },
  792. {
  793. ruleId: 'hint_runaway',
  794. regexToMatch: /^Runaway (.+)/,
  795. package: 'TeX',
  796. },
  797. {
  798. ruleId: 'hint_you_havent_specified_a_language_option',
  799. regexToMatch:
  800. /^Package babel error: You haven't specified a language option/,
  801. package: 'babel',
  802. },
  803. ]
  804. const warnings: Rule[] = [
  805. {
  806. ruleId: 'hint_calculating_math_sizes_for_size',
  807. regexToMatch:
  808. /^LaTeX (Font )?(Warning|Info): Calculating math sizes for size (.+)/,
  809. package: 'LaTeX',
  810. },
  811. {
  812. ruleId: 'hint_checking_defaults_for',
  813. regexToMatch: /^LaTeX (Font )?(Warning|Info): Checking defaults for (.+)/,
  814. package: 'LaTeX',
  815. },
  816. {
  817. ruleId: 'hint_citation_on_page_undefined',
  818. regexToMatch:
  819. /^LaTeX (Font )?(Warning|Info): Citation `(.+?)' on page (.+?) undefined/,
  820. package: 'LaTeX',
  821. },
  822. {
  823. ruleId: 'hint_command_invalid_in_math_mode',
  824. regexToMatch:
  825. /^LaTeX (Font )?(Warning|Info): Command (.+?) invalid in math mode/,
  826. package: 'LaTeX',
  827. },
  828. {
  829. ruleId: 'hint_document_class',
  830. regexToMatch: /^LaTeX (Font )?(Warning|Info): Document Class\s*: (.+)/,
  831. package: 'LaTeX',
  832. },
  833. {
  834. ruleId: 'hint_empty_thebibliography_environment',
  835. regexToMatch:
  836. /^LaTeX (Font )?(Warning|Info): Empty `thebibliography' environment/,
  837. package: 'LaTeX',
  838. },
  839. {
  840. ruleId: 'hint_encoding_has_changed_to_for',
  841. regexToMatch:
  842. /^LaTeX (Font )?(Warning|Info): Encoding (.+?) has changed to (.+?) for/,
  843. package: 'LaTeX',
  844. },
  845. {
  846. ruleId: 'hint_end_occurred_inside_a_group_at_level',
  847. regexToMatch: /^\(\\end occurred inside a group at level (.+)\)/,
  848. package: 'TeX',
  849. },
  850. {
  851. ruleId: 'hint_when_condition_on_line_was_incomplete',
  852. regexToMatch: /^\(\\end occurred when (.+?) on line (.+) was incomplete\)/,
  853. package: 'TeX',
  854. },
  855. {
  856. ruleId: 'hint_external_font_loaded_for_size',
  857. regexToMatch:
  858. /^LaTeX (Font )?(Warning|Info): External font (.+?) loaded for size (.+)/,
  859. package: 'LaTeX',
  860. },
  861. {
  862. ruleId: 'hint_faking_for_font_family_in_ts1_encoding',
  863. regexToMatch:
  864. /^Package TeXtcomp (Warning|Info): Faking (.+?) for font family (.+?) in TS1 encoding/,
  865. package: 'TeXtcomp',
  866. },
  867. {
  868. ruleId:
  869. 'hint_file_already_exists_on_the_system_not_generating_it_from_this_source',
  870. regexToMatch:
  871. /^LaTeX (Font )?(Warning|Info): File `(.+?)' already exists on the system\.\nNot generating it from this source\./,
  872. package: 'LaTeX',
  873. },
  874. {
  875. ruleId: 'hint_file',
  876. regexToMatch: /^LaTeX (Font )?(Warning|Info): File\s*: (.+)/,
  877. package: 'LaTeX',
  878. },
  879. {
  880. ruleId: 'hint_file_font_definition',
  881. regexToMatch: /^LaTeX (Font )?(Warning|Info): File\s*: (.+?)\.fd (.+)/,
  882. package: 'LaTeX',
  883. },
  884. {
  885. ruleId: 'hint_float_too_large_for_page_by',
  886. regexToMatch:
  887. /^LaTeX (Font )?(Warning|Info): Float too large for page by (.+)/,
  888. package: 'LaTeX',
  889. },
  890. {
  891. ruleId: 'hint_font_shape_in_size_not_available_external_font_used',
  892. regexToMatch:
  893. /^LaTeX (Font )?(Warning|Info): Font shape (.+?) in size (.+?) not available\nexternal font (.+?) used/,
  894. package: 'LaTeX',
  895. },
  896. {
  897. ruleId: 'hint_font_shape_in_size_not_available_size_substituted',
  898. regexToMatch:
  899. /^LaTeX (Font )?(Warning|Info): Font shape (.+?) in size (.+?) not available\nsize (.+?) substituted/,
  900. package: 'LaTeX',
  901. },
  902. {
  903. ruleId: 'hint_font_shape_in_size_not_available_shape_forme_tried',
  904. regexToMatch:
  905. /^LaTeX (Font )?(Warning|Info): Font shape (.+?) in size (.+?) not available\nshape (.+?) tried/,
  906. package: 'LaTeX',
  907. },
  908. {
  909. ruleId: 'hint_font_shape_forme_undefined_using_autre_forme_instead',
  910. regexToMatch:
  911. /^LaTeX (Font )?(Warning|Info): Font shape (.+?) undefined\. Using `(.+?)' instead/,
  912. package: 'LaTeX',
  913. },
  914. {
  915. ruleId: 'hint_font_shape_forme_will_be_scaled_to_size_taille_',
  916. regexToMatch:
  917. /^LaTeX (Font )?(Warning|Info): Font shape (.+?) will be scaled to size (.+)/,
  918. package: 'LaTeX',
  919. },
  920. {
  921. ruleId: 'hint_foreign_command',
  922. regexToMatch: /^Package amsmath (Warning|Info): Foreign command (.+?);/,
  923. package: 'amsmath',
  924. },
  925. {
  926. ruleId: 'hint_form_feed_has_been_converted_to_blank_line',
  927. regexToMatch:
  928. /^LaTeX (Font )?(Warning|Info): Form feed has been converted to Blank Line/,
  929. package: 'LaTeX',
  930. },
  931. {
  932. ruleId: 'hint_float_specifier_changed',
  933. regexToMatch:
  934. /^LaTeX (Font )?(Warning|Info): `(.+?)' float specifier changed to `(.+?)'/,
  935. package: 'LaTeX',
  936. },
  937. {
  938. ruleId: 'hint_ignoring_text_after_end',
  939. regexToMatch:
  940. /^LaTeX (Font )?(Warning|Info): Ignoring text `(.+?)' after \\end{(.+?)}/,
  941. package: 'LaTeX',
  942. },
  943. {
  944. ruleId: 'hint_label_multiply_defined',
  945. regexToMatch:
  946. /^LaTeX (Font )?(Warning|Info): Label `(.+?)' multiply defined/,
  947. package: 'LaTeX',
  948. },
  949. {
  950. ruleId: 'hint_labels_may_have_changed_rerun_to_get_cross_references_right',
  951. regexToMatch:
  952. /^LaTeX (Font )?(Warning|Info): Label\(s\) may have changed\. Rerun to get cross-references right\./,
  953. package: 'LaTeX',
  954. },
  955. {
  956. ruleId: 'hint_loose_hbox_badness',
  957. regexToMatch: /^Loose \\hbox \(badness (.+?)\) (.+)/,
  958. package: 'TeX',
  959. },
  960. {
  961. ruleId: 'hint_loose_vbox_badness',
  962. regexToMatch: /^Loose \\vbox \(badness (.+?)\) (.+)/,
  963. package: 'TeX',
  964. },
  965. {
  966. ruleId: 'hint_making_an_active_character',
  967. regexToMatch:
  968. /^Package babel (Warning|Info): Making (.+?) an active character/,
  969. package: 'babel',
  970. },
  971. {
  972. ruleId: 'hint_marginpar_on_page_moved',
  973. regexToMatch:
  974. /^LaTeX (Font )?(Warning|Info): Marginpar on page (.+?) moved/,
  975. package: 'LaTeX',
  976. },
  977. {
  978. ruleId: 'hint_missing_character_there_is_no_in_font',
  979. regexToMatch: /^Missing character\s*: There is no (.+?) in font (.+?)!/,
  980. package: 'TeX',
  981. },
  982. {
  983. ruleId: 'hint_no_author_given',
  984. regexToMatch: /^LaTeX (Font )?(Warning|Info): No \\author given/,
  985. package: 'LaTeX',
  986. },
  987. {
  988. ruleId: 'hint_no_auxiliary_output_files',
  989. regexToMatch: /^LaTeX (Font )?(Warning|Info): No auxiliary output files/,
  990. package: 'LaTeX',
  991. },
  992. {
  993. ruleId: 'hint_no_characters_defined_by_input_encoding_change_to',
  994. regexToMatch:
  995. /^LaTeX (Font )?(Warning|Info): No characters defined by input encoding change to (.+)/,
  996. package: 'LaTeX',
  997. },
  998. {
  999. ruleId: 'hint_no_file',
  1000. regexToMatch: /^LaTeX (Font )?(Warning|Info): No file (.+)/,
  1001. package: 'LaTeX',
  1002. },
  1003. {
  1004. ruleId: 'hint_no_hyphenation_patterns_were_loaded_for_the_language',
  1005. regexToMatch:
  1006. /^Package babel (Warning|Info): No hyphenation patterns were loaded for the language `(.+?)'/,
  1007. package: 'babel',
  1008. },
  1009. {
  1010. ruleId: 'hint_no_input_encoding_specified_for_language',
  1011. regexToMatch:
  1012. /^Package babel (Warning|Info): No input encoding specified for (.+?) language/,
  1013. package: 'babel',
  1014. },
  1015. {
  1016. ruleId: 'hint_no_positions_in_optional_float_specifier',
  1017. regexToMatch:
  1018. /^LaTeX (Font )?(Warning|Info): No positions in optional float specifier\./,
  1019. package: 'LaTeX',
  1020. },
  1021. {
  1022. ruleId: 'hint_oldstyle_digits_unavailable_for_family',
  1023. regexToMatch:
  1024. /^LaTeX (Font )?(Warning|Info): Oldstyle digits unavailable for family (.+)/,
  1025. package: 'Textcomp',
  1026. },
  1027. {
  1028. ruleId: 'hint_optional_argument_of_twocolumn_too_tall_on_page',
  1029. regexToMatch:
  1030. /^LaTeX (Font )?(Warning|Info): Optional argument of \\twocolumn too tall on page (.+)/,
  1031. package: 'LaTeX',
  1032. },
  1033. {
  1034. ruleId: 'hint_oval_circle_or_line_size_unavailable',
  1035. regexToMatch:
  1036. /^LaTeX (Font )?(Warning|Info): \\oval, \\circle, or \\line size unavailable/,
  1037. package: 'LaTeX',
  1038. },
  1039. {
  1040. ruleId: 'hint_overfull_hbox_too_wide_quelque_part_',
  1041. regexToMatch: /^Overfull \\hbox \((.+?)pt too wide\) (.+)/,
  1042. package: 'TeX',
  1043. },
  1044. {
  1045. ruleId: 'hint_overfull_vbox_pt_too_wide',
  1046. regexToMatch: /^Overfull \\vbox \((.+?)pt too wide\)\) (.+)/,
  1047. package: 'TeX',
  1048. },
  1049. {
  1050. ruleId: 'hint_overwriting_encoding_scheme_quelque_chose_defaults',
  1051. regexToMatch:
  1052. /^LaTeX (Font )?(Warning|Info): Overwriting encoding scheme (.+?) defaults/,
  1053. package: 'LaTeX',
  1054. },
  1055. {
  1056. ruleId: 'hint_overwriting_in_version',
  1057. regexToMatch:
  1058. /^LaTeX (Font )?(Warning|Info): Overwriting (.+?) in version `(.+)'/,
  1059. package: 'LaTeX',
  1060. },
  1061. {
  1062. ruleId: 'hint_package',
  1063. regexToMatch: /^LaTeX (Font )?(Warning|Info): Package: (.+)/,
  1064. package: 'LaTeX',
  1065. },
  1066. {
  1067. ruleId: 'hint_redeclaring_font_encoding',
  1068. regexToMatch:
  1069. /^LaTeX (Font )?(Warning|Info): Redeclaring font encoding (.+)/,
  1070. package: 'LaTeX',
  1071. },
  1072. {
  1073. ruleId: 'hint_redeclaring_math_accent',
  1074. regexToMatch: /^LaTeX (Font )?(Warning|Info): Redeclaring math accent (.+)/,
  1075. package: 'LaTeX',
  1076. },
  1077. {
  1078. ruleId: 'hint_redeclaring_math_alphabet',
  1079. regexToMatch:
  1080. /^LaTeX (Font )?(Warning|Info): Redeclaring math alphabet (.+)/,
  1081. package: 'LaTeX',
  1082. },
  1083. {
  1084. ruleId: 'hint_redeclaring_math_symbol',
  1085. regexToMatch: /^LaTeX (Font )?(Warning|Info): Redeclaring math symbol (.+)/,
  1086. package: 'LaTeX',
  1087. },
  1088. {
  1089. ruleId: 'hint_redeclaring_math_version',
  1090. regexToMatch:
  1091. /^LaTeX (Font )?(Warning|Info): Redeclaring math version (.+)/,
  1092. package: 'LaTeX',
  1093. },
  1094. {
  1095. ruleId: 'hint_redeclaring_symbol_font',
  1096. regexToMatch: /^LaTeX (Font )?(Warning|Info): Redeclaring symbol font (.+)/,
  1097. package: 'LaTeX',
  1098. },
  1099. {
  1100. ruleId: 'hint_reference_on_page_undefined',
  1101. regexToMatch:
  1102. /^LaTeX (Font )?(Warning|Info): Reference `(.+?)' on page (.+?) undefined/,
  1103. package: 'LaTeX',
  1104. },
  1105. {
  1106. ruleId: 'hint_size_substitutions_with_differences_up_to_have_occurred',
  1107. regexToMatch:
  1108. /^LaTeX (Font )?(Warning|Info): Size substitutions with differences up to (.+?) have occurred/,
  1109. package: 'LaTeX',
  1110. },
  1111. {
  1112. ruleId: 'hint_some_font_shapes_were_not_available_defaults_substituted',
  1113. regexToMatch:
  1114. /^LaTeX (Font )?(Warning|Info): Some font shapes were not available, defaults substituted/,
  1115. package: 'LaTeX',
  1116. },
  1117. {
  1118. ruleId: 'hint_tab_has_been_converted_to_blank_space',
  1119. regexToMatch:
  1120. /^LaTeX (Font )?(Warning|Info): Tab has been converted to Blank Space/,
  1121. package: 'LaTeX',
  1122. },
  1123. {
  1124. ruleId: 'hint_text_page_contains_only_floats',
  1125. regexToMatch:
  1126. /^LaTeX (Font )?(Warning|Info): text page (.+?) contains only floats/,
  1127. package: 'LaTeX',
  1128. },
  1129. {
  1130. ruleId: 'hint_there_were_multiply_defined_labels',
  1131. regexToMatch:
  1132. /^LaTeX (Font )?(Warning|Info): There were multiply-defined labels/,
  1133. package: 'LaTeX',
  1134. },
  1135. {
  1136. ruleId: 'hint_there_were_undefined_references',
  1137. regexToMatch:
  1138. /^LaTeX (Font )?(Warning|Info): There were undefined references/,
  1139. package: 'LaTeX',
  1140. },
  1141. {
  1142. ruleId: 'hint_tight_hbox_badness',
  1143. regexToMatch: /^Tight \\hbox \(badness (.+?)\) (.+)/,
  1144. package: 'TeX',
  1145. },
  1146. {
  1147. ruleId: 'hint_tight_vbox_badness',
  1148. regexToMatch: /^Tight \\vbox \(badness (.+?)\) (.+)/,
  1149. package: 'TeX',
  1150. },
  1151. {
  1152. ruleId: 'hint_try_loading_font_information_for',
  1153. regexToMatch:
  1154. /^LaTeX (Font )?(Warning|Info): Try loading font information for (.+?)\+(.+)/,
  1155. package: 'LaTeX',
  1156. },
  1157. {
  1158. ruleId: 'hint_unable_to_redefine_math_accent',
  1159. regexToMatch:
  1160. /^Package amsmath (Warning|Info): Unable to redefine math accent (.+)/,
  1161. package: 'amsmath',
  1162. },
  1163. {
  1164. ruleId: 'hint_hbox_badness_detected_at_line',
  1165. regexToMatch:
  1166. /^Underfull \\hbox \(badness (.+?)\) (.+?) detected at line (.+)/,
  1167. package: 'TeX',
  1168. },
  1169. {
  1170. ruleId: 'hint_hbox_badness_has_occurred_while_output_is_active',
  1171. regexToMatch:
  1172. /^Underfull \\hbox \(badness (.+?)\) (.+?) has occurred while \\output is active/,
  1173. package: 'TeX',
  1174. },
  1175. {
  1176. ruleId: 'hint_hbox_badness_in_alignment_at_lines',
  1177. regexToMatch:
  1178. /^Underfull \\hbox \(badness (.+?)\) (.+?) in alignment at lines (.+)/,
  1179. package: 'TeX',
  1180. },
  1181. {
  1182. ruleId: 'hint_hbox_badness_in_paragraph_at_lines',
  1183. regexToMatch:
  1184. /^Underfull \\hbox \(badness (.+?)\) (.+?) in paragraph at lines (.+)/,
  1185. package: 'TeX',
  1186. },
  1187. {
  1188. ruleId: 'hint_vbox_badness_detected_at_line',
  1189. regexToMatch:
  1190. /^Underfull \\vbox \(badness (.+?)\) (.+?) detected at line (.+)/,
  1191. package: 'TeX',
  1192. },
  1193. {
  1194. ruleId: 'hint_vbox_badness_has_occurred_while_output_is_active',
  1195. regexToMatch:
  1196. /^Underfull \\vbox \(badness (.+?)\) (.+?) has occurred while \\output is active/,
  1197. package: 'TeX',
  1198. },
  1199. {
  1200. ruleId: 'hint_vbox_badness_in_alignment_at_lines',
  1201. regexToMatch:
  1202. /^Underfull \\vbox \(badness (.+?)\) (.+?) in alignment at lines (.+)/,
  1203. package: 'TeX',
  1204. },
  1205. {
  1206. ruleId: 'hint_unused_global_options',
  1207. regexToMatch:
  1208. /^LaTeX (Font )?(Warning|Info): Unused global option\(s\)\s*: \[(.+?)]/,
  1209. package: 'LaTeX',
  1210. },
  1211. {
  1212. ruleId: 'hint_writing_file',
  1213. regexToMatch: /^LaTeX (Font )?(Warning|Info): Writing file `(.+?)'/,
  1214. package: 'LaTeX',
  1215. },
  1216. {
  1217. ruleId: 'hint_writing_text_before_end_as_last_line_of',
  1218. regexToMatch:
  1219. /^LaTeX (Font )?(Warning|Info): Writing text `(.+?)' before \\end{(.+?)} as last line of (.+)/,
  1220. package: 'LaTeX',
  1221. },
  1222. {
  1223. ruleId: 'hint_you_have_more_than_once_selected_the_attribute_for_language',
  1224. regexToMatch:
  1225. /^Package babel (Warning|Info): You have more than once selected the attribute `(.+?)' for language (.+)/,
  1226. package: 'babel',
  1227. },
  1228. {
  1229. ruleId:
  1230. 'hint_you_have_requested_package_or_class_but_the_package_or_class_provides',
  1231. regexToMatch:
  1232. /^LaTeX (Font )?(Warning|Info): You have requested (package|class) `(.+?)', but the (package|class) provides `(.+?)'/,
  1233. package: 'LaTeX',
  1234. },
  1235. {
  1236. ruleId:
  1237. 'hint_you_have_requested_release_date_of_latex_but_only_release_ancienne_date_is_available',
  1238. regexToMatch:
  1239. /^LaTeX (Font )?(Warning|Info): You have requested release `(.+?)' of LaTeX, but only release `(.+?)' is available/,
  1240. package: 'LaTeX',
  1241. },
  1242. {
  1243. ruleId:
  1244. 'hint_you_have_requested_on_line_version_of_but_only_version_is_available',
  1245. regexToMatch:
  1246. /^LaTeX (Font )?(Warning|Info): You have requested, on line (.+?), version `(.+?)' of (.+?), but only version `(.+?)' is available/,
  1247. package: 'LaTeX',
  1248. },
  1249. ]
  1250. export default [...rules, ...errors, ...warnings]