[NTG-context] unwanted head behavior

Zhichu Chen chenzhichu at sinap.ac.cn
Sat Apr 9 15:02:32 CEST 2016


Dear Hans,


On 04/07/2016 06:31 PM, Hans Hagen wrote:
> \def\currentsectioncountervalue 
> {\clf_depthnumber\numexpr\thenamedheadlevel\currenthead\relax}
> %def\previoussectioncountervalue{\clf_depthnumber\numexpr\thenamedheadlevel\currenthead+\minusone\relax} 
>
> \def\previoussectioncountervalue{\clf_depthnumber\numexpr\thenamedheadlevel\previoushead\relax} 
>
>
> \let\previoushead\empty
>
> \def\strc_sectioning_handle_page_nop
>   {\edef\p_continue{\headparameter\c!continue}%
>    \ifx\p_continue\v!yes
>      \ifx\currenthead\previoushead % not really needed
>         \strc_sectioning_check_layout
>      \else\ifnum\previoussectioncountervalue=\zerocount
>         \strc_sectioning_check_layout
>      \else\ifnum\currentsectioncountervalue>\zerocount
>         \strc_sectioning_check_layout
>      \fi\fi\fi
>    \else
>      \strc_sectioning_check_layout
>    \fi
>    \globallet\previoushead\currenthead}
>
> \def\strc_sectioning_handle_page_yes
>   {\ifconditional\c_strc_sectioning_ignore_page
>      \setfalse\c_strc_sectioning_ignore_page
>    \else
>      % beware, these numbers are not yet know here
>      \strc_sectioning_handle_page_nop
>      \edef\p_aligntitle{\headparameter\c!aligntitle}%
>      \ifx\p_aligntitle\v!float
>          \ifconditional\c_strc_sectioning_auto_break
>            \vspacing[\v!samepage-\currentheadlevel]%
>          \fi
>          \headparameter\c!before\relax
>          \indent
>      \else
>          \page_otr_command_flush_side_floats
>          \ifconditional\c_strc_sectioning_auto_break
>            \vspacing[\v!samepage-\currentheadlevel]%
>          \fi
>          \headparameter\c!before\relax
>      \fi
>      \global\c_strc_sectioning_preceding_level\currentheadlevel
>    \fi
>    \globallet\previoushead\currenthead}
>
> but it really needs testing with other cases
Tested and confirmed working in my project and this MWE. Thanks for the 
work.
>
>
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________ 
>
> If your question is of interest to others as well, please add an entry 
> to the Wiki!
>
> maillist : ntg-context at ntg.nl / 
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


-- 
Best regards,
ℤhichu ℂhen

Shanghai Institute of Applied Physics
No. 2019, Jialuo Road
Jiading, Shanghai, P.R.China
Tel: +86-21-39194888



More information about the ntg-context mailing list