Re: [NTG-context] Is this possible for the Frames

2013-10-21 Thread Keith J. Schultz
Hi Wolfgang, all,

Thanx for the example/help.

I have a few questions sothat I understand properly what is going on and
how to maybe do some more fancy things.

1) \dimexpr allows the calculation of a dimention

2)  \dimexpr is closed by \relax or if I need more complicated calculation 
something like:
frameoffset=\dimexpr{\framedparameter{rulethickness}*3/10}  + 
\framedparameter{\frameoffset}}\relax

3)  How would access a value of a DIFFERENT frame?
   
4) I could use my own command whose result is a dimension:
  \def\MyCommand#1{#1\textwidth}
and use it as:
frameoffset=\dimexpr\Mycommand{.05}\relax

regards
Keith


Am 18.10.2013 um 14:56 schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:

 
 
 \defineframed
  [MyFrame]
  [rulethickness=3pt,
   frameoffset=\dimexpr\framedparameter{rulethickness}*3/10\relax]
 
 \starttext
 
 \MyFrame{What goes into the frame}
 
 \blank
 
 \MyFrame[rulethickness=1pt]{What goes into the frame}
 
 \blank
 
 \MyFrame[rulethickness=10pt]{What goes into the frame}
 
 \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
 ___

___
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] \mframed not aligned in mkiv

2013-10-21 Thread Otared Kavian
Dear Hans,

I noticed a difference between mkii and mkiv in the behavior of \mframed: it 
seems that in mkiv the frame is not vertically aligned with the the + sign in 
the following example (or rather it is not vertically centered, please see the 
attached PDF produced with ConTeXt  ver: 2013.10.15 13:52 MKIV). 
Does one have to use now a new key to require this sort of alignment?

Best regard: OK

 begin mframed-example.tex
\setupcolors[state=start]

\def\graymath{\mframed[frame=off,
   background=color,
   backgroundcolor=lightgray,
   backgroundoffset=2pt
   ]}

\starttext

Since for $|x|  1$ we have
\startformula
\log(1+x) = \graymath{x- \displaystyle{x^2\over2}} + {x^3 \over 3} + \cdots
\stopformula
we may write $\log(1+x) = x + O(x^2)$.

\stoptext
 end mframed-example.tex



mframe.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] How to use system fonts

2013-10-21 Thread Sven Huynink

  
  
Thanks
  for your answer. The problem was all mine - that is, it
  disappeared with a fresh install of my rather clogged Windows. Now
  everything works fine! 
  
  
  
Wolfgang Schuster schreef op
  18-10-2013 18:03:

  
  



  Am 18.10.2013 um 17:55 schrieb Sven Huynink s...@huynink.nl:
  
  


  I seem no
to be able to use system fonts, not with /simplefonts
neither with typescripts. When I define 

\starttypescript [serif] [arnoproregular]

  \definefontsynonym [Serif] [name:arnoproregular]
 

  \definefontsynonym [SerifItalic] [name:arnoproitalic]
 

  \definefontsynonym [SerifBoldItalic]
  [name:arnoproitaliccaption]
 

  \definefontsynonym [SerifCaps] [name:arnoproregular]
\stoptypescript

(or any other system font in my Windows font directory
e:/windows/ fonts as defined in osfontdir), I get   


  
  
  
  You have to define also a typeface to use the typescript,
e.g.
  
  
  \starttypescript [serif] [arnoproregular]
   
  \stoptypescript
  
  
  \definetypeface [myfont] [rm] [serif] [arnoproregular]
[default]
  
  
  \setupbodyfont[myfont]
  
  
  \starttext
  \input knuth
  \stoptext
  
  

  fonts
 typescripts  unknown library 'loc'
{E:/texprogs/texlive/2013/texmf-dist/fonts/map/dvips/lm/lm-math.map}{E:/texprogs/texlive/2013/texmf-dist/fonts/map/dvips/lm/lm-rm.map}{E:/texprogs/texlive/2013/texmf-dist/fonts/map/pdftex/context/mkiv-base.map}
fonts  'fallback modern rm 11pt' is loaded

First, I don't understand "unknown library 'loc' " 
I haven't defined that. Or does it mean 'local'? When I
do the same with, say, garamond, I also get the line
"unknown library 'garamond' "  why does it think
garamond is in a library? 
When I do 

mtxrun --script fonts --list --info
--pattern=arnoproregular*

mtxfonts gives me all kinds of information, so the font
*is* known to ConTeXt. Or is that a rash conclusion? 
 

  
  
  
  Which information do you get?
  
  

  Second,
there is not even a mention of the typescript or the
font in the log. Why is that? Is it purely a syntax
error in my setup as copied above?

Thirdly - of course - my question is: how can I make
ConTeXt use my system fonts?   

  
  
  
  On Windows and Mac you can use system fonts out of the
box, you have to write only a typescript or use simplefonts.
  
  

  I use
TexLive (most recent version), Texworks and Windows 7.
Before I had a standalone ConTeXt set-up, which gave the
same problems.
  

  


Can you try the following example with the current beta
  from the ConTeXt Suite.


\definefontfamily [mainface] [rm] [Arno Pro]


\setupbodyfont[mainface]


\starttext
\input knuth
\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
___
  
  

  



	
		
			

			
		
		
			
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus actief is.
			
		
	




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

maillist : ntg-context@ntg.nl / 

Re: [NTG-context] Setting structureuservariable

2013-10-21 Thread Peter Münster
On Mon, Jan 16 2012, Hans Hagen wrote:

 2. Is there a way to provide a default value for a
 structureuservariable? I'd like to set a reference number based on a
 global counter if the user doesn't supply their own.

 Currently not ... but I can add it.

Have you added it?  If yes, how can we use it please?

TIA,
-- 
   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] tnum and aligncharacter=yes

2013-10-21 Thread Wolfgang Schuster

Am 21.10.2013 um 00:55 schrieb Hans Hagen pra...@wxs.nl:

 On 10/21/2013 7:44 AM, Peter Münster wrote:
 Hi,
 
 aligncharacter=yes does not work with \addfeature[with-tnum]:
 
 --8---cut here---start-8---
 \definefontfeature[with-tnum][default][tnum=yes]
 \definefontfamily[mainface][sans][Alwyn New]
 \setupbodyfont[mainface]
 \setupTABLE[alignmentcharacter=., aligncharacter=yes]
 \starttext
 \startbuffer
   \bTABLE \bTR \bTD 111.111 \eTD \eTR \bTR \bTD 444.444 \eTD \eTR \eTABLE
 \stopbuffer
 \getbuffer\addfeature[with-tnum]\getbuffer
 \stoptext
 --8---cut here---end---8---
 
 Please find attached the pdf file.
 
 How could I solve this problem please?
 
 when making examples, use fonts that are available ... (as I have no time to 
 find a variant on my system that has a similar problem as the font used by 
 you)


You can use Constantia for the example.

\definefontfeature[tnum][tnum=yes]

\definefontfamily[mainface][sans][Constantia]

\setupbodyfont[mainface]

\startbuffer
\bTABLE[alignmentcharacter=., aligncharacter=yes]
\bTR
\bTD 111.111 \eTD
\eTR
\bTR
\bTD 444.444 \eTD
\eTR
\eTABLE
\stopbuffer

\starttext

\getbuffer

\feature[+][tnum]

\getbuffer

\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] tnum and aligncharacter=yes

2013-10-21 Thread Peter Münster
Hi,

aligncharacter=yes does not work with \addfeature[with-tnum]:

--8---cut here---start-8---
\definefontfeature[with-tnum][default][tnum=yes]
\definefontfamily[mainface][sans][Alwyn New]
\setupbodyfont[mainface]
\setupTABLE[alignmentcharacter=., aligncharacter=yes]
\starttext
\startbuffer
  \bTABLE \bTR \bTD 111.111 \eTD \eTR \bTR \bTD 444.444 \eTD \eTR \eTABLE
\stopbuffer
\getbuffer\addfeature[with-tnum]\getbuffer
\stoptext
--8---cut here---end---8---

Please find attached the pdf file.

How could I solve this problem please?

TIA for any hints,
-- 
   Peter


test.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] tnum and aligncharacter=yes

2013-10-21 Thread Hans Hagen

On 10/21/2013 7:44 AM, Peter Münster wrote:

Hi,

aligncharacter=yes does not work with \addfeature[with-tnum]:

--8---cut here---start-8---
\definefontfeature[with-tnum][default][tnum=yes]
\definefontfamily[mainface][sans][Alwyn New]
\setupbodyfont[mainface]
\setupTABLE[alignmentcharacter=., aligncharacter=yes]
\starttext
\startbuffer
   \bTABLE \bTR \bTD 111.111 \eTD \eTR \bTR \bTD 444.444 \eTD \eTR \eTABLE
\stopbuffer
\getbuffer\addfeature[with-tnum]\getbuffer
\stoptext
--8---cut here---end---8---

Please find attached the pdf file.

How could I solve this problem please?


when making examples, use fonts that are available ... (as I have no 
time to find a variant on my system that has a similar problem as the 
font used by you)


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] Is this possible for the Frames

2013-10-21 Thread Keith J. Schultz
Hi All,


Am 21.10.2013 um 08:41 schrieb Keith J. Schultz schul...@uni-trier.de:

 Hi Wolfgang, all,
 
 Thanx for the example/help.
 
 I have a few questions sothat I understand properly what is going on and
 how to maybe do some more fancy things.
 
 1) \dimexpr allows the calculation of a dimention
 
 2)  \dimexpr is closed by \relax or if I need more complicated calculation 
 something like:
   frameoffset=\dimexpr{\framedparameter{rulethickness}*3/10}  + 
 \framedparameter{\frameoffset}}\relax
Found the answer use \dimexpr(…). the \relax is so that TeX behaves!

 3)  How would access a value of a DIFFERENT frame?
 
 4) I could use my own command whose result is a dimension:
  \def\MyCommand#1{#1\textwidth}
   and use it as:
   frameoffset=\dimexpr\Mycommand{.05}\relax
 
 regards
   Keith
 

___
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] total number of sections

2013-10-21 Thread Peter Münster
On Thu, Oct 17 2013, Hans Hagen wrote:

 \determinelistcharacteristics[section][criterium=text]
 \ifnum\structurelistsize=1 ... \fi

Thanks. Now I've found another example on the mailing list:

\determinelistcharacteristics[section][criterium=all]
number of sections: \utilitylistlength

That works too.
What is the difference between criterium=all and criterium=text?
And what is the difference between \structurelistsize and
\utilitylistlength?

TIA,
-- 
   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] Setting structureuservariable

2013-10-21 Thread Hans Hagen

On 10/21/2013 7:58 AM, Peter Münster wrote:

On Mon, Jan 16 2012, Hans Hagen wrote:


2. Is there a way to provide a default value for a
structureuservariable? I'd like to set a reference number based on a
global counter if the user doesn't supply their own.


Currently not ... but I can add it.


Have you added it?  If yes, how can we use it please?


not added

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] tnum and aligncharacter=yes

2013-10-21 Thread Hans Hagen

On 10/21/2013 8:04 AM, Wolfgang Schuster wrote:


Am 21.10.2013 um 00:55 schrieb Hans Hagen pra...@wxs.nl:


On 10/21/2013 7:44 AM, Peter Münster wrote:

Hi,

aligncharacter=yes does not work with \addfeature[with-tnum]:

--8---cut here---start-8---
\definefontfeature[with-tnum][default][tnum=yes]
\definefontfamily[mainface][sans][Alwyn New]
\setupbodyfont[mainface]
\setupTABLE[alignmentcharacter=., aligncharacter=yes]
\starttext
\startbuffer
   \bTABLE \bTR \bTD 111.111 \eTD \eTR \bTR \bTD 444.444 \eTD \eTR \eTABLE
\stopbuffer
\getbuffer\addfeature[with-tnum]\getbuffer
\stoptext
--8---cut here---end---8---

Please find attached the pdf file.

How could I solve this problem please?


% \setupbodyfont[pagella]

\definefontfeature[oldstylenumbers][onum=yes]
\definefontfeature[inlinenumbers]  [lnum=yes,tnum=no]
\definefontfeature[tabularnumbers] [tnum=yes,lnum=no]

\definefontfamily[mainface][sans][Constantia]
\setupbodyfont[mainface]

\starttext

\setupTABLE
  [alignmentcharacter=.,
   aligncharacter=yes]

\startbuffer
\bTABLE
\bTR \bTD  11.111 \eTD \eTR
\bTR \bTD   2.2   \eTD \eTR
\bTR \bTD 444.444 \eTD \eTR
\eTABLE
\par
1234567890\par
00\par
11\par
44
\blank
\stopbuffer

\start
inlinenumbers:\crlf
\addfeature[inlinenumbers]
\getbuffer
\stop

\start
tabularnumbers:\crlf
\addfeature[tabularnumbers]
\getbuffer
\stop

\start
oldstylenumbers:\crlf
\addfeature[oldstylenumbers]
\getbuffer
\stop

\start
oldstylenumbers + inlinenumbers:\crlf
\addfeature[oldstylenumbers]
\addfeature[inlinenumbers]
\getbuffer
\stop

\start
oldstylenumbers + tabularnumbers:\crlf
\addfeature[oldstylenumbers]
\addfeature[tabularnumbers]
\getbuffer
\stop

\stoptext

-
  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] tnum and aligncharacter=yes

2013-10-21 Thread Peter Münster
On Mon, Oct 21 2013, Hans Hagen wrote:

 How could I solve this problem please?

 \definefontfeature[oldstylenumbers][onum=yes]
 \definefontfeature[inlinenumbers]  [lnum=yes,tnum=no]
 \definefontfeature[tabularnumbers] [tnum=yes,lnum=no]

 \definefontfamily[mainface][sans][Constantia]
 \setupbodyfont[mainface]

 [...]

Hi Hans,

Does your answer mean, that you cannot reproduce the problem?
I've tried with Constantia, and I get the same horizontal shift as in my
previous example PDF file. My ConTeXt version is 2013.10.20 07:09

I attach a new PDF file with Constantia (from my Windows-XP installation).

Is there a problem with my fonts?

-- 
   Peter


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

[NTG-context] Using typescripts in Texlive 2013

2013-10-21 Thread john Culleton
I have written a program that generates for each typescript in texlive
2013 a test file like this:
--
\usetypescriptfile[type-imp-charter][all]
\setupbodyfont[imp-charter,18pt]
\starttext
\rm Sphinx of black quartz, judge my vow, 1234567890
\rm Roman \bf Bold \bi Bold Italic \it Italic
\sc Small Caps \crlf \crlf
\stoptext
-

Most of these test files can't find the fonts and use the fallback
fonts instead. Only the following actually use the expected font:
junicode
gentium
latinmodern
droid
termesmath-regular

 Here is an extract from imp-charter.log:

fontsbodyfont '18pt' is defined (can better be done global)
fontsbodyfont '21.6pt' is defined (can better be done
global) fontstypescripts  unknown library 'loc'
(/usr/local/texlive/2013/texmf-dist/tex/context/base/type-imp-charter.mkiv)
(/usr/local/texlive/2013/texmf-dist/tex/context/base/type-imp-charter.mkiv)
fontspreloading latin modern fonts (third stage)
{/usr/local/texlive/2013/texmf-dist/fonts/map/dvips/lm/lm-math.map}{/usr/local/texlive/2013/texmf-dist/fonts/map/dvips/lm/lm-rm.map}{/usr/local/texlive/2013/texmf-dist/fonts/map/pdftex/context/mkiv-base.map}
fonts'fallback modern rm 18pt' is loaded


Also, what causes the reference to an unknown library called loc?
-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: Create Book Covers with Scribus
available at http://www.booklocker.com/books/4055.html
___
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] \mframed not aligned in mkiv

2013-10-21 Thread Aditya Mahajan

On Mon, 21 Oct 2013, Otared Kavian wrote:


Dear Hans,

I noticed a difference between mkii and mkiv in the behavior of \mframed: it 
seems that in mkiv the frame is not vertically aligned with the the + sign in 
the following example (or rather it is not vertically centered, please see the 
attached PDF produced with ConTeXt  ver: 2013.10.15 13:52 MKIV).
Does one have to use now a new key to require this sort of alignment?

Best regard: OK

 begin mframed-example.tex
\setupcolors[state=start]

\def\graymath{\mframed[frame=off,
  background=color,
  backgroundcolor=lightgray,
  backgroundoffset=2pt
  ]}

\starttext

Since for $|x|  1$ we have
\startformula
\log(1+x) = \graymath{x- \displaystyle{x^2\over2}} + {x^3 \over 3} + \cdots
\stopformula
we may write $\log(1+x) = x + O(x^2)$.

\stoptext
 end mframed-example.tex


Search for Alignment in inmframed in the mailing list archives.

% The next statement is part of the core. Included it here for 
% illustration.


\definemathframed[mcframed] [location=mathematics]

\starttext

\startformula
\ln (1+x) = 
\mcframed[background=color,backgroundcolor=red,foregroundcolor=white,frame=off]{x 
- {\frac {x^2}{\frac{x^3}{\frac{x^3}{3} +

\frac{x^3}{3}-\cdots.
\stopformula

\startformula
\ln (1+x) = \mcframed{x - {\frac {x^2}{\frac{x^3}{\frac{x^3}{3} + 
\frac{x^3}{3}-\cdots.

\stopformula

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


[NTG-context] issue with layers and layouts

2013-10-21 Thread Pablo Rodriguez
Dear list,

I have the following sample and two issues that I must solve:

\showframe\setuplayout[margin=20mm, width=fit, topspace=45mm,
bottomspace=25mm,
height=fit]
\definelayout[first][topspace=70mm, bottomspace=30mm]
\definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm, voffset=101mm,
location={right,bottom}, state=start]
\setlayer[avoidasfloat]{\startMPcode
draw (0mm,0mm)--(55mm,0mm) ;
draw (0mm,0mm)--(0mm,-86mm) ;
draw (0mm,-86mm)--(55mm,-86mm) ;
draw (55mm,-86mm)--(55mm,0mm) ;
\stopMPcode
}
\setupbackgrounds[page][background={avoidasfloat}]
\starttext
\dorecurse{40}{\input knuth\par}
\stoptext

First, the layout is right on the first two pages, but it is wrong from
page three. The text doesn’t reach the bottom frame.

I have the info on multiple layers from the wiki (it isn’t a complete
example, though). After Wolfgang’s reply last Friday, I spend hours
searching on the mailing list trying to find relevant information to
know what I was doing wrong.

If this isn’t a bug, what am I missing here?

My second question is about the layer: is there no way to force the text
to avoid it as if it were a float?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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] issue with layers and layouts

2013-10-21 Thread luigi scarso
On Mon, Oct 21, 2013 at 5:23 PM, Pablo Rodriguez oi...@gmx.es wrote:

 Dear list,

 I have the following sample and two issues that I must solve:

 \showframe\setuplayout[margin=20mm, width=fit, topspace=45mm,
 bottomspace=25mm,
 height=fit]
 \definelayout[first][topspace=70mm, bottomspace=30mm]
 \definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm, voffset=101mm,
 location={right,bottom}, state=start]
 \setlayer[avoidasfloat]{\startMPcode
 draw (0mm,0mm)--(55mm,0mm) ;
 draw (0mm,0mm)--(0mm,-86mm) ;
 draw (0mm,-86mm)--(55mm,-86mm) ;
 draw (55mm,-86mm)--(55mm,0mm) ;
 \stopMPcode
 }
 \setupbackgrounds[page][background={avoidasfloat}]
 \starttext
 \dorecurse{40}{\input knuth\par}
 \stoptext

 First, the layout is right on the first two pages, but it is wrong from
 page three. The text doesn’t reach the bottom frame.

 I have the info on multiple layers from the wiki (it isn’t a complete
 example, though). After Wolfgang’s reply last Friday, I spend hours
 searching on the mailing list trying to find relevant information to
 know what I was doing wrong.

 If this isn’t a bug, what am I missing here?

 from http://wiki.contextgarden.net/Odd,_even_,_first_page_not_working

\showframe
%\setuplayout[margin=20mm, width=fit, topspace=45mm,
%  bottomspace=25mm,
%  height=fit]

\definelayout[1][topspace=120mm, bottomspace=30mm,height=fit]

\definelayout[even][margin=20mm, width=fit, topspace=45mm,
  bottomspace=25mm,
  height=fit]

\definelayout[odd][margin=20mm, width=fit, topspace=45mm,
  bottomspace=25mm,
  height=fit]



\definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm,
voffset=101mm,location={right,bottom}, state=start]
\setlayer[avoidasfloat]{\startMPcode
  draw (0mm,0mm)--(55mm,0mm) ;
  draw (0mm,0mm)--(0mm,-86mm) ;
  draw (0mm,-86mm)--(55mm,-86mm) ;
  draw (55mm,-86mm)--(55mm,0mm) ;
  \stopMPcode
}
\setupbackgrounds[page][background={avoidasfloat}]
\starttext
\dorecurse{40}{\input knuth\par}
\stoptext




 My second question is about the layer: is there no way to force the text
 to avoid it as if it were a float?

 Many thanks for your help,


hm what do you want to avoid ?

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

Re: [NTG-context] issue with layers and layouts

2013-10-21 Thread Pablo Rodriguez
On 10/21/2013 05:43 PM, luigi scarso wrote:
 On Mon, Oct 21, 2013 at 5:23 PM, Pablo Rodriguez wrote:
   [...]
   First, the layout is right on the first two pages, but it is wrong from
   page three. The text doesn’t reach the bottom frame.
   [...]
   If this isn’t a bug, what am I missing here?
 
 from http://wiki.contextgarden.net/Odd,_even_,_first_page_not_working
 
 \showframe
 %\setuplayout[margin=20mm, width=fit, topspace=45mm,
 %  bottomspace=25mm,
 %  height=fit]
 
 \definelayout[1][topspace=120mm, bottomspace=30mm,height=fit]
 
 \definelayout[even][margin=20mm, width=fit, topspace=45mm,
   bottomspace=25mm,
   height=fit]
 
 \definelayout[odd][margin=20mm, width=fit, topspace=45mm,
   bottomspace=25mm,
   height=fit]

Many thanks for your reply, Luigi.

If I don’t get it wrong, if I define a layout for the first page, I have
to define it for even and odd pages, haven’t I?.

   My second question is about the layer: is there no way to force the text
   to avoid it as if it were a float?
 
 hm what do you want to avoid ?

I want the text flow to avoid the layer avoidasfloat as it avoids the
figures.

\definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm,
voffset=101mm,location={right,bottom}, state=start]
\setlayer[avoidasfloat]{\startMPcode
  draw (0mm,0mm)--(55mm,0mm) ;
  draw (0mm,0mm)--(0mm,-86mm) ;
  draw (0mm,-86mm)--(55mm,-86mm) ;
  draw (55mm,-86mm)--(55mm,0mm) ;
  \stopMPcode
}
\setupbackgrounds[page][background={avoidasfloat}]
\starttext
\dorecurse{40}{\input knuth\placefigure[right]{}{}\par}
\stoptext

Layer has text inside in the sample above. I’d like to have it as a float.

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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] Pdf bookmarks with meta-structure (frontmatter, bodymatter etc)

2013-10-21 Thread pol stra
Hello,

In my document, when I use a meta-structure, I only get introduction and 
content bookmarks, while not using a meta-structure, I have my part and 
chapter (which is the desired behaviour). How can I get the same behaviour in 
both structures?
(by the way, how can I change the bookmarks of the table of contents, I tried 
\completecontent[bookmark=mytitle] and \setupcombinedlist[mytitle] without 
success).

Thank you all

Here is my sample code:

\setupinteraction [state=start]

\placebookmarks[part, chapter, section, title, subject][force=yes]

\setupcombinedlist[content][
list={title, part, chapter, subject, subsubject, section, subsection},
alternative=c]

\setuphead[part][placehead=yes, bodypartlabel=part]

\startmode[meta]
\startfrontmatter
\startchapter[title={Introduction}]
% \component c_introduction
\stopchapter

\completecontent[criterium=all]
\stopfrontmatter

\startbodymatter
\startpart[title={part}]
\startchapter[title={chapter1}]
\stopchapter
\stoppart
\stopbodymatter
\stopmode

\startmode[nonmeta]
\startchapter[title={Introduction}]
% \component c_introduction
\stopchapter

\completecontent[criterium=all]

\startpart[title={part}]
\startchapter[title={chapter1}]
\stopchapter
\stoppart
\stopmode

  ___
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] open quotation not working

2013-10-21 Thread john Culleton
On Sun, 13 Oct 2013 11:30:54 +0200
Wolfgang Schuster schuster.wolfg...@gmail.com wrote:

 
 Am 13.10.2013 um 06:09 schrieb Ciro A. Soto c...@kavyata.com:
 
  sorry, I just saw an old chain of messages about this question... I
  fixed it with the translation module. \usemodule[translate]
  \translateinput[``][“]
  \enableinputtranslation
 
 Better use real quotation marks “ and ” or \quotation{…}.
 
 Wolfgang
 

Why is it better? And why is it so difficult to just reinstall the
traditional TeX method of handling quotes? Even the MSWin version of
smart quotes using the  glyph would be a worthwhile simplification. 


Not every change is an improvement, IMO.







-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: Create Book Covers with Scribus
available at http://www.booklocker.com/books/4055.html
___
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] \mframed not aligned in mkiv

2013-10-21 Thread Otared Kavian
Thanks Aditya!
I overlooked this change in mkiv…

Best regards: OK

On 21 oct. 2013, at 22:18, Aditya Mahajan adit...@umich.edu wrote:

 On Mon, 21 Oct 2013, Otared Kavian wrote:
 
 Dear Hans,
 
 I noticed a difference between mkii and mkiv in the behavior of \mframed: it 
 seems that in mkiv the frame is not vertically aligned with the the + sign 
 in the following example (or rather it is not vertically centered, please 
 see the attached PDF produced with ConTeXt  ver: 2013.10.15 13:52 MKIV).
 Does one have to use now a new key to require this sort of alignment?
 
 Best regard: OK
 
  begin mframed-example.tex
 \setupcolors[state=start]
 
 \def\graymath{\mframed[frame=off,
  background=color,
  backgroundcolor=lightgray,
  backgroundoffset=2pt
  ]}
 
 \starttext
 
 Since for $|x|  1$ we have
 \startformula
 \log(1+x) = \graymath{x- \displaystyle{x^2\over2}} + {x^3 \over 3} + \cdots
 \stopformula
 we may write $\log(1+x) = x + O(x^2)$.
 
 \stoptext
  end mframed-example.tex
 
 Search for Alignment in inmframed in the mailing list archives.
 
 % The next statement is part of the core. Included it here for % illustration.
 
 \definemathframed[mcframed] [location=mathematics]
 
 \starttext
 
 \startformula
\ln (1+x) = 
 \mcframed[background=color,backgroundcolor=red,foregroundcolor=white,frame=off]{x
  - {\frac {x^2}{\frac{x^3}{\frac{x^3}{3} +
 \frac{x^3}{3}-\cdots.
 \stopformula
 
 \startformula
\ln (1+x) = \mcframed{x - {\frac {x^2}{\frac{x^3}{\frac{x^3}{3} + 
 \frac{x^3}{3}-\cdots.
 \stopformula
 
 \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
 ___

___
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 link colors.

2013-10-21 Thread Jaroslav Hajtmar

Hello ConTeXist.

Where is my mistake, if I want to have external references a different 
color than the other (default) links (to sections, figures etc) defined 
by \setupinteraction?


Thanx Jaroslav Hajtmar

Here is my minimal example:



\setupinteraction[state=start, style=normal, color=blue, contrastcolor=]
\setupurl[style=type, color=green]

\setupexternalfigures[location={local,default}]


\useURL [garden]
   [http://wiki.contextgarden.net/][]
   [http://wiki.contextgarden.net/]

\starttext

\section[sect]{Section}

This is testing Cow section.

\placefigure[here][cowfig]{Cow figure in Section.}
  {\externalfigure[cow][width=7cm]}

In \in {section}[sect] at \at {page}[sect] is \in {figure}[cowfig] 
(these links have the correct blue color).



But this external link to URL \from[garden] should be {\green green} and 
should be {\green\tt tt font}.


\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] open quotation not working

2013-10-21 Thread Khaled Hosny
On Mon, Oct 21, 2013 at 01:57:22PM -0400, john Culleton wrote:
 On Sun, 13 Oct 2013 11:30:54 +0200
 Wolfgang Schuster schuster.wolfg...@gmail.com wrote:
 
  
  Am 13.10.2013 um 06:09 schrieb Ciro A. Soto c...@kavyata.com:
  
   sorry, I just saw an old chain of messages about this question... I
   fixed it with the translation module. \usemodule[translate]
   \translateinput[``][“]
   \enableinputtranslation
  
  Better use real quotation marks “ and ” or \quotation{…}.
  
  Wolfgang
  
 
 Why is it better? And why is it so difficult to just reinstall the
 traditional TeX method of handling quotes? Even the MSWin version of
 smart quotes using the  glyph would be a worthwhile simplification. 

Because the “traditional TeX” was a font hack, if you are fine with
using the original Knuth fonts you can still get it. Modern fonts do not
implement such a feature. Besides, \quotation{…} provide much more
options (like being language sensitive, or handling nested quotes and so
on).

Regards,
Khaled
___
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] open quotation not working

2013-10-21 Thread Peter Münster
On Mon, Oct 21 2013, john Culleton wrote:

 Not every change is an improvement, IMO.


On Sat, Jul 27 2013, Mojca Miklavec wrote:

 On the other hand many languages use different quotation marks and
 using ``these'' is completely americanocentric. On top,
 auto-replacement lead to inability to typeset the actual backtick (`)
 when it's needed. So yes, getting rid of `` replaced by quotation by
 default *was* an improvement.

(copied from http://www.ntg.nl/pipermail/ntg-context/2013/074277.html )

-- 
   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] open quotation not working

2013-10-21 Thread Hans Hagen

On 10/22/2013 2:57 AM, john Culleton wrote:

On Sun, 13 Oct 2013 11:30:54 +0200
Wolfgang Schuster schuster.wolfg...@gmail.com wrote:



Am 13.10.2013 um 06:09 schrieb Ciro A. Soto c...@kavyata.com:


sorry, I just saw an old chain of messages about this question... I
fixed it with the translation module. \usemodule[translate]
\translateinput[``][“]
\enableinputtranslation


Better use real quotation marks “ and ” or \quotation{…}.

Wolfgang



Why is it better? And why is it so difficult to just reinstall the
traditional TeX method of handling quotes? Even the MSWin version of
smart quotes using the  glyph would be a worthwhile simplification.


traditional tex was meant for (us) english ... and geared at cm fonts .. 
you can't expect all context users to take english as their default so 
either you use the proper quotes for your language (as wolfgang pointed 
out) or you use \quotation (which adapt itself to the main language)



Not every change is an improvement, IMO.


there are more such traditional features that are fine in a restricted 
usage but not that handy today


btw, if you look into the traditional tex fonts you see more pseudo 
ligatures (-- --- space+... some quotes) and if you ever had to use a 
commercial font or a free one not tuned for tex, you wouldn't have had 
those quote ligs either ... it is a dependency you don't want nowadays


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] tnum and aligncharacter=yes

2013-10-21 Thread Hans Hagen

On 10/21/2013 10:03 PM, Peter Münster wrote:

On Mon, Oct 21 2013, Hans Hagen wrote:


How could I solve this problem please?


\definefontfeature[oldstylenumbers][onum=yes]
\definefontfeature[inlinenumbers]  [lnum=yes,tnum=no]
\definefontfeature[tabularnumbers] [tnum=yes,lnum=no]

\definefontfamily[mainface][sans][Constantia]
\setupbodyfont[mainface]

[...]


Hi Hans,

Does your answer mean, that you cannot reproduce the problem?
I've tried with Constantia, and I get the same horizontal shift as in my
previous example PDF file. My ConTeXt version is 2013.10.20 07:09

I attach a new PDF file with Constantia (from my Windows-XP installation).


this is what i get


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


oeps.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] tnum and aligncharacter=yes

2013-10-21 Thread Hans Hagen

On 10/21/2013 10:03 PM, Peter Münster wrote:

On Mon, Oct 21 2013, Hans Hagen wrote:


How could I solve this problem please?


\definefontfeature[oldstylenumbers][onum=yes]
\definefontfeature[inlinenumbers]  [lnum=yes,tnum=no]
\definefontfeature[tabularnumbers] [tnum=yes,lnum=no]

\definefontfamily[mainface][sans][Constantia]
\setupbodyfont[mainface]

[...]


Hi Hans,

Does your answer mean, that you cannot reproduce the problem?
I've tried with Constantia, and I get the same horizontal shift as in my
previous example PDF file. My ConTeXt version is 2013.10.20 07:09

I attach a new PDF file with Constantia (from my Windows-XP installation).

Is there a problem with my fonts?


this kind of mechanimns assume equal width digits so we might need to 
force lnum


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] tnum and aligncharacter=yes

2013-10-21 Thread Peter Münster
On Tue, Oct 22 2013, Hans Hagen wrote:

 this is what i get

Ok, but you use LM instead of Constantia...

pdffonts oeps.pdf :
name type  encoding emb sub 
uni object ID
 -  --- --- 
--- -
KQRURB+LMSans10-Regular  CID Type 0C   Identity-H   yes yes 
yes 18  0

pdffonts test.pdf :
name type  encoding emb sub 
uni object ID
 -  --- --- 
--- -
CZUMAG+ConstantiaCID TrueType  Identity-H   yes yes 
yes 18  0

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