Re: [NTG-context] Line break in verbatim

2011-05-03 Thread Wolfgang Schuster

Am 03.05.2011 um 01:26 schrieb Aditya Mahajan:

 You can also put the text in a \hbox with “\setuptype[command=\hbox]”.
 The command key from \setuptype is special because it accepts only
 box commands (\hbox, \vbox, \framed …).
 
 I don't see why that is the case. Looking at the code, it appears that any 
 option for command should work (that is not reset by \tf\tt). For example, 
 command=\underbar works as expected.


\underbar is defined as \groupedcommand and doesn’t take a argument, here is a 
example which fails.

\define[1]\TypeCommand{}

\setuptype[command=\TypeCommand]

\starttext
\type{type}
\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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Positional graphics (MetaFun)!

2011-05-03 Thread Verhaag, G.C.H.M.

Hi,

Inspired by the examples given in the MetaFun manual (Oct. 2010) I tried 
a few, but I can't get them working!


I'm specially interested in the 'Anchors and layers' (p.257, screen 
version!) feature. I typed in the MetaPost code as given on page 260, 
defined the anchors, but no circles and lines appear in the resulting 
pdf-file.


Well I assume it must be something trivial. Anybody any idea?

P.S. I use ConTeXt  ver: 2011.03.30 11:21 MKIV  fmt: 2011.3.30  int: 
english/english


Regards,
Gerard Verhaag
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] modules with no author

2011-05-03 Thread Patrick Gundlach
Hi Adam,

 
 I you mean the gantt module, have a look at the mailinglist: 
 http://www.ntg.nl/pipermail/ntg-context/2010/054051.html
 
 It was advised to upload it to tlcontrib instead, so the module is located 
 here:
 http://tlcontrib.metatex.org/cgi-bin/package.cgi/ruid=4295644089/action=view/id=300
 
 As I could neither upload it to the minimals module site nor could I delete 
 the empty module page, this is why you have the module with no author etc.


OK, thanks for the info.

Patrick

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


[NTG-context] tikz picture is placed align left-upper corner

2011-05-03 Thread Gao Ya'nan
I draw a figure by tikz but found it is not in the middle but a little
left of the page, and then I wrote a piece code and impoved my view.

And I tried to add some parameters to put the figure in the middle but failed.

Thanks for any tips and test code is below.

\usemodule[tikz]
\usetikzlibrary[positioning, shapes, shadows, arrows]
\usetikzlibrary[backgrounds]

\starttext

\placefigure[here][fig:pci]{PCI System}{
\framed{
\hbox{
\tikzstyle{abstract}=[rectangle, draw=black, rounded corners,
fill=blue!40, drop shadow, text=white, font=\small]
\tikzstyle{cache}=[rectangle, draw=black, rounded corners,
fill=green, drop shadow, text=white, font=\small]

\starttikzpicture[background rectangle/.style={draw=blue}, framed]
\draw[help lines] (-5, -4) grid (5, 1);

\node (Processor) [abstract, rectangle split, rectangle split 
parts=2]
{
{Processor}
\nodepart{second}Cache
};

\node (AuxNode01) [below=of Processor] {};
\node (Coherency) [cache, left=of AuxNode01]
{
{Cache Coherency}
};
\node (L2-Cache) [cache, right=of AuxNode01]
{
{Cache}
};
\stoptikzpicture
}
}
}
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] bibliography basics

2011-05-03 Thread Hagmann Jörg
Using the attached minimal example with biblio.bib, how can I get an 
alphabetical publication-list with surname-Initials etc. when using numbers in 
the thext? Shouldn't that be default? It is when using authoryear in the text 
(comment/uncomment the relevant lines).

mkiv, current version: 2011.04.03 22:32. Mac 10.6.7



biblio.bib
Description: Binary data


minimal-bib.tex
Description: Binary data


Thanks, Jörg

On Apr 28, 2011, at 4:13 PM, Hagmann Jörg wrote:

 Thanks, Wolfgang - and a follow-up question:
 
 I have no time for a minimal example - if there is no quick and obvious 
 answer, tell me and I'll prepare one later.
 I have numbers in the text and want \invertedshortauthor in the 
 publicationlist. But I get First Name-Initial-Surname... no matter what I 
 try.  If I have Name-Year in the text, it comes out the way I want it.
 
 I tried, e.g.:
 -
 \setupbibtex[database={manuscript}]
 \setuppublications[alternative=num,criterium=text,sorttype=cite]
 
 \setuppublicationlist[author={\invertedshortauthor}] %should be default 
 anyway?
 
 \starttext
 \placepublications[criterium=text]
 \stoptext
 -
 
 Thanks, Jörg
 

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

Re: [NTG-context] tikz picture is placed align left-upper corner

2011-05-03 Thread Aditya Mahajan

On Tue, 3 May 2011, Gao Ya'nan wrote:


I draw a figure by tikz but found it is not in the middle but a little
left of the page, and then I wrote a piece code and impoved my view.

And I tried to add some parameters to put the figure in the middle but failed.


Does this 
http://archive.contextgarden.net/message/20090722.010815.d9c051d3.en.html

help.



\placefigure[here][fig:pci]{PCI System}{
\framed{


Also, in TeX you have to be careful about trailing whitespaces. It is 
better to use


\framed{%

or

\framed
   {

and the same for \hbox etc.


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


[NTG-context] AMSTeX compatibility: `\dotsb` is not defined

2011-05-03 Thread Paul Menzel
Dear ConTeXt folks,


`\dotsb` is not defined although it is defined in AMSTeX (amsmath) [1].

Please find the following minimal example also attached.

\starttext
This throws an error, since »\backslash dotsb« is not defined.

\startformula
1 + 2 + 3 + \dotsb + n = \frac{n}{2} (n + 1)
\stopformula
\stoptext

This is the error.

[…]
system   begin file dotsb.tex at line 1
! Undefined control sequence.

system   tex  error on line 5 in file dotsb.tex: Undefined 
control sequence ...

1 \starttext
2 This throws an error, since »\backslash dotsb« is not defined.
3 
4 \startformula
5 1 + 2 + 3 + \dotsb + n = \frac{n}{2} (n + 1)
6 \stopformula
7 \stoptext
8 

l.5 1 + 2 + 3 + \dotsb
+ n = \frac{n}{2} (n + 1)
?
[…]

Is `\dotsb` not defined intentionally?


Thanks,

Paul


[1] 
http://en.wikibooks.org/wiki/LaTeX/Mathematics#Introducing_text_and_dots_in_formulas
\starttext
This throws an error, since »\backslash dotsb« is not defined.

\startformula
	1 + 2 + 3 + \dotsb + n = \frac{n}{2} (n + 1)
\stopformula
\stoptext


signature.asc
Description: This is a digitally signed message part
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] modules or packages for abbreviations for common math commands

2011-05-03 Thread Paul Menzel
Dear ConTeXt folks,


is there a module or a package people have created for common things
used in mathematics.

`\set{ a, b, c }` for a set.
`\EV{X}` for the expected value.
`\P{ X = ½ }` for the probability.
…

If not, maybe a module could be created and maintained together to not
reinvent the wheel.


Thanks,

Paul


signature.asc
Description: This is a digitally signed message part
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Problem with arrows in latest mkiv (again)

2011-05-03 Thread Otared Kavian
Hi Hans,

I am sending again a message sent some two weeks ago, but probably it was lost…

It seems that the latest beta (version 2011.05.01 12:50) has a problem with 
arrow in math mode, using Latin modern, while with Palatino the arrows are 
correct.
Here is a minimal example and its PDF result (please look at the 
\longrightarrow in the PDF):

\starttext
Let $E,F$ be two Banach spaces and consider a linear operator
$L : E \longrightarrow F$.
\stoptext

Best regards: OK




arrow-1.pdf
Description: Adobe PDF document


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

Re: [NTG-context] AMSTeX compatibility: `\dotsb` is not defined

2011-05-03 Thread Wolfgang Schuster

Am 03.05.2011 um 15:46 schrieb Paul Menzel:

 Dear ConTeXt folks,
 
 
 `\dotsb` is not defined although it is defined in AMSTeX (amsmath) [1].

Why don’t you use \cdots, i can see no difference between your linked example 
and mine below.

\setupbodyfont[pagella]
\starttext
\formula{A_1+\cdots+A_N}\par
\formula{A_1+⋯+A_N}
\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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Too much spacing in math mode between 'f' and 'l' (MkIV only)

2011-05-03 Thread S Barmeier
 
 Hi,
 
 please consider this:
 
 \starttext
 \math{flow_1}
 \stoptext
 
 When compiled with MkIV, space between f and l is quite big and doesn't
 look very good. Is it a bug?
 
Spacing between letters when treated as individual variables is always a
bit fishy. In this case the math mode suppresses the fl ligature, which
seems to be present in the font, whence the spacing is off. Something like

\starttext
\math{{\it flow}_1}
\stoptext

will help ConTeXt treat it as text and improve the spacing (and in this
case make use of the fl ligature).

Define \def\flow{\text{\it flow}} if you just want to say

\starttext
\math{\flow_1}
\stoptext

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


Re: [NTG-context] modules or packages for abbreviations for common math commands

2011-05-03 Thread Aditya Mahajan

On Tue, 3 May 2011, Paul Menzel wrote:


Dear ConTeXt folks,


is there a module or a package people have created for common things
used in mathematics.

   `\set{ a, b, c }` for a set.
   `\EV{X}` for the expected value.
   `\P{ X = ½ }` for the probability.
   …

If not, maybe a module could be created and maintained together to not
reinvent the wheel.


See the mathsets module[1]. The current module does not work with MkIV (I 
need to debug that; most likely due to catcode changes for _ and ^. I am 
planning to reimplement the module using lpeg but that is on a low 
priority.


Aditya

[1]: http://modules.contextgarden.net/mathsets___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] AMSTeX compatibility: `\dotsb` is not defined

2011-05-03 Thread Aditya Mahajan

On Tue, 3 May 2011, Paul Menzel wrote:


Dear ConTeXt folks,


`\dotsb` is not defined although it is defined in AMSTeX (amsmath) [1].

Is `\dotsb` not defined intentionally?


I do not completely understand why this command is needed. I think that 
the intent of amstex is that the user should use \dotsb for dots between 
binary operators and then change \dotsb to \cdots or \ldots depending on 
convention. If so, we need to add them to \setupmathematics or perhaps add 
a new command


\setupmathdots[binary=middle,comma=low,...and others...]

or something similar.

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


Re: [NTG-context] Problem with arrows in latest mkiv (again)

2011-05-03 Thread Aditya Mahajan

On Tue, 3 May 2011, Otared Kavian wrote:


Hi Hans,

I am sending again a message sent some two weeks ago, but probably it was lost…

It seems that the latest beta (version 2011.05.01 12:50) has a problem 
with arrow in math mode, using Latin modern, while with Palatino the 
arrows are correct.


It appears that a text mode minus is being used rather than the math mode 
minus. I haven't checked why that is happening.


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

Re: [NTG-context] Too much spacing in math mode between 'f' and 'l' (MkIV only)

2011-05-03 Thread Aditya Mahajan

On Tue, 3 May 2011, Vedran Miletić wrote:


Hi,

please consider this:

\starttext
\math{flow_1}
\stoptext

When compiled with MkIV, space between f and l is quite big and doesn't
look very good. Is it a bug?


Definitely looks like a bug in italic correction. In principle, the 
spacing with virtual fonts (mkiv) should be the same as type 1 fonts 
(mkii).


But I agree with Severin that you should not be using \math{flow_1} to 
represent the first flow. I hope that this example was for illustrating 
the spacing bug.


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

[NTG-context] Multiplication table (with lines) in ConTeXt?

2011-05-03 Thread Alasdair McAndrew
I want to typeset a multiplication table, where there will be a horizontal
line after the first row, and a vertical line after the first column.  In
LaTeX, I can use:

\[
\begin{array}{c|ccc}
  \times0123456\\
  \hline
  \\
  10123456\\
  20246135\\
  30362514\\
  40415263\\
  50531642\\
  60654321
\end{array}
\]

What is the canonical way of including lines in a mathematical array in
ConTeXt?

Thanks,
Alasdair
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Multiplication table (with lines) in ConTeXt?

2011-05-03 Thread Aditya Mahajan

On Wed, 4 May 2011, Alasdair McAndrew wrote:


I want to typeset a multiplication table, where there will be a horizontal
line after the first row, and a vertical line after the first column.  In
LaTeX, I can use:

\[
\begin{array}{c|ccc}
 \times0123456\\
 \hline
 \\
 10123456\\
 20246135\\
 30362514\\
 40415263\\
 50531642\\
 60654321
\end{array}
\]

What is the canonical way of including lines in a mathematical array in
ConTeXt?


\startsetups table:frame
\setupTABLE[each][each][frame=off, align=middle]
\setupTABLE[row][first][bottomframe=on]
\setupTABLE[column][first][rightframe=on]
\stopsetups

\startTABLE[setups=table:frame]
 \NC $\times$ \NC 1 \NC 2 \NC ... \NC \NR
 
\stopTABLE

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


Re: [NTG-context] Problem with arrows in latest mkiv (again)

2011-05-03 Thread Otared Kavian

On 4 mai 2011, at 05:57, Aditya Mahajan wrote:
 […]
 It appears that a text mode minus is being used rather than the math mode 
 minus. I haven't checked why that is happening.

Thanks Aditya for your attention: yes you are right indeed, this is what 
happens with LM, but not with Palatino.

Best regards: OK___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___