[NTG-context] showcase on mac?

2008-09-28 Thread Frans Goddijn
Willi Egger helped me get a minimal install working on my mac and I'm  
working on a collection of columns illustrated with pictures. It's  
been a while since I used Context so I want to download some basic  
manuals to refresh my memory and learn new things.

On my Windows machine I can view/navigate and download manuals from the
http://www.pragma-ade.nl/showcase.pdf
page, but on my mac this doesn't work. In the Safari browser, nothing  
happens if I click on the manuals link. In Firefox, the showcase PDF  
is downloaded and I can open it. After allowing the file to go full  
screen, I get error messages for the links there was an error opening  
this document/ the file cannot be found', execpt on the quit link ;-)

Is there a simple thing I should change to make it work on the mac as  
well?

Groet,

Frans Goddijn
www.kostverlorenvaart.nl




___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] showcase on mac?

2008-09-28 Thread Wolfgang Schuster

Am 28.09.2008 um 13:40 schrieb Frans Goddijn:

 Willi Egger helped me get a minimal install working on my mac and I'm
 working on a collection of columns illustrated with pictures. It's
 been a while since I used Context so I want to download some basic
 manuals to refresh my memory and learn new things.

 On my Windows machine I can view/navigate and download manuals from  
 the
 http://www.pragma-ade.nl/showcase.pdf
 page, but on my mac this doesn't work. In the Safari browser, nothing
 happens if I click on the manuals link. In Firefox, the showcase PDF
 is downloaded and I can open it. After allowing the file to go full
 screen, I get error messages for the links there was an error opening
 this document/ the file cannot be found', execpt on the quit  
 link ;-)

 Is there a simple thing I should change to make it work on the mac as
 well?

Works here with Safari and Adobe Reader.

Wolfgang

___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] showcase on mac?

2008-09-28 Thread Hans Hagen
Frans Goddijn wrote:
 Willi Egger helped me get a minimal install working on my mac and I'm  
 working on a collection of columns illustrated with pictures. It's  
 been a while since I used Context so I want to download some basic  
 manuals to refresh my memory and learn new things.
 
 On my Windows machine I can view/navigate and download manuals from the
 http://www.pragma-ade.nl/showcase.pdf
 page, but on my mac this doesn't work. In the Safari browser, nothing  
 happens if I click on the manuals link. In Firefox, the showcase PDF  
 is downloaded and I can open it. After allowing the file to go full  
 screen, I get error messages for the links there was an error opening  
 this document/ the file cannot be found', execpt on the quit link ;-)
 
 Is there a simple thing I should change to make it work on the mac as  
 well?

doesn't acrobat work? (the mac pdf browser is somewhat limited); best 
use acrobat reader as plugin


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] showcase on mac?

2008-09-28 Thread Frans Goddijn
I noticed that manuals are available from
http://wiki.contextgarden.net/Main_Page
as well so I won't worry too much about my Mac browsers' hesitations

Frans

On 28 sep 2008, at 14:08, Wolfgang Schuster wrote:


Am 28.09.2008 um 13:40 schrieb Frans Goddijn:

 Willi Egger helped me get a minimal install working on my mac and I'm
 working on a collection of columns illustrated with pictures. It's
 been a while since I used Context so I want to download some basic
 manuals to refresh my memory and learn new things.

 On my Windows machine I can view/navigate and download manuals from
 the
 http://www.pragma-ade.nl/showcase.pdf
 page, but on my mac this doesn't work. In the Safari browser, nothing
 happens if I click on the manuals link. In Firefox, the showcase PDF
 is downloaded and I can open it. After allowing the file to go full
 screen, I get error messages for the links there was an error opening
 this document/ the file cannot be found', execpt on the quit
 link ;-)

 Is there a simple thing I should change to make it work on the mac as
 well?

Works here with Safari and Adobe Reader.

Wolfgang

___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Experience on writing a thesis with MKIV

2008-09-28 Thread Hans Hagen
Aditya Mahajan wrote:
 Hi everyone,
 
 I finished my thesis, writing both my thesis and my presentation using 
 ConTeXt.

congratulations!

 Thesis: http://www.eecs.umich.edu/~adityam/publications/thesis/thesis.pdf

impressive and it also looks nice (the large interline spacing even 
looks ok -)

 Source: 
 http://www.eecs.umich.edu/~adityam/publications/thesis/thesis.tar.gz
 
 Presentation: 
 http://www.eecs.umich.edu/~adityam/publications/thesis/thesis-presentation.pdf
 
 Overall it was a pleasant experience, but there were some difficulties. I 
 am summarizing my experience here. Hopefully, others will find it useful.
 
 * Layout and Formatting: It was extremely simple to set up the layout and 
 formatting according to the thesis specifications. Due to the ease of 
 changing formatting, I experimented quite a bit with the formatting before 
 settling down to what is in the thesis (The school wanted nothing 
 fancy).

at least they gave you the freedom to play with fonts

 * Organizing large projects: The product-component structure made it easy 
 to work on single chapters. However, I could not get correct numbering for 
 the components (If I compiled chapter-02, it got numbered 1). In the end, 
 I was just compiling the whole thesis at the time, since it was pretty 
 fast (~10 sec).

there is a \setuphead[chapter][file=..] option which should do the job 
(remin dme to implement that in the upcoming mkiv sectioning mechanisms 
as well)

 * Fonts: Using different fonts with MKIV was really easy. For the 
 presentation, I did have some trouble in getting Euler to work with the 
 minimals. Hopefully, this will be corrected soon.

indeed; anyhow, your thesis proofs that luatex can be used for real 
production

 * Math: The math alignments worked very nicely, but I had to do a lot of 
 manual tweaking at a lot of places. Also, equations seem to like to have a 
 tendency of starting on a new page. I tried changing penalties for 
 predisplay and postdisplay (which are set to zero), but it invariably led 
 to bad page breaks at other places.
 
   At some places, the equation overlapped with the previous material. I am 
 not sure what was causing this (medium interline spacing, wrong 
 calculation of the width of the previous line, or something else). In the 
 end, I simply put a few manual \break[small] here and there.

in mkiv we can redo the before/after math spacing because there we have 
the control that we wanted

   Being able to write unicode math made simplified reading math markup.
 
 * Metapost: TeX-MP interaction is fast and easy. However, debugging 
 metapost errors is difficult because context does not stop compiling on 
 encountering a metapost error.

ok, remind me to implement a 'show error when mp fails' mechanism (we 
may need a way to trigger tex's error mode then from within luatex then; 
somethin gis possible now but a bit hackery)

 * Bibliography. For a large part, the bib module was very easy. In the 
 end, there were a few glitches with the formatting of the bibliography 
 (too title space between entries) which I had to manually correct. (Look 
 for \help inside the bbl file).
 
   The bbl file sorted authors with multiple entries incorrectly. If I had 
 authors with four publications in a year, say 2000, the came out as 2000d, 
 2000c, 2000b, 2000a. I wanted 2000a, 2000b, 2000c, and 2000d, so in the 
 end I just edited the bbl file by hand.
 
   There was also problem with maybe year. If I had 2000a and 2000b in the 
 bib file, but only referred to 2000b in the thesis, the year came out as 
 2000b rather than 2000. For this also, I edited the bbl file by hand.

i like the bibliography layout

 Overall, ConTeXt made writing the thesis fairly easy. I mean the 
 typesetting part of it. For those who are wondering, ConTeXt does not help 
 with the content of the thesis :-) I would like to thank Hans and Taco for 
 providing ConTeXt and everyone on the mailing list for answering my 
 various questions.

Hans

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] showcase on mac?

2008-09-28 Thread Frans Goddijn
When I click on the showcase link, my Firefox 3.0.3 _downloads_ de  
PDF, doesn't show it in the browser. I then double click the  
downloaded file, Adobe Reader 8.1.2 starts up and if I click a link,  
it says There was an error opening this document. This file cannot be  
found.

I deleted the Reader and downloaded/installed Reader 9.0.0 from the  
Adobe website. This time no error message but also no action when I  
click on any link but quit

Still, it must be something on my machine, since others don't have  
this problem.

Best

Frans



On 28 sep 2008, at 14:13, Hans Hagen wrote:

Frans Goddijn wrote:
 Willi Egger helped me get a minimal install working on my mac and I'm
 working on a collection of columns illustrated with pictures. It's
 been a while since I used Context so I want to download some basic
 manuals to refresh my memory and learn new things.

 On my Windows machine I can view/navigate and download manuals from  
 the
 http://www.pragma-ade.nl/showcase.pdf
 page, but on my mac this doesn't work. In the Safari browser, nothing
 happens if I click on the manuals link. In Firefox, the showcase PDF
 is downloaded and I can open it. After allowing the file to go full
 screen, I get error messages for the links there was an error opening
 this document/ the file cannot be found', execpt on the quit  
 link ;-)

 Is there a simple thing I should change to make it work on the mac as
 well?

doesn't acrobat work? (the mac pdf browser is somewhat limited); best
use acrobat reader as plugin


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Has anybody used asymptote without LaTeX?

2008-09-28 Thread Alan BRASLAU
On 2008-09-28 04:35 Zhichu Chen wrote:
 It is said that Asymptote has supported PRC format 3D file: 
 http://asymptote.sourceforge.net/gallery/3D%20graphs/ 
 
 I really wanna give it a try, but once I was building from the svn 
 source, I was told that I don't have LaTeX in my $PATH. I haven't 
 really been using LaTeX for a long time, and I prefer I don't need 
 to install a bunch of LaTeX programs and packages just for a 
 drawing program which, IMHO, only use LaTeX to make nice 
 labels. 
 
 Is there any workarounds? And how to embed .prc files into 
 the .pdf document? 
  -- 
 Best Regards
 Chen

This doesn't really answer your question
but may be of some related interest to the mailing list.

I am quite fond of pfg/tikz as a drawing package
that works rather well with plain tex, latex and context.
Asymptote is a similar tool, but it seems to be less portable.
However, it appears on the other hand to be much more powerful for 3D.
Neverless, I am sharing with this context list an impressive tikz example





-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS URA 2464
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:[EMAIL PROTECTED]

http://www-dna2006.cea.fr/

 .''`.
: :'  :
`. `'`
  `-
that I have adapted to context. (I have put the author on copy.)

Basically, the only changes to the latex source are
\usepackage{preview} - \startTEXpage \stopTEXpage
\begin{tikzpicture} - \starttikzpicture
and a few other minor syntax adaptations...)

Alan

% What is it
% ==
%
% Examples inspired by the thread at comp.text.tex about how to convert some 
hand 
% drawn pictures into programmatic 3D sketches:
% 
http://groups.google.com/group/comp.text.tex/browse_thread/thread/a03baf5d6fa64865/f7e7b903f1d87a6a
% The sketches present stereographic and cylindrical map projections and they 
% pose some interesting challenges for doing them with a 2D drawing package 
PGF/TikZ. 
%
% The main idea is to draw in selected 3D planes and then project onto the 
canvas 
% coordinate system with an appriopriate transformation. Some highlights:
% [*] usage of pgf math engine for calculation of projection transformations 
and 
% transitions points from visible (solid lines) to invisible (dashed 
lines) on 
% meridians and latitude circles
% [*] definition of 3D plane transformation with expanded styles so that they 
are robust 
% against redefinition of macros used in their construction
% [*] usage of named coordinates (nodes) for definition of characteristic 
points in 
% local coordinate systems so that they are accessible outside of their 
plane of 
% definition
% [*] calculation of intersections points with TikZ intersection coordinate 
system
% [*] usage of 'to' path operation instead of 'arc' for marking angles to 
allow for 
% easy positioning of text labels on the curve
% [*] 3D lighting effects with shading
%
%
% Who's done it
% =
%
% Tomasz M. Trzeciak
%
%
% Distribution and use
% 
%
% Use as you see fit. Consider giving a proper attribution to the author.
%
%
% Change log
% ==
%
% 2008/08/07  posted to latex-community.org
% 2008/08/08  fixed some typos, added note about 'to' path operation to the 
description,
% fixed positioning issue of nodes and 'to' path operation as 
suggested 
% by Kjell, removed some dead code from KART picture
% 2008/09/28  adapted as an example to ConTeXt

\usemodule[tikz] 
\usetikzlibrary[calc,fadings,decorations.pathreplacing]

%% helper macros

\def\pgfmathsinandcos#1#2#3{% 
  \pgfmathsetmacro#1{sin(#3)}% 
  \pgfmathsetmacro#2{cos(#3)}% 
} 
\def\LongitudePlane#1#2#3{%
  \pgfmathsinandcos\sinEl\cosEl{#2} % elevation
  \pgfmathsinandcos\sint\cost{#3} % azimuth
  \tikzset{#1/.estyle={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}
}
\def\LatitudePlane#1#2#3{%
  \pgfmathsinandcos\sinEl\cosEl{#2} % elevation
  \pgfmathsinandcos\sint\cost{#3} % latitude
  \pgfmathsetmacro\yshift{\cosEl*\sint}
  \tikzset{#1/.estyle={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} % 
}
\def\DrawLongitudeCircle#1#2{
  \LongitudePlane{current plane}{\angEl}{#2}
  \tikzset{current plane/.prefix style={scale=#1}}
   % angle of visibility 
  \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %
  \draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1); 
  \draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1); 
}
\def\DrawLatitudeCircle#1#2{
  \LatitudePlane{current plane}{\angEl}{#2}
  \tikzset{current plane/.prefix style={scale=#1}}
  \pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)} 
  % angle of visibility
  \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}  
  \draw[current plane] (\angVis:1) arc (\angVis:-\angVis-180:1); 
  \draw[current plane,dashed] (180-\angVis:1) arc (180-\angVis:\angVis:1);
}

%% document-wide tikz options and styles

\tikzset{%
  =latex, % option for nice arrows 
  inner sep=0pt,%
  outer sep=2pt,%
  mark 

Re: [NTG-context] showcase on mac?

2008-09-28 Thread Stanley Hudson
I had the same problem with Safari. I am not a fan of Adobe  
installations and all the extra stuff that goes on with them, but  
installing Reader did fix it.

Stan

.
On Sep 28, 2008, at 9:05 AM, Frans Goddijn wrote:

 When I click on the showcase link, my Firefox 3.0.3 _downloads_ de
 PDF, doesn't show it in the browser. I then double click the
 downloaded file, Adobe Reader 8.1.2 starts up and if I click a link,
 it says There was an error opening this document. This file cannot be
 found.

 I deleted the Reader and downloaded/installed Reader 9.0.0 from the
 Adobe website. This time no error message but also no action when I
 click on any link but quit

 Still, it must be something on my machine, since others don't have
 this problem.

 Best

 Frans



 On 28 sep 2008, at 14:13, Hans Hagen wrote:

 Frans Goddijn wrote:
 Willi Egger helped me get a minimal install working on my mac and I'm
 working on a collection of columns illustrated with pictures. It's
 been a while since I used Context so I want to download some basic
 manuals to refresh my memory and learn new things.

 On my Windows machine I can view/navigate and download manuals from
 the
 http://www.pragma-ade.nl/showcase.pdf
 page, but on my mac this doesn't work. In the Safari browser, nothing
 happens if I click on the manuals link. In Firefox, the showcase  
 PDF
 is downloaded and I can open it. After allowing the file to go full
 screen, I get error messages for the links there was an error  
 opening
 this document/ the file cannot be found', execpt on the quit
 link ;-)

 Is there a simple thing I should change to make it work on the mac as
 well?

 doesn't acrobat work? (the mac pdf browser is somewhat limited); best
 use acrobat reader as plugin


 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -
 ___
 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://tex.aanhet.net
 archive  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

 ___
 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://tex.aanhet.net
 archive  : https://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net
 ___

___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Experience on writing a thesis with MKIV

2008-09-28 Thread Mikael Persson
Wow, that looks very nice!

I hope you do not feel I am stealing your thread now (I do not mean
to). I did also finish my thesis (in mathematics) recently, written
in ConTeXt. For this I had a lot of help with your doc Using
\startalign and friends, thank you.

The thesis is available at

http://www.math.chalmers.se/~mickep/mp-thesis-final.pdf

and a short presentation of the third paper

http://www.math.chalmers.se/~mickep/pres.pdf

Some comments:
* At our university the thesis should be printed on the (not really
standard) G5 paper. No problem in defining and using it with ConTeXt.
* The bibliography uses Taco's module. I am happy of being able to
have different bibliographies in one file.
* As a mathematician I was a bit tired of the computer modern fonts (I
really like them, but I see them to often), so I decided to go with
the utopia/fourier fonts. This forced me to work with mkii, since I
did not get these fonts to work with mkiv (This is still a problem, I
am not sure how to go on with it for future documents).
* Typesetting math worked very smoothly. There is one place where I
hade to add some negative vertical space (I could not reproduce this
in a minimal file).
* I'm very happy with the way MetaPost and ConTeXt work together.
* The presentation is inspired by Thomas A. Schmitz' files at
http://www.tug.org/pracjourn/2006-2/schmitz/ (thanks!)
* The presentation uses Wolfram's Mathematica fonts which I find being
very clear.

I will happily continue to use ConTeXt in future projects.

/Micke P

On Sat, Sep 27, 2008 at 6:35 PM, Aditya Mahajan [EMAIL PROTECTED] wrote:
 Hi everyone,

 I finished my thesis, writing both my thesis and my presentation using
 ConTeXt.

 Thesis: http://www.eecs.umich.edu/~adityam/publications/thesis/thesis.pdf

 Source:
 http://www.eecs.umich.edu/~adityam/publications/thesis/thesis.tar.gz

 Presentation:
 http://www.eecs.umich.edu/~adityam/publications/thesis/thesis-presentation.pdf

 Overall it was a pleasant experience, but there were some difficulties. I
 am summarizing my experience here. Hopefully, others will find it useful.

 * Layout and Formatting: It was extremely simple to set up the layout and
 formatting according to the thesis specifications. Due to the ease of
 changing formatting, I experimented quite a bit with the formatting before
 settling down to what is in the thesis (The school wanted nothing
 fancy).

 * Organizing large projects: The product-component structure made it easy
 to work on single chapters. However, I could not get correct numbering for
 the components (If I compiled chapter-02, it got numbered 1). In the end,
 I was just compiling the whole thesis at the time, since it was pretty
 fast (~10 sec).

 * Fonts: Using different fonts with MKIV was really easy. For the
 presentation, I did have some trouble in getting Euler to work with the
 minimals. Hopefully, this will be corrected soon.

 * Math: The math alignments worked very nicely, but I had to do a lot of
 manual tweaking at a lot of places. Also, equations seem to like to have a
 tendency of starting on a new page. I tried changing penalties for
 predisplay and postdisplay (which are set to zero), but it invariably led
 to bad page breaks at other places.

  At some places, the equation overlapped with the previous material. I am
 not sure what was causing this (medium interline spacing, wrong
 calculation of the width of the previous line, or something else). In the
 end, I simply put a few manual \break[small] here and there.

  Being able to write unicode math made simplified reading math markup.

 * Metapost: TeX-MP interaction is fast and easy. However, debugging
 metapost errors is difficult because context does not stop compiling on
 encountering a metapost error.

 * Bibliography. For a large part, the bib module was very easy. In the
 end, there were a few glitches with the formatting of the bibliography
 (too title space between entries) which I had to manually correct. (Look
 for \help inside the bbl file).

  The bbl file sorted authors with multiple entries incorrectly. If I had
 authors with four publications in a year, say 2000, the came out as 2000d,
 2000c, 2000b, 2000a. I wanted 2000a, 2000b, 2000c, and 2000d, so in the
 end I just edited the bbl file by hand.

  There was also problem with maybe year. If I had 2000a and 2000b in the
 bib file, but only referred to 2000b in the thesis, the year came out as
 2000b rather than 2000. For this also, I edited the bbl file by hand.


 Overall, ConTeXt made writing the thesis fairly easy. I mean the
 typesetting part of it. For those who are wondering, ConTeXt does not help
 with the content of the thesis :-) I would like to thank Hans and Taco for
 providing ConTeXt and everyone on the mailing list for answering my
 various questions.


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

 

Re: [NTG-context] Experience on writing a thesis with MKIV

2008-09-28 Thread Mohamed Bana
Aditya Mahajan wrote:
 Hi everyone,
 
 I finished my thesis, writing both my thesis and my presentation using 
 ConTeXt.
 
  Aditya

:).  But there's a still something missing that I need before I even 
thinking of typesetting an msc thesis in ConTeXt.   I'd like to have 
something equivelant to the *listings.sty* package; 
http://thread.gmane.org/gmane.comp.tex.context/15591/focus=15592 or 
http://vega.soi.city.ac.uk/~abbg770/listing-sample.pdf.


I setup listing first;

\lstset{breaklines=true,
showlines=true, % showing line numbers
numbers=left,   % where to show line numbers
numberstyle=\tiny\color{gray},  
numbersep=10pt, %
stepnumber=1,   % how often to show the line number on the left
language=Java,  % specifiy the language
basicstyle=\ttfamily\small,  % print whole listing small
keywordstyle=\color{eclipsekeyword}\ttfamily\underbar, % underlined bold 
black keywords
identifierstyle=,   % nothing happens
commentstyle=\color{eclipsecomment}, % white comments, if you use 
commentstyle=\color{white},
stringstyle=\ttfamily,  % typewriter type for strings
showstringspaces=false, % no special string spaces
frame=single,
backgroundcolor=\color{white},
tabsize=4,
showspaces=false,
showstringspaces=false} 

\lstset{morecomment=[s][\color{eclipsejavadoc}]{/**}{*/}}


Includes a file, look at Listing B.2 on the pdf I posted.  This should 
be self explanatory;

\lstinputlisting[
caption={SpreadsheetParser.java},
label=lst:SpreadsheetParser.java]
{source/SpreadsheetParser.java}



I can also list inline using the same settings defined in \lstset - but 
it doesn't break across lines.  The choice of charater is arbitrary 
i.e., I could have chosen to use | instead of !;

\lstinline!matcher(CharSequence input)!



Similar to preceeding, with line breaking.  Also I can refer to it 
using; \ref{lst:freeformlogfile}

\begin{lstlisting}[frame=,label={lst:freeformlogfile},caption={Log File}]
import java.util.Arrays;

public class ArrayReallocationDemo {

   public static void main(String[] args) {
 int[] data1 = new int[] { 1, 3, 5, 7, 9 };

 printArray(data1);
 int[] data2 = Arrays.copyOf(data1, 6);
 data2[5] = 11;
 printArray(data2);

 int[] data3 = Arrays.copyOfRange(data1, 2, 10);
 printArray(data3);
   }

   // print array elements
   private static void printArray(int[] data) {
 StringBuilder stringBuilder = new StringBuilder([);
 for (int i = 0; i  data.length; i++) {
   stringBuilder.append(data[i]);
   if (i  data.length - 1)
 stringBuilder.append(, );
 }
 stringBuilder.append(]);
 System.out.println(stringBuilder);
   }
}
\end{lstlisting}


Thanks guys

___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Listings (was: Experience on writing a thesis with MKIV)

2008-09-28 Thread Wolfgang Schuster

Am 28.09.2008 um 19:34 schrieb Mohamed Bana:

 Aditya Mahajan wrote:
 Hi everyone,

 I finished my thesis, writing both my thesis and my presentation  
 using
 ConTeXt.

 Aditya

 :).  But there's a still something missing that I need before I even
 thinking of typesetting an msc thesis in ConTeXt.   I'd like to have
 something equivelant to the *listings.sty* package;
 http://thread.gmane.org/gmane.comp.tex.context/15591/focus=15592 or
 http://vega.soi.city.ac.uk/~abbg770/listing-sample.pdf.


 I setup listing first;

 \lstset{breaklines=true,
 showlines=true,   % showing line numbers
 numbers=left, % where to show line numbers
 numberstyle=\tiny\color{gray},
 numbersep=10pt,   %
 stepnumber=1, % how often to show the line number on the left
 language=Java,% specifiy the language
 basicstyle=\ttfamily\small,  % print whole listing small
 keywordstyle=\color{eclipsekeyword}\ttfamily\underbar, % underlined  
 bold
 black keywords
 identifierstyle=,   % nothing happens
 commentstyle=\color{eclipsecomment}, % white comments, if you use
 commentstyle=\color{white},
 stringstyle=\ttfamily,  % typewriter type for strings
 showstringspaces=false,   % no special string spaces
 frame=single,
 backgroundcolor=\color{white},
 tabsize=4,
 showspaces=false,
 showstringspaces=false}   

 \lstset{morecomment=[s][\color{eclipsejavadoc}]{/**}{*/}}


 Includes a file, look at Listing B.2 on the pdf I posted.  This should
 be self explanatory;

 \lstinputlisting[
 caption={SpreadsheetParser.java},
 label=lst:SpreadsheetParser.java]
 {source/SpreadsheetParser.java}



 I can also list inline using the same settings defined in \lstset -  
 but
 it doesn't break across lines.  The choice of charater is arbitrary
 i.e., I could have chosen to use | instead of !;

 \lstinline!matcher(CharSequence input)!



 Similar to preceeding, with line breaking.  Also I can refer to it
 using; \ref{lst:freeformlogfile}

 \begin{lstlisting}[frame=,label={lst:freeformlogfile},caption={Log  
 File}]
 import java.util.Arrays;

 public class ArrayReallocationDemo {

   public static void main(String[] args) {
 int[] data1 = new int[] { 1, 3, 5, 7, 9 };

 printArray(data1);
 int[] data2 = Arrays.copyOf(data1, 6);
 data2[5] = 11;
 printArray(data2);

 int[] data3 = Arrays.copyOfRange(data1, 2, 10);
 printArray(data3);
   }

   // print array elements
   private static void printArray(int[] data) {
 StringBuilder stringBuilder = new StringBuilder([);
 for (int i = 0; i  data.length; i++) {
   stringBuilder.append(data[i]);
   if (i  data.length - 1)
 stringBuilder.append(, );
 }
 stringBuilder.append(]);
 System.out.println(stringBuilder);
   }
 }
 \end{lstlisting}

\setupcolors[state=start]

\definetyping[JAVA][option=JV]

\setuptyping
   [JAVA]
   [numbering=line]

\starttext

\startJAVA
...
\stopJAVA

\stoptext

or

same preamble as above plus

\definefloat[listing][listings]

\starttext

\placelisting
[split]
[lst:freeformlogfile]
{Log File}
{\startJAVA
 ...
 \stopJAVA}

\stoptext

Wolfgang

___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Experience on writing a thesis with MKIV

2008-09-28 Thread Hans Hagen
Mikael Persson wrote:

 The thesis is available at

maybe we should collect such links on a wiki page

 http://www.math.chalmers.se/~mickep/mp-thesis-final.pdf
 
 and a short presentation of the third paper
 
 http://www.math.chalmers.se/~mickep/pres.pdf

 Some comments:
 * At our university the thesis should be printed on the (not really
 standard) G5 paper. No problem in defining and using it with ConTeXt.

just curious ... is it used more often or just at your universiy; it's 
no problem to add an extra papersize definition

 * The bibliography uses Taco's module. I am happy of being able to
 have different bibliographies in one file.
 * As a mathematician I was a bit tired of the computer modern fonts (I
 really like them, but I see them to often), so I decided to go with
 the utopia/fourier fonts. This forced me to work with mkii, since I
 did not get these fonts to work with mkiv (This is still a problem, I
 am not sure how to go on with it for future documents).

looks quite nice, i also like the font size

 * Typesetting math worked very smoothly. There is one place where I
 hade to add some negative vertical space (I could not reproduce this
 in a minimal file).
 * I'm very happy with the way MetaPost and ConTeXt work together.
 * The presentation is inspired by Thomas A. Schmitz' files at
 http://www.tug.org/pracjourn/2006-2/schmitz/ (thanks!)
 
 * The presentation uses Wolfram's Mathematica fonts which I find being
 very clear.

looks nice indeed; are there open type variants of those?


Hans

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] index in swedish doc (mkiv)

2008-09-28 Thread Hans Hagen
Mikael Persson wrote:
 Hi all,
 I want to have an index in a swedish document, but when I add it I get
 unknown instead of the letter heads. Minimal file:
 
 
 \mainlanguage[sv]
 \starttext
 Test\index{test}
 \placeindex
 \stoptext
 
 
 Just uncomment the \mainlanguage[sv] and you will get a t instead of
 unknown as expected.
 
 If there is something that has to be added when it comes to swedish
 indices I am willing to do that.
 
 By the way, this problem does only appear in mkiv, in mkii it works as
 it should.

take a look at sort-lan.lua ... no swedish there yet


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] index in swedish doc (mkiv)

2008-09-28 Thread Mikael Persson
On Sun, Sep 28, 2008 at 8:27 PM, Hans Hagen [EMAIL PROTECTED] wrote:
 Mikael Persson wrote:
 Hi all,
 I want to have an index in a swedish document, but when I add it I get
 unknown instead of the letter heads. Minimal file:

 
 \mainlanguage[sv]
 \starttext
 Test\index{test}
 \placeindex
 \stoptext
 

 Just uncomment the \mainlanguage[sv] and you will get a t instead of
 unknown as expected.

 If there is something that has to be added when it comes to swedish
 indices I am willing to do that.

 By the way, this problem does only appear in mkiv, in mkii it works as
 it should.

 take a look at sort-lan.lua ... no swedish there yet


Hi, I had a look, and it seems it is exactly the same as the finish
one is done in that file.

Mikael
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Experience on writing a thesis with MKIV

2008-09-28 Thread Aditya Mahajan
On Sun, 28 Sep 2008, Mikael Persson wrote:

 On Sun, Sep 28, 2008 at 8:23 PM, Hans Hagen [EMAIL PROTECTED] wrote:
 Mikael Persson wrote:

 The thesis is available at

 maybe we should collect such links on a wiki page

 good idea

These could also be useful for the regression test suite for ConTeXt.

 http://www.math.chalmers.se/~mickep/mp-thesis-final.pdf

 and a short presentation of the third paper

 http://www.math.chalmers.se/~mickep/pres.pdf

Look very nice and professional.

 Some comments:
 * As a mathematician I was a bit tired of the computer modern fonts (I
 really like them, but I see them to often), so I decided to go with
 the utopia/fourier fonts. This forced me to work with mkii, since I
 did not get these fonts to work with mkiv (This is still a problem, I
 am not sure how to go on with it for future documents).

 looks quite nice, i also like the font size

 Thanks. What about getting these fonts to work in mkiv? Must there be
 some change in the fonts? Some files in ConTeXt? (they were perfectly
 working in older mkii)

Fourier and Uptopia should work with mkiv. I will check why they are not 
working at present.

Aditya
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Newbie Problem With ConTeXt/MacTeX-2008 Distribution

2008-09-28 Thread Mojca Miklavec
On Sat, Sep 27, 2008 at 6:42 PM, George N. White III wrote:
 On Sat, Sep 27, 2008 at 12:51 PM, Stanley Hudson wrote:
 Trying out ConTeXt on a Macbook with the MacTeX -2008 Distribution.
 The following compiles on ConTeXt live at the Garden, but does not
 work locally.

 \usemodule[pre-05]

 \starttext
  \TitlePage{A Sample Presentation}
  \Topics{Informative Talk}
  \Topic{First item}
 Some information goes here
 \Topic{Second Item}
 More information goes here
 \stoptext

 Any suggestions on what is wrong?

 I get the same error using TL2008 on linux, so it looks like a bug in
 context.  All is not lost, however, as your file does work using MKiV
 with the context minimal distro:

It also seems to work with MacTeX 2008 with (slightly) newer ConTeXt and mkii.

(ConTeXt  ver: 2008.07.31 16:30 MKII  fmt: 2008.8.4  int: english/english)

Maybe it was just a bug in TL version of ConTeXt. (There are some
notes about updating on http://wiki.contextgarden.net/Running_Mark_IV,
but there are some mkiv-related problems with updating that are
currently being resolved. So you would also need to update luatools
and mtxrun binaries manually.)

Mojca
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Listings

2008-09-28 Thread Mohamed Bana
Wolfgang Schuster wrote:
 Am 28.09.2008 um 19:34 schrieb Mohamed Bana:
 
 Aditya Mahajan wrote:
 Hi everyone,

 I finished my thesis, writing both my thesis and my presentation  
 using
 ConTeXt.

 Aditya
 :).  But there's a still something missing that I need before I even
 thinking of typesetting an msc thesis in ConTeXt.   I'd like to have
 something equivelant to the *listings.sty* package;
 http://thread.gmane.org/gmane.comp.tex.context/15591/focus=15592 or
 http://vega.soi.city.ac.uk/~abbg770/listing-sample.pdf.


 I setup listing first;

 \lstset{breaklines=true,
 showlines=true,  % showing line numbers
 numbers=left,% where to show line numbers
 numberstyle=\tiny\color{gray},   
 numbersep=10pt,  %
 stepnumber=1,% how often to show the line number on the left
 language=Java,   % specifiy the language
 basicstyle=\ttfamily\small,  % print whole listing small
 keywordstyle=\color{eclipsekeyword}\ttfamily\underbar, % underlined  
 bold
 black keywords
 identifierstyle=,   % nothing happens
 commentstyle=\color{eclipsecomment}, % white comments, if you use
 commentstyle=\color{white},
 stringstyle=\ttfamily,  % typewriter type for strings
 showstringspaces=false,  % no special string spaces
 frame=single,
 backgroundcolor=\color{white},
 tabsize=4,
 showspaces=false,
 showstringspaces=false}  

 \lstset{morecomment=[s][\color{eclipsejavadoc}]{/**}{*/}}


 Includes a file, look at Listing B.2 on the pdf I posted.  This should
 be self explanatory;

 \lstinputlisting[
 caption={SpreadsheetParser.java},
 label=lst:SpreadsheetParser.java]
 {source/SpreadsheetParser.java}



 I can also list inline using the same settings defined in \lstset -  
 but
 it doesn't break across lines.  The choice of charater is arbitrary
 i.e., I could have chosen to use | instead of !;

 \lstinline!matcher(CharSequence input)!



 Similar to preceeding, with line breaking.  Also I can refer to it
 using; \ref{lst:freeformlogfile}

 \begin{lstlisting}[frame=,label={lst:freeformlogfile},caption={Log  
 File}]
 import java.util.Arrays;

 public class ArrayReallocationDemo {

   public static void main(String[] args) {
 int[] data1 = new int[] { 1, 3, 5, 7, 9 };

 printArray(data1);
 int[] data2 = Arrays.copyOf(data1, 6);
 data2[5] = 11;
 printArray(data2);

 int[] data3 = Arrays.copyOfRange(data1, 2, 10);
 printArray(data3);
   }

   // print array elements
   private static void printArray(int[] data) {
 StringBuilder stringBuilder = new StringBuilder([);
 for (int i = 0; i  data.length; i++) {
   stringBuilder.append(data[i]);
   if (i  data.length - 1)
 stringBuilder.append(, );
 }
 stringBuilder.append(]);
 System.out.println(stringBuilder);
   }
 }
 \end{lstlisting}
 
 \setupcolors[state=start]
 
 \definetyping[JAVA][option=JV]
 
 \setuptyping
[JAVA]
[numbering=line]
 
 \starttext
 
 \startJAVA
 ...
 \stopJAVA
 
 \stoptext
 
 or
 
 same preamble as above plus
 
 \definefloat[listing][listings]
 
 \starttext
 
 \placelisting
 [split]
 [lst:freeformlogfile]
 {Log File}
 {\startJAVA
  ...
  \stopJAVA}
 
 \stoptext
 
 Wolfgang
 

Thanks Wolfgang.

Source; http://pastebin.com/m40986857
Pdf; http://filebin.ca/kceezh/listing.pdf or http://filebin.ca/kceezh

I've still got some issues with it :(.  I think I'll just wait till 
verbatim supports improves.

1.  Lines protude into the margin and sometime even go past the end of 
the page.
2.  Why doesn't it show the line numbers for the empty lines?
3.  Is there a way to supress the 'there is nothing to split' warning?

Mohamed

___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Listings

2008-09-28 Thread Wolfgang Schuster

Am 28.09.2008 um 22:42 schrieb Mohamed Bana:

 Wolfgang Schuster wrote:
 Am 28.09.2008 um 19:34 schrieb Mohamed Bana:

 Aditya Mahajan wrote:
 Hi everyone,

 I finished my thesis, writing both my thesis and my presentation
 using
 ConTeXt.

 Aditya
 :).  But there's a still something missing that I need before I even
 thinking of typesetting an msc thesis in ConTeXt.   I'd like to have
 something equivelant to the *listings.sty* package;
 http://thread.gmane.org/gmane.comp.tex.context/15591/focus=15592 or
 http://vega.soi.city.ac.uk/~abbg770/listing-sample.pdf.


 I setup listing first;

 \lstset{breaklines=true,
 showlines=true, % showing line numbers
 numbers=left,   % where to show line numbers
 numberstyle=\tiny\color{gray},  
 numbersep=10pt, %
 stepnumber=1,   % how often to show the line number on the left
 language=Java,  % specifiy the language
 basicstyle=\ttfamily\small,  % print whole listing small
 keywordstyle=\color{eclipsekeyword}\ttfamily\underbar, % underlined
 bold
 black keywords
 identifierstyle=,   % nothing happens
 commentstyle=\color{eclipsecomment}, % white comments, if you use
 commentstyle=\color{white},
 stringstyle=\ttfamily,  % typewriter type for strings
 showstringspaces=false, % no special string spaces
 frame=single,
 backgroundcolor=\color{white},
 tabsize=4,
 showspaces=false,
 showstringspaces=false} 

 \lstset{morecomment=[s][\color{eclipsejavadoc}]{/**}{*/}}


 Includes a file, look at Listing B.2 on the pdf I posted.  This  
 should
 be self explanatory;

 \lstinputlisting[
 caption={SpreadsheetParser.java},
 label=lst:SpreadsheetParser.java]
 {source/SpreadsheetParser.java}



 I can also list inline using the same settings defined in \lstset -
 but
 it doesn't break across lines.  The choice of charater is arbitrary
 i.e., I could have chosen to use | instead of !;

 \lstinline!matcher(CharSequence input)!



 Similar to preceeding, with line breaking.  Also I can refer to it
 using; \ref{lst:freeformlogfile}

 \begin{lstlisting}[frame=,label={lst:freeformlogfile},caption={Log
 File}]
 import java.util.Arrays;

 public class ArrayReallocationDemo {

  public static void main(String[] args) {
int[] data1 = new int[] { 1, 3, 5, 7, 9 };

printArray(data1);
int[] data2 = Arrays.copyOf(data1, 6);
data2[5] = 11;
printArray(data2);

int[] data3 = Arrays.copyOfRange(data1, 2, 10);
printArray(data3);
  }

  // print array elements
  private static void printArray(int[] data) {
StringBuilder stringBuilder = new StringBuilder([);
for (int i = 0; i  data.length; i++) {
  stringBuilder.append(data[i]);
  if (i  data.length - 1)
stringBuilder.append(, );
}
stringBuilder.append(]);
System.out.println(stringBuilder);
  }
 }
 \end{lstlisting}

 \setupcolors[state=start]

 \definetyping[JAVA][option=JV]

 \setuptyping
   [JAVA]
   [numbering=line]

 \starttext

 \startJAVA
 ...
 \stopJAVA

 \stoptext

 or

 same preamble as above plus

 \definefloat[listing][listings]

 \starttext

 \placelisting
[split]
[lst:freeformlogfile]
{Log File}
{\startJAVA
 ...
 \stopJAVA}

 \stoptext

 Wolfgang


 Thanks Wolfgang.

 Source; http://pastebin.com/m40986857
 Pdf; http://filebin.ca/kceezh/listing.pdf or http://filebin.ca/kceezh

 I've still got some issues with it :(.  I think I'll just wait till
 verbatim supports improves.

 1.  Lines protude into the margin and sometime even go past the end of
 the page.

\setuptyping
[JAVA]
[numbering=line,
 lines=yes]

\setuplinenumbering[location=text]

 2.  Why doesn't it show the line numbers for the empty lines?

Could be a MkII bug because it works with MkIV but here appears
a new problem, location=text for line numbering is not working.

Test file for Hans:

% engine=luatex

\setuplinenumbering[location=text]

\showframe

\starttext

\startlinenumbering
A line of text with the line number.
\stoplinenumbering

\stoptext


 3.  Is there a way to supress the 'there is nothing to split' warning?

It's a bug, I will look for a solution (the caption has to be fixed  
too).

Wolfgang

___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Formatting TOC

2008-09-28 Thread Diego Depaoli
2008/9/27 Wolfgang Schuster [EMAIL PROTECTED]:

 \setuplabeltext[en][chapter=Chapter~]

 \setuplist[chapter][numbercommand=\groupedcommand{\labeltext{chapter}}
 {},width=2.5cm]
Simply perfect!!!
A lot of thanks

-- 
Diego Depaoli
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] urgent index error

2008-09-28 Thread Steffen Wolfrum
Hi,


in my document I use utf-input.
So do the index-marks:

\enableregime[utf]

\starttext

START\startregister[index][umlautä]{Umlaute– ä}

\input knuth

END\stopregister[index][umlautä]

\placeregister[index][compress=yes]

\stoptext



Just, this can't be typset:

! Missing \endcsname inserted.
to be read again
\char
\dochar #1-\char
   #1\relax
\setgvalue #1-\expandafter \gdef \csname #1
 \endcsname
\dostartregister ... \setgvalue {\??id #1\??id #2}
   {\dodostopregister  
[#1][#3...
l.5 ...rtregister[index][umlautä]{Umlaute– ä}

?



UTF in maintext but not in index-marks ...

What can be done now (besides re-writting the document)?

Steffen (MKII)
___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] urgent index error

2008-09-28 Thread Wolfgang Schuster

Am 29.09.2008 um 00:00 schrieb Steffen Wolfrum:

 Hi,


 in my document I use utf-input.
 So do the index-marks:

 \enableregime[utf]

 \starttext

 START\startregister[index][umlautä]{Umlaute– ä}

 \input knuth

 END\stopregister[index][umlautä]

 \placeregister[index][compress=yes]

 \stoptext



 Just, this can't be typset:

 ! Missing \endcsname inserted.
 to be read again
\char
 \dochar #1-\char
   #1\relax
 \setgvalue #1-\expandafter \gdef \csname #1
 \endcsname
 \dostartregister ... \setgvalue {\??id #1\??id #2}
   {\dodostopregister
 [#1][#3...
 l.5 ...rtregister[index][umlautä]{Umlaute– ä}

 ?



 UTF in maintext but not in index-marks ...

 What can be done now (besides re-writting the document)?

\startregister[index][umlautae]{...}
...
\stopregister[index][umlautae]

You could use umlauts in macro names only with XeTeX and LuaTeX
but not with pdfTeX.

Wolfgang


___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Listings

2008-09-28 Thread Wolfgang Schuster

Am 28.09.2008 um 23:23 schrieb Wolfgang Schuster:


 Am 28.09.2008 um 22:42 schrieb Mohamed Bana:

 Wolfgang Schuster wrote:
 Am 28.09.2008 um 19:34 schrieb Mohamed Bana:

 Aditya Mahajan wrote:
 Hi everyone,

 I finished my thesis, writing both my thesis and my presentation
 using
 ConTeXt.

 Aditya
 :).  But there's a still something missing that I need before I  
 even
 thinking of typesetting an msc thesis in ConTeXt.   I'd like to  
 have
 something equivelant to the *listings.sty* package;
 http://thread.gmane.org/gmane.comp.tex.context/15591/focus=15592 or
 http://vega.soi.city.ac.uk/~abbg770/listing-sample.pdf.


 I setup listing first;

 \lstset{breaklines=true,
 showlines=true,% showing line numbers
 numbers=left,  % where to show line numbers
 numberstyle=\tiny\color{gray}, 
 numbersep=10pt,%
 stepnumber=1,  % how often to show the line number on the left
 language=Java, % specifiy the language
 basicstyle=\ttfamily\small,  % print whole listing small
 keywordstyle=\color{eclipsekeyword}\ttfamily\underbar, % underlined
 bold
 black keywords
 identifierstyle=,   % nothing happens
 commentstyle=\color{eclipsecomment}, % white comments, if you use
 commentstyle=\color{white},
 stringstyle=\ttfamily,  % typewriter type for strings
 showstringspaces=false,% no special string spaces
 frame=single,
 backgroundcolor=\color{white},
 tabsize=4,
 showspaces=false,
 showstringspaces=false}

 \lstset{morecomment=[s][\color{eclipsejavadoc}]{/**}{*/}}


 Includes a file, look at Listing B.2 on the pdf I posted.  This  
 should
 be self explanatory;

 \lstinputlisting[
 caption={SpreadsheetParser.java},
 label=lst:SpreadsheetParser.java]
 {source/SpreadsheetParser.java}



 I can also list inline using the same settings defined in \lstset -
 but
 it doesn't break across lines.  The choice of charater is arbitrary
 i.e., I could have chosen to use | instead of !;

 \lstinline!matcher(CharSequence input)!



 Similar to preceeding, with line breaking.  Also I can refer to it
 using; \ref{lst:freeformlogfile}

 \begin{lstlisting}[frame=,label={lst:freeformlogfile},caption={Log
 File}]
 import java.util.Arrays;

 public class ArrayReallocationDemo {

 public static void main(String[] args) {
   int[] data1 = new int[] { 1, 3, 5, 7, 9 };

   printArray(data1);
   int[] data2 = Arrays.copyOf(data1, 6);
   data2[5] = 11;
   printArray(data2);

   int[] data3 = Arrays.copyOfRange(data1, 2, 10);
   printArray(data3);
 }

 // print array elements
 private static void printArray(int[] data) {
   StringBuilder stringBuilder = new StringBuilder([);
   for (int i = 0; i  data.length; i++) {
 stringBuilder.append(data[i]);
 if (i  data.length - 1)
   stringBuilder.append(, );
   }
   stringBuilder.append(]);
   System.out.println(stringBuilder);
 }
 }
 \end{lstlisting}

 \setupcolors[state=start]

 \definetyping[JAVA][option=JV]

 \setuptyping
  [JAVA]
  [numbering=line]

 \starttext

 \startJAVA
 ...
 \stopJAVA

 \stoptext

 or

 same preamble as above plus

 \definefloat[listing][listings]

 \starttext

 \placelisting
   [split]
   [lst:freeformlogfile]
   {Log File}
   {\startJAVA
...
\stopJAVA}

 \stoptext

 Wolfgang


 Thanks Wolfgang.

 Source; http://pastebin.com/m40986857
 Pdf; http://filebin.ca/kceezh/listing.pdf or http://filebin.ca/kceezh

 I've still got some issues with it :(.  I think I'll just wait till
 verbatim supports improves.

 1.  Lines protude into the margin and sometime even go past the end  
 of
 the page.

 \setuptyping
   [JAVA]
   [numbering=line,
lines=yes]

 \setuplinenumbering[location=text]

 2.  Why doesn't it show the line numbers for the empty lines?

 Could be a MkII bug because it works with MkIV but here appears
 a new problem, location=text for line numbering is not working.

 Test file for Hans:

 % engine=luatex

 \setuplinenumbering[location=text]

 \showframe

 \starttext

 \startlinenumbering
 A line of text with the line number.
 \stoplinenumbering

 \stoptext


 3.  Is there a way to supress the 'there is nothing to split'  
 warning?

 It's a bug, I will look for a solution (the caption has to be fixed  
 too).

Here is a quick and dirty solution, alisghtly modified version of
something I wrote two years ago [1]. The code is not ready for
documents because the spacing between the lines is wrong.

\unprotect

\def\dododostarttyping[#1]%
   {\typingparameter\c!before
\ifinsidesplitfloat
  \setbox\tablecontentbox\vbox\bgroup % added
\fi
\startpacked % includes \bgroup
\dosetuptypelinenumbering{#1}%
\initializetyping
\startverbatimcolor
\expanded{\mktypeblockverbatim{\s!start\currenttyping}{\s!stop 
\currenttyping}}}

\def\dostoptyping#1% hm, currenttyping
   {\stopverbatimcolor
\stoppacked  % includes \egroup
\ifinsidesplitfloat
  \egroup % added
  \dosplitverbatimbox\tablecontentbox
\fi

Re: [NTG-context] Has anybody used asymptote without LaTeX?

2008-09-28 Thread Zhichu Chen
Hi, Alan

Thank you for your attention, but I don't need the psedu-3D effect. Asymptote
could create real 3D file which pdf has supported since, maybe, version 1.5.



On Sun, Sep 28, 2008 at 10:19 PM, Alan BRASLAU [EMAIL PROTECTED] wrote:
 On 2008-09-28 04:35 Zhichu Chen wrote:
 It is said that Asymptote has supported PRC format 3D file:
 http://asymptote.sourceforge.net/gallery/3D%20graphs/

 I really wanna give it a try, but once I was building from the svn
 source, I was told that I don't have LaTeX in my $PATH. I haven't
 really been using LaTeX for a long time, and I prefer I don't need
 to install a bunch of LaTeX programs and packages just for a
 drawing program which, IMHO, only use LaTeX to make nice
 labels.

 Is there any workarounds? And how to embed .prc files into
 the .pdf document?
  --
 Best Regards
 Chen

 This doesn't really answer your question
 but may be of some related interest to the mailing list.

 I am quite fond of pfg/tikz as a drawing package
 that works rather well with plain tex, latex and context.
 Asymptote is a similar tool, but it seems to be less portable.
 However, it appears on the other hand to be much more powerful for 3D.
 Neverless, I am sharing with this context list an impressive tikz example





 --
 Alan Braslau
 CEA DSM-IRAMIS-SPEC
 CNRS URA 2464
 Orme des Merisiers
 91191 Gif-sur-Yvette cedex FRANCE
 tel: +33 1 69 08 73 15
 fax: +33 1 69 08 87 86
 mailto:[EMAIL PROTECTED]

 http://www-dna2006.cea.fr/

  .''`.
 : :'  :
 `. `'`
  `-
 that I have adapted to context. (I have put the author on copy.)

 Basically, the only changes to the latex source are
 \usepackage{preview} - \startTEXpage \stopTEXpage
 \begin{tikzpicture} - \starttikzpicture
 and a few other minor syntax adaptations...)

 Alan

 % What is it
 % ==
 %
 % Examples inspired by the thread at comp.text.tex about how to convert some
 hand
 % drawn pictures into programmatic 3D sketches:
 %
 http://groups.google.com/group/comp.text.tex/browse_thread/thread/a03baf5d6fa64865/f7e7b903f1d87a6a
 % The sketches present stereographic and cylindrical map projections and they
 % pose some interesting challenges for doing them with a 2D drawing package
 PGF/TikZ.
 %
 % The main idea is to draw in selected 3D planes and then project onto the
 canvas
 % coordinate system with an appriopriate transformation. Some highlights:
 % [*] usage of pgf math engine for calculation of projection transformations
 and
 % transitions points from visible (solid lines) to invisible (dashed
 lines) on
 % meridians and latitude circles
 % [*] definition of 3D plane transformation with expanded styles so that they
 are robust
 % against redefinition of macros used in their construction
 % [*] usage of named coordinates (nodes) for definition of characteristic
 points in
 % local coordinate systems so that they are accessible outside of their
 plane of
 % definition
 % [*] calculation of intersections points with TikZ intersection coordinate
 system
 % [*] usage of 'to' path operation instead of 'arc' for marking angles to
 allow for
 % easy positioning of text labels on the curve
 % [*] 3D lighting effects with shading
 %
 %
 % Who's done it
 % =
 %
 % Tomasz M. Trzeciak
 %
 %
 % Distribution and use
 % 
 %
 % Use as you see fit. Consider giving a proper attribution to the author.
 %
 %
 % Change log
 % ==
 %
 % 2008/08/07  posted to latex-community.org
 % 2008/08/08  fixed some typos, added note about 'to' path operation to the
 description,
 % fixed positioning issue of nodes and 'to' path operation as
 suggested
 % by Kjell, removed some dead code from KART picture
 % 2008/09/28  adapted as an example to ConTeXt

 \usemodule[tikz]
 \usetikzlibrary[calc,fadings,decorations.pathreplacing]

 %% helper macros

 \def\pgfmathsinandcos#1#2#3{%
  \pgfmathsetmacro#1{sin(#3)}%
  \pgfmathsetmacro#2{cos(#3)}%
 }
 \def\LongitudePlane#1#2#3{%
  \pgfmathsinandcos\sinEl\cosEl{#2} % elevation
  \pgfmathsinandcos\sint\cost{#3} % azimuth
  \tikzset{#1/.estyle={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}
 }
 \def\LatitudePlane#1#2#3{%
  \pgfmathsinandcos\sinEl\cosEl{#2} % elevation
  \pgfmathsinandcos\sint\cost{#3} % latitude
  \pgfmathsetmacro\yshift{\cosEl*\sint}
  \tikzset{#1/.estyle={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %
 }
 \def\DrawLongitudeCircle#1#2{
  \LongitudePlane{current plane}{\angEl}{#2}
  \tikzset{current plane/.prefix style={scale=#1}}
   % angle of visibility
  \pgfmathsetmacro\angVis{atan(sin(#2)*cos(\angEl)/sin(\angEl))} %
  \draw[current plane] (\angVis:1) arc (\angVis:\angVis+180:1);
  \draw[current plane,dashed] (\angVis-180:1) arc (\angVis-180:\angVis:1);
 }
 \def\DrawLatitudeCircle#1#2{
  \LatitudePlane{current plane}{\angEl}{#2}
  \tikzset{current plane/.prefix style={scale=#1}}
  \pgfmathsetmacro\sinVis{sin(#2)/cos(#2)*sin(\angEl)/cos(\angEl)}
  % angle of visibility
  \pgfmathsetmacro\angVis{asin(min(1,max(\sinVis,-1)))}
 

Re: [NTG-context] Has anybody used asymptote without LaTeX?

2008-09-28 Thread Yue Wang
Hi, Zhichu:

$n$ years ago ($n\geq 2$), some user had successfully embed a u3d
format file into pdf using ConTeXt with the instruction from Hans. I
think the module is still there. Maybe you can have a look. In fact
u3d and prc are similar, maybe you can try the same way. But I have no
idea how to create a asy-tex interface like tex-mp [Moreover, I prefer
to extend mp to 3-dimension, I look at the c code, it is not
impossible:)].

Yue Wang

On Mon, Sep 29, 2008 at 1:17 PM, Zhichu Chen [EMAIL PROTECTED] wrote:
 Hi, Alan

 Thank you for your attention, but I don't need the psedu-3D effect. Asymptote
 could create real 3D file which pdf has supported since, maybe, version 1.5.



 On Sun, Sep 28, 2008 at 10:19 PM, Alan BRASLAU [EMAIL PROTECTED] wrote:
 On 2008-09-28 04:35 Zhichu Chen wrote:
 It is said that Asymptote has supported PRC format 3D file:
 http://asymptote.sourceforge.net/gallery/3D%20graphs/

 I really wanna give it a try, but once I was building from the svn
 source, I was told that I don't have LaTeX in my $PATH. I haven't
 really been using LaTeX for a long time, and I prefer I don't need
 to install a bunch of LaTeX programs and packages just for a
 drawing program which, IMHO, only use LaTeX to make nice
 labels.

 Is there any workarounds? And how to embed .prc files into
 the .pdf document?
  --
 Best Regards
 Chen

 This doesn't really answer your question
 but may be of some related interest to the mailing list.

 I am quite fond of pfg/tikz as a drawing package
 that works rather well with plain tex, latex and context.
 Asymptote is a similar tool, but it seems to be less portable.
 However, it appears on the other hand to be much more powerful for 3D.
 Neverless, I am sharing with this context list an impressive tikz example





 --
 Alan Braslau
 CEA DSM-IRAMIS-SPEC
 CNRS URA 2464
 Orme des Merisiers
 91191 Gif-sur-Yvette cedex FRANCE
 tel: +33 1 69 08 73 15
 fax: +33 1 69 08 87 86
 mailto:[EMAIL PROTECTED]

 http://www-dna2006.cea.fr/

  .''`.
 : :'  :
 `. `'`
  `-
 that I have adapted to context. (I have put the author on copy.)

 Basically, the only changes to the latex source are
 \usepackage{preview} - \startTEXpage \stopTEXpage
 \begin{tikzpicture} - \starttikzpicture
 and a few other minor syntax adaptations...)

 Alan

 % What is it
 % ==
 %
 % Examples inspired by the thread at comp.text.tex about how to convert some
 hand
 % drawn pictures into programmatic 3D sketches:
 %
 http://groups.google.com/group/comp.text.tex/browse_thread/thread/a03baf5d6fa64865/f7e7b903f1d87a6a
 % The sketches present stereographic and cylindrical map projections and they
 % pose some interesting challenges for doing them with a 2D drawing package
 PGF/TikZ.
 %
 % The main idea is to draw in selected 3D planes and then project onto the
 canvas
 % coordinate system with an appriopriate transformation. Some highlights:
 % [*] usage of pgf math engine for calculation of projection transformations
 and
 % transitions points from visible (solid lines) to invisible (dashed
 lines) on
 % meridians and latitude circles
 % [*] definition of 3D plane transformation with expanded styles so that they
 are robust
 % against redefinition of macros used in their construction
 % [*] usage of named coordinates (nodes) for definition of characteristic
 points in
 % local coordinate systems so that they are accessible outside of their
 plane of
 % definition
 % [*] calculation of intersections points with TikZ intersection coordinate
 system
 % [*] usage of 'to' path operation instead of 'arc' for marking angles to
 allow for
 % easy positioning of text labels on the curve
 % [*] 3D lighting effects with shading
 %
 %
 % Who's done it
 % =
 %
 % Tomasz M. Trzeciak
 %
 %
 % Distribution and use
 % 
 %
 % Use as you see fit. Consider giving a proper attribution to the author.
 %
 %
 % Change log
 % ==
 %
 % 2008/08/07  posted to latex-community.org
 % 2008/08/08  fixed some typos, added note about 'to' path operation to the
 description,
 % fixed positioning issue of nodes and 'to' path operation as
 suggested
 % by Kjell, removed some dead code from KART picture
 % 2008/09/28  adapted as an example to ConTeXt

 \usemodule[tikz]
 \usetikzlibrary[calc,fadings,decorations.pathreplacing]

 %% helper macros

 \def\pgfmathsinandcos#1#2#3{%
  \pgfmathsetmacro#1{sin(#3)}%
  \pgfmathsetmacro#2{cos(#3)}%
 }
 \def\LongitudePlane#1#2#3{%
  \pgfmathsinandcos\sinEl\cosEl{#2} % elevation
  \pgfmathsinandcos\sint\cost{#3} % azimuth
  \tikzset{#1/.estyle={cm={\cost,\sint*\sinEl,0,\cosEl,(0,0)}}}
 }
 \def\LatitudePlane#1#2#3{%
  \pgfmathsinandcos\sinEl\cosEl{#2} % elevation
  \pgfmathsinandcos\sint\cost{#3} % latitude
  \pgfmathsetmacro\yshift{\cosEl*\sint}
  \tikzset{#1/.estyle={cm={\cost,0,0,\cost*\sinEl,(0,\yshift)}}} %
 }
 \def\DrawLongitudeCircle#1#2{
  \LongitudePlane{current plane}{\angEl}{#2}
  \tikzset{current plane/.prefix