Skip to content

fix(templates): move @afterindentfalse patch post-\textual + fix duplicate comments#61

Merged
Hylbert merged 3 commits into
developfrom
fix/first-paragraph-indent
May 17, 2026
Merged

fix(templates): move @afterindentfalse patch post-\textual + fix duplicate comments#61
Hylbert merged 3 commits into
developfrom
fix/first-paragraph-indent

Conversation

@Hylbert

@Hylbert Hylbert commented May 17, 2026

Copy link
Copy Markdown
Owner

Problem

The \makeatletter\let\@afterindentfalse\@afterindenttrue\makeatother patch was placed in the preamble, but abntex2 resets internal state via \AtBeginDocument hooks after the preamble is processed, silently undoing the fix. As a result, the first paragraph after every \chapter heading remained unindented.

Fix

Moved the \makeatletter...\makeatother block from the preamble to immediately after \textual (before \setcounter{secnumdepth}{3} and \setlength{\parindent}{1.3cm}), so it executes after abntex2 has finished its own initialization hooks.

Also removed duplicate comment blocks that were accidentally introduced in the dissertacao-abnt preamble.

Changes

  • tcc-abnt/template.tex — moved patch to post-\textual
  • dissertacao-abnt/template.tex — moved patch to post-\textual; removed duplicate preamble comments
  • relatorio-abnt/template.tex — moved patch to post-\textual
  • tese-abnt/template.tex — moved patch to post-\textual
  • artigo-abnt/template.tex — added patch (was missing entirely)

Hylbert and others added 3 commits May 17, 2026 12:15
…abntex2 templates

In abntex2-based templates (tcc-abnt, dissertacao-abnt, relatorio-abnt,
tese-abnt) the \textual macro resets internal spacing state, causing the
very first paragraph of the body to render without the expected 1.3 cm
indentation while all subsequent paragraphs are correctly indented.

Adding \setlength{\parindent}{1.3cm} immediately after \textual forces
the indent value back before pandoc-generated content is rendered,
ensuring consistent indentation across all paragraphs.
…ore originals

Restores all 4 abntex2 templates to their develop-branch originals
(preserving all comments, structure and formatting), then applies
only the two intended changes:

1. After \floatplacement{figure}{H}: add
     \makeatletter
     \let\@afterindentfalse\@afterindenttrue
     \makeatother
   so abntex2's \chapter can never suppress first-paragraph indent.

2. After \setcounter{secnumdepth}{3}: add
     \setlength{\parindent}{1.3cm}
   to guarantee the 1.3 cm indent value is active in the body.
@Hylbert
Hylbert merged commit 1a4ab05 into develop May 17, 2026
2 checks passed
@Hylbert
Hylbert deleted the fix/first-paragraph-indent branch May 17, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant