Files
pdf-inspector/tests/snapshots/td9264.md
T
Abimael MartellandClaude Fable 5 39c31a8404 fix(underline): rescue snug-owned underlines from the table-ruling filters (#143)
* fix(underline): rescue snug-owned underlines from the table-ruling filters

Documents that underline many full-width lines (dense CJK business docs,
legal redlines, 10-K section links) produce span-similar rules at 3+
y-levels — exactly what the repeated-ruling filter treats as table
rulings, so every semantic underline on such pages was discarded. Three
changes fix detection without re-marking real tables:

1. Snug-owner rescue: a rule survives the repeated-ruling filter when
   the union of touching text runs on its baseline row owns it (rule
   contained within the union's span +0.75em, runs cover >=60% of the
   rule, no column-sized gaps between runs). Table row separators fail
   ownership: they overshoot their cells' text or match gapped items.
   Same-row segmented rules (column-header separators) always stay
   discarded, and a rule enclosed by a drawn cell-sized box (rect-grid
   tables) is never rescued.

2. Vertical window widened 0.35em -> 0.72em below the baseline: CJK
   layouts draw underlines under the full em box, measured at ~0.67em.

3. Prose-table guard in the positions-path suppressor: a detected
   'table' whose cells hold flowing prose (>=30% of cells over 100
   chars) is a detection artifact of boxed callouts + stacked rules,
   not a real table — suppressing there erased every underline on the
   page.

Also fixes cluster_x_positions fabricating phantom table columns from
style-split continuation runs (touching items, gap <2pt, now feed one
column start) — the fix that keeps rect-grid table shapes stable while
underlined links inside cells are correctly marked.

Snapshot updates are underline gains on regulation/form fixtures and one
empty spacer-column change in a subscripted header.

Corpus (508-doc public bench sweep): text output byte-identical on all
docs; underlined items +224/-0; strikeout now fires on redline docs.
Item-level GT coverage: is_underline 86->151/405, is_strikeout 0->10/44.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L3U6BKYCS73DVA83odAfYB

* fix(underline): fraction-bar guard + subscript merge across underline marks

Found by a 202-doc real-world corpus diff (pdf-evals) that exercises the
full markdown pipeline, which the bench-corpus item sweep does not:

1. Math fraction bars and lattice grid lines are underline geometry —
   short horizontal rules under digits. Guard: a narrow rule (<=60pt)
   with bar-sized text hanging just below it (denominator) never marks.
   The below-text width bound matters: tightly-leaded REAL underlines
   have a full-width next line below, which must not trip the guard.

2. merge_subscript_items refused to merge when the parent was underlined
   but the tiny digit was not (the drawn rule easily misses the digit's
   own overlap window) — losing the merge broke subscript tokens inside
   table cells (b+2 no longer became b₂). Strikeout boundaries still
   block the merge in both directions; only parent-underlined/digit-bare
   merges, absorbing with the parent's flags.

Corpus after refinement: underlined items +220/-2 (the 2 are fraction
bars the old code wrongly marked), GT rule-text coverage 149/405
underline + 10/44 strikeout, text output identical on all 508 bench
docs and word-count-identical on the 202 pdf-evals docs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L3U6BKYCS73DVA83odAfYB

* fix(underline): address review — grid-evidence veto, strikeout-safe fraction guard, bounded gaps

- Cell-box veto now requires GRID EVIDENCE (a vertically abutting
  neighbor rect with x-overlap) instead of a height window: multiline
  table cells taller than the old 90pt ceiling veto again, and isolated
  filled callout panels (which legitimately contain underlines) no
  longer veto at all.
- The fraction guard gates only UNDERLINE marking; rule_strikes_item
  still evaluates, so short strikeouts near lower text survive.
- Fraction hug distance tightened to 0.3em so a short last-line at
  normal leading is not mistaken for a denominator.
- Continuation-run suppression bounds the negative gap (-4pt): text
  overhanging from an adjacent cell keeps its own column start.

Corpus after review fixes: underlined items +222/-2, GT coverage
150/405 underline + 10/44 strikeout, bench text output identical on
all 508 docs, pdf-evals word loss bounded at equation-reflow noise.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L3U6BKYCS73DVA83odAfYB

* chore: appease clippy (redundant closure)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L3U6BKYCS73DVA83odAfYB

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 08:47:45 -07:00

15 KiB
Raw Blame History

(e) [Reserved]. For further guidance, see §1.1563-3T(e)(1). Par. 50. Section 1.1563-3T is added to read as follows: §1.1563-3T Rules for determining stock ownership (temporary). (a) through (d)(2)(iii) [Reserved]. For further guidance, see §1.1563-3(a)
through (d)(2)(iii).
(iv) Statement . If the application of paragraph (d)(2)(ii) or (iii) of §1.1563-3 does not result in a corporation being treated as a component member of only one controlled group of corporations on a December 31, then such corporation will be treated as a component member of only one such group on such date. Such corporation may elect the group in which it is to be included by including on or with its income tax return a statement entitled, “STATEMENT TO ELECT CONTROLLED GROUP PURSUANT TO §1.1563-3T(d)(2)(iv).” The statement must include-- (A) A description of each of the controlled groups in which the corporation could be included. The description must include the name and employer identification number of each component member of each such group and the stock ownership of the component members of each such group; and (B) The following representation: [INSERT NAME AND EMPLOYER IDENTIFICATION NUMBER OF CORPORATION] ELECTS TO BE TREATED AS A COMPONENT MEMBER OF THE [INSERT DESIGNATION OF GROUP].
(v) Election -- (A) Election filed. An election filed under paragraph (d)(2)(iv) of this section is irrevocable and effective until paragraph (d)(2)(ii) or (iii) of §1.1563-3 applies or until a change in the stock ownership of the corporation results in
termination of membership in the controlled group in which such corporation has
been included.
(B) Election not filed. In the event no election is filed in accordance with the
provisions of paragraph (d)(2)(iv) of this section, then the Internal Revenue Service
will determine the group in which such corporation is to be included. Such
determination will be binding for all subsequent years unless the corporation files a
valid election with respect to any such subsequent year or until a change in the
stock ownership of the corporation results in termination of membership in the
controlled group in which such corporation has been included.
(d)(3) [Reserved]. For further guidance, see §1.1563-3(d)(3).
(e) Effective date-- (1) Applicability date. This section applies to any original

Federal income tax return (including any amended return filed on or before the due date (including extensions) of such original return) timely filed on or after May 30,

(2) Expiration date. The applicability of this section will expire on May 26, 2009. Par. 51. Section 1.6012-2 is amended by revising paragraph (c) and adding paragraph (k) to read as follows: §1.6012-2 Corporations required to make returns of income.


(c) [Reserved]. For further guidance, see §1.6012-2T(c).


(k) [Reserved]. For further guidance, see §1.6012-2T(k)(1).

Par. 52. Section 1.6012-2T is added to read as follows: §1.6012-2T Corporations required to make returns of income (temporary).

(a) through (b) [Reserved]. For further guidance, see §1.6012-2(a) through (b). (c) Insurance companies-- (1) Domestic life insurance companies-- (i) In general. A life insurance company subject to tax under section 801 shall make a return on Form 1120L. Except as provided in paragraph (c)(4) of this section, such company shall file with its return--

(A) A copy of its annual statement which shows the reserves used by the company in computing the taxable income reported on its return; and

(B) A copy of Schedule A (real estate) and of Schedule D (bonds and stocks), or any successor thereto, of such annual statement. (ii) Mutual savings banks. Mutual savings banks conducting life insurance business and meeting the requirements of section 594 are subject to partial tax computed on Form 1120 and partial tax computed on Form 1120L. The Form 1120L is attached as a schedule to Form 1120, together with the annual statement and schedules required to be filed with Form 1120L.

(2) Domestic nonlife insurance companies. Every domestic insurance company other than a life insurance company shall make a return on Form 1120PC. This includes organizations described in section 501(m)(1) that provide commercial- type insurance and organizations described in section 833. Except as provided in paragraph (c)(4) of this section, such company shall file with its return a copy of its

annual statement (or a pro forma annual statement), including the underwriting and investment exhibit for the year covered by such return.

(3) Foreign insurance companies. The provisions of paragraphs (c)(1) and (c)(2) of this section concerning the returns and statements of insurance companies subject to tax under section 801 or section 831 also apply to foreign insurance companies subject to tax under those sections, except that the copy of the annual statement required to be submitted with the return shall, in the case of a foreign insurance company that is not required to file an annual statement, be a copy of the pro forma annual statement relating to the United States business of such company. (4) Exception for insurance companies filing their Federal income tax returns electronically. If an insurance company described in paragraph (c)(1), (c)(2), or

(c)(3) of this section files its Federal income tax return electronically, it should not include on or with such return its annual statement (or pro forma annual statement), or any portion thereof. Such statement must be available at all times for inspection by authorized Internal Revenue Service officers or employees and retained for so long as such statements may be material in the administration of any internal revenue law. See §1.6001-1(e). (5) Definition. For purposes of this section, the term annual statement means the annual statement, the form of which is approved by the National Association of Insurance Commissioners (NAIC), which is filed by an insurance company for the year with the insurance departments of States, Territories, and the District of

Columbia. The term annual statement also includes a pro forma annual statement if the insurance company is not required to file the NAIC annual statement.

(d) through (j) [Reserved]. For further guidance, see §1.6012-2(d) through (j). (k) Effective date-- (1) Applicability date. This section applies to any original Federal income tax return (including any amended return filed on or before the due date (including extensions) of such original return) timely filed on or after May 30,

(2) Expiration date. The applicability of this section will expire on May 26, 2009.

Par. 53. For each entry in the “Location” column of the following table,
remove the language in the “Remove” column and add the language in the “Add”
column in its place:
Location Remove Add
The last sentence of the The following rules shall The rules described in
introductory text to be applicable in paragraph (a) of §1.302-
§1.302-4 determining whether the specific requirements of section 302(c)(2) are met: 4T and in paragraphs (b) through (g) of this section apply in determining whether the specific

requirements of section 302(c)(2) are met.

§1.338(h)(10)-1(f) §1.331-1(d), and §1.332- §1.331-1T(d) and §1.332-
6 6T
The last sentence of paragraph (a)(2)(ii) of this paragraph (a) of §1.382-
§1.382-2T(h)(4)(vi)(B) section 11T
The first sentence of §1.382-6(b)(2)(i) §1.382-2T(a)(2)(ii) §1.382-11T(a)
The second sentence of paragraph (c) of this paragraphs (c)(1), (c)(3),
§1.382-8(a) section (c)(4) and (c)(5) of this

section and paragraph

(c)(2) of §1.382-8T

The third sentence of paragraph (c) of this paragraphs (c)(1), (c)(3),
§1.382-8(a) section (c)(4) and (c)(5) of this section and paragraph (c)(2) of §1.382-8T
§1.382-8(c)(3) paragraph (c)(2) of this section paragraph (c)(2) of §1.382-8T
The first sentence of paragraphs (c)(1), (2), paragraphs (c)(1) and
§1.382-8(c)(4) and (3) of this section (c)(3) of this section and paragraph (c)(2) of §1.382-8T
§1.382-8(c)(5) this paragraph (c) paragraphs (c)(1), (c)(3),

(c)(4), and (c)(5) of this section, and paragraph (c)(2) of §1.382-8T

§1.382-8(g), Example
The first sentence of §1.382-8(g), Example §1.382-8(g), Example §1.382-8(g), Example

(2)(c) (2)(e) (3)(b) (3)(c)(1)(B)

The second sentence of
§1.382-8(g), Example The second sentence of §1.382-8(g), Example The first sentence of §1.1502-32(b)(4)(v)(A) The first sentence of §1.1502-32(b)(4)(v)(B)

(4)(c) (5)(c)

The fifth sentence of paragraph (c) of this paragraphs (c)(1), (c)(3),
§1.382-8(f) section (c)(4), and (c)(5) of this section, and paragraph (c)(2) of §1.382-8T
§1.382-8(g), Example paragraph (c) of this paragraphs (c)(1), (c)(3), section, and paragraph (c)(2) of §1.382-8T
The second sentence of paragraph (c) of this paragraphs (c)(1), (c)(3),
§1.382-8(g), Example section paragraph (c)(2) of this section paragraph (c)(2) of this section paragraph (c)(2) of this section paragraphs (c)(1) and (2) of this section paragraph (c)(2) of this section paragraph (c)(2) of this section paragraph (b)(4)(iv) of this section paragraph (b)(4)(iv) of this section (c)(4), and (c)(5) of this (c)(2) of §1.382-8T paragraph (c)(2) of §1.382-8T paragraph (c)(2) of §1.382-8T paragraph (c)(2) of §1.382-8T paragraph (c)(1) of this section and paragraph (c)(2) of §1.382-8T paragraph (c)(2) of §1.382-8T paragraph (c)(2) of §1.382-8T paragraph (b)(4)(iv) of §1.1502-32T paragraph (b)(4)(iv) of §1.1502-32T

(1)(b)(2) section (c)(4), and (c)(5) of this (1)(c) section, and paragraph

§1.1502-35(c)(4)(ii)(B) §1.1502-76(b)(2)(ii)(D) §1.1502-76T(b)(2)(ii)(D)
§1.1502-76(b)(2)(ii)(A)(2) paragraph (b)(2)(ii)(D) of this section paragraph (b)(2)(ii)(D) of §1.1502-76T
§1.1502-92(e)(1) §1.382-2T(a)(2)(ii) §1.382-11T(a)
The first sentence of §1.1502-92(e)(2) §1.382-2T(a)(2)(ii) §1.382-11T(a)
The first sentence of §1.1502-94(d) §1.382-2T(a)(2)(ii) §1.382-11T(a)
The second sentence of §1.1502-94(d) §1.382-2T(a)(2)(ii) §1.382-11T(a)
The last sentence of paragraph (f) of this paragraph (f) of §1.1502-
§1.1502-95(b)(3) section 95T
The last sentence of subdivision (ii) of this paragraph (c)(2)(i) of
§1.1563-1(c)(2)(iv), Example (1) subparagraph §1.1563-1T
The last sentence of the district director with the Internal Revenue
§1.1563-1(c)(2)(iv), Example (1) audit jurisdiction of Ns return Service
The third sentence of subdivision (iii) of this paragraph (c)(2)(ii) of
§1.1563-1(c)(2)(iv), Example (2) subparagraph §1.1563-1T
The third sentence of the district director with the Internal Revenue
§1.1563-1(c)(2)(iv), Example (2) audit jurisdiction of the return of the corporation whose taxable year ends on the earliest date Service
The last sentence of district director Internal Revenue Service

§1.1563-1(c)(2)(iv), Example (2)

The second sentence of subdivisions (ii), (iii), and paragraphs (d)(2)(ii) and
§1.1563-3(d)(2)(i) (iv) of this subparagraph (iii) of this section, and paragraph (d)(2)(iv) of §1.1563-3T
The first sentence of §1.332-6(b), 1.368-3(a), §1.332-6T(a), §1.368-
§1.6043-2(a) or 1.1081-11 3T(a), or §1.1081-11T
The first sentence of §301.6011-5T(a) (twice) §1.6012-2 paragraphs (a), (b) and (d) through (j) of §1.6012- 2, and paragraph (c) of §1.6012-2T

PART 602--OMB CONTROL NUMBERS UNDER THE PAPERWORK REDUCTION ACT Par. 54. The authority citation for part 602 continues to read as follows: Authority: 26 U.S.C. 7805. Par. 55. In §602.101, paragraph (b) is amended to read as follows:

  1. The following entries to the table are removed: §602.101 OMB Control numbers.

(b) * * * CFR part or section where Current OMB identified or described control No.


1.332-6…………………………………………………………………. 1545-2019 1.382-11……………………………………………………………….. 1545-2019 1.351-3…………………………………………………………………. 1545-2019 1.355-5…………………………………………………………………. 1545-2019 1.368-3…………………………………………………………………. 1545-2019 1.1081-11………………………………………………………………. 1545-2019

          • ______________________________________________________________
  1. The following entries are added in numerical order to the table: §602.101 OMB Control numbers.

(b) * * * CFR part or section where Current OMB identified or described control No.


1.302-2T………………………………………………………………… 1545-2019 1.302-4T………………………………………………………………… 1545-2019

1.331-1T………………………………………………………………… 1545 -2019
1.332-6T………………………………………………………………... 1545-2019 1.338-10T………………………………………………………………. 1545-2019
1.351-3T………………………………………………………………… 1545 -2019
1.355-5T………………………………………………………………… 1545 -2019
1.368-3T………………………………………………………………… 1545 -2019 1.381(b)-1T…………………………………………………………….. 1545-2019
1.382-8T………………………………………………………………… 1545 -2019 1.382-11T………………………………………………………………. 1545-2019 1.1081-11T……………………………………………………………… 1545-2019 1.1221-2T……………………………………………………………….. 1545-2019
1.1502-13T……………………………………………………………… 1545-2019 1.1502-31T……………………………………………………………… 1545-2019 1.1502-32T……………………………………………………………… 1545-2019 1.1502-33T……………………………………………………………… 1545-2019 1.1502-35T……………………………………………………………… 1545-2019 1.1502-76T……………………………………………………………… 1545-2019
1.1502-95T……………………………………………………………… 1545 -2019 1.1563-1T……………………………………………………………….. 1545-2019

1.1563-3T……………………………………………………………….. 1545-2019 1.6012-2T……………………………………………………………….. 1545-2019

          • Mark E. Matthews Deputy Commissioner for Services and Enforcement.

Approved: May 19, 2006 Eric Solomon Acting Deputy Assistant Secretary of the Treasury (Tax Policy).