2

After modifying a heading/title style with \setuphead per the Titles instructions for mkiv, how might one reset that style to its default?

I had initially thought that the ConTeXt environment might do that, but it appears not.

If there's no inherent capability to restore styles, where would one find them in the source?

EDIT Example:

Given:

\setuphead[subsection][
  after={},
  align={flushleft, nothyphenated, verytolerant},
  alternative=text,
  distance=0pt,
  beforesection={},
  before={},
  inbetween={},
  textstyle={\tfx},
  interlinespace=-10pt,
  commandbefore={},
  commandafter={},
  aligntitle=float,
  number=no,
  strut=no,
  style={\tfx},
  command=\myHeadCommand,
]

Now, how does one reset all those settings to the default?

2

I'm not sure I understand your question; an example is needed. Here is what I consider an answer:

\setuphead [section] [color=red,style=bf]

\starttext

\startsection [title=Section One]

  Test

\stopsection

\setuphead [section] [color=,style=]

\startsection [title=Section Two]

  Test

\stopsection

\stoptext

And here's the result:

enter image description here

  • So basically by setting the var= it resets to the default? Because that'd be the answer. :) – Brian M. Hunt Mar 23 '17 at 14:25
  • If that's what you're looking for, yes, setting the var to an empty value resets to default. – Thomas Mar 23 '17 at 14:29
  • Oddly, setting distance= causes an error for me (“Missing number, treated as zero”). The others I have tried seem to work. – Brian M. Hunt Mar 23 '17 at 15:11
  • 2
    Assigning a empty value to a key doesn’t reset it, it just sets a different value which doesn’t have to be the original one. In case of the distance key empty values aren’t allowed and you have to use a dimension, e.g. 0pt. – Wolfgang Schuster Mar 23 '17 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.