Mostly for the sake of doing so, I am writing a presentation in ConTeXt. I thought that defining a start-stop would be a good way to split up slides. So I have something like:


My question is, given that every slide will have a title and a subtitle, is there a way to wrap the \subject and \subsubject up in the \definestartstop and provide the values when the start-stop begins?

I haven't found anything that is related to this and I know start-stops don't take arguments, so how might you do something like that? If I am going about the problem wrong, what would be the ConTeXt way?

  • 3
    Why don't you use the regular \startsection ... \stopsection and \startsubsection? That will give you the benefit of being able to add the title. And you can define every section to equal one slide.
    – Thomas
    Jul 4, 2012 at 20:37
  • 2
    Have a look at the annotation module by Wolfgang Schuster and search the ConTeXt mailing list for usage examples.
    – Aditya
    Jul 9, 2012 at 12:46

1 Answer 1


I would suggest to simply use the built-in sectioning macros for the slides.

With \definehead you can create new sectioning commands which can be individually styled and the behaviour modified as desired. If you use MkIV sectioning style you can provide a second argument which can be accessed with \structureuservariable{…}. Here is a very simple slide template demonstrating that feature.

\useMPlibrary     [dum]  %% only for the screenshot
\setuppapersize   [S6]
\setupbodyfont    [sans,18pt]
\setupheadertexts [{\getmarking [slide] — \getmarking [subtitle]}]
\setupheader      [style=bigbodyfont]
\definemarking    [subtitle]


  [slide] [subsection]
  [page=yes, placehead=empty,insidesection=\doSubtitle]

\starttexdefinition doSubtitle
  \marking [subtitle] {\structureuservariable{subtitle}}


  \startslide [title=Foo] [subtitle=a subtitle]
    \input ward

  \startslide [title=Bar] [subtitle=another subtitle]
      {\externalfigure [dummy] [width=.5\textwidth]}
      {\externalfigure [dummy] [width=.5\textwidth]}


ss1 ss2

Also have a look at Aditya's step-by-step instruction tutorial to create slides with ConTeXt.

To actually answer your question: You can create commands with arguments using \dosingleempty for one argument \dodoubleempty for two arguments, etc. Here is an example of a macro \TwoArgs that simply prints parentheses around the arguments.


  {(#1) (#2)}

More information on the wiki - Commands with optional arguments

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.