Skip to content

Instantly share code, notes, and snippets.

@phi-gamma
Created May 16, 2012 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phi-gamma/2709746 to your computer and use it in GitHub Desktop.
Save phi-gamma/2709746 to your computer and use it in GitHub Desktop.
flushleft structure numbers
\setuphead [chapter,section] [alternative=leftalignmargin]
\setupmargindata [left] [align=flushleft]
\setuplayout [leftmargin=1cm]
\unprotect
%%% simplified from strc-ren.mkiv
\unexpanded\def\placeheadleftalignmarginalternative#1#2{%
\vbox{%
\localheadsetup\begstrut\dontleavehmode
\ifconditional\headshownumber\inleftmargin{#1}\fi
{#2}%
}
}
\defineheadplacement[leftalignmargin] [\v!vertical]#1#2{%
\placeheadleftalignmarginalternative{#1}{#2}%
}
\protect
\starttext \chapter{foo}\section{bar}\input knuth \stoptext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment