Re: [NTG-context] Math Sets (ConTeXt port of braket.sty)

2007-02-26 Thread Zulkifli Hidayat
 I uploaded the module to garden. I have only implemented scaling of
 single vertical bar (|). braket.sty also allows scaling of double
 vertical bar (||) and only treating the first | to be special. These
 are not implemented right now. In case someone needs them, let me
 know.

 The module is available from

 http://modules.contextgarden.net/mathsets

 Aditya


I also need that. Thank you.

Zulkifli

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Math Sets (ConTeXt port of braket.sty)

2007-02-24 Thread Zulkifli Hidayat

 Hi,

 I find myself writing a lot of probability expressions where I want
 the delimiters to scale automatically, and | (conditional sign) to
 scale automatically, and the spacing around | to be correct. In LaTeX,
 I used to use braket package to do this. Since moving to ConTeXt, I
 was doing this by hand, but wring a lot of

 \EXP\left\{ ... \,\middle\, ...\right\} and \Pr( ... \mid ...)

 soon became a pain to read and write. So (thanks to Taco's first hand
 knowledge of why TeX is Turing complete), I have written the following
 macros:

 \unprotect
 \definesystemvariable {ms}   % Math Set

 \def\mathsetmiddle{\,\middle\mathsetparameter\c!middle\,}

 \let\currentmathset\empty
 \def\mathsetparameter#1%

 {\executeifdefined{\??ms\currentmathset#1}{\executeifdefined{\??ms#1}\empty}}

 \def\definemathset
{\dodoubleargument\dodefinemathset}

 \def\dodefinemathset[#1][#2]%
{\getparameters[\??ms#1]
  [\c!text=,\c!left={\{},\c!right={\}},\c!middle=\vert,#2]
 \setvalue{#1}{\dododefinemathset[#1]}}

 \def\dododefinemathset[#1]#2#%
{\begingroup
 \def\currentmathset{#1}
 \mathcode`\|32768
 \let|\mathsetmiddle
 \def\mathsetarguments{#2}
 \dodododefinemathset}

 \def\dodododefinemathset#1%
{\doifsomething{\mathsetparameter\c!text}
  {\mathop{\mathsetparameter\c!text\mathsetarguments}}
 \left\mathsetparameter\c!left#1\right\mathsetparameter\c!right
 \endgroup}

 \protect

 which allows me to do

 \definemathset[EXP][text={\mfunction{E}}]
 \definemathset[PR][text={\mfunction{Pr}},left=(,right=)]

 \starttext

 Correct spacing around the vertical bar.
 \startformula
\EXP{f(X) | Y} = \sum_{x} f(x) \PR{x|Y}
 \stopformula

 Correct scaling of delimiters (as correct as left and right give you)

 \startformula
\EXP{\sum_z f(X,z) | Y} = \sum_{x,z} f(x,z) \PR{x,z|Y}
 \stopformula

 Correct handling of sub|/|super scripts

 \startformula
\EXP_X{f(X) | Y} = \sum_{x} f(x) \PR{x|Y}
 \stopformula


 Is there anyone else interested in this kind of stuff? I have not
 ported all the features of braket.sty, but only those that I needed.
 Other should not be too difficult to port.

 Hans and Taco: Does it make sense to add these to the core? If so, I
 can polish the macros a bit (add a \setupmathsets command).

 Aditya


I think I will need it near in the future. Thanks for nice the nice works.

Zulkifli



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Not able to use Bibtex module

2007-02-17 Thread Zulkifli Hidayat

 On Fri, 16 Feb 2007, Zulkifli Hidayat wrote:

 Hi,

 I'm trying to use bib module. So far, I still can't make it work. I
 can't
 have the pdf shows the list of reference.

 I have made a small test file to try the bib module (it is shown below
 this mail). For the test, I use only the default options. I also attach
 the output of the Context process. My Context version is 12.01.2007 on
 MS
 Windows XP SP2.

 So what I did are:
 1. Make the .bbl file - tes.bbl
 2. Make the main file - tes.tex
 3. Include the tes.bbl in tes.tex as it is written below

 Any comment is appreciated.

 I did not actually try your file, but the reason it is not working may
 be spaces in your key value assignments.

 \setuppublicationlist[%
  criterium=all,
  totalnumber = 2]
   ^^

 \startpublication[
  k = katfti,  % key
 ^^^

 etc. That is instead of

 key(space)=(space)value,

 use

 key=value,

 There can be spaces before the key, as is

 (space)key=value,

 but there should be no other spaces.

 Aditya


You're right, it works. So I have to be more careful with space. Thank you
for clue.

Zulkifli

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Not able to use Bibtex module

2007-02-16 Thread Zulkifli Hidayat
Hi,

I'm trying to use bib module. So far, I still can't make it work. I can't
have the pdf shows the list of reference.

I have made a small test file to try the bib module (it is shown below
this mail). For the test, I use only the default options. I also attach
the output of the Context process. My Context version is 12.01.2007 on MS
Windows XP SP2.

So what I did are:
1. Make the .bbl file - tes.bbl
2. Make the main file - tes.tex
3. Include the tes.bbl in tes.tex as it is written below

Any comment is appreciated.

Regards,

Zulkifli

 file tes.tex 

usemodule[bib]

\setuppublications
  [criterium=all]

\setupbibtex
  [database=tes]

%\usepublications
%  [tes]

\starttext

\chapter{Tes}

\section{Tes}

\cite[katfti] \cite[arif01]

\completepublications

\stoptext


 file tes.bbl ===

\setuppublicationlist[%
  criterium=all,
  totalnumber = 2]

\startpublication[
  k = katfti,  % key
  a = fti,  % author
  y = 2005,  % year
  n = 1, % number
  s = KatFTI,  % short
  t = catalogue]  % type
  \author{Fakultas Teknologi}[FT.]{}{Industri}
  \author{Bidang Studi}[BS.]{}{Pengaturan}
  \title{Katalog Matakuliah FTI}
  \pubyear{2005}
  \city{Surabaya}
  \country{Indonesia}
  \isbn{0-13-127765-0}
  \edition{2th}
  \pubname{ITSPress}
\stoppublication

\startpublication[
  k = arif01,  % key
  a = arif,  % author
  y = 2001,  % year
  n = 2,  % number
  s = MA2001,  % short
  t = manual]  % type
  \author{Abdul Hamid}[AH.]{}{Arif}
  \author{Mahmud}[M.]{}{Syamsuri}
  \title{Membebaskan Diri dari Belenggu}
  \pubyear{2001}
  \city{Jakarta}
  \country{Indonesia}
  \isbn{0-13-597097-0}
  \pubname{Rukyah Press}
\stoppublication




TeXExec | processing document 'tes.tex'
TeXExec | no ctx file found
TeXExec | tex processing method: context
TeXExec | TeX run 1
TeXExec | writing option file tes.top
TeXExec | using randomseed 936
TeXExec | tex engine: pdftex
TeXExec | tex format: cont-en
This is pdfTeX, Version 3.141592-1.40.1 (Web2C 7.5.6)
 \write18 enabled.
 (d:/Programs/context/usr/local/context/tex/texmf-mswin/web2c/natural.tcx)
entering extended mode
(./tes.tex

ConTeXt  ver: 2007.01.12 15:56 MKII  fmt: 2007.2.16  int: english/english

language: language en is active
system  : cont-new loaded

(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/base/cont-ne
w.tex
systems : beware: some patches loaded from cont-new.tex

(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/base/cont-ne
w.mkii))
system  : cont-old loaded

(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/base/cont-ol
d.tex
loading : Context Old Macros
)
system  : cont-fil loaded

(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/base/cont-fi
l.tex
loading : Context File Synonyms
)
system  : cont-sys loaded

(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/user/cont-sy
s.tex)
bodyfont: 12pt rm is loaded
language: patterns nl-texnansi:texnansi-1-2:3 nl-ec:ec-2-2:3 fr-
texnansi:texnansi-3-2:3 fr-ec:ec-4-2:3 de-texnansi:texnansi-5-2:3 de-e
c:ec-6-2:3 it-texnansi:texnansi-7-2:3 it-ec:ec-8-2:3 pt-texnansi:texna
nsi-9-2:3 pt-ec:ec-10-2:3 hr-ec:ec-11-2:3 pl-pl0:pl0-12-2:3 pl-ec:e
c-13-2:3 pl-qx:qx-14-2:3 cz-il2:il2-15-2:3 cz-ec:ec-16-2:3 sk-il2:i
l2-17-2:3 sk-ec:ec-18-2:3 sl-ec:ec-19-2:3 ru-t2a:t2a-21-2:3 en-ec:e
c-22-2:3 uk-ec:ec-23-2:3 us-ec:ec-24-2:3 agr-agr:agr-25-2:3 da-ec:e
c-26-2:3 sv-ec:ec-27-2:3 af-ec:ec-28-2:3 no-ec:ec-29-2:3 deo-ec:ec-
30-2:3 es-ec:ec-31-2:3 ca-ec:ec-32-2:3 la-ec:ec-33-2:3 ro-ec:ec-34
-2:3 tr-ec:ec-35-2:3 fi-ec:ec-37-2:3 hu-ec:ec-38-2:3 loaded
specials: tex,postscript,rokicki loaded
system  : tes.top loaded
(./tes.top
specials: loading definition file tpd

(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/base/spec-tp
d.tex
specials: loading definition file fdf

(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/base/spec-fd
f.tex
(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/base/spec-fd
f.mkii))
specials: fdf loaded
)
specials: fdf,tpd loaded
)
systems : system commands are enabled
system  : module bib loaded

(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/bib/t-bib.te
x
publications: loading formatting style from bibl-apa

(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/bib/bibl-apa
.tex))
publications: wrote a new auxiliary file tes.aux
(./tes.tuo) (./tes.tuo) (./tes.tuo) (./tes.tuo) (./tes.tuo) (./tes.tuo)
(./tes.tuo) (./tes.tuo) (./tes.tuo) (./tes.tuo)
(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/base/sort-de
f.tex)
(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/base/sort-la
n.tex) (./tes.tuo) (./tes.tuo)
(d:/Programs/context/usr/local/context/tex/texmf-local/tex/context/base/pdfr-de
f.tex)
publications: loading database from tes.bbl
(./tes.bbl)

Re: [NTG-context] Newbie question: math font and bibliography

2007-02-13 Thread Zulkifli Hidayat


 Date: Mon, 12 Feb 2007 08:19:38 +0100
 From: Taco Hoekwater [EMAIL PROTECTED]
 Subject: Re: [NTG-context] Newbie question: math font and bibliography
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed

 Zulkifli Hidayat wrote:


Dear Taco,
I'm sorry if made myself not clear and for the noise about the upright
 and
italic bold math. I found that it works.

I have reread the bibliography manual, I think it should be clear enough
for me to do some experiments. But there's one thing makes me confuse,
 how
to cite the publications. From all of the publication fields, which one
should I use in \cite[1(opt)][2(reference)]? The first bracket is
optional, how about the second one?

 The simplest solution is to decide on a global style

\setuppublications[alternative=apa] % this is actually the default

 other possible values are aps, ams, num, and ssa.

 Then you can just use \cite[key] and the style will decide what field
 to pick.

 I apologize for my dumb questions.

 There is definately no need to apologise.

 Cheers, Taco

Thank you. From your simples example, I think I should read the manual
more carefully and do some experiments.

Furthermore, could you give pointers to style alternatives documentation
or links?

Yours,

Zulkifli

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Newbie question: math font and bibliography

2007-02-10 Thread Zulkifli Hidayat
 Date: Fri, 9 Feb 2007 09:09:58 +0700 (WIT)
 From: Zulkifli Hidayat [EMAIL PROTECTED]
 Subject: [NTG-context] Newbie question: math font and bibliography To:
ntg-context@ntg.nl
 Message-ID:
   [EMAIL PROTECTED]
 Content-Type: text/plain;charset=iso-8859-1

 Dear all,

 I'm a newbie, just recently try to use context. As I read the wiki, I
think that Context is great to typeset documents. Now I'm trying to make
a
 document with some maths in it and I also need bold math symbols. I try
the steps written in MyWay Magazine: Normal and Bold Math Combination by
Hans Hagen and I find that bold math in inline equation is bold upright
but in formula it is bold italics. Furthermore, I can't type a bold
greek
 symbol in an inline equation. A file test is below. I also tried in
Contextlive and got the same result. I use the 23.01.2007 context
version.

 For bibliography, I don't have any idea how to cite a bibliography item
in
 the list of publications. I found the wiki is not clear enough for real
newbie like me.

 Thank you in advance for any help or suggestions ...

 Zulkifli

 ===
 \usetypescriptfile[type-enc]

 \definetypeface [mainface] [rm] [serif] [modern] [default]
 \definetypeface [mainface] [tt] [mono]  [modern] [default]
 \definetypeface [mainface] [ss] [sans]  [modern] [default]
 \definetypeface [mainface] [mm] [math]  [modern] [default]

 \definetypeface [boldmath] [rm] [serif][modern] [default]
 \definetypeface [boldmath] [tt] [mono] [modern] [default]
 \definetypeface [boldmath] [ss] [sans] [modern] [default]
 \definetypeface [boldmath] [mm] [boldmath] [modern] [default]

 \definetypeface [mainface] [mm] [bfmath] [modern] [default]
 \definetypeface [boldmath] [mm] [bfmath] [modern] [default]

 \setupformulas
[method=bold]

 \setupbodyfont
[mainface]

 \def\vu{{\bf u}}
 \def\vxh{{\hat\bf x}}
 \def\vyh{{\hat\bf y}}
 \def\thetah{\hat{\theta}}
 \def\vthetah{\hat{\bfm\theta}}

 \starttext

 $x(t)$ $u(t)$ $\vu(t)$ \vu(t) $N$ $\theta$ \theta%\vthetah dan
$\vthetah$.

 \startformula
   \vu(t) \vthetah \thetah \hat{\alpha} {\bfm\hat{\alpha}\alpha}
 \stopformula

 \stoptext




 Date: Fri, 09 Feb 2007 08:55:57 +0100
 From: Taco Hoekwater [EMAIL PROTECTED]
 Subject: Re: [NTG-context] Newbie question: math font and bibliography
To: mailing list for ConTeXt users ntg-context@ntg.nl
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed

 Zulkifli Hidayat wrote:
 For bibliography, I don't have any idea how to cite a bibliography item in
 the list of publications. I found the wiki is not clear enough for real
newbie like me.

 The easiest way to explain this is to point you to the manual of the
bibliography module. It is on the modules section of the wiki:

 http://dl.contextgarden.net/modules/t-bib/doc/context/bib/bibmod-doc.pdf

 But it should also be on your harddisk already, in:

 context-texmf-local-tree/doc/context/bib/bibmod-doc.pdf

 If you can't figure out what to do from the manual, you will need to
give a bit more information on what precisely is unclear (I know it is
probably hard that to expres that clearly, but ...)

 Best wishes,

 Taco


Dear Taco,
I'm sorry if made myself not clear and for the noise about the upright and
italic bold math. I found that it works.

I have reread the bibliography manual, I think it should be clear enough
for me to do some experiments. But there's one thing makes me confuse, how
to cite the publications. From all of the publication fields, which one
should I use in \cite[1(opt)][2(reference)]? The first bracket is
optional, how about the second one?

One more thing, for the test file above, I can't get uppercase greeks
appear right and their bold version as well. I tried it in context live.
Is there any suggestion for this?

Thank you

Regards,

Zulkifli

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Newbie question: math font and bibliography

2007-02-08 Thread Zulkifli Hidayat
Dear all,

I'm a newbie, just recently try to use context. As I read the wiki, I
think that Context is great to typeset documents. Now I'm trying to make a
document with some maths in it and I also need bold math symbols. I try
the steps written in MyWay Magazine: Normal and Bold Math Combination by
Hans Hagen and I find that bold math in inline equation is bold upright
but in formula it is bold italics. Furthermore, I can't type a bold greek
symbol in an inline equation. A file test is below. I also tried in
Contextlive and got the same result. I use the 23.01.2007 context version.

For bibliography, I don't have any idea how to cite a bibliography item in
the list of publications. I found the wiki is not clear enough for real
newbie like me.

Thank you in advance for any help or suggestions ...

Zulkifli

===
\usetypescriptfile[type-enc]

\definetypeface [mainface] [rm] [serif] [modern] [default]
\definetypeface [mainface] [tt] [mono]  [modern] [default]
\definetypeface [mainface] [ss] [sans]  [modern] [default]
\definetypeface [mainface] [mm] [math]  [modern] [default]

\definetypeface [boldmath] [rm] [serif][modern] [default]
\definetypeface [boldmath] [tt] [mono] [modern] [default]
\definetypeface [boldmath] [ss] [sans] [modern] [default]
\definetypeface [boldmath] [mm] [boldmath] [modern] [default]

\definetypeface [mainface] [mm] [bfmath] [modern] [default]
\definetypeface [boldmath] [mm] [bfmath] [modern] [default]

\setupformulas
   [method=bold]

\setupbodyfont
   [mainface]

\def\vu{{\bf u}}
\def\vxh{{\hat\bf x}}
\def\vyh{{\hat\bf y}}
\def\thetah{\hat{\theta}}
\def\vthetah{\hat{\bfm\theta}}

\starttext

$x(t)$ $u(t)$ $\vu(t)$ \vu(t) $N$ $\theta$ \theta%\vthetah dan $\vthetah$.

\startformula
  \vu(t) \vthetah \thetah \hat{\alpha} {\bfm\hat{\alpha}\alpha}
\stopformula

\stoptext


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context