summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/noindentafter/noindentafter.sty
blob: 904fedb1278575f3e2257a1c97da19d682d302d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
%%
%% This is file `noindentafter.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% noindentafter.dtx  (with options: `package,identify')
%% noindentafter.dtx  (with options: `package,body')
%% 
%% noindentafter -- purposefully prevention of paragraph indentation
%% 
%% ----------------------------------------------------------------------------
%%
%% Copyright (C) Michiel Helvensteijn, 2014-2021
%% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2021-2021
%%
%% ----------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, version 1.3c of the license. The latest
%% version of this license is in
%%     http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2008-05-04 or later.
%%
%% This work has the LPPL maintenance status "author-maintained".
%%
%% The current maintainer and author of this work is Falk Hanisch.
%%
%% This work consists of the main source file README.md, LICENSE.md,
%% noindentafter.dtx and the derived documentation noindentafter.pdf
%%
%% ----------------------------------------------------------------------------
%%
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesPackage{noindentafter}
  [2021-05-14 v1.00 purposefully prevention of paragraph indentation]
\RequirePackage{etoolbox}
\RequirePackage{xpatch}
\newcommand*\nia@scan{%
  \kernel@ifnextchar\par{%
    \par%
    \def\par{%
      \everypar{\setbox\z@\lastbox\everypar{}}%
      \@restorepar%
    }%
  }{}%
}
\newcommand*\nia@afterendenv{}
\def\nia@afterendenv#1\ignorespaces\fi{#1\ignorespaces\fi\nia@scan}
\newrobustcmd*\NoIndentAfterThis{\nia@scan\par}
\newcommand*\NoIndentAfterCmd[1]{%
  \xapptocmd#1{\NoIndentAfterThis}{}{%
    \PackageWarning{noindentafter}{%
      Patching `\string#1' failed!\MessageBreak%
      `\string\NoIndentAfterCmd{\string#1}' won't work%
    }%
  }%
}
\newcommand*\NoIndentAfterEnv[1]{\AfterEndEnvironment{#1}{\nia@afterendenv}}
\endinput
%%
%% End of file `noindentafter.sty'.