fix(templates): move @afterindentfalse patch post-\textual + fix duplicate comments#61
Merged
Merged
Conversation
…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.
…x duplicate comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
\makeatletter\let\@afterindentfalse\@afterindenttrue\makeatotherpatch was placed in the preamble, but abntex2 resets internal state via\AtBeginDocumenthooks after the preamble is processed, silently undoing the fix. As a result, the first paragraph after every\chapterheading remained unindented.Fix
Moved the
\makeatletter...\makeatotherblock 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-abntpreamble.Changes
tcc-abnt/template.tex— moved patch to post-\textualdissertacao-abnt/template.tex— moved patch to post-\textual; removed duplicate preamble commentsrelatorio-abnt/template.tex— moved patch to post-\textualtese-abnt/template.tex— moved patch to post-\textualartigo-abnt/template.tex— added patch (was missing entirely)