HumanReadableLogsRules.tsx 35 KB

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