# [dev-context] Paragraph indentation after indentnext=no

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Thu Jan 2 21:49:41 CET 2020

Hi Hans,

below is a fix for the following question on the mailing list:
https://mailman.ntg.nl/pipermail/ntg-context/2019/096591.html

When you use the "indentnext=no" setting for a environment the following
paragraph will never be indented unless you use the \doindentation
command. When this happens in an enumeration which already has a
indentation option this method isn't the best choice.

The reson for this effect is the meaning of the \checkindentation
command which changes with the indentnext setting (or the \noindentation
and \doindentation commands).

One way to fix this is to add "\let\checkindentation\relax" to the rest
keywords for \setupalign but I think it's better to ensure
\checkindentation gets reset when \setupindenting is called (and the
first paragraph should be reset).

\unprotect

\def\spac_indentation_setup_indeed
{% not here: \settrue\c_spac_indentation_indent_first
% not here: \parindent\d_spac_indentation_par
% not here: \c_spac_indentation_toggle_state\zerocount
\processcommacommand[\m_spac_indentation_options]\spac_indentation_apply_step_one
% catch small, medium, etc
\processcommacommand[\m_spac_indentation_options]\spac_indentation_apply_step_two
% catch rest
\ifzeropt\parindent\else
\doifemptytoks\everypar\spac_indentation_set_everypar
\fi
-  \ifconditional\c_spac_indentation_indent_first\else
+  \ifconditional\c_spac_indentation_indent_first
+    \spac_indentation_variant_yes % \let\checkindentation\relax
\else
\spac_indentation_variant_no
\fi
\spac_indentation_check_toggle}

\protect

\setupindenting[yes,big]

\starttext

\input knuth

\noindentation

\blank

% uncomment one setting below to indent
% the first paragraph after \setupindenting
%
%\let\checkindentation\relax
%\doindentation

\setupindenting[yes,big]

\input knuth

\stoptext