ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Fabrice Couvreur <fabrice1.couvreur@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Set up a theorem style
Date: Fri, 27 Jul 2018 00:13:35 +0200	[thread overview]
Message-ID: <CACyK-epQ-bmeZApJT8_P4FBXVjmxv+Wzhd7iq1ctEsLEPSKtcA@mail.gmail.com> (raw)
In-Reply-To: <CACyK-eopPu3DrVSan3A-KR+Q6foP7RT6+Z_0+V5ixUdk8LDNaA@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2213 bytes --]

Hello,
Perhaps the key proposed by Wolfgang is what I want to do : put a dash
between the numbering and the text

\setupenumerations[
       before={\blank},
       after={\blank},
       text=Théorème ,
       alternative=serried,
       headstyle={\sc},
       prefix=yes,
       prefixsegments=chapter,
       way=bysection,
       *numberstopper={. ---},*
       style=italic,

]

\defineenumeration[theorem]

Fabrice


2018-07-25 12:15 GMT+02:00 Fabrice Couvreur <fabrice1.couvreur@gmail.com>:

> Hello,
> I used LaTeX for a long time before converting (with difficulty !) to
> ConteXt. For example, to define my new theorems, I used the amsthm
> package and I did this :
>
> \newtheoremstyle{theoremdd}% name of the style to be used
>   {\topsep}% measure of space to leave above the theorem. E.g.: 3pt
>   {\topsep}% measure of space to leave below the theorem. E.g.: 3pt
>   {\itshape}% name of font to use in the body of the theorem
>   {0pt}% measure of space to indent
>   {\bfseries}% name of head font
>  * {. ---}% punctuation between head and body*
>   { }% space after theorem head; " " = normal interword space
>   {\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}}
>
> \theoremstyle{theoremdd}
> \newtheorem{thmd}{Theorem}[section]
>
>
>
> I'm trying to do the same thing with ConTeXt but I can not do it
> completely :
>
> \setupenumerations[
>        before={\blank},
>        after={\blank},
>        text=Théorème,
>        alternative=serried,
>        title=no,
>        prefix=yes,
>        prefixsegments=chapter,
>        way=bysection,
>        right=.,
>        titlestyle=bold,
>        style=italic,
>        width=broad,
>
> ]
>
> \defineenumeration[theorem]
>
>
> \starttext
>
> \startchapter[title={First Chapter}]
> \startsection[title={First Section}]
>   \dorecurse{2}{
>     \starttheorem
>       \input ward
>     \stoptheorem}
> \stopsection
> \stopchapter
>
> \startchapter[title={Second Chapter}]
> \startsection[title={Second Section}]
> \dorecurse{2}{
>     \starttheorem
>       \input ward
>     \stoptheorem}
> \stopsection
> \stopchapter
>
> \stoptext
>
> Thanks
> Fabrice
>

[-- Attachment #1.2: Type: text/html, Size: 5530 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      parent reply	other threads:[~2018-07-26 22:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25 10:15 Fabrice Couvreur
2018-07-25 11:15 ` Aditya Mahajan
2018-07-26 22:13 ` Fabrice Couvreur [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACyK-epQ-bmeZApJT8_P4FBXVjmxv+Wzhd7iq1ctEsLEPSKtcA@mail.gmail.com \
    --to=fabrice1.couvreur@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).