Re: [NTG-context] page numbering in words?

2007-04-16 Thread Robin Kirkham
Hi all,

There are still a few problems with \numstr when you get beyond the  
hundreds. Perhaps this is unlikely when it is a page number, but I  
was interested in using this macro for contracts, where an amount of  
money is often written out in words.

\input numstr.tex
\starttext
\numstr{-1}\par
\numstr{0}\par
\numstr{101}\par
\numstr{1001}\par
\numstr{101}\par
\numstr{1200021}
\stoptext

This produces output:

null
null
one hundred and one
one thousand one
one millionone
one million two hundred thousand twenty-one

which should be:

minus one
zero
one hundred and one
one thousand and one
one million and one
one million, two hundred thousand and twenty-one

In English, the tens/units (if not zero) should be preceded by and  
if the number exceeds 100 (so 101 is correct in the above output).  
This applies whether the tens/units is truly tens/units, or is a  
thousands or millions multiplier (12 = one hundred and twenty  
thousand).

The use of a comma after millions and sometimes thousands is helpful  
but not essential, and it only appears in certain cases. I'll have to  
think a bit more about a rule for that!

The use of a hyphen between tens and units (twenty-one) is not  
incorrect but is nowadays probably regarded as a little old-fashioned  
(but personally, I like it).

Best,

Robin

 Date: 2007-03-29 17:38 +1000
 To: mailing list for ConTeXt users
 Subject: Re: [NTG-context] page numbering in words?
 cormullion.at.remove.this.mac.com wrote:
  On 2007-03-28, at 16:49.0, Zhichu Chen wrote:
 
  I modified Wolfgang's macro as the attached file. But I'm really
  not a native American, so there must be some special rules that
  I've ignored. Wish you good luck.
 
  Yes - this works great now. Thank you for sorting out the TeX code,
  which is like no other language I know ;-). I've changed only one
  spelling (fourty - forty) and the rest looks perfect.

 It would be nice if someone (one of the module tutorial attendants :-)
 could wrap this command in a module for the contextgarden page.

 Cheers,
 Taco

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


Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-16 Thread George N. White III
On 4/16/07, Sanjoy Mahajan [EMAIL PROTECTED] wrote:

  can also try to create the pd file by hand with dvips -Ppdf test,
  that gave a correct output on my system.

 Thanks, that works.  I guess -Ppdf tells it to use map files that find
 the type1 fonts, so cmr in the metapost figures is replaced by the
 lmodern .pfb.  Oh, that's not what happens: it instead finds the
 cmr10.pfb and includes it correctly.  So the final document uses
 lmodern for the page number (from the ConTeXt src file) and cmr10 for
 the 'hello' from the metapost figure.

This is a hint that the underlying problem is related to map files.  With the
lm-rep maps the cm hello should become lmodern.

 Though I'm a bit scared of -Ppdf from years ago when I think it caused
 encoding problems.  A few characters didn't show up correctly in the
 pdf file, but only when using non-cmr fonts.

I think that was fixed long ago, but I rarely use .dvi anymore.

-- 
George N. White III [EMAIL PROTECTED]
Head of St. Margarets Bay, Nova Scotia
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] using of field failed when arrange subpages

2007-04-16 Thread Zhichu Chen

Hi everybody,

I figured out that it is not because the fields are not treated nor they are
overlapped by other materials. Only the JavaScript failed to excute the 
Toggle_Hide function. When I deleted hidden from
\setupfield
[HelpSetup]
[width=1.2em,height=fit,frame=off,option={readonly,hidden}]
the fields are shown and fail to hide now. I think it can be a bug.

I'm still looking for a solution but I'm new to ConTeXt. I hope you can help
me with it. Any suggestion will be OK.



On 4/16/07, Zhichu Chen [EMAIL PROTECTED] wrote:


Hi,

I've tried Hans' example introduced at mwidget-p.pdf, it's perfect. But
when I was trying some subpage arrangements, it just failed. How could it
happen? I guess either shiping out subpages forget the fields or something
has covered over them. Here's a small example (by the way, I don't actually
know the meanings of the arguments of \dosetuparrangement, I'm very
appreciated if someone could explain the macro to me.):

=

\setupinteraction  [state=start]

\installpagearrangement TEMP
  {\dosetuparrangement{1}{1}{1}{0}{0}%
 \pusharrangedpageTEMP\poparrangedpagesAonly\relax}

\def\pusharrangedpageTEMP#1%
  {\doglobal\increment\arrangedpageN
   \reportarrangedpage\arrangedpageN
   \ifcase\arrangedpageN
   \or \handlearrangedpageXandY{#1}0{11}0\arrangedpageA
   \or \handlearrangedpageXandY{#1}0{9}0\arrangedpageA
   \or \handlearrangedpageXandY{#1}0{7}0\arrangedpageA
   \or \handlearrangedpageXandY{#1}0{5}0\arrangedpageA
   \or \handlearrangedpageXandY{#1}0{3}0\arrangedpageA
   \or \handlearrangedpageXandY{#1}0{1}0\arrangedpageA
 \poparrangedpages
   \fi}

\def\poparrangedpagesAonly
  {\ifnum\arrangedpageN\zerocount
 \dontcomplain
 \paperwidth\arrangedpageX\paperwidth
 \paperheight\arrangedpageY\paperheight
 \outputarrangedbox\arrangedpageA
 \doglobal\newcounter\arrangedpageN
   \fi}

\definepapersize
  [Column]
  [width=40pt,
   height=400pt,
   offset=0pt]

\definepapersize
  [Scroll]
  [width=540pt,
   height=400pt,
   offset=0pt]


\setuppapersize[Column][Scroll]
\setuparranging[TEMP,background]
\setuplayout
  [margin=0pt,
   width=fit,
   height=middle,
   leftmargin=0pt,
   rightmargin=0pt,
   leftedge=0pt,
   rightedge=0pt,
   header=0pt,
   footer=0pt,
   bottom=0pt,
   top=0pt,
   backspace=0pt,
   topspace=0pt,
   bottomspace=0pt,
   horoffset=0pt,
   veroffset=0pt,
   headerdistance=0pt,
   footerdistance=0pt,
   topdistance=0pt,
   bottomdistance=0pt]

\pdfoptionpdfminorversion=6

\title{What?}

\starttext

\newcounter\abc
\doglobal\increment\abc

\setupfields
[reset]
\setupfield
[HelpSetup]
[width=1.2em,height=fit,frame=off,option={readonly,hidden}]

\def\currenthelp{Help::\abc}

\definefield [\currenthelp] [check] [HelpSetup] [helpinfo\abc]
[helpinfo\abc]

\definesymbol [helpinfo\abc] [\SomeHelpText]
\def\SomeHelpText%
{\framed
[width=1.2em,height=fit,align=middle,style=small,
frame=on,background=color,backgroundcolor=white,framecolor=red]
{Some texts}}

\inright{\fitfield[\currenthelp]} Click
\goto{here}[JS(Toggle_Hide{\currenthelp})] to see.

\dorecurse{10}{\input knuth\endgraf}

\stoptext
=

--
Sincerely yours,
Chen


  Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
 No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
 tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
   | www.sinap.ac.cn






--
Sincerely yours,
Chen


 Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
  | www.sinap.ac.cn

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


[NTG-context] xml problem

2007-04-16 Thread Bernd Militzer

Hi Hans,

first thanks for your help at Epen, but reading the different documents 
I could not find out how to define a macro to get the value of a 
specific element of an xml-file.

Running your example I get all elements.

For example:
I wont to get the value of the first name for person pid=66

\def\getFirstName#1{{\enableXML\getvalue{person:#1}}} % what is  here to 
change?


Thanks for help again

Bernd
?xml version=1.0?

start 
	ref name=persons/ 
/start 

define name=persons 
	element name=persons 
		zeroOrMore 
			choice 
			ref name=persons.person/ 
			/choice 
		/zeroOrMore 
	/element 
/define 


define name=persons.person 
	element name=person 
		interleave 
			optional ref name=person.Fam/ /optional 
			optional ref name=person.Nam/ /optional 
			optional ref name=person.Vor/ /optional 
			optional ref name=person.Ruf/ /optional 
			optional ref name=person.Geb/ /optional 
			optional ref name=person.GebOrt/ /optional 
			optional ref name=person.GebZeit/ /optional
			optional ref name=person.Tau/ /optional 
			optional ref name=person.TauOrt/ /optional 
			optional ref name=person.Konf/ /optional
			optional ref name=person.Pate1/ /optional  
			optional ref name=person.Pate2/ /optional  
			optional ref name=person.Pate3/ /optional  
			optional ref name=person.Pate4/ /optional 
			optional ref name=person.Konfi/ /optional 
			optional ref name=person.KonfiOrt/ /optional
			optional ref name=person.Kommu/ /optional 
			optional ref name=person.KommuOrt/ /optional
			optional ref name=person.Hei/ /optional 
			optional ref name=person.HeiOrt/ /optional 
			optional ref name=person.Amt/ /optional 
			optional ref name=person.AmtOrt/ /optional
			optional ref name=person.Partner/ /optional
			optional ref name=person.Tod/ /optional 
			optional ref name=person.TodOrt/ /optional 
			optional ref name=person.TodZeit/ /optional 
			optional ref name=person.Alter/ /optional 
			optional ref name=person.Urs/ /optional
			optional ref name=person.Grab/ /optional 
			optional ref name=person.GrabOrt/ /optional 
			optional ref name=person.Ber/ /optional 
			optional ref name=person.Zus/ /optional 
			optional ref name=person.GeschwZahl/ /optional 
			optional ref name=person.Geschw1/ /optional 
			optional ref name=person.Geschw2/ /optional 
			optional ref name=person.Geschw3/ /optional 
			optional ref name=person.KinderZahl/ /optional 
			optional ref name=person.Kind1/ /optional 
			optional ref name=person.Kind2/ /optional 
			optional ref name=person.Kind3/ /optional 
			optional ref name=person.Kind4/ /optional 
			optional ref name=person.Vater/ /optional 
			optional ref name=person.Mutter/ /optional
			optional ref name=person.UGebKi/ /optional 
			optional ref name=person.UGebAmt/ /optional 
			optional ref name=person.UTaufe/ /optional 
			optional ref name=person.UKonfi/ /optional 
			optional ref name=person.UHeiKi/ /optional 
			optional ref name=person.UHeiAmt/ /optional 
			optional ref name=person.UTodKi/ /optional 
			optional ref name=person.UtodAmt/ /optional 
		/interleave 
		attribute name=pid/ 
	/element 
/define 


  define name=person.Fam
element name=Familienname
  text/
/element
  /define



persons
	person pid=1a 
		FamMilitzer/Fam 
		VorKai Uwe/Vor 
		RufKai/Ruf
		Geb21. August 1980/Geb
		GebOrtKrefeld/GebOrt
		Vater2/Vater
		Mutter3/Mutter
	/person 

	person pid=1c 
		FamMilitzer/Fam 
		VorJan Erik/Vor 
		RufJan/Ruf
		Geb3. September 1981/Geb
		GebOrtKrefeld/GebOrt
		Vater2/Vater
		Mutter3/Mutter
	/person 

	person pid=66 
		FamMilitzer/Fam 
		VorJohann Christoph Erdmann/Vor 
		RufJohann/Ruf
		Geb27. August 1797/Geb
		GebOrtUnterkoskau/GebOrt
		Vater132/Vater
		Mutter133/Mutter
	/person 
	
	person pid=67 
		FamRudolph/Fam 
		VorJohanne Christiane Friedericke/Vor 
		RufJohanne/Ruf
		Geb21. Juli 1804/Geb
		GebOrtOberkoskau Obermühle/GebOrt
		Vater134/Vater
		Mutter135/Mutter
	/person 

	
	person pid=2112 
		FamMilitzer/Fam 
		VorAdam/Vor 
		RufAdam/Ruf
		Tau16. November 1670/Tau
		GebOrtUnterkoskau/GebOrt
		Vater4224/Vater
		Mutter4225/Mutter
	/person 
	
	person pid=4224 
		FamMilitzer/Fam 
		VorJohannes/Vor 
		RufHans/Ruf
		Tau4. Januar 1630/Tau
		GebOrtUnterkoskau/GebOrt
		Vater8448/Vater
		Mutter8449/Mutter
	/person 



/persons




getData.tex
Description: TeX document
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \cite customisation

2007-04-16 Thread Paul Schalck
Hello!

Using the bib module for Context for the first time, I wonder if there is a way 
to change the \cite definition in order to get something like this:

\cite[a_schm:73] -- A. Schmitt, Entrückung (author name with initial, short 
title -- the real title is much longer)

as it is common in the humanities, at least in Germany. I didn't find anything 
in that direction in former posts, I hope I haven't missed anything, and 
hacking the t-bib.tex file is nothing I can manage by myself. 

Have a nice week!
P
___
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192

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


[NTG-context] bibtex: et al. and missing spacing before et

2007-04-16 Thread Tobias Burnus
Hello,

if I tex the following example, I get:
Hu{\it et al.} without space between Hu and et.

Any idea why this happens? This is with:
- context version: 2007.01.12 15:56 (openSUSE's TeXLive)
- ver: 2007.03.19 11:20 MKII  fmt: 2007.4.2 (updated teTeX)
- Live ConTeXt  on the garden.

bibl-aps.tex contains:
\c!authoretaltext={ {\it et al.\/}},
\c!editoretaltext={ {\it  et al.\/}},
\c!artauthoretaltext={ {\it et al.\/}}]

Tobias

\usemodule[bib]
\setupinteraction[state=start]
\setuppublications[alternative=aps]

\startpublication[k=Hu2000,t=article,
a={{Hu},{}},y=2000,o={10.1103/PhysRevB.61.5262},
n=53,s=HvLG{\etalchar{+}}00]
\artauthor[]{Z.}[Z.]{}{Hu}
\artauthor[]{H.}[H.]{von}{Lips}
\artauthor[]{M.~S.}[M.~S.]{}{Golden}
\artauthor[]{J.}[J.]{}{Fink}
\artauthor[]{G.}[G.]{}{Kaindl}
\artauthor[]{F.~M.~F.}[F.~M.~F.]{de}{Groot}
\artauthor[]{S.}[S.]{}{Ebbinghaus}
\artauthor[]{A.}[A.]{}{Reller}
\pubyear{2000}
\journal{Physical Review B}
\volume{61}
\pages{5262-5266}
\stoppublication

\starttext
\cite[Hu2000]
\section{References}
\placepublications
\stoptext

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


Re: [NTG-context] \cite customisation

2007-04-16 Thread Paul Schalck
I found the solution, it#8217;s very easy: I have to modify manually the s={} 
entry of my .bbl file and with setuppublications[refcommand=short], it works 
fine!

Sorry for the noise
P

___
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192

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


[NTG-context] Footnotes in columns

2007-04-16 Thread Aditya Mahajan
I am writing a two column document using \startcolumns  
\stopcolumns. Now, by default, a \footnote in columns spans the whole 
text width. I want the footnote to appear at the bottom of the column 
where it was called. How can I do that.

Aditya


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


Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-16 Thread Sanjoy Mahajan
George N. White III [EMAIL PROTECTED] wrote:
 Your ConTeXt example is using the default latin modern fonts.  The
 reason the mpost files work with plain TeX is that the cm fonts are
 being used by plain tex, so the fonts are already defined in the .ps
 file when the font commands in the figure file are found.

That's 95% of the story, but I think with a small addendum.  e.g. If
the .tex file uses only cmr10 but fig.1 file uses cmsy7 for a
subscript, dvips will handle it correctly and download cmsy7 into the
.ps file.  So it's not only that the fonts are defined in the .ps
file, but that dvips knows how to handle the inclusion correctly when
the font is listed in a fig.1 embedded by plain TeX.

 For debian, the procedure for changing updmap.cnf has been debianized,
 but it is mentioned in the README for the lmodern package

Thanks, I didn't know about that.  The directions are easy enough to
do, esp. on an Ubuntu system.

Though I prefer to use the vanilla system, so that I can test the
distributions to see what works and breaks, and try to get the
upstream folks to fix it.  Although, I'm not sure who is the relevant
upstream here.  Mojca (off-list) suggested trying an older ConText and
I'll try that.

Meanwhile I'll put the 'dvips -Ppdf' workaround into my Makefiles.

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texexec+mpost cmr10 vs CMR10 trouble using dvips backend

2007-04-16 Thread Sanjoy Mahajan
 I think that was fixed long ago, but I rarely use .dvi anymore.

Nor me except for arxiv.org.  By the way, the next email will have
directions on how to submit ConText documents to arxiv.org.

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] arxiv.org: submitting ConText documents

2007-04-16 Thread Sanjoy Mahajan
Here is the (just tested!) procedure to submit ConTeXt documents to
arxiv.org and also provide source.

Suppose that document.tex is the source file, and has fig.mp as the
figure file that produces fig.1, etc.

1. Generate document.ps using 

  texexec --dvi --nobackend document.tex
  dvips -Ppdf document.dvi -o document.ps 
  /* the -o in case of stupid systems that send the output to lpr by default */

2. Make a directory src/ with document.tex and fig.mp.  Then make a
   .tgz file for uploading.  It is produced from this file structure

document.ps
src/
  fig.mp
  document.tex

   e.g. by 
   
   tar -czvf arxiv.tgz document.ps src/

3. arxiv.org will generate PDF from the PS using ghostscript, so make
   sure that ps2pdf on document.ps produces a working PDF.

4. If all is well, upload arxiv.tgz as your submission using the usual
   arxiv.org submission (or replacement) procedure.  Ideally you'll do
   step 4 at least 15 minutes (ideally an hour) before the 4pm (US
   Eastern) weekday deadline, so that you get back the submission date and
   preprint number from arxiv, leaving time for step 5

5. Incorporate the preprint number (or URL) and submission date into
   your document and produce an arxiv stampline along the left.  Then
   remake document.ps and arxiv.tgz in step 2, and replace the
   previous submission with the new arxiv.tgz.

6. Check that all is well.

When the paper becomes official (8pm US Eastern time), users should
get three choices for format: PS (what you provided), PDF (generated
by arxiv.org from the PS), and 'Other formats', which will offer an
option to download source.

Of course, all of the remaking should be done by a Makefile.  You can
see http://www.arxiv.org/abs/0704.1854 for an example with a
Makefile.

All of the above is wikified at
http://wiki.contextgarden.net/Posting_on_arxiv.org

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context