HumanReadableLogsRules.tsx 35 KB

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