Re: [NTG-context] (Ctx)Lua, diacritics & string.upper()

2011-04-06 Thread Wolfgang Schuster

Am 06.04.2011 um 08:35 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> Thanks W&H, both solutions work perfectly.

I see, characters.upper is also mentioned in Hans Lua manual: 
http://www.pragma-ade.com/show-man-44.htm

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] Footnotes: Individual number styles

2011-04-06 Thread Christian

Hi,
that was helpful. I managed to get what I wanted. Maybe this is 
Wiki-Material:
If the opentype font you are using contains special glyphs for 
superscript ('sups' feature) you might consider using them for 
footnotes. The open source font Linux Libertine has it, for example.
Advantage: The default footnote numbers are normal numbers that are 
downscaled and raised and therefore are more pale (or thinner, if you 
prefer) than the body text.

To use it:
% define the sups feature:
\definefontfeature[sups][sups=yes]
\def\sups{\setff{sups}}
% use it for footnotes:
\setupnote[footnote][textcommand=,
textstyle=\sups]

Cheers
Christian

Am 20:59, schrieb Philipp Gesang:

Hi C,

On 2011-04-06<01:58:33>, C. wrote:

Sorry to bother again, but how do I change the style of the footnote number
that is IN THE TEXT. Not the ones under the line, I can manipulate those
with numbercommand.

Let's just say I want a normal serif body text, but the footnote numbers are
sans serif (or red, if you will)
To clarify:

This is the main² text. The little two after main wants to be painted red.
Here comes more text...
__
² This two down here does not want to be red.

Is this possible?


at least I can try:

··8<·

\setupfootnotes[
   textcommand=\low,
   textstyle=\bi,
   textcolor=red,
]
\starttext

What is the air speed velocity of an unladen\footnote{African or
European.} swallow?

\stoptext \endinput

··8<·

Good night, Philipp






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


Re: [NTG-context] Position of MetaPost graphics

2011-04-06 Thread Tim Steenvoorden
Thanks for your tips Wolfgang! I switched to a solution as on the
wiki, using overlays and frames in place of layers. After setting the
boudingboxes right it works! I have to increase the \objectoffset
though, because otherwise the graphic is chopped of:

\setuppapersize[A5][A5]
\setuppagenumbering[alternative=doublesided]

\def\objectoffset{\cutspace}

\startMPinclusions
numeric CutSpace, wavePeriods, waveWidth;
path unitwave;
CutSpace:= \the\cutspace;
wavePeriods := 3 + 1/4;
waveSize:= wavePeriods * 2*pi;
unitwave:= (origin for x=0 step 0.1 until waveSize:
 .. (x,x*sin(x))
   endfor) scaled (1/waveSize);
\stopMPinclusions

\startuniqueMPgraphic{rightwave}
pickup pencircle scaled 1pt;
draw origin -- (OverlayWidth,0) -- unitwave xscaled CutSpace yscaled
(LineHeight/2) shifted (OverlayWidth,0);
setbounds currentpicture to boundingbox OverlayBox;
\stopuniqueMPgraphic

\startuniqueMPgraphic{leftwave}
pickup pencircle scaled 1pt;
draw reverse unitwave xscaled (-1*CutSpace) yscaled (LineHeight/2) --
(OverlayWidth,0);
setbounds currentpicture to boundingbox OverlayBox;
\stopuniqueMPgraphic

\defineoverlay[rightwave]
  [\uniqueMPgraphic{rightwave}]
\defineoverlay[leftwave]
  [\uniqueMPgraphic{leftwave}]

\setuphead[chapter]
  [style=\ss\bfc,
   page=yes,
   after={\PlaceDecoration\blank[big]}]

\define\PlaceDecoration
  {\framed
 [width=broad,
  frame=off,
  offset=0pt,
  background=\doifoddpageelse{rightwave}{leftwave}]
 {\ss\bfx \date \hfill Author Name}}

\starttext

\chapter{A very long chapter title on two or more lines}

\input knuth

\chapter{A very long chapter title on two or more lines}

\input knuth

\stoptext

The \startchapter[] solution on the wiki is very neat, but it doesn't
work with MKII. Get errors with MKIV to... (Using TeXLive 2010) But
I'll use \setvariables.

Thanks for all your help!
Tim


2011/4/4 Wolfgang Schuster :
> Your problem is that you use {\ss\bfc …} etc. to place the title
> rather than contexts \title command where you can define your own
> command. With such a command you can put all text in a frame with
> your graphic a background.
>
> - http://wiki.contextgarden.net/Generate_Authorlist_from_Head_Content
> - 
> http://wiki.contextgarden.net/Titles#A_complex_graphical_element_under_the_chapter_title
>
> 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] frames within frame

2011-04-06 Thread Reviczky, Adam
Hi

If I have two frames within one frame, how can I vertically align the first 
(well, or both) framed to top or middle.
Here's a minimal example:

\starttext
\framed[strut=no,height=fit,framecolor=green,background=screen,backgroundscreen=.80]
{\framed[height=fit,width=100pt,background=screen,backgroundscreen=.90,frame=on,autowidth=force,align=middle]{first
 box wants to be on top/middle}
\framed[offset=none,height=100pt,width=100pt,background=screen,backgroundscreen=.90,frame=on]{second
 box}}
\stoptext

So here the second framed defines the hight, and the first framed is on the 
bottom of the "big outer" frame.
All I want is to have the first box on top or middle respectively.
I've tried location, but that didn't work.

Adam
___
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] frames within frame

2011-04-06 Thread Wolfgang Schuster

Am 06.04.2011 um 18:11 schrieb Reviczky, Adam:

> Hi
> 
> If I have two frames within one frame, how can I vertically align the first 
> (well, or both) framed to top or middle.
> Here's a minimal example:
> 
> \starttext
> \framed[strut=no,height=fit,framecolor=green,background=screen,backgroundscreen=.80]
> {\framed[height=fit,width=100pt,background=screen,backgroundscreen=.90,frame=on,autowidth=force,align=middle]{first
>  box wants to be on top/middle}
> \framed[offset=none,height=100pt,width=100pt,background=screen,backgroundscreen=.90,frame=on]{second
>  box}}
> \stoptext
> 
> So here the second framed defines the hight, and the first framed is on the 
> bottom of the "big outer" frame.
> All I want is to have the first box on top or middle respectively.
> I've tried location, but that didn't work.

You need “location=middle” for the *inner* frames.

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] frames within frame

2011-04-06 Thread Reviczky, Adam
>> You need “location=middle” for the *inner* frames.
I'm so sure that I've tried that already, anyhow.
It works as expected, so thanks!

Adam
___
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] Frame until the bottom of the page

2011-04-06 Thread Aditya Mahajan

Hi,

I want to create a frame that should occupy the remaining space on the 
page. For example, if I call this frame when the page is 1/3rd full, I 
want the frame to have an height of 0.667\textheight. How can I do that?


In other words, how to I find out how much space is left on the current 
page?


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