Re: [NTG-context] Modules, namespaces, Luacode etc..

2010-10-01 Thread Jaroslav Hajtmar

Thanx Wolfgang
puzzle starts to fit itself ...
Jarda




Dne 30.9.2010 20:53, Wolfgang Schuster napsal(a):

Am 30.09.2010 um 20:40 schrieb Jaroslav Hajtmar:

   

Hello my wise masters of the Force and teachers of Jedi...

It seems that my first module (SCANCSV of scancsv.lua library of CTM in 
Brejlov) work without any visible errors (without
documentation and with a junkyard yet), but I'm not sure whether is there a
hidden problem or future collisions. Therefore I have a few of questions for
modules namespaces, luacode namespaces etc. I want to ask how relates a 
namespace ConTeXt module with
namespace of Lua code, which is listed within this module and others questions.

1. Is the namespace of Lua code independent of the namespace module?
 

Yes.

   

2. If are ConTeXt macros defined in the module, are automatically in its 
namespace?
 

No, the namespace in a module is only for keys and key-value-lists. When you 
write a command with the same name as a core command the core definition is 
overwritten and lost.

   

3. Can both namespaces (module and Luacode) somehow connected?
 

You can try to use the same namespace in TeX and Lua but thats up to you.

   

4. What happens when I have two macros with the same name in two different 
modules?
 

The last definition is the current meaning of the command, e.g. in this example 
the command \befehl has the content “Befehl” because it’s the last defintion.

\def\befehl{command} % \befehl has not the content “command”

\def\befehl{Befehl} % \befehl has now the content “Befehl” and the content of 
the first definition is lost

   

5. Can I call the macros of the same names in different namespaces (diferent 
modules)?
 

When you call them inside of a environment it’s possible.

\def\startenvone{\bgroup\def\befehl{command}}
\def\stopenvone {\egroup}

\def\startenvtwo{\bgroup\def\befehl{befehl}}
\def\stopenvtwo {\egroup}

\starttext
\startenvone \befehl \stopenvone % \befehl == “command”
\startenvtwo \befehl \stopenvtwo % \befehl == “befehl”
\stoptext

   

6. Can I read about somewhere more?
 

- The programming pages on the wiki.
- A book about plain TeX {e.g. The TeXbook, TeX by Topic, TeX for the Impatient 
etc.)

   

7. I enclose below a minimal example of the module (I do not know why there are 
some things) to comment or write yours comments and suggestions, etc.
 

Give me some time to write a detailed description of the \definenamespace 
command.

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] Two layer in a document

2010-10-01 Thread R. Bastian
On Thu, 30 Sep 2010 19:42:34 +0200
Wolfgang Schuster schuster.wolfg...@googlemail.com scribit:

 
 Am 30.09.2010 um 11:49 schrieb Daniel Grycman:
 
  Hi list,
  
  I am typesetting a template for internal documentation. In the header of
  the document I want to put two different figure. One on the left side and
  the other on the right side. When I compile the source the output shows
  only the figure on the left side.
[...]
 One layer is enough for both pictures, try also to make it more readable next 
 time.
 
 \definelayer[logo][width=\paperwidth,height=\paperheight,state=repeat]
 
 \setupbackgrounds[page][background={foreground,logo}]
 
 \setlayer
   [logo]
   [preset=righttop,
hoffset=1cm]
   {\externalfigure[label][height=4cm,3.5cm]}
 
 \setlayer
   [logo]
   [preset=lefttop,
hoffset=1.3cm,
voffset=1.4cm]
   {\externalfigure[wortmarke][height=0.3cm,width=6.5cm]}
 
 \starttext
 \dorecurse{20}{\input knuth\par}
 \stoptext
 
 Wolfgang

Does this work in Mk II ?

 ___


-- 
René Bastian
www.pythoneon.org
www.musiques-rb.org
___
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] Verbatim text loaded from a file?

2010-10-01 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I'd need to show contents of a (text) file like verbatim text (with a monospace 
font).

So to do something being described at 
http://wiki.contextgarden.net/Verbatim_text using \startcode SOME TEXT \stop 
code, but the difference is that I don't need to write SOME TEXT manually but I 
need to load it from a (text) file.

Moreover, I'd need to have the following options:

- To alter the font used for numbering lines, so that it would be smaller than 
the normal text.

- To specify number of the first and/or last line to be printed.

- The input file may contain the end-of-page character, \0C. So I'd need this 
char

  - to be ignored

  - and/or to force printing from a new page.

Is there a ConTeXt command which would provide all above?

(NB: When I worked with LaTeX, these features were mostly provided by \VerbatimInput 
command from fancyvrb package.)

Kind regards,

Lukáš


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___
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] Two layer in a document

2010-10-01 Thread Daniel Grycman
It works in MKIV, but I don't what it does in MKII.

Daniel

On 01.10.10 09:51, R. Bastian rbast...@free.fr wrote:

On Thu, 30 Sep 2010 19:42:34 +0200
Wolfgang Schuster schuster.wolfg...@googlemail.com scribit:

 
 Am 30.09.2010 um 11:49 schrieb Daniel Grycman:
 
  Hi list,
  
  I am typesetting a template for internal documentation. In the header
of
  the document I want to put two different figure. One on the left side
and
  the other on the right side. When I compile the source the output
shows
  only the figure on the left side.
[...]
 One layer is enough for both pictures, try also to make it more
readable next time.
 
 \definelayer[logo][width=\paperwidth,height=\paperheight,state=repeat]
 
 \setupbackgrounds[page][background={foreground,logo}]
 
 \setlayer
 [logo]
 [preset=righttop,
  hoffset=1cm]
 {\externalfigure[label][height=4cm,3.5cm]}
 
 \setlayer
 [logo]
 [preset=lefttop,
  hoffset=1.3cm,
  voffset=1.4cm]
 {\externalfigure[wortmarke][height=0.3cm,width=6.5cm]}
 
 \starttext
 \dorecurse{20}{\input knuth\par}
 \stoptext
 
 Wolfgang

Does this work in Mk II ?

 

___


-- 
René Bastian
www.pythoneon.org
www.musiques-rb.org
__
_
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
__
_


___
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] structure affects protrusion

2010-10-01 Thread Steffen Wolfrum
Hi,

please have look at the minimal example below:

Using the latest beta (20100929) with structure set to stop:
protrusion works.

With structure set to start: the hyphen doesn't get protruded!
(but the comma still does ...?)


Steffen
---

\enabletrackers[structure.tags]

\setupstructure[state=stop] % - start = no protrusion


\definefontfeature[default][default]
[mode=node,protrusion=quality,script=latn]

\starttypescript[TheTimes]
 \definetypeface [TheTimes] [rm] [serif] [times] [default] 
\stoptypescript

\usetypescript[TheTimes]
\setupbodyfont[TheTimes, 12pt]
\setupalign[line,block,hanging]


\setuplayout
[width=113mm]

\starttext  \showframe
\input tufte
\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] Two layer in a document

2010-10-01 Thread Peter Rolf
Am 01.10.2010 09:51, schrieb R. Bastian:
 On Thu, 30 Sep 2010 19:42:34 +0200
 Wolfgang Schuster schuster.wolfg...@googlemail.com scribit:
 

 Am 30.09.2010 um 11:49 schrieb Daniel Grycman:

 Hi list,

 I am typesetting a template for internal documentation. In the header of
 the document I want to put two different figure. One on the left side and
 the other on the right side. When I compile the source the output shows
 only the figure on the left side.
 [...]
 One layer is enough for both pictures, try also to make it more readable 
 next time.

 \definelayer[logo][width=\paperwidth,height=\paperheight,state=repeat]

 \setupbackgrounds[page][background={foreground,logo}]

 \setlayer
  [logo]
  [preset=righttop,
   hoffset=1cm]
  {\externalfigure[label][height=4cm,3.5cm]}

 \setlayer
  [logo]
  [preset=lefttop,
   hoffset=1.3cm,
   voffset=1.4cm]
  {\externalfigure[wortmarke][height=0.3cm,width=6.5cm]}

 \starttext
 \dorecurse{20}{\input knuth\par}
 \stoptext

 Wolfgang
 
 Does this work in Mk II ?


You can set your mind at rest and test it yourself.
The 'nuke_my_computer_by_running_context' module is no longer part of
the official distribution ;-)

Best wishes,  Peter
___
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] Verbatim text loaded from a file?

2010-10-01 Thread Henning Hraban Ramm

Am 2010-10-01 um 09:51 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

I'd need to show contents of a (text) file like verbatim text (with  
a monospace font).


So to do something being described at http://wiki.contextgarden.net/Verbatim_text 
 using \startcode SOME TEXT \stop code, but the difference is that I  
don't need to write SOME TEXT manually but I need to load it from a  
(text) file.


At Verbatim_text you overlooked the small hint to \typefile:
http://wiki.contextgarden.net/Reference/en/typefile
(also mentioned at http://wiki.contextgarden.net/Reference/en/starttyping)


Moreover, I'd need to have the following options:
- To alter the font used for numbering lines, so that it would be  
smaller than the normal text.


\definetyping[MyStyle]
\setuptyping[MyStyle][style={\tfx\tt}]

see http://wiki.contextgarden.net/Reference/en/setuptyping


Doesn't look like you really searched the wiki...


- To specify number of the first and/or last line to be printed.


I remember something like that, please search the mailing list archive  
and add your findings to the wiki pages.


- The input file may contain the end-of-page character, \0C. So I'd  
need this char

 - to be ignored
 - and/or to force printing from a new page.


I don't know, never used ...typing myself.



Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] Verbatim text loaded from a file?

2010-10-01 Thread Henning Hraban Ramm

Am 2010-10-01 um 11:06 schrieb Henning Hraban Ramm:



Moreover, I'd need to have the following options:
- To alter the font used for numbering lines, so that it would be  
smaller than the normal text.


\definetyping[MyStyle]
\setuptyping[MyStyle][style={\tfx\tt}]

see http://wiki.contextgarden.net/Reference/en/setuptyping


Sorry, I guess I misunderstood you:
You mean the font of the numbers?

I've no clue - don't know what i/v/ccommand can do (perhaps only  
coloring some word classes), try it yourself or look in the sources:

http://source.contextgarden.net/tex/context/base/verb-ini.mkii

Maybe the settings of \setuplinenumbering also affect \...typing:
http://wiki.contextgarden.net/Reference/en/setuplinenumbering
(Don't know how you can change the number font with it, though.)

Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] Verbatim text loaded from a file?

2010-10-01 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,


Sorry, I guess I misunderstood you:
You mean the font of the numbers?


I mean font (or or its size) used for printing for line numbers - see 
http://ftp.cstug.cz/pub/CTAN/macros/latex/contrib/fancyvrb/fancyvrb.pdf, pg. 11: line 
numbers which are turned on by numbers=left are printed with small (xsmall?) 
font; that's what I'm trying to achieve.

- I'll try to look into wiki.ctx.



I've no clue - don't know what i/v/ccommand can do (perhaps only
coloring some word classes), try it yourself or look in the sources:
http://source.contextgarden.net/tex/context/base/verb-ini.mkii

Maybe the settings of \setuplinenumbering also affect \...typing:
http://wiki.contextgarden.net/Reference/en/setuplinenumbering


- I'll try it.

Cheers,

Lukas

___
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] font sizes (again)

2010-10-01 Thread Florian Wobbe
On Sep 30, 2010, at 15:27 , Mojca Miklavec wrote:

 On Wed, Sep 29, 2010 at 14:30, Florian Wobbe wrote:
 Hi,
 
 please regard this minimal example:
 
 \setupbodyfont[10pt]
 \starttext
 \title{Title}
 \section{Section}
 {\switchtobodyfont[big] big}
 {\switchtobodyfont[small] small}
 {\tfxx tfxx}
 {\tfx tfx}
 {\tfa tfa}
 {\tfb tfb}
 {\tfc tfc}
 {\tfd tfd}
 \stoptext
 
 Latin Modern Regular is available in different optical sizes - 
 lmroman{5,6,7,8,9,10,12,17}-regular.otf - and as context is aware of these 
 sizes (configured in typescripts) I wonder why they are not correctly 
 assigned. This table indicates what happens instead:
 
 \tfxx 6pt- lmroman6 (as expected)
 \tfx  8pt- lmroman8 (as expected)
 \tftf 10pt   - lmroman10 (as expected)
 \tfa  12.0pt - lmroman10 (instead of lmroman12)
 \tfb  14.4pt - lmroman10 (instead of lmroman12)
 \tfc  17.3pt - lmroman10 (instead of lmroman17)
 \tfd  20.7pt - lmroman10 (instead of lmroman17)
 
 \switchtobodyfont[small]  8pt  - lmroman8 (as expected)
 \switchtobodyfont[big]12pt - lmroman12 (as expected)
 
 \title   17.3pt - lmroman10 (instead of lmroman17)
 \section 12pt   - lmroman10 (instead of lmroman12)
 
 The commands \title and \section and the font size switches \tfa, b, c, and 
 d scale the font to the correct size, however, the wrong optical size is 
 assigned. Note, this is not the case for \tfx, xx and \switchtobodyfont. 
 Tested in MKIV and MKII (current beta).
 
 Is this a bug or a feature?
 
 Most likely the first, however I never really understood how this
 magic is configured in ConTeXt.
 
 The relevant files are
tex/context/base/type-siz.mkiv (as well as mkii)
 I guess that the contents more or less agree with your observations
 (there is no 17pt font defined for big, however there are small fonts
 defined for x and xx), but I would have no idea how to fix anything.
 
 Mojca

Thanks, you are right, the biggest defined lm font is lmroman12. But that's 
beside the point. The typescripts are configured correctly. BTW, you get the 
same problem with Wolfgang's third/typescripts/type-optical.tex, which defines 
four optical sizes of the Adobe Pro fonts. Like Mojca, I don't know about the 
context magic innards and how to fix this either. Is there a way for 
interactive line tracing in luatex, similar to e.g. bash -x?

Florian

___
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] Two layer in a document

2010-10-01 Thread Steffen Wolfrum

Am 01.10.2010 um 11:00 schrieb Peter Rolf:

 Am 01.10.2010 09:51, schrieb R. Bastian:
 On Thu, 30 Sep 2010 19:42:34 +0200
 Wolfgang Schuster schuster.wolfg...@googlemail.com scribit:
 
 
 Am 30.09.2010 um 11:49 schrieb Daniel Grycman:
 
 Hi list,
 
 I am typesetting a template for internal documentation. In the header of
 the document I want to put two different figure. One on the left side and
 the other on the right side. When I compile the source the output shows
 only the figure on the left side.
 [...]
 One layer is enough for both pictures, try also to make it more readable 
 next time.
 
 \definelayer[logo][width=\paperwidth,height=\paperheight,state=repeat]
 
 \setupbackgrounds[page][background={foreground,logo}]
 
 \setlayer
 [logo]
 [preset=righttop,
  hoffset=1cm]
 {\externalfigure[label][height=4cm,3.5cm]}
 
 \setlayer
 [logo]
 [preset=lefttop,
  hoffset=1.3cm,
  voffset=1.4cm]
 {\externalfigure[wortmarke][height=0.3cm,width=6.5cm]}
 
 \starttext
 \dorecurse{20}{\input knuth\par}
 \stoptext
 
 Wolfgang
 
 Does this work in Mk II ?
 
 
 You can set your mind at rest and test it yourself.
 The 'nuke_my_computer_by_running_context' module is no longer part of
 the official distribution ;-)
 
 Best wishes,  Peter


... added to goodies from the mailing list:

http://wiki.contextgarden.net/Humour


Steffen

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

2010-10-01 Thread Florian Wobbe
On Sep 30, 2010, at 21:01 , Patrick Gundlach wrote:

 Hi,
 
 several days ago I asked about companions to Cambria, and Wolfgang kindly 
 gave me this:
 
 \definetypeface [mainface] [rm] [serif] [cambria]  [default]
 \definetypeface [mainface] [ss] [sans]  [corbel]   [default] [rscale=auto]
 \definetypeface [mainface] [tt] [mono]  [consolas] [default] [rscale=auto]
 \definetypeface [mainface] [mm] [math]  [cambria]  [default]
 
 
 which works fine, except for consolas. Shouldn't consolas be defined like
 
 \starttypescript [mono] [consolas] [name]  
   \setups[\s!font:\s!fallback:\s!sans]
\definefontsynonym [\s!Mono]   [\s!file:consola]  
 [\s!features=\s!default]
\definefontsynonym [\s!MonoBold]   [\s!file:consolab] 
 [\s!features=\s!default]
\definefontsynonym [\s!MonoItalic] [\s!file:consolai] 
 [\s!features=\s!default]
\definefontsynonym [\s!MonoBoldItalic] [\s!file:consolaz] 
 [\s!features=\s!default]
\stoptypescript
 
 instead of
 
 Sans ? It's much more a monospace font then a Sans.
 
 Thanks
 
 Patrick

It seems, the ClearType fonts come with different filenames, so I had to define 
them by name like Cambria is in type-otf (\definefontsynonym [CambriaSerif] 
[name:cambria]):

\starttypescript [sans] [corbel] [name]
  \setups[font:fallback:sans]
  \definefontsynonym [Sans]   [name:corbel]   [features=default]
  \definefontsynonym [SansBold]   [name:corbelbold]   [features=default]
  \definefontsynonym [SansItalic] [name:corbelitalic] [features=default]
  \definefontsynonym [SansBoldItalic] [name:corbelbolditalic] [features=default]
\stoptypescript

\starttypescript [mono] [consolas] [name]
  \setups[font:fallback:mono]
  \definefontsynonym [Mono]   [name:consolas]   
[features=default]
  \definefontsynonym [MonoBold]   [name:consolasbold]   
[features=default]
  \definefontsynonym [MonoItalic] [name:consolasitalic] 
[features=default]
  \definefontsynonym [MonoBoldItalic] [name:consolasbolditalic] 
[features=default]
\stoptypescript

Best
Florian

___
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] Computer Modern Unicode fonts

2010-10-01 Thread Mojca Miklavec
On Fri, Oct 1, 2010 at 05:53, Vladimir Lomov wrote:
 Hi Mojca.

 source.contextgarden.net: 2010-03-30: not sure what this means.

This means that source browser for ConTeXt dates back to the times
when Hans was releasing a new current version of ConTeXt every few
days. Now he started distributing the betas on a regular basis and
current ConTeXt simply hasn't been updated since March. The source
browser only shows the current version of ConTeXt.

 minimals.contextgarden.net: Last modified - 2010-09-30 - setup .

This one might be an indicator of last update, yes.
But then it's best to check

http://minimals.contextgarden.net/current/context/beta/tex/context/base/context.tex
or maybe the files you are interested in:

http://minimals.contextgarden.net/current/modules/t-typescripts/tex/context/third/typescripts/
which date to
30-Sep-2010 14:19

Mojca

PS: I will try to remember to add these font to minimals in a month or so
___
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] typewriter text in formula

2010-10-01 Thread Patrick Gundlach
Hi,

how do I get typewriter text in formula?

I've tried:

\startformula
r =  \mono{foo}
\stopformula

but that gives mono from a different font. I'd like to have consolas, but it 
looks like courier new.

And a related question:

How do I get an underscore in this:

\startformula
r =  \mono{foo_i} looks wrong (I need the underscore) and \mono{foo\_i} fails
\stopformula


Patrick
-


My setup:

\usetypescriptfile[type-consolas]
\definetypeface [mainface] [rm] [serif] [cambria]  [default]
\definetypeface [mainface] [ss] [sans]  [corbel]   [default] [rscale=auto]
\definetypeface [mainface] [tt] [mono]  [consolas] [default] [rscale=auto]
\definetypeface [mainface] [mm] [math]  [cambria]  [default]

where type-consolas is this:

\unprotect
 \starttypescript [mono] [consolas] [name]  
   \setups[\s!font:\s!fallback:\s!sans]
\definefontsynonym [\s!Mono]   [\s!file:consola]  
[\s!features=\s!default]
\definefontsynonym [\s!MonoBold]   [\s!file:consolab] 
[\s!features=\s!default]
\definefontsynonym [\s!MonoItalic] [\s!file:consolai] 
[\s!features=\s!default]
\definefontsynonym [\s!MonoBoldItalic] [\s!file:consolaz] 
[\s!features=\s!default]
\stoptypescript
\protect


___
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] typewriter text in formula

2010-10-01 Thread Khaled Hosny
On Fri, Oct 01, 2010 at 12:25:54PM +0200, Patrick Gundlach wrote:
 Hi,
 
 how do I get typewriter text in formula?
 
 I've tried:
 
 \startformula
 r =  \mono{foo}
 \stopformula
 
 but that gives mono from a different font. I'd like to have consolas, but it 
 looks like courier new.

You should get the math mono from the math font you are using (Cambria,
I guess) not from the text font.

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] typewriter text in formula

2010-10-01 Thread Patrick Gundlach

 how do I get typewriter text in formula?
 
 I've tried:
 
 \startformula
 r =  \mono{foo}
 \stopformula
 
 but that gives mono from a different font. I'd like to have consolas, but it 
 looks like courier new.
 
 You should get the math mono from the math font you are using (Cambria,
 I guess) not from the text font.

sorry to ask again, _how_ do I get the mono from the math font? (Yes, Cambria).

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
___


Re: [NTG-context] typewriter text in formula

2010-10-01 Thread Khaled Hosny
On Fri, Oct 01, 2010 at 02:04:09PM +0200, Patrick Gundlach wrote:
 
  how do I get typewriter text in formula?
  
  I've tried:
  
  \startformula
  r =  \mono{foo}
  \stopformula
  
  but that gives mono from a different font. I'd like to have consolas, but 
  it looks like courier new.
  
  You should get the math mono from the math font you are using (Cambria,
  I guess) not from the text font.
 
 sorry to ask again, _how_ do I get the mono from the math font? (Yes, 
 Cambria).

\mono{}? which you are already using.
I tried the file below, and all the three r's are Cambria's, and the
last two are mono.

\setupbodyfont[cambria]
\starttext
\startformula
r=\mono{r}{\tt r}
\stopformula
\stoptext

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] typewriter text in formula

2010-10-01 Thread Patrick Gundlach

 
 \mono{}? which you are already using.
 I tried the file below, and all the three r's are Cambria's, and the
 last two are mono.
 
 \setupbodyfont[cambria]
 \starttext
 \startformula
 r=\mono{r}{\tt r}
 \stopformula
 \stoptext


Thats what I get, too, but this is not what I want! This looks like Courier to 
me, but I want Consolas in the formula. See my original question.

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
___


Re: [NTG-context] typewriter text in formula

2010-10-01 Thread Patrick Gundlach
Hi all,


 \setupbodyfont[cambria]
 \starttext
 \startformula
 r=\mono{r}{\tt r}
 \stopformula
 \stoptext

Mojca gave me the right hint to use \text{.} around the text. And my other 
problem is solved as well (underscores).



Thanks!
___
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] Two layer in a document

2010-10-01 Thread luigi scarso
 The 'nuke_my_computer_by_running_context' module is no longer part of
 the official distribution ;-)
I must admit that I had some
'burn_my_computer_by_running_context' beta releases
under windows7 with luatex compiled by me (fat burst of laughters here)
on my EeePC T101.



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


[NTG-context] No bleeding with 2UP arranging

2010-10-01 Thread Vianney le Clément
Hello,

When using 2UP arranging, the pages are clipped to their bounding box,
loosing any bleeding.

Example:

\setuppapersize[A6][A4,landscape]
\setuparranging[2UP]
\setuplayout[location=middle]
\setuppagenumbering[alternative=doublesided]
\showframe
\startreusableMPgraphic{background}
StartPage;
fill fullcircle scaled 1cm;
StopPage;
\stopreusableMPgraphic
\defineoverlay[background][\reuseMPgraphic{background}]
\setupbackgrounds[page][background=background]
\starttext
\dorecurse{4}{\page\input tufte}
\stoptext

There should be a circle centered in the lower-left corner of every
page. With 2UP arranging, this circle is clipped. With no arranging or
2**2 arranging, everything works fine.

Is there any way around this?

Thanks,
Vianney
___
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 latest beta: \placepublications

2010-10-01 Thread Thomas A. Schmitz
Hans Hagen pragma at wxs.nl writes:

 
 On 30-9-2010 11:00, Alan BRASLAU wrote:
  Thanks to the course given by Taco, I now know all about 'nil'...
  However, I did not track down the error, as Hans will find it immediately!
 
 ah, I wanted to log off but you force me to check it now ...
 
 in strc-lst.mkiv patch
 
 \unexpanded\def\analyzestructurelist#1#2#3%
{\ctxlua{structures.lists.analyze {
  names = #1,
  criterium = #2,
  number= #3,
 }}}
 
 untested of course
 

I hit the same problem today, and this patch doesn't solve it. Could you look
into it, Hans? 

All best

Thomas 




___
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] rotated (landscape) pages in portrait document

2010-10-01 Thread Mojca Miklavec
Dear list,

First one question: what is the MKIV-way of doing something like

\startbuffer[a]
% set text width for formula somehow
\startformula\startalign
\NC a \NC = b \NR
\stopalign\stopformula
\stopbuffer

\framed{\rotate[rotation=90]{\externalfigure[\jobname-a.tmp]}}

possibly adjusting width of formula to actual width (even if that is
done manually)?


And the other question: is there some quick trick that would rotate
the whole page inside a document, so that the page would still be
portrait, but text would be rotated with textwidth and textheight
swapped, but with preserved main header (in reality I do not care
about the header).

I would like to put a narrow, but several lines long equation
(\startalign) on left (bottom) and image on the right (top).

I was playing with an approximation

\rotate[rotation=90]{\vbox{
\startformula\startalign[n=6,align={middle,middle,right,middle,left,left}]
\NC l \NC\hbox to 1em{}\NC m_l \NC\hbox to 1em{}\NC \text{orb.}\hbox
to 2em{} \NC Y_{lm}\NR
\NC 0 \NC\NC 0\NC\NC s   \NC \frac{1}{2}\sqrt{\frac{
1}{π}} \NR
\NC 1 \NC\NC 0\NC\NC p_z \NC \frac{1}{2}\sqrt{\frac{
3}{π}}\frac{z}{r}  \NR
\NC 1 \NC\NC \pm1 \NC\NC p_x \NC \frac{1}{2}\sqrt{\frac{
3}{π}}\frac{x}{r}  \NR
\NC   \NC\NC  \NC\NC p_y \NC \frac{1}{2}\sqrt{\frac{
3}{π}}\frac{y}{r}  \NR
\NC 2 \NC\NC 0\NC\NC d_{z^2} \NC \frac{1}{4}\sqrt{\frac{
5}{π}}\frac{3z^2-r^2}{r^2} \NR
\NC 2 \NC\NC \pm1 \NC\NC d_{xz}  \NC
\frac{1}{2}\sqrt{\frac{15}{π}}\frac{xz}{r^2}   \NR
\NC   \NC\NC  \NC\NC d_{yz}  \NC
\frac{1}{2}\sqrt{\frac{15}{π}}\frac{yz}{r^2}   \NR
\NC 2 \NC\NC \pm2 \NC\NC d_{xy}  \NC
\frac{1}{2}\sqrt{\frac{15}{π}}\frac{xy}{r^2}   \NR
\NC   \NC\NC  \NC\NC d_{x^2-y^2} \NC
\frac{1}{4}\sqrt{\frac{15}{π}}\frac{x^2-y^2}{r^2}  \NR
\stopalign\stopformula}}
% and then externalfigure on the right ...

but the formula takes exactly \textwidth space, I didn't manage to
convince it to consume less space (I could probably change textwidth
locally).

I know for workarounds (typesetting a different document for example
and then include the page), but I really wonder if switching
orientation just for a page (to typeset a table for example) is doable
in some elegant way.

This is all low priority though.

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


Re: [NTG-context] rotated (landscape) pages in portrait document

2010-10-01 Thread Wolfgang Schuster

Am 01.10.2010 um 17:41 schrieb Mojca Miklavec:

 Dear list,
 
 First one question: what is the MKIV-way of doing something like
 
 \startbuffer[a]
 % set text width for formula somehow
 \startformula\startalign
 \NC a \NC = b \NR
 \stopalign\stopformula
 \stopbuffer
 
 \framed{\rotate[rotation=90]{\externalfigure[\jobname-a.tmp]}}
 
 possibly adjusting width of formula to actual width (even if that is
 done manually)?


Something like this?

\startbuffer[a]
\startTEXpage[width=\textheight]
\startformula\startalign
\NC a \NC = b \NR
\stopalign\stopformula
\stopTEXpage
\stopbuffer

\starttext
\framed{\rotate[rotation=90]{\getbuffer[a]}}
\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] Two layer in a document

2010-10-01 Thread Aditya Mahajan


On Oct 1, 2010, at 5:00 AM, Peter Rolf indi...@gmx.net wrote:


 
 
 
 
 
 
 
 
 
 Does this work in Mk II ?
 
 
 You can set your mind at rest and test it yourself.
 The 'nuke_my_computer_by_running_context' module is no longer part of
 the official distribution ;-)

Does that mean that my filter module will never become part of the official 
distribution :((

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] rotated (landscape) pages in portrait document

2010-10-01 Thread Wolfgang Schuster

Am 01.10.2010 um 17:41 schrieb Mojca Miklavec:

 And the other question: is there some quick trick that would rotate
 the whole page inside a document, so that the page would still be
 portrait, but text would be rotated with textwidth and textheight
 swapped, but with preserved main header (in reality I do not care
 about the header).
 
 I would like to put a narrow, but several lines long equation
 (\startalign) on left (bottom) and image on the right (top).
 
 I was playing with an approximation
 
 \rotate[rotation=90]{\vbox{
 \startformula\startalign[n=6,align={middle,middle,right,middle,left,left}]
 \NC l \NC\hbox to 1em{}\NC m_l \NC\hbox to 1em{}\NC \text{orb.}\hbox
 to 2em{} \NC Y_{lm}\NR
 \NC 0 \NC\NC 0\NC\NC s   \NC \frac{1}{2}\sqrt{\frac{
 1}{π}} \NR
 \NC 1 \NC\NC 0\NC\NC p_z \NC \frac{1}{2}\sqrt{\frac{
 3}{π}}\frac{z}{r}  \NR
 \NC 1 \NC\NC \pm1 \NC\NC p_x \NC \frac{1}{2}\sqrt{\frac{
 3}{π}}\frac{x}{r}  \NR
 \NC   \NC\NC  \NC\NC p_y \NC \frac{1}{2}\sqrt{\frac{
 3}{π}}\frac{y}{r}  \NR
 \NC 2 \NC\NC 0\NC\NC d_{z^2} \NC \frac{1}{4}\sqrt{\frac{
 5}{π}}\frac{3z^2-r^2}{r^2} \NR
 \NC 2 \NC\NC \pm1 \NC\NC d_{xz}  \NC
 \frac{1}{2}\sqrt{\frac{15}{π}}\frac{xz}{r^2}   \NR
 \NC   \NC\NC  \NC\NC d_{yz}  \NC
 \frac{1}{2}\sqrt{\frac{15}{π}}\frac{yz}{r^2}   \NR
 \NC 2 \NC\NC \pm2 \NC\NC d_{xy}  \NC
 \frac{1}{2}\sqrt{\frac{15}{π}}\frac{xy}{r^2}   \NR
 \NC   \NC\NC  \NC\NC d_{x^2-y^2} \NC
 \frac{1}{4}\sqrt{\frac{15}{π}}\frac{x^2-y^2}{r^2}  \NR
 \stopalign\stopformula}}
 % and then externalfigure on the right ...
 
 but the formula takes exactly \textwidth space, I didn't manage to
 convince it to consume less space (I could probably change textwidth
 locally).
 
 I know for workarounds (typesetting a different document for example
 and then include the page), but I really wonder if switching
 orientation just for a page (to typeset a table for example) is doable
 in some elegant way.

\starttext

\bTABLE[orientation=90,frame=off,width=\textwidth,height=.5\textheight,align=lohi]
\bTR
\bTD \externalfigure[cow] \eTD
\eTR
\bTR
\bTD
\starttabulate[|Mc|Mr|Ml|Ml|]
\NC l \NC m_l \NC \text{orb.} \NC Y_{lm}
\NC\NR
\NC 0 \NC 0   \NC s   \NC \frac{1}{2}\sqrt{\frac{1}{π}} 
\NC\NR
\NC 1 \NC 0   \NC p_z \NC 
\frac{1}{2}\sqrt{\frac{3}{π}}\frac{z}{r}  \NC\NR
\NC 1 \NC ±1  \NC p_x \NC 
\frac{1}{2}\sqrt{\frac{3}{π}}\frac{x}{r}  \NC\NR
\NC   \NC \NC p_y \NC 
\frac{1}{2}\sqrt{\frac{3}{π}}\frac{y}{r}  \NC\NR
\NC 2 \NC 0   \NC d_{z^2} \NC 
\frac{1}{4}\sqrt{\frac{5}{π}}\frac{3z^2-r^2}{r^2} \NC\NR
\NC 2 \NC ±1  \NC d_{xz}  \NC 
\frac{1}{2}\sqrt{\frac{15}{π}}\frac{xz}{r^2}  \NC\NR
\NC   \NC \NC d_{yz}  \NC 
\frac{1}{2}\sqrt{\frac{15}{π}}\frac{yz}{r^2}  \NC\NR
\NC 2 \NC ±2  \NC d_{xy}  \NC 
\frac{1}{2}\sqrt{\frac{15}{π}}\frac{xy}{r^2}  \NC\NR
\NC   \NC \NC d_{x^2-y^2} \NC 
\frac{1}{4}\sqrt{\frac{15}{π}}\frac{x^2-y^2}{r^2} \NC\NR
\stoptabulate
\eTD
\eTR
\eTABLE

\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] Interline spacing in lists

2010-10-01 Thread Elias Oltmanns
Hi there,

how can I change the interline space when placing the list of figures?
before=\blank is not what I'm looking for since that won't help when a
caption contains an explicit \crlf.

Thanks in advance for your help,

Elias
___
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] Interline spacing in lists

2010-10-01 Thread Wolfgang Schuster

Am 01.10.2010 um 18:36 schrieb Elias Oltmanns:

 Hi there,
 
 how can I change the interline space when placing the list of figures?
 before=\blank is not what I'm looking for since that won't help when a
 caption contains an explicit \crlf.
 
 Thanks in advance for your help,

\start\setupinterlinespace[line=...]
\placelistoffigures
\stop

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] Interline spacing in lists

2010-10-01 Thread Elias Oltmanns
Wolfgang Schuster schuster.wolfg...@googlemail.com wrote:
 Am 01.10.2010 um 18:36 schrieb Elias Oltmanns:

 Hi there,
 
 how can I change the interline space when placing the list of figures?
 before=\blank is not what I'm looking for since that won't help when a
 caption contains an explicit \crlf.
 
 Thanks in advance for your help,

 \start\setupinterlinespace[line=...]
 \placelistoffigures
 \stop

That's odd. Why didn't \setupinterlinespace[big] work then?

Anyway, thanks for your quick response.

Regards,

Elias
___
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] one line caption

2010-10-01 Thread Patrick Gundlach
Hi,

how do I get the caption as wide as possible?


\starttext
\placefigure
[here]
[foo]
{A very long caption, isn't it?}
{\externalfigure[cow][width=2cm]}
\stoptext


I also tried without luck

\setupcaptions[minwidth=fit] (no effect)

and \setupcaptions[minwidth=\textwidth] (left aligned)

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
___


Re: [NTG-context] one line caption

2010-10-01 Thread Mojca Miklavec
On Fri, Oct 1, 2010 at 21:43, Patrick Gundlach wrote:
 Hi,

 how do I get the caption as wide as possible?

 
 \starttext
 \placefigure
 [here]
 [foo]
 {A very long caption, isn't it?}
 {\externalfigure[cow][width=2cm]}

Don't sue me; this is what I sometimes use:
{\hbox to .9\textwidth{\hss\externalfigure[cow][width=2cm]\hss}}

But I bet that there exists an option to fix that globally.

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


Re: [NTG-context] one line caption

2010-10-01 Thread Peter Münster
On Fri, Oct 01 2010, Patrick Gundlach wrote:

 I also tried without luck
 
 \setupcaptions[minwidth=fit] (no effect)
 
 and \setupcaptions[minwidth=\textwidth] (left aligned)

\setupcaptions[minwidth=\textwidth, align=middle]

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


Re: [NTG-context] one line caption

2010-10-01 Thread Patrick Gundlach
 
 \setupcaptions[minwidth=fit] (no effect)
 
 and \setupcaptions[minwidth=\textwidth] (left aligned)
 
 \setupcaptions[minwidth=\textwidth, align=middle]

[palm-slap to the forehead] Yes. Thanks!

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
___


Re: [NTG-context] typewriter text in formula

2010-10-01 Thread Hans Hagen

On 1-10-2010 2:38, Patrick Gundlach wrote:

Hi all,



\setupbodyfont[cambria]
\starttext
\startformula
r=\mono{r}{\tt r}
\stopformula
\stoptext


Mojca gave me the right hint to use \text{.} around the text. And my other 
problem is solved as well (underscores).


fyi: there is a typewriter alphabet in math (unicode) but indeed in your 
case you need \text in order to get more than the alphabet (and another 
font).



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] typewriter text in formula

2010-10-01 Thread Patrick Gundlach


 fyi: there is a typewriter alphabet in math (unicode) but indeed in your case 
 you need \text in order to get more than the alphabet (and another font).

I remember that I came across that (U+1D670 and further) a few days ago and 
wondered

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
___


Re: [NTG-context] change register entry separator

2010-10-01 Thread Hans Hagen

On 1-10-2010 12:02, Jano Kula wrote:

Hi,

any way to change register entry and subentry separator from + to
something else? Preferably to kanji character, so I'm sure it will not
appear in the text. Entries and subentries are autoflushed, so it can be
really anything.

Other way around: I substitute + with  PLUS  in index terms before
writing into the index, but which command is reading the sorted index
entries to change it back to + when typesetting the sorted index on
pages?


\setregisterentry[index]
  [entries:1=...,
   entries:2=...,
   entries:3=...,
   keys:1=...,
   keys:2=...,
   keys:3=...,
   ...

ok, not nice that it's plural but there's also the regular 'entries'

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Consolas

2010-10-01 Thread Hans Hagen

On 1-10-2010 12:42, Florian Wobbe wrote:

On Sep 30, 2010, at 21:01 , Patrick Gundlach wrote:


Hi,

several days ago I asked about companions to Cambria, and Wolfgang kindly gave 
me this:

\definetypeface [mainface] [rm] [serif] [cambria]  [default]
\definetypeface [mainface] [ss] [sans]  [corbel]   [default] [rscale=auto]
\definetypeface [mainface] [tt] [mono]  [consolas] [default] [rscale=auto]
\definetypeface [mainface] [mm] [math]  [cambria]  [default]


which works fine, except for consolas. Shouldn't consolas be defined like

\starttypescript [mono] [consolas] [name]
   \setups[\s!font:\s!fallback:\s!sans]
\definefontsynonym [\s!Mono]   [\s!file:consola]  
[\s!features=\s!default]
\definefontsynonym [\s!MonoBold]   [\s!file:consolab] 
[\s!features=\s!default]
\definefontsynonym [\s!MonoItalic] [\s!file:consolai] 
[\s!features=\s!default]
\definefontsynonym [\s!MonoBoldItalic] [\s!file:consolaz] 
[\s!features=\s!default]
\stoptypescript

instead of

Sans ? It's much more a monospace font then a Sans.

Thanks

Patrick


It seems, the ClearType fonts come with different filenames, so I had to define 
them by name like Cambria is in type-otf (\definefontsynonym [CambriaSerif] 
[name:cambria]):


btw, we need to make decisions here ... in tex live such fonts get 
different names so do we follow that convention or do we opt for the 
official files


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Consolas

2010-10-01 Thread Khaled Hosny
On Fri, Oct 01, 2010 at 11:26:04PM +0200, Hans Hagen wrote:
 On 1-10-2010 12:42, Florian Wobbe wrote:
 On Sep 30, 2010, at 21:01 , Patrick Gundlach wrote:
 
 Hi,
 
 several days ago I asked about companions to Cambria, and Wolfgang kindly 
 gave me this:
 
 \definetypeface [mainface] [rm] [serif] [cambria]  [default]
 \definetypeface [mainface] [ss] [sans]  [corbel]   [default] [rscale=auto]
 \definetypeface [mainface] [tt] [mono]  [consolas] [default] [rscale=auto]
 \definetypeface [mainface] [mm] [math]  [cambria]  [default]
 
 
 which works fine, except for consolas. Shouldn't consolas be defined like
 
 \starttypescript [mono] [consolas] [name]
\setups[\s!font:\s!fallback:\s!sans]
 \definefontsynonym [\s!Mono]   [\s!file:consola]  
  [\s!features=\s!default]
 \definefontsynonym [\s!MonoBold]   [\s!file:consolab] 
  [\s!features=\s!default]
 \definefontsynonym [\s!MonoItalic] [\s!file:consolai] 
  [\s!features=\s!default]
 \definefontsynonym [\s!MonoBoldItalic] [\s!file:consolaz] 
  [\s!features=\s!default]
 \stoptypescript
 
 instead of
 
 Sans ? It's much more a monospace font then a Sans.
 
 Thanks
 
 Patrick
 
 It seems, the ClearType fonts come with different filenames, so I had to 
 define them by name like Cambria is in type-otf (\definefontsynonym 
 [CambriaSerif] [name:cambria]):
 
 btw, we need to make decisions here ... in tex live such fonts get
 different names so do we follow that convention or do we opt for the
 official files

TeXLive would never have those particular fonts, I'm not sure if they
are available from font retailers, though (I still think font name is
safer).

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] Consolas

2010-10-01 Thread Florian Wobbe
On Oct 1, 2010, at 23:26 , Hans Hagen wrote:
 On 1-10-2010 12:42, Florian Wobbe wrote:
 On Sep 30, 2010, at 21:01 , Patrick Gundlach wrote:
 
 Hi,
 
 several days ago I asked about companions to Cambria, and Wolfgang kindly 
 gave me this:
 
 \definetypeface [mainface] [rm] [serif] [cambria]  [default]
 \definetypeface [mainface] [ss] [sans]  [corbel]   [default] [rscale=auto]
 \definetypeface [mainface] [tt] [mono]  [consolas] [default] [rscale=auto]
 \definetypeface [mainface] [mm] [math]  [cambria]  [default]
 
 
 which works fine, except for consolas. Shouldn't consolas be defined like
 
 \starttypescript [mono] [consolas] [name]
   \setups[\s!font:\s!fallback:\s!sans]
\definefontsynonym [\s!Mono]   [\s!file:consola]  
 [\s!features=\s!default]
\definefontsynonym [\s!MonoBold]   [\s!file:consolab] 
 [\s!features=\s!default]
\definefontsynonym [\s!MonoItalic] [\s!file:consolai] 
 [\s!features=\s!default]
\definefontsynonym [\s!MonoBoldItalic] [\s!file:consolaz] 
 [\s!features=\s!default]
\stoptypescript
 
 instead of
 
 Sans ? It's much more a monospace font then a Sans.
 
 Thanks
 
 Patrick
 
 It seems, the ClearType fonts come with different filenames, so I had to 
 define them by name like Cambria is in type-otf (\definefontsynonym 
 [CambriaSerif] [name:cambria]):
 
 btw, we need to make decisions here ... in tex live such fonts get different 
 names so do we follow that convention or do we opt for the official files
 
 Hans

Actually, what I meant was that there are no common official filenames for 
these MS Fonts. In Windows they are like calibri.ttf, calibrib.ttf, 
calibrii.ttf, ... In Office for Mac the font files are named Calibri.ttf, 
Calibri Bold.ttf, Calibri Italic.ttf, etc. So going by name is explicit.

Florian

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

2010-10-01 Thread Hans Hagen

On 1-10-2010 11:41, Florian Wobbe wrote:

On Oct 1, 2010, at 23:26 , Hans Hagen wrote:

On 1-10-2010 12:42, Florian Wobbe wrote:

On Sep 30, 2010, at 21:01 , Patrick Gundlach wrote:


Hi,

several days ago I asked about companions to Cambria, and Wolfgang kindly gave 
me this:

\definetypeface [mainface] [rm] [serif] [cambria]  [default]
\definetypeface [mainface] [ss] [sans]  [corbel]   [default] [rscale=auto]
\definetypeface [mainface] [tt] [mono]  [consolas] [default] [rscale=auto]
\definetypeface [mainface] [mm] [math]  [cambria]  [default]


which works fine, except for consolas. Shouldn't consolas be defined like

\starttypescript [mono] [consolas] [name]
   \setups[\s!font:\s!fallback:\s!sans]
\definefontsynonym [\s!Mono]   [\s!file:consola]  
[\s!features=\s!default]
\definefontsynonym [\s!MonoBold]   [\s!file:consolab] 
[\s!features=\s!default]
\definefontsynonym [\s!MonoItalic] [\s!file:consolai] 
[\s!features=\s!default]
\definefontsynonym [\s!MonoBoldItalic] [\s!file:consolaz] 
[\s!features=\s!default]
\stoptypescript

instead of

Sans ? It's much more a monospace font then a Sans.

Thanks

Patrick


It seems, the ClearType fonts come with different filenames, so I had to define 
them by name like Cambria is in type-otf (\definefontsynonym [CambriaSerif] 
[name:cambria]):


btw, we need to make decisions here ... in tex live such fonts get different 
names so do we follow that convention or do we opt for the official files

Hans


Actually, what I meant was that there are no common official filenames for 
these MS Fonts. In Windows they are like calibri.ttf, calibrib.ttf, 
calibrii.ttf, ... In Office for Mac the font files are named Calibri.ttf, 
Calibri Bold.ttf, Calibri Italic.ttf, etc. So going by name is explicit.



well, if someone figures out the names ...

(btw, it's not entirely fail save either as for instanc the commercial 
cambria clashes with the ms one)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] mixed English and Arabic using Simplefonts?

2010-10-01 Thread Talal Al-Azem
My apologies if I'm dumbing down the level of discussion here. But I'm trying 
to get my head around fonts and bidirectionality using ConTeXt MkIV (as a 
rather unsophisticated user, not as a developer). 

To begin with, since it's all bit much at once, I'm trying to use simplefonts. 
I am unclear how to establish English as my language and its font as my main 
font (using the default font), and Arabic as a secondary language (using 
Scheherazade).

What would I change in the ara-sty environment found on 
wiki.contextgarden.net/Arabic_and_Hebrew? Or, if I don't need to use this, 
should I define my own macro in my tex document for directionality?

I'm probably making a mess of some basic things here, but could use some help. 
I have working familiarity with Fontspec over on the XeLaTeX side of things, 
but the sparse documentation of simplefonts is leading to my uncertainty as how 
to proceed.

Many thanks in advance.

Kind regards,
Talal
___
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] mixed English and Arabic using Simplefonts?

2010-10-01 Thread Wolfgang Schuster

Am 02.10.2010 um 02:16 schrieb Talal Al-Azem:

 My apologies if I'm dumbing down the level of discussion here. But I'm trying 
 to get my head around fonts and bidirectionality using ConTeXt MkIV (as a 
 rather unsophisticated user, not as a developer). 
 
 To begin with, since it's all bit much at once, I'm trying to use 
 simplefonts. I am unclear how to establish English as my language and its 
 font as my main font (using the default font), and Arabic as a secondary 
 language (using Scheherazade).
 
 What would I change in the ara-sty environment found on 
 wiki.contextgarden.net/Arabic_and_Hebrew? Or, if I don't need to use this, 
 should I define my own macro in my tex document for directionality?
 
 I'm probably making a mess of some basic things here, but could use some 
 help. I have working familiarity with Fontspec over on the XeLaTeX side of 
 things, but the sparse documentation of simplefonts is leading to my 
 uncertainty as how to proceed.

\usemodule[simplefonts]

%\setmainfont[Antykwa Poltawskiego]
\setmainfontfallback[Scheherazade][range={arabic,arabicpresentationformsa,arabicpresentationformsb,arabicsupplement}]

\starttext

\input knuth

\textdir TRT أهلا بالعالم!

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