HumanReadableLogsRules.tsx 36 KB

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