Re: [NTG-context] tikz

2009-07-22 Thread Hans Hagen

Mojca Miklavec wrote:

On Tue, Jul 21, 2009 at 23:22, Hans Hagen wrote:

Mojca Miklavec wrote:

TikZ does the following:

\def\pgfu...@font@tiny{\tfxx}% How to do this correctly?

\small or \txx


That was just copy-pasted from TikZ source (I have not been asking
that; my diagnosis/question/suggestion was about
\let\pgfu...@font@normalfont=\rm and \let\pgfu...@selectfont=\rm that
should probably be changed to \tf) but since you have answered ...

I think that it was desired to use something even smaller. In LaTeX there is:

\tiny   5
\scriptsize 7
\footnotesize   8
\small  9
\normalsize 10

so one can choose 4 smaller sizes. In ConTeXt there is apparently (I
never had to use so tiny sizes, so I never checked the details):

  \definebodyfontenvironment
[10pt]
[\s!text=10pt,\s!script=7pt,\s!scriptscript=5pt,
 \c!x=8pt,\c!xx=6pt,\c!big=12pt,\c!small=8pt]

I suspect that the author wanted to have something even smaller than
\tfxx (or better: 4 smaller sizes instead of just the current two),
most probably that would be scriptscript, just that it needs a special
treatment. (\switchtobodyfont[scriptscript] works to get 5pt in 10pt
regime, but I'm not sure about the most efficient way.)


i don't know either ... personally i'd use a model that is tight to 
graphic dimensions (as baseline alignments are also an issue)


anyway, the latex and context font models are too different to bother 
too much about mapping


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] support for SUBSCRIPT THREE etc. ?

2009-07-22 Thread Hans Hagen

Michail Vidiassov wrote:


What about an analog of ucs LaTeX package,
when Unicode math subscripts (and other symbols) in TeX file are replaced
by \sub{3} etc., regardless of the font used for typesetting?


the reverse mapping is doable and on the agenda (normally i do such 
things when i run into it in a project)



It will give WYSIWYG-like appearance of the input file on the screen
in the editor using Unicode font and will not bring the mess deep into 
ConTeXt?


well, editors is another case as not all fonts used in editors have such 
characters so your file becomes quite unportable unless the editor 
implements some fallback mechanism


there's also a subscript font feature but often such features are 
implemented incomplete in fonts (like frac) and quite unuseable unless 
more logic in the engine is added (again, something that i will look 
into when i have a reason)



Is such thing doable?
(Not making a set of mappings for presonal use, but proper package
for public consumption?)


it would be core functionality as it involved manupulating the internal 
math node lists


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
___


[NTG-context] problem with t-letter.tex and itemize

2009-07-22 Thread Peter Münster
Hello,

The example shows the problem:

\usemodule[letter]
\starttext
\startletter
\startitemize
\item Lines are broken
  at the same places as the input text.
  Strange...
\stopitemize
\stopletter
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] t-letter and line-breaking (was: problem with t-letter.tex and itemize)

2009-07-22 Thread Peter Münster
On Wed, 22 Jul 2009, Peter Münster wrote:

 \usemodule[letter]
 \starttext
 \startletter
 \startitemize
 \item Lines are broken
   at the same places as the input text.
   Strange...
 \stopitemize
 \stopletter
 \stoptext

Excuse me, the problem has nothing to do with itemize. Here a smaller
example:

\usemodule[letter]
\starttext
\startletter
Lines are broken
at the same places as the input text.
Strange...
\stopletter
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/

___
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] Line overflows

2009-07-22 Thread Willi Egger
If I understand your question correctly, then you mightplay with  
\setuptolerance[tolerant] or \setuptolerance[verytolerant] or even  
\setuptolerance[verytolerant,stretch]


Willi
On Jul 21, 2009, at 9:34 PM, Tom wrote:

A few lines overflow a couple of characters into the right margin.  
How does one solve this problem?




Tom Benjey

Tuxedo Press



__ 
_
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] support for SUBSCRIPT THREE etc. ?

2009-07-22 Thread Hans Hagen

Aditya Mahajan wrote:


Microsoft implmented something like this in newer versions of Word. See the
developer's blog for more detials.
http://blogs.msdn.com/murrays/archive/2009/05/07/entering-math-via-the-linear-format.aspx 


Well, we can consider supporting linear math ..

\unexpanded\def\startmathzone
  {\ifvmode
 \Ustartdisplaymath
 \let\stopmathzone\Ustopdisplaymath
   \else
 \Ustartmath
 \let\stopmathzone\Ustopmath
   \fi}

\defineactivecharacter 23A8 \startmathzone
\defineactivecharacter 23AC \stopmathzone

\catcode3016=\begingroupcatcode
\catcode3017=\endgroupcatcode


\utfchar{23A8}x^\utfchar{3016}1+2\utfchar{3017}\utfchar{23AC}


The question is if we do it this way using a special math catcode 
regime, but that does not work when we pass it as argument unless we 
mess around with some math codes - like prime does) or use a parser 
(which is not that hard to do and is needed for things like sin/cos anyway)


i'll have a look at it (given that it's a frozen 'standard')

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] no line breaks between figures

2009-07-22 Thread Hans Hagen

Aditya Mahajan wrote:

Now since \placefigure internally places its contents in a \vbox, this 
boils down to a differnce beween


that will not change .. (being in vmode also has advantages with regards 
to spurious spaces)


The redefinition at ConTeXt will break some existing documents (i.e., 
the authors will have to manually add a \vbox where there was none 
earlier). The redefinition at tikz end will make all pgf code run 
slightly slower (an extra hbox for each typeset pgfpicture)


not that much slower i guess as not much repackaging is needed, just a 
box flush; in tikz parsing and calculations of the graphic take much 
more time (just take look at traced output); if you want to optimize 
tikz there are other tricks


If neither of these is acceptable, then we can have a simple wrapper 
around \start-stop tikzpicture:


\def\startTIKZcode{\hbox\bgroup\starttikzpicture}
\def\stopTIKZcode {\stoptikzpicture\egroup}

which will only affect ConTeXt code.


or just add a \dontleavehmode in front of the picture

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] t-letter and line-breaking (was: problem with t-letter.tex and itemize)

2009-07-22 Thread Wolfgang Schuster


Am 22.07.2009 um 11:43 schrieb Peter Münster:


Lines are broken
at the same places as the input text.
Strange...


fixed, was the side effect of a user request

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] no line breaks between figures

2009-07-22 Thread Mojca Miklavec
On Wed, Jul 22, 2009 at 03:08, Aditya Mahajan wrote:
 CCed to ConTeXt mailing list.

(And removed the pgf mailing list? :)

 On Tue, 21 Jul 2009, Mojca Miklavec wrote to pgf.user list:

 Hello,

 I noticed that a large number of
   \begin{tikzpicture} \draw (0,0) -- (5,1); \end{tikzpicture}
 breaks at line end while
   \starttikzpicture \draw (0,0) -- (5,1); \stoptikzpicture
 just generates an infinitely long line.

 Is there any simple way to fix the behaviour in ConTeXt?

 Don't know.

I have just noticed that (independent of the second issue) when
placing several items of:

1.) \tikz \draw (0,0)--(4,2);
works OK in both LaTeX and ConTeXt
2.) \begin{tikzpicture} \draw (0,0)--(4,2); \end{tikzpicture}
works OK in LaTeX
3.) \starttikzpicture \draw (0,0)--(4,2); \stoptikzpicture{}
works OK in ConTeXt
4.) \starttikzpicture \draw (0,0)--(4,2); \stoptikzpicture
creates an infinitely long line in ConTeXt

Does that ring a bell to anyone? (It must be something trivial like
eating any spaces after \commandsequence, but I don't know what
exactly.)

 I also don't like the behaviour in
   \placefigure{title}{\starttikzpicture ... \stoptikzpicture}
 that has to be surrounded with
   \hbox{\starttikzpicture ... \stoptikzpicture}
 else the figure gets placed at the beginning of line instead of being
 centered.

 This is what is happening. The pgf code basically boils down to this.

 \starttext
 \newbox\pgfpic

 \setbox\pgfpic\hbox to 10pt\bgroup abc \egroup

 \placefigure
  {testing box placement}
  {\leavevmode\raise-2pt\box\pgfpic}

 \stoptext

 Now since \placefigure internally places its contents in a \vbox, this boils
 down to a differnce beween

 \hbox to \textwidth {\hss \vbox{\hbox{abc}} \hss}

 \hbox to \textwidth {\hss \vbox{\leavevmode\raise-2pt \hbox{abc}} \hss}

 So, the solution is to either patch \placefigure so that

 \def\setlocalfloatdimensions#1%
  {...
  \global\setbox\floatbox\hbox% was \vbox
  }

 or redefine \pgf...@typesetpicturebox to

 \def\pgf...@typesetpicturebox#1{%
  
  \hbox{\leavevmode\raise-\...@x\box#1}%\hbox added
 }


 The redefinition at ConTeXt will break some existing documents (i.e., the
 authors will have to manually add a \vbox where there was none earlier). The
 redefinition at tikz end will make all pgf code run slightly slower (an
 extra hbox for each typeset pgfpicture)

 If neither of these is acceptable, then we can have a simple wrapper around
 \start-stop tikzpicture:

 \def\startTIKZcode{\hbox\bgroup\starttikzpicture}
 \def\stopTIKZcode {\stoptikzpicture\egroup}

 which will only affect ConTeXt code.

Would it affect anyone if TikZ would generate an hbox instead of vbox
(at least in ConTeXt)?

That means ... instead of
\let\starttikzpicture=\tikzpicture
\let\stoptikzpicture=\endtikzpicture
having
\def\starttikzpicture{\hbox\bgroup\tikzpicture}
\def\stoptikzpicture{\endtikzpicture\egroup}

(I admit that I don't understand all the tiny bits, for example when
one would prefer to have vbox, so I might be missing the whole
picture.)

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] Space between description entries?

2009-07-22 Thread Wolfgang Schuster


Am 22.07.2009 um 07:07 schrieb Corsair:


Hi all,

Anyone knows how to adjust white space between description entries?  I
thought it was `inbetween', but it does not work.


use 'before' and 'after'

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] Font of this article

2009-07-22 Thread Wolfgang Schuster


Am 21.07.2009 um 14:18 schrieb Xan:


En/na Xan ha escrit:

Hi,

Does anyone know what is the font from this article: http://www.tug.org/pracjourn/2006-4/fenn/ 
 ??

I like it very much.

Xan.


\setupbodyfont [palatino,11pt]??


\usetypescript[palatino]
\setupbodyfont[palatino]

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] [PATCH] Add begin_of_buffer and end_of_buffer hooks for lua pretty printers

2009-07-22 Thread Matthijs Kooijman
Hi,

any chance of looking at and perhaps committing this patch?

 Is there any place where lua pretty printers are documented? The wiki seems to
 say only wait for lua, but not how to use them. If there isn't, I'll try to
 put something useful on the wiki.
I've created [1] to document the creation of pretty printers in MkIV.

[1]: http://wiki.contextgarden.net/Custom_pretty_printer


signature.asc
Description: Digital signature
___
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] Strange behaviour of startitemize[1]

2009-07-22 Thread Xan

Hi,

Sorry for perhaps silly question, but I receive and error for this code:

\subsubsubject{El problema de la paraula}

\startitemize[1]
\item $\pi(x^{-1}) = \pi(x)^{-1}$ per a tot $x \in X$.
\item Per a tota paraula $w = w_1 \ldots w_r$ sobre $X \cup X^{-1}$,
\startformula
\pi(w) = \pi(w_1) \cdots \pi(w_r) \in G.
\stopformula
\stopitemize

that in the first item should be one less $:

subsubsubject   : - El problema de la paraula
! Argument of \dodoregister has an extra }.
inserted text
   \par
to be read again
  }
\doattributes ...name #1...@ea \endcsname \fi {#4}
 \dostopattributes
\dolistitem ...evel \c!style \c!color {\listitem }
 \fi \fi 
}\ifconditional \f...


\complexdoitemgroupitem ...obreak \fi \dolistitem
 \relax \ifconditional 
\pac...

to be read again
  $
l.237 \item $
\pi(x^{-1}) = \pi(x)^{-1}$ per a tot $x \in X$.
? x


The whole file is attached.


What's the problem. Sorry I don't see


Xan.
% interface=en output=pdftex
%\environment capcalera.context % Capçalera

% Regime
\enableregime[utf]

% Choose a font
\setupbodyfont [cmr,11pt] % cmr, 11pt

% Be tolerant with paragraph building
\setuptolerance [horizontal,verytolerant,stretch]

% Choose a language, and associated hyphenation rules.
%\language [ca]
\mainlanguage[ca]


% Page number
\setuppagenumbering [location={footer}]

% White space between paragraphs
%\setupwhitespace [big]

% Paper size
\setuppapersize [a4]

% Margins
%\setuplayout  [grid=yes, footer=0.5\footerheight, header=0.5\headerheight]
%\setuplayout[footer=2cm, header=2cm]
%\showlayout
%\showframe
%\showsetups
% Format de marges
%\setuplayout[topspace=1.5cm, % marge d'adalt
%margin=1.5cm, %marges dels costats
%header=1.0cm,%separació entre adalt i primera línia
%footer=1.0cm,%separació entre abaix i darrera línia
%width=fit,height=fit,backspace=2cm]



% Enable colors and activate hyperlinks
\setupcolors [state=start]
\definecolor[lightblue][r=0.5, g=0.5, b=1.0]
%\setupinteraction [state=start, color=lightBlue]
%\setupurl[style=small, space=yes]
\setupurl[space=yes]

% Enumerate the URLs
%\useURL[wiki][http://wiki.contextgarden.net][][\ConTeXt\ wiki]
%\useURL[nagorko-pdf][http://www.math.bgu.ac.il/~barakw/probseminar/nagorko/slides.pdf][][http://www.math.bgu.ac.il/\~{}barakw/\quad\quad\quad\quad
 probseminar/nagorko/slides.pdf]
%\useURL[govern-me][http://sgtrelinst.caib.es/llibrestil/00index.html][][http://sgtrelinst.caib.es/llibrestil/00index.html]
%\useURL[context-manual-pdf][http://www.pragma-ade.com/general/manuals/cont-eni.pdf][][http://www.pragma-ade.com/general/manuals/
 cont-eni.pdf]
%\useURL [contextgarden] [{http://www.contextgarden.net}]

%\useURL 
[mccammond][{http://www.math.ucsb.edu/~jon.mccammond/geogrouptheory/}][] [{\tf 
http://www.math.ucsb.edu/\~{}jon.mccammond/geogrouptheory/}]


% Fonts
%% Chapters...
\setupheads[align=flushleft]
\setuphead[chapter][style={\tfd\bf}]
\setuphead[section][style={\bfc}, header=nomarking]
\setuphead[subsection][style={\bfb}]
\setuphead[subsubsection][style={\bfa}]
%\setuphead[section][textstyle=bold]

% Bibliography options
% BIBTEX
\usemodule[bib]
\usemodule[bibltx]
\setupbibtex[database=memoria,sort=author]
\setuppublications [alternative=ams,numbering=yes, sorttype=bbl, 
criterium=cite]%
\setupheadtext[ca][pubs=Referències]
\setuppublicationlist[authoretallimit=3]
\setuppublicationlist[authoretaltext={\it\  et al.}]
\setuppublicationlist[authoretaldisplay=1]

%Indentation
\setupheads[indentnext=yes] 
\setupindenting[yes,small,first]
%\setupformulae[indentnext=yes]

% Vertical spaces between paragraphs
\setupwhitespace[small]

%Itemize
\setupitemize[each][indentnext=no,margin=2em] % [identnext=yes,margin=2em]
\setupitemize[each][headstyle=bold]
%\setupitemize[a][right=),stopper=]

% Mathematical packets
\usemodule[newmat]
\usemodule[math-ams]

% Heads and footers
%\setupfootertexts[][{\tfx \currentdate}]
%\setupfootertexts[\pagenumber/\lastpage]
%\setupfooter[text][before=\hrule]
%\setupheader[text][after=\hrule]
%\setupheadertexts[{\tfx Màster de Matemàtiques}][{\tfx 
\jobname.\ConTeXt{}.\currentdate}]
%\setupheadertexts[][{\tfx \currentdate}]


% hyphenating
\hyphenation{do-cu-ment}
\hyphenation{pro-ble-ma}
\hyphenation{es-crip-tu-ra}
\hyphenation{ge-ne-ra-lit-za-ció}
\hyphenation{cor-res-po-nents}
\hyphenation{pa-rells}
\hyphenation{ge-ne-rat}

% Modules
\usemodule[tikz]
\usemodule[pgfmath]
\usetikzlibrary[mindmap,arrows,calc,decorations.pathmorphing,decorations.markings]
%\usetikzlibrary[trees]



% AMSTHM equivalent
%% Exercici
\defineenumeration
  [exercici]
  
[text={Problema},headstyle=bold,between=\blank,titledistance=0em,textdistance=1em,

Re: [NTG-context] Strange behaviour of startitemize[1]

2009-07-22 Thread Xan

Ah!, for startitemize[n] it works.

En/na Xan ha escrit:

Hi,

Sorry for perhaps silly question, but I receive and error for this code:

\subsubsubject{El problema de la paraula}

\startitemize[1]
\item $\pi(x^{-1}) = \pi(x)^{-1}$ per a tot $x \in X$.
\item Per a tota paraula $w = w_1 \ldots w_r$ sobre $X \cup X^{-1}$,
\startformula
\pi(w) = \pi(w_1) \cdots \pi(w_r) \in G.
\stopformula
\stopitemize

that in the first item should be one less $:

subsubsubject   : - El problema de la paraula
! Argument of \dodoregister has an extra }.
inserted text
   \par
to be read again
  }
\doattributes ...name #1...@ea \endcsname \fi {#4}
 \dostopattributes
\dolistitem ...evel \c!style \c!color {\listitem }
 \fi \fi 
}\ifconditional \f...


\complexdoitemgroupitem ...obreak \fi \dolistitem
 \relax \ifconditional 
\pac...

to be read again
  $
l.237 \item $
\pi(x^{-1}) = \pi(x)^{-1}$ per a tot $x \in X$.
? x


The whole file is attached.


What's the problem. Sorry I don't see


Xan.


___
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] I can't put footnote

2009-07-22 Thread Xan

Hi,

Anyone could help me please. I attach a document with I have problems.
When I comment out the footnote in line 402, then I get an error.

Can anyone could see what happens?

Thanks in advance,
Xan.
% interface=en output=pdftex
%\environment capcalera.context % Capçalera

% Regime
\enableregime[utf]

% Choose a font
\setupbodyfont [cmr,11pt] % cmr, 11pt

% Be tolerant with paragraph building
\setuptolerance [horizontal,verytolerant,stretch]

% Choose a language, and associated hyphenation rules.
%\language [ca]
\mainlanguage[ca]


% Page number
\setuppagenumbering [location={footer}]

% White space between paragraphs
%\setupwhitespace [big]

% Paper size
\setuppapersize [a4]

% Margins
%\setuplayout  [grid=yes, footer=0.5\footerheight, header=0.5\headerheight]
%\setuplayout[footer=2cm, header=2cm]
%\showlayout
%\showframe
%\showsetups
% Format de marges
%\setuplayout[topspace=1.5cm, % marge d'adalt
%margin=1.5cm, %marges dels costats
%header=1.0cm,%separació entre adalt i primera línia
%footer=1.0cm,%separació entre abaix i darrera línia
%width=fit,height=fit,backspace=2cm]



% Enable colors and activate hyperlinks
\setupcolors [state=start]
\definecolor[lightblue][r=0.5, g=0.5, b=1.0]
%\setupinteraction [state=start, color=lightBlue]
%\setupurl[style=small, space=yes]
\setupurl[space=yes]

% Enumerate the URLs
%\useURL[wiki][http://wiki.contextgarden.net][][\ConTeXt\ wiki]
%\useURL[nagorko-pdf][http://www.math.bgu.ac.il/~barakw/probseminar/nagorko/slides.pdf][][http://www.math.bgu.ac.il/\~{}barakw/\quad\quad\quad\quad
 probseminar/nagorko/slides.pdf]
%\useURL[govern-me][http://sgtrelinst.caib.es/llibrestil/00index.html][][http://sgtrelinst.caib.es/llibrestil/00index.html]
%\useURL[context-manual-pdf][http://www.pragma-ade.com/general/manuals/cont-eni.pdf][][http://www.pragma-ade.com/general/manuals/
 cont-eni.pdf]
%\useURL [contextgarden] [{http://www.contextgarden.net}]

%\useURL 
[mccammond][{http://www.math.ucsb.edu/~jon.mccammond/geogrouptheory/}][] [{\tf 
http://www.math.ucsb.edu/\~{}jon.mccammond/geogrouptheory/}]


% Fonts
%% Chapters...
\setupheads[align=flushleft]
\setuphead[chapter][style={\tfd\bf}]
\setuphead[section][style={\bfc}, header=nomarking]
\setuphead[subsection][style={\bfb}]
\setuphead[subsubsection][style={\bfa}]
%\setuphead[section][textstyle=bold]

% Bibliography options
% BIBTEX
\usemodule[bib]
\usemodule[bibltx]
\setupbibtex[database=memoria,sort=author]
\setuppublications [alternative=ams,numbering=yes, sorttype=bbl, 
criterium=cite]%
\setupheadtext[ca][pubs=Referències]
\setuppublicationlist[authoretallimit=3]
\setuppublicationlist[authoretaltext={\it\  et al.}]
\setuppublicationlist[authoretaldisplay=1]

%Indentation
\setupheads[indentnext=yes] 
\setupindenting[yes,small,first]
%\setupformulae[indentnext=yes]

% Vertical spaces between paragraphs
\setupwhitespace[small]

%Itemize
\setupitemize[each][indentnext=no,margin=2em] % [identnext=yes,margin=2em]
\setupitemize[each][headstyle=bold]
%\setupitemize[a][right=),stopper=]

% Mathematical packets
\usemodule[newmat]
\usemodule[math-ams]

% Heads and footers
%\setupfootertexts[][{\tfx \currentdate}]
%\setupfootertexts[\pagenumber/\lastpage]
%\setupfooter[text][before=\hrule]
%\setupheader[text][after=\hrule]
%\setupheadertexts[{\tfx Màster de Matemàtiques}][{\tfx 
\jobname.\ConTeXt{}.\currentdate}]
%\setupheadertexts[][{\tfx \currentdate}]


% hyphenating
\hyphenation{do-cu-ment}
\hyphenation{pro-ble-ma}
\hyphenation{es-crip-tu-ra}
\hyphenation{ge-ne-ra-lit-za-ció}
\hyphenation{cor-res-po-nents}
\hyphenation{pa-rells}
\hyphenation{ge-ne-rat}

% Modules
\usemodule[tikz]
\usemodule[pgfmath]
\usetikzlibrary[mindmap,arrows,calc,decorations.pathmorphing,decorations.markings]
%\usetikzlibrary[trees]



% AMSTHM equivalent
%% Exercici
\defineenumeration
  [exercici]
  
[text={Problema},headstyle=bold,between=\blank,titledistance=0em,textdistance=1em,
stopper={.\space},location=serried,left={\bgroup\bf},right={\egroup},width=fit,before={\bgroup\startframedtext[background=screen,frame=off,width=broad]},after={\stopframedtext\egroup}]

%% Lema 
\defineenumeration
  [lema]
  [text={Lema}, % Què es mostra
   before={\blank[big]}, % abans de lema, un bigskip
   after={\blank[big]}, % després de lema, un bigskip
   headstyle=bold, % Negreta per la capçaleras
   %between=\blank, % Entre Lemmes una línia en blanc
   titledistance=.5em, % espai entre número i parèntesis.
   textdistance=.5em, % espai entre ) i text
   stopper={.\space}, % Com acaba. Després de parèntesis un '.'
   location=serried,
   width=fit, % que ocupi tot l'espai
   style=italic, % estil del text
   title=yes, % si puc posar o no arguments opcionals
   titlestyle=bf, % estil del títol
   way=bytext, % enumerar en tot el document
   conversion=numbers,indenting=yes] % enumera amb arabic

%% Proposició, corol·laris, teoremes.
%% Comparteix els nombres amb lema
%% Si volem que vagin a part, hem de posar 'number=proposition'
\defineenumeration
  

Re: [NTG-context] no line breaks between figures

2009-07-22 Thread Aditya Mahajan

On Wed, 22 Jul 2009, Mojca Miklavec wrote:


On Wed, Jul 22, 2009 at 03:08, Aditya Mahajan wrote:

CCed to ConTeXt mailing list.


(And removed the pgf mailing list? :)


No... it was in the newsroup header (I was replying via gmane interface).


On Tue, 21 Jul 2009, Mojca Miklavec wrote to pgf.user list:


Hello,

I noticed that a large number of
  \begin{tikzpicture} \draw (0,0) -- (5,1); \end{tikzpicture}
breaks at line end while
  \starttikzpicture \draw (0,0) -- (5,1); \stoptikzpicture
just generates an infinitely long line.

Is there any simple way to fix the behaviour in ConTeXt?


Don't know.


I have just noticed that (independent of the second issue) when
placing several items of:

1.) \tikz \draw (0,0)--(4,2);
   works OK in both LaTeX and ConTeXt
2.) \begin{tikzpicture} \draw (0,0)--(4,2); \end{tikzpicture}
   works OK in LaTeX
3.) \starttikzpicture \draw (0,0)--(4,2); \stoptikzpicture{}
   works OK in ConTeXt
4.) \starttikzpicture \draw (0,0)--(4,2); \stoptikzpicture
   creates an infinitely long line in ConTeXt

Does that ring a bell to anyone? (It must be something trivial like
eating any spaces after \commandsequence, but I don't know what
exactly.)


Try the undocumented equivalent of \begin{...} \end{...} in ConTeXt:

\start[tikzpicture] ... \stop[tikzpicture]


I also don't like the behaviour in
  \placefigure{title}{\starttikzpicture ... \stoptikzpicture}
that has to be surrounded with
  \hbox{\starttikzpicture ... \stoptikzpicture}
else the figure gets placed at the beginning of line instead of being
centered.


[explanation snipped]

If neither of these is acceptable, then we can have a simple wrapper around
\start-stop tikzpicture:

\def\startTIKZcode{\hbox\bgroup\starttikzpicture}
\def\stopTIKZcode {\stoptikzpicture\egroup}

which will only affect ConTeXt code.


Would it affect anyone if TikZ would generate an hbox instead of vbox
(at least in ConTeXt)?

That means ... instead of
   \let\starttikzpicture=\tikzpicture
   \let\stoptikzpicture=\endtikzpicture
having
   \def\starttikzpicture{\hbox\bgroup\tikzpicture}
   \def\stoptikzpicture{\endtikzpicture\egroup}



This is same as the workaround that I suggested. It should work perfectly 
fine in ConTeXt.


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] I can't put footnote

2009-07-22 Thread Hans Hagen

Xan wrote:

Hi,

Anyone could help me please. I attach a document with I have problems.
When I comment out the footnote in line 402, then I get an error.

Can anyone could see what happens?


it's the version info that is causing the trouble, comment that line

-
  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] hskip and crlf

2009-07-22 Thread Hans Hagen

Flavien Lambert wrote:

Dear all, can you explain why the following code does not produce an
horizontal spacing for the second line ? I am using MarkIV.

\starttext
\hskip2em a\crlf
\hskip4em a\crlf
\stoptext


because the par builder will discard the second skip; instead use:

\hskip2em a\crlf
\strut\hskip4em a\crlf



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


[NTG-context] beta

2009-07-22 Thread Hans Hagen
I uploaded a beta with last days fixes; probably an updated current 
tomorrow.

--

-
  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] \setuptype[style=...] and a feature request

2009-07-22 Thread Hans Hagen

Peter Münster wrote:

On Mon, 20 Jul 2009, Hans Hagen wrote:


Feature request:
\setuptype[before=..., after=...]

well, not before/after then but left/right


No problem, left/right is nice!


i'll put in on the todo list as it's non trivial where to hook in that code

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] hskip and crlf

2009-07-22 Thread Flavien Lambert
Thanks !

2009/7/22 Hans Hagen pra...@wxs.nl

 Flavien Lambert wrote:

 Dear all, can you explain why the following code does not produce an
 horizontal spacing for the second line ? I am using MarkIV.

 \starttext
 \hskip2em a\crlf
 \hskip4em a\crlf
 \stoptext


 because the par builder will discard the second skip; instead use:

 \hskip2em a\crlf
 \strut\hskip4em a\crlf



 -
  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

 ___




-- 
Flavien.

Quantum objects are completely crazy but, at least, they are all crazy in
the same way. R.P. Feynman.
___
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] [PATCH] Add begin_of_buffer and end_of_buffer hooks for lua pretty printers

2009-07-22 Thread Hans Hagen

Matthijs Kooijman wrote:

Hi,

any chance of looking at and perhaps committing this patch?


Is there any place where lua pretty printers are documented? The wiki seems to
say only wait for lua, but not how to use them. If there isn't, I'll try to
put something useful on the wiki.

I've created [1] to document the creation of pretty printers in MkIV.

[1]: http://wiki.contextgarden.net/Custom_pretty_printer


i uploaded a beta zip with two extra hooks

i also moved the pretty printers to another namespace so you need to use 
the buffers.newvisualizer function so that we don't get clashes with 
future features


you need to adapt the wiki accordingly

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] I can't put footnote

2009-07-22 Thread Xan

En/na Hans Hagen ha escrit:

Xan wrote:

Hi,

Anyone could help me please. I attach a document with I have problems.
When I comment out the footnote in line 402, then I get an error.

Can anyone could see what happens?


it's the version info that is causing the trouble, comment that line

No, with the version line commented I get the same error:

Presentacions de grups
[3.3] [4.4] [5.5]
subsubsubject   : - El problema de la paraula
! Missing number, treated as zero.
to be read again
  [
\setcounter ...name #1\endcsname {\the \numexpr #2
 \relax }
\footnote -\setnote [
 \v!footnote ]
l.402 ...t de generadors de $G({\cal P})$\footnote
 {Recordem que abusem 
del l...


? x


Why?

Thanks for helping me,
Xan.
___
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] I can't put footnote

2009-07-22 Thread Hans Hagen

Xan wrote:


No, with the version line commented I get the same error:


i don't get that error so i need a smaller test file

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] I can't put footnote

2009-07-22 Thread Xan

En/na Hans Hagen ha escrit:

Xan wrote:


No, with the version line commented I get the same error:


i don't get that error so i need a smaller test file

Hans


I hope this serves you. Now I have another error. What fails???

Xan.

% interface=en output=pdftex
%\environment capcalera.context % Capçalera

% Regime
\enableregime[utf]

% Choose a font
\setupbodyfont [cmr,11pt] % cmr, 11pt

% Be tolerant with paragraph building
\setuptolerance [horizontal,verytolerant,stretch]

% Choose a language, and associated hyphenation rules.
%\language [ca]
\mainlanguage[ca]


% Page number
\setuppagenumbering [location={footer}]

% White space between paragraphs
%\setupwhitespace [big]

% Paper size
\setuppapersize [a4]

% Margins
%\setuplayout  [grid=yes, footer=0.5\footerheight, header=0.5\headerheight]
%\setuplayout[footer=2cm, header=2cm]
%\showlayout
%\showframe
%\showsetups
% Format de marges
%\setuplayout[topspace=1.5cm, % marge d'adalt
%margin=1.5cm, %marges dels costats
%header=1.0cm,%separació entre adalt i primera línia
%footer=1.0cm,%separació entre abaix i darrera línia
%width=fit,height=fit,backspace=2cm]



% Enable colors and activate hyperlinks
\setupcolors [state=start]
\definecolor[lightblue][r=0.5, g=0.5, b=1.0]
%\setupinteraction [state=start, color=lightBlue]
%\setupurl[style=small, space=yes]
\setupurl[space=yes]

% Enumerate the URLs
%\useURL[wiki][http://wiki.contextgarden.net][][\ConTeXt\ wiki]
%\useURL[nagorko-pdf][http://www.math.bgu.ac.il/~barakw/probseminar/nagorko/slides.pdf][][http://www.math.bgu.ac.il/\~{}barakw/\quad\quad\quad\quad
 probseminar/nagorko/slides.pdf]
%\useURL[govern-me][http://sgtrelinst.caib.es/llibrestil/00index.html][][http://sgtrelinst.caib.es/llibrestil/00index.html]
%\useURL[context-manual-pdf][http://www.pragma-ade.com/general/manuals/cont-eni.pdf][][http://www.pragma-ade.com/general/manuals/
 cont-eni.pdf]
%\useURL [contextgarden] [{http://www.contextgarden.net}]

%\useURL 
[mccammond][{http://www.math.ucsb.edu/~jon.mccammond/geogrouptheory/}][] [{\tf 
http://www.math.ucsb.edu/\~{}jon.mccammond/geogrouptheory/}]


% Fonts
%% Chapters...
\setupheads[align=flushleft]
\setuphead[chapter][style={\tfd\bf}]
\setuphead[section][style={\bfc}, header=nomarking]
\setuphead[subsection][style={\bfb}]
\setuphead[subsubsection][style={\bfa}]
%\setuphead[section][textstyle=bold]

% Bibliography options
% BIBTEX
\usemodule[bib]
\usemodule[bibltx]
\setupbibtex[database=memoria,sort=author]
\setuppublications [alternative=ams,numbering=yes, sorttype=bbl, 
criterium=cite]%
\setupheadtext[ca][pubs=Referències]
\setuppublicationlist[authoretallimit=3]
\setuppublicationlist[authoretaltext={\it\  et al.}]
\setuppublicationlist[authoretaldisplay=1]

%Indentation
\setupheads[indentnext=yes] 
\setupindenting[yes,small,first]
%\setupformulae[indentnext=yes]

% Vertical spaces between paragraphs
\setupwhitespace[small]

%Itemize
\setupitemize[each][indentnext=no,margin=2em] % [identnext=yes,margin=2em]
\setupitemize[each][headstyle=bold]
%\setupitemize[a][right=),stopper=]

% Mathematical packets
\usemodule[newmat]
\usemodule[math-ams]

% Heads and footers
%\setupfootertexts[][{\tfx \currentdate}]
%\setupfootertexts[\pagenumber/\lastpage]
%\setupfooter[text][before=\hrule]
%\setupheader[text][after=\hrule]
%\setupheadertexts[{\tfx Màster de Matemàtiques}][{\tfx 
\jobname.\ConTeXt{}.\currentdate}]
%\setupheadertexts[][{\tfx \currentdate}]


% hyphenating
\hyphenation{do-cu-ment}
\hyphenation{pro-ble-ma}
\hyphenation{es-crip-tu-ra}
\hyphenation{ge-ne-ra-lit-za-ció}
\hyphenation{cor-res-po-nents}
\hyphenation{pa-rells}
\hyphenation{ge-ne-rat}

% Modules
\usemodule[tikz]
\usemodule[pgfmath]
\usetikzlibrary[mindmap,arrows,calc,decorations.pathmorphing,decorations.markings]
%\usetikzlibrary[trees]



% AMSTHM equivalent
%% Exercici
\defineenumeration
  [exercici]
  
[text={Problema},headstyle=bold,between=\blank,titledistance=0em,textdistance=1em,
stopper={.\space},location=serried,left={\bgroup\bf},right={\egroup},width=fit,before={\bgroup\startframedtext[background=screen,frame=off,width=broad]},after={\stopframedtext\egroup}]

%% Lema 
\defineenumeration
  [lema]
  [text={Lema}, % Què es mostra
   before={\blank[big]}, % abans de lema, un bigskip
   after={\blank[big]}, % després de lema, un bigskip
   headstyle=bold, % Negreta per la capçaleras
   %between=\blank, % Entre Lemmes una línia en blanc
   titledistance=.5em, % espai entre número i parèntesis.
   textdistance=.5em, % espai entre ) i text
   stopper={.\space}, % Com acaba. Després de parèntesis un '.'
   location=serried,
   width=fit, % que ocupi tot l'espai
   style=italic, % estil del text
   title=yes, % si puc posar o no arguments opcionals
   titlestyle=bf, % estil del títol
   way=bytext, % enumerar en tot el document
   conversion=numbers,indenting=yes] % enumera amb arabic

%% Proposició, corol·laris, teoremes.
%% Comparteix els nombres amb lema
%% Si volem que vagin a part, hem de posar 

[NTG-context] [OT] mupdf

2009-07-22 Thread luigi scarso
http://ccxvii.net/mupdf/
It seems a valid alternative to xpdf

-- 
luigi
___
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] [OT] mupdf

2009-07-22 Thread Aditya Mahajan

On Thu, 23 Jul 2009, luigi scarso wrote:


http://ccxvii.net/mupdf/
It seems a valid alternative to xpdf


Minimal and fast... but file reload does not seem possible, so not useful 
in a normal TeX workflow.


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
___