Re: [NTG-context] framed with titles

2017-11-14 Thread Jeong Dal
Hi, 

I got a partial solution to suppress the automatic display by changing 
“text=theorem,” to “text=,” and “number=yes” to “number=no”.
But, I couldn’t remove a blank line before the main text.
So it is a partial solution.

> 1. to put “Theorem #.#” inside the FrameTitle?(#.# means that chapter 
> number.theorem number)
> 2. to suppress the automatically display of “Thm #” inside the text?

The command
\FrameTitle{Theorem \getmarking[chapternumber].\recurselevel}
shows “Theorem 1.1”, but the it shows the chapternumber -1 not the real 
chapternumber.
Also I don’t know how to put the theorem counter after chapternumber instead of 
\recurselevel.

Here is a sample code.

Thank you for reading.

Best regards,

Dalyoung

 framed Text copied from MetaFun manual
\startuseMPgraphic{FunnyFrame} 
picture p ; numeric o ; path a, b ; pair c ; 
p := textext.rt(\MPstring{FunnyFrame}) ; 
o := BodyFontSize ; 
a := unitsquare xyscaled (OverlayWidth,OverlayHeight) ; 
p := p shifted (2o,OverlayHeight-ypart center p) ; 
drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; 
b := a superellipsed .95 ; 
%fill b withcolor .85white ; 
draw b ; 
b := (boundingbox p) superellipsed .95 ; 
fill b withcolor .85white ;  %.425green;%.
draw b ; 
draw p withcolor black ;
setbounds currentpicture to a ; 
\stopuseMPgraphic 

\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] 
\defineframedtext[FunnyText][frame=off,background=FunnyFrame, 
offset=\bodyfontsize, width=\textwidth]%\overlaywidth]%
\def\FrameTitle #1% 
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut\ss\bf #1\hss}}} 

\defineenumeration[Thm]
   [text=,
style=,
title=no,
prefix=yes,
prefixsegments={chapter},
way=bychapter,
number=no,
before={\FrameTitle {Theorem \getmarking[chapternumber].\recurselevel} 
\startFunnyText},
after={\stopFunnyText\blank}]

%\define[2]\thm{\FrameTitle{#1}
%\startFunnyText #2 \stopFunnyText}

\starttext

\dorecurse{3}
{\chapter{Chapter Title}

{\FrameTitle{Fort's space test}
\startFunnyText
Let $X$ be a uncountable set. Let $\infty$ is a fixed point of $X$. Let 
$\mathcal T$ be the family of subsets $G$ such that either (i) $\infty \notin 
G$ or (ii) $\infty \in G \text{ and } G^c$ is finite. The space $(X, {\mathcal 
T} )$ is called {\bf Fort's space}.
\stopFunnyText}

{\getmarking[chapternumber]}.\recurselevel}%

\startThm
Fort's space is a compact and Hausdorff topological space.
\stopThm

\stoptext
 


___
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
___

[NTG-context] org-mode & ConTeXt

2017-11-14 Thread Gour
Hello,

I plan to start working on series lectures/presentations for educational
purposes and I'm going to use ConTeXt for typesetting the whole material.

Considering that for smaller articles (e.g. blog posts) I use Emacs' org-mode
(with Hugo static-site-generator) and spend fair amount of time with org-mode,
I wonder whether you in general can recommend using org-mode for collecting
notes and then export to ConTeXt (via Pandoc)?

Another concern - disclaimer: still haven't go through excellent Bibliographies
manual - is whether it is possible to e.g. use org-ref
(https://github.com/jkitchin/org-ref) - orgmode's support for RefTeX
(https://www.gnu.org/software/auctex/reftex.html) which is mentioned in the
wiki (http://wiki.contextgarden.net/Reftex) or is is better to excusively work
within the scope of ConTeXt?

I've also noticed that Bibliogrpahies manual does mention JabRef and Zotero for
managing databases, so I'd appreciate if ConTeXt users can share their
experience in regard?


Sincerely,
Gour

-- 
An intelligent person does not take part in the sources of misery,
which are due to contact with the material senses. O son of Kuntī,
such pleasures have a beginning and an end, and so the wise man does
not delight in them.


___
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
___