Re: [NTG-context] Producing quotesingle glyph

2011-03-19 Thread Mojca Miklavec
On Sat, Mar 19, 2011 at 01:29, Pontus Lurcock wrote:
 Hello,

 This may be a stupid question, but I can't work out how to produce the
 ' character (quotesingle, unicode 0x0027) glyph in a document. Just
 typing the character in the source produces a quoteright as expected.
 Here are my other attempts:

 \starttext
 \quotesingle
 \getnamedglyphdirect{lm}{quotesingle}
 \uchar{00}{39}
 \stoptext

 They all produce quoteright as well. Does anyone have a better
 suggestion? I'm using MkIV, version 2011.02.25 22:03.

In font-ini.mkiv you can find

\definefontfeature
  [default]
  [%mode=node,
   liga=yes,kern=yes,tlig=yes,trep=yes] % texligatures=yes,texquotes=yes

You can find those features defined in font-otc.lua, but in short:
trep is responsible for auto-replacing 0x0027 into 0x2019. If you want
to disable that behaviour, you need to turn trep feature off, for
example with
\definefontfeature[default][liga=yes,kern=yes,tlig=yes] % trep=no
to be more explicit

Sometimes you need to load the font after redefining the features, but
I'm not sure when that is and maybe I'm wrong (it might be true for
Type1 fonts or I may be wrong completely).

Mojca

PS: just as a thought ... it might make sense to map 0x27 to some
(constant) private range slot and make it accessible with some control
sequence. I don't know to what extent that would be usable though, so
maybe that's just a way too silly idea.
___
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] cals tables - UNSOLVED

2011-03-19 Thread R. Ermers
Dear All,

After having succeeded with Aditya's kind help to typeset a table file in a 
separate pdf, I have been trying to typeset the cals tables in my docbook xml 
file in two ways:

A. directly in the document. 

The table is in //section/cals:table.

The cals module is loaded at the beginning of the document. But in the pdf 
there is no trace of any table. Do I need to add 
 definition somewhere? Perhaps in this list where the xml items are introduced?

\xmlsetsetup{#1}{article|footnote|foreignphrase|section [snippet] 
para|quote|itemizedlist|listitem}{xml:*}

This would be contrary to working with the directives and the cals module.

B. as a separate document in a mediaobject
Usually docbook files can contain tables, but there is nothing against imported 
a separate files. I chose to use the graphics wrapper:

  mediaobject role=tabel
imageobject
  imagedata fileref=./test2.xml/  (I also tried 
fileref=test2.xml) 
/imageobject
  /mediaobject

I know that the object is found, because I use a marker (TABEL 3), which is 
printed in the pdf.

\startxmlsetups xml:mediaobject:imageobject:imagedata:tabel
\xmlloaddirectives{directives.xml}
TABEL 3
\xmlprocess{xml:cals:process}{\xmlatt{#1}{fileref}}{}
\stopxmlsetups

The xml file, and I believe here the table file is meant, is not imported 
though. The log file says that the xml file is invalid, but that is not true.  
It is Hans' simple test table (alpha, betha, gamma), it is validated by xml 
software, and moreover, it can be typeset without any problems in a separate 
pdf.

\pagesflushing realpage 24, userpage 24
lxml: 9 directives found in 'directives.xml', 9 valid
load invalid xml file - parsed text

The log file also says that the text is parsed. But there is no text from the 
table in the pdf.

%I tried loading the directives in various places, e.g. directly after the 
module in the top of the document and after the command \startxmlsetups 
xml:dbsetups.

Well, has anyone any advice? Or should I give up on this?

Regards,

Robert





___
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] Producing quotesingle glyph

2011-03-19 Thread Mojca Miklavec
On Sat, Mar 19, 2011 at 09:05, Mojca Miklavec wrote:

 If you want
 to disable that behaviour, you need to turn trep feature off, for
 example with
    \definefontfeature[default][liga=yes,kern=yes,tlig=yes]

... or maybe just disable the font feature temporary with
\subff{trep}. In theory that should work, but it didn't when I tried
it.

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] Some problems I experienced when using ConTeXt

2011-03-19 Thread Mojca Miklavec
On Sat, Mar 19, 2011 at 03:41, Cecil Westerhof wrote:

 When I use a sentence like:
     In de boxen van de stam vul je voor iedere dag (maandag t/m zondag)
     een activiteit in die je op die dag afrond.

 I would prefer t/m kept together. It is, but the way it is
 displayed, it looks like there is (a) space between the '/' and
 the 'm'. Is there something that can be done about this, or have
 I to live with it?

I don't know implementation details, but if you want to fix it for the
whole document, you could change kerning between / and m by
tweaking the font. If you want to fix just a single appearance you can
use
t/\kern-.1em m
(use any amount of space you want; you can use absolute pt or
relative-to-fontsize em [width of one m] as the unit).

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] Producing quotesingle glyph

2011-03-19 Thread Khaled Hosny
On Sat, Mar 19, 2011 at 09:12:42AM +0100, Mojca Miklavec wrote:
 On Sat, Mar 19, 2011 at 09:05, Mojca Miklavec wrote:
 
  If you want
  to disable that behaviour, you need to turn trep feature off, for
  example with
     \definefontfeature[default][liga=yes,kern=yes,tlig=yes]
 
 ... or maybe just disable the font feature temporary with
 \subff{trep}. In theory that should work, but it didn't when I tried
 it.

You need node mode for that stuff to work.

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
 Arab
___
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] ... and emoticons

2011-03-19 Thread Mojca Miklavec
On Sat, Mar 19, 2011 at 04:15, Aditya Mahajan wrote:
 On Sat, 19 Mar 2011, Cecil Westerhof wrote:

 Are there codes for ... and emoticons in ConTeXt?

 \setupbodyfont[libertine]
 \starttext
 \unknown\ or \ldots
 ☺☹
 \stoptext

If font supports the emoticons in the first place, one could also
define ligatures to create them automatically with
:-)
etc. But personally I would prefer to use \externalfigure and find
some really nice images out there as opposed to using whatever limited
set of black-and-white images a font provides.

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] Some problems I experienced when using ConTeXt

2011-03-19 Thread Wolfgang Schuster

Am 19.03.2011 um 03:41 schrieb Cecil Westerhof:

 I would prefer t/m kept together. It is, but the way it is
 displayed, it looks like there is (a) space between the '/' and
 the 'm'. Is there something that can be done about this, or have
 I to live with it?

Use a different font or add manual kerning. As you can see here it’s font 
dependent:

\starttext

t/m

\switchtobodyfont[pagella]t/m

\switchtobodyfont[termes]t/m

\switchtobodyfont[iwona]t/m

\switchtobodyfont[antykwa-poltawskiego]t/m

\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] Some problems I experienced when using ConTeXt

2011-03-19 Thread Wolfgang Schuster

Am 19.03.2011 um 03:41 schrieb Cecil Westerhof:

 I found also an obscure problem with table. I had to dabble a bit
 to reproduce it. (For a moment I thought I had imagined it.)
 
 The table does not fit on the space that is left on the page, so
 it is moved to the next page. So far so good. But the text after
 the table is put on the current page and is now before the table.
 
 It is not that they can not be put on a page together, because
 when you uncomment the break, the table and text reside on the
 same page.

\placetable[force]{…}{…}

and don’t use \blank before and after a float, you can change
the space with the “spacebefore” and “spaceafter” keys for \setupfloat.

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] Some problems I experienced when using ConTeXt

2011-03-19 Thread Wolfgang Schuster

Am 19.03.2011 um 03:41 schrieb Cecil Westerhof:

 Lastly a question about a long click-able email address. I would
 like it not to be broken up. But sometimes this can happen. See
 the end of the document.(Can of-course also happen with a short
 address, but will happen less often.) What is the best way to
 circumvent this? At the moment I just put it centered on its own
 line. At the moment I do not have a problem with this. But I do
 not know if this will be always the case.

\gotobox{quitealongusernametowriteanema...@dummy.nl}[url(quitealongusernametowriteanema...@dummy.nl)]

and \setupinteraction[state=start] to your document.

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] Macro for acronyms

2011-03-19 Thread Wolfgang Schuster

Am 19.03.2011 um 03:29 schrieb Cecil Westerhof:

 At the moment I have I my document:
 {\switchtobodyfont[1.25em]\bf M}ust
 
 {\switchtobodyfont[1.25em]\bf S}hould
 
 {\switchtobodyfont[1.25em]\bf C}ould
 
 {\switchtobodyfont[1.25em]\bf N}ot now
 
 But I like to have a macro for this, so I could just do:
 \Acronym{Must Should Could Not~now}
 
 Is more readable and when I want a change (for example another color for the 
 first letter), this is much easier to implement. How should I implement such 
 a macro?


\definestartstop[Acronym][style=\bfa]

\starttext

\starttabulate[|lh{\Acronym}|]
\HC {M}ust\NC\NR
\HC {S}hould  \NC\NR
\HC {C}ould   \NC\NR
\HC {N}ot now \NC\NR
\stoptabulate

\startlines
\Acronym{M}ust
\Acronym{S}hould
\Acronym{C}ould
\Acronym{N}ot now
\stoplines

\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] Macro for acronyms

2011-03-19 Thread Wolfgang Schuster

Am 19.03.2011 um 04:08 schrieb Aditya Mahajan:

 \def\FancyUppercase#1%
  {\dostartFancyUppercase#1\dostopFancyUppercase}
 
 \def\dostartFancyUppercase#1#2\dostopFancyUppercase
  {\FancyFirstLetter{#1}#2}
 
 
 \def\Acronym#1%
  {\dostartAcronym#1 \dostopAcronym}
 
 \def\dostartAcronym#1 #2\dostopAcronym
  {\doifsomething{#1}
  {\FancyUppercase{#1} %space
   \dostartAcronym#2 \dostopAcronym}}

\def\Acronym#1%
  {\startpacked
   \processseparatedlist[#1][ ]\doAcronym
   \stoppacked}

\def\doAcronym#1%
  {\getfirstcharacter{#1}%
   {\FancyFirstLetter\firstcharacter}\remainingcharacters\par}

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] ... and emoticons

2011-03-19 Thread Wolfgang Schuster
Am 19.03.2011 um 09:21 schrieb Mojca Miklavec:If font supports the emoticons in the first place, one could alsodefine ligatures to create them automatically with :-)etc. But personally I would prefer to use \externalfigure and findsome really nice images out there as opposed to using whatever limitedset of black-and-white images a font provides.You can also do a lot with symbol fonts [1]:\startTEXpage[offset=5mm]\definedfont[file:Dingbats2SamplerOT at 80pt]%\dontleavehmode\hsmash{\yellow\fontchar{d.alt001}}\hsmash{\orange\fontchar{d.alt002}}\fontchar{d}\stopTEXpage[1]http://www.ffdingbatsfont.com/Wolfgang

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] Defining new head grid problem

2011-03-19 Thread Bart Wise
The code below prints out the word Text: in bold and then follows with the
text.  However, if I turn the grid on (as is coded below), the first line of
the paragraph is printed, followed by a blank line, followed by the
remaining text.  The blank line after the first line should not be there.
 If I don't use the grid, I don't get the extra blank line.

Is something broken (I'm using the latest beta), or am I doing something
wrong?

Thanks,
Bart


\setuplayout[grid=yes]

\definehead[paragraph][subsubsubject]
\setuphead[paragraph][
alternative=text,
style=bold]

\starttext
\paragraph{Text: } \input knuth
\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] Simplefonts, \setcjk....font has some side effect on verbatim typing

2011-03-19 Thread 尹冠皓
Did I miss anything?

\usemodule[simplefonts]
\setcjkmainfont[whatever]
\starttext
\type{'} % expect ', but get ’
\type{--}% expect --, but get –
\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] Simplefonts, \setcjk....font has some side effect on verbatim typing

2011-03-19 Thread Wolfgang Schuster

Am 19.03.2011 um 13:33 schrieb 尹冠皓:

 Did I miss anything?

Fixed.

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] Defining new head grid problem

2011-03-19 Thread Wolfgang Schuster

Am 19.03.2011 um 12:57 schrieb Bart Wise:

 The code below prints out the word Text: in bold and then follows with the 
 text.  However, if I turn the grid on (as is coded below), the first line of 
 the paragraph is printed, followed by a blank line, followed by the remaining 
 text.  The blank line after the first line should not be there.  If I don't 
 use the grid, I don't get the extra blank line.
 
 Is something broken (I'm using the latest beta), or am I doing something 
 wrong?

\setuplayout[grid=yes]

\definehead[paragraph][subsubsubject]

\setuphead
  [paragraph]
  [strut=no,
   textcommand=\groupedcommand{}{:},
   alternative=text,
   style=bold]

\starttext
\paragraph{Text} \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
___


Re: [NTG-context] Defining new head grid problem

2011-03-19 Thread Bart Wise
Wolfgang,

Works great.  Thanks!

Bart

On Sat, Mar 19, 2011 at 6:54 AM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 Am 19.03.2011 um 12:57 schrieb Bart Wise:

  The code below prints out the word Text: in bold and then follows with
 the text.  However, if I turn the grid on (as is coded below), the first
 line of the paragraph is printed, followed by a blank line, followed by the
 remaining text.  The blank line after the first line should not be there.
  If I don't use the grid, I don't get the extra blank line.
 
  Is something broken (I'm using the latest beta), or am I doing something
 wrong?

 \setuplayout[grid=yes]

 \definehead[paragraph][subsubsubject]

 \setuphead
  [paragraph]
   [strut=no,
   textcommand=\groupedcommand{}{:},
alternative=text,
   style=bold]

 \starttext
 \paragraph{Text} \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

 ___

___
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] PDF Version Selection

2011-03-19 Thread Raymond LeClair
Fantastic! This fixes my problem uploading documents to Lulu. Thank you. This 
has been one tough bug to track down.

On Mar 18, 2011, at 5:05 PM, Aditya Mahajan wrote:

 On Fri, 18 Mar 2011, Hans Hagen wrote:
 
 On 18-3-2011 8:51, Raymond LeClair wrote:
 Is it possible to select the PDF version that is produced by running 
 context file.tex?
 For example, running context file.tex produced file.pdf of PDF version 
 _1.5_ on Ubuntu with ConTeXt  ver: 2009.11.26 16:28 MKIV and of PDF version 
 _1.6_ on Mac OS X with ConTeXt  ver: 2010.05.24 13:05 MKIV.
 I would like to produce PDF version _1.5_ on Mac OS X with ConTeXt  ver: 
 2010.05.24 13:05 MKIV.
 
 just choose the relevant pdf/x version
 
 http://wiki.contextgarden.net/PDFX
 
 I think that the OP just wants
 
 \pdfminorversion=5
 
 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
 ___



smime.p7s
Description: S/MIME cryptographic signature
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Simplefonts, \setcjk....font has some side effect on verbatim typing

2011-03-19 Thread 尹冠皓
On Sat, Mar 19, 2011 at 01:46:15PM +0100, Wolfgang Schuster wrote:

 Fixed.

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
___


[NTG-context] missing or ungrouped '=' after 'reset'

2011-03-19 Thread Reviczky, Adam
Hi

I'm getting lines like these since context experimental 2011.03.11 (including 
2011.03.18) by using definelayout reset.

checkmissing or ungrouped '=' after 'reset' in line 8 (@@ly2)
checkmissing or ungrouped '=' after 'reset' in line 12 (@@ly9)

Did something change around definelayout and its options or is that just a 
normal (verbose) message?

I'm using the example on http://wiki.contextgarden.net/Layout:
%%%
\setuplayout[% default layout for all the pages
backspace=1cm,
width=middle]

\definelayout[1][% set this layout on the first page
backspace=6cm]

\definelayout[2][reset] % reset to the default layout starting from the second 
page

\definelayout[5][backspace=6cm] % use this layout starting from  page 5

\definelayout[9][reset] % reset to the default layout starting from  page 9

\starttext
\showframe
\dorecurse{20}{\input dawkins \blank[big] \input knuth \page}
\stoptext
%%%

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] Different fontsize in header and footer

2011-03-19 Thread Cecil Westerhof
I thought I saw it once, but I can not find it. I like to use another
fontsize in my headers and footers. At the moment I have solved it in this
way:
\setupfootertexts[{\switchtobodyfont[6pt]Pagina \pagenumber \space van
\lastpage}]

But then I have to do this everywhere I change the text for header/footer.
Is there a way to set the fontsize (and font) globally?

-- 
Cecil Westerhof
___
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] Different fontsize in header and footer

2011-03-19 Thread Wolfgang Schuster

Am 19.03.2011 um 15:08 schrieb Cecil Westerhof:

 I thought I saw it once, but I can not find it. I like to use another 
 fontsize in my headers and footers. At the moment I have solved it in this 
 way:
 \setupfootertexts[{\switchtobodyfont[6pt]Pagina \pagenumber \space van 
 \lastpage}]
 
 But then I have to do this everywhere I change the text for header/footer. Is 
 there a way to set the fontsize (and font) globally?

\setupheader[style=...]
\setupfooter[style=...]

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] Different fontsize in header and footer

2011-03-19 Thread Cecil Westerhof
2011/3/19 Wolfgang Schuster schuster.wolfg...@googlemail.com

  I thought I saw it once, but I can not find it. I like to use another
 fontsize in my headers and footers. At the moment I have solved it in this
 way:
  \setupfootertexts[{\switchtobodyfont[6pt]Pagina \pagenumber \space
 van \lastpage}]
 
  But then I have to do this everywhere I change the text for
 header/footer. Is there a way to set the fontsize (and font) globally?

 \setupheader[style=...]
 \setupfooter[style=...]


Thanks, that was.

It rang a bell and sure enough I already used in one of my documents, but I
forgot about it.

-- 
Cecil Westerhof
___
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] missing or ungrouped '=' after 'reset'

2011-03-19 Thread Wolfgang Schuster

Am 19.03.2011 um 15:01 schrieb Reviczky, Adam:

 Hi
 
 I'm getting lines like these since context experimental 2011.03.11 (including 
 2011.03.18) by using definelayout reset.
 
 checkmissing or ungrouped '=' after 'reset' in line 8 (@@ly2)
 checkmissing or ungrouped '=' after 'reset' in line 12 (@@ly9)
 
 Did something change around definelayout and its options or is that just a 
 normal (verbose) message?

The example is wrong, for \definelayout only assignments are valid parameters
while \setuplayout accepts also “reset” for the first (with one argument)
or second (with two arguments) argument.

Valid settings are:

\definelayout[name][key=value,...]

\setuplayout[reset]
\setuplayout[key=value,...]
\setuplayout[name][reset]
\setuplayout[name][key=value,...]

The message above comes when you write this:

  \setupfoo[key=value,option]

ConTeXt doesn’t support mixed option where you write assignments and keywords
in one argument and for the unused keyword context gives a error message.

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] missing or ungrouped '=' after 'reset'

2011-03-19 Thread Reviczky, Adam
The example is wrong, for \definelayout only assignments are valid parameters
while \setuplayout accepts also “reset” for the first (with one argument)
or second (with two arguments) argument.
Hmm, but it's the only way it produces the output with the right layouts.
So what needs to be changed for this example to be in a correct way (and still 
get the layouts right)?

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
___


Re: [NTG-context] missing or ungrouped '=' after 'reset'

2011-03-19 Thread Wolfgang Schuster

Am 19.03.2011 um 16:08 schrieb Reviczky, Adam:

 The example is wrong, for \definelayout only assignments are valid parameters
 while \setuplayout accepts also “reset” for the first (with one argument)
 or second (with two arguments) argument.
 Hmm, but it's the only way it produces the output with the right layouts.
 So what needs to be changed for this example to be in a correct way (and 
 still get the layouts right)?

\definelayout[2][] % when you don’t like the empty argument you can write 
\...[2][state=start]

and you can add

\setuplayout[2][reset]

but this isn’t necessary.

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] How to get the style definitions from \chapter, \section, \subsection

2011-03-19 Thread Cecil Westerhof
The style of chapter is significant bigger as the style from section, but it
looks like the style from section and subsection are about the same. I have
a workaround with the following:
\setuphead[section][before={\blank[3*big] \testpage[15]}]
\setuphead[subsection][before={\blank[big,small]
\testpage[10]},style={\bf}]

This works reasonable. But it would be better if I could find out the
definitions from \section and \subsection. Then I could make a more
fine-tuned solution. Is it possible to get those definitions?

-- 
Cecil Westerhof
___
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 get the style definitions from \chapter, \section, \subsection

2011-03-19 Thread Wolfgang Schuster

Am 19.03.2011 um 17:21 schrieb Cecil Westerhof:

 The style of chapter is significant bigger as the style from section, but it 
 looks like the style from section and subsection are about the same. I have a 
 workaround with the following:
 \setuphead[section][before={\blank[3*big] \testpage[15]}]
 \setuphead[subsection][before={\blank[big,small] 
 \testpage[10]},style={\bf}]
 
 This works reasonable. But it would be better if I could find out the 
 definitions from \section and \subsection. Then I could make a more 
 fine-tuned solution. Is it possible to get those definitions?

\starttext

\starttabulate[|lh{\type}|lh{\type}|lh{\type}|lh{\type}|]
\NC \bf command \NC \bf before  \NC \bf after   \NC \bf style \NC\NR
\HC {\part} \HC {\blank[2*big]} \HC {\blank[2*big]} \HC {\tfc}\NC\NR
\HC {\chapter}  \HC {\blank[2*big]} \HC {\blank[2*big]} \HC {\tfc}\NC\NR
\HC {\section}  \HC {\blank[2*big]} \HC {\blank}\HC {\tfa}\NC\NR
\stoptabulate

\stoptext

\subsection has the same values as \section because unknown values are taken
from the parent, e.g. \subsection use \section settings and \section use 
\chapter
values etc.

A exception to this behaviour are textstyle, textcolor, numberstyle and 
numbercolor
because the use only the values from style/colors keys of the own level.

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] Different fontsize in header and footer

2011-03-19 Thread Aditya Mahajan

On Sat, 19 Mar 2011, Cecil Westerhof wrote:


It rang a bell and sure enough I already used in one of my documents, but I
forgot about it.


Can you add some of the answers to your recent questions to the wiki.

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] Feature request: setuppapersize

2011-03-19 Thread Aditya Mahajan

On Mon, 10 Jan 2011, Aditya Mahajan wrote:


On Mon, 10 Jan 2011, Hans Hagen wrote:


more elegant and downward compatible is this:

\definepapersize
 [samesized]
 [ \c!width=\paperwidth,
  \c!height=\paperheight]

\setuppapersize
 [A4][samesized]

in page-lay.mkiv


Indeed. This will also work fine.


I don't know if something changed, but this has stoopped working.

\setuppapersize[A5]
\starttext
\dorecurse{10}{\input knuth \endgraf}
\stoptext

With MkII I get

$pdfinfo page-test.pdf
Title:  page-test
Subject:
Keywords:
Author:
Creator:ConTeXt - 2011.02.25 22:03
Producer:   pdfTeX-1.40.11
CreationDate:   Sat Mar 19 13:50:49 2011
ModDate:ConTeXt - 2011.02.25 22:03
Tagged: no
Pages:  5
Encrypted:  no
Page size:  595.276 x 841.89 pts (A4)
File size:  33436 bytes
Optimized:  no
PDF version:1.5

With MkIV:

$pdfinfo page-test.pdf 
Title:  page-test

Creator:ConTeXt - 2011.02.25 22:03
Producer:   LuaTeX-0.65.0
CreationDate:   Sat Mar 19 13:53:29 2011
ModDate:Sat Mar 19 13:53:29 2011
Tagged: no
Pages:  5
Encrypted:  no
Page size:  595.276 x 841.89 pts (A4)
File size:  16057 bytes
Optimized:  no
PDF version:1.6

Notice that the page size is still A4! Any idea why this is happening?
(I get the right paper size with letter, A0, A1, A2, A3, but wrong paper 
sizes with anything smaller than A4).


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

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


[NTG-context] Text with background (overlay with a line by MP)

2011-03-19 Thread Procházka Lukáš

Hello,

I'm trying to create an overlay - text with a line drawn bellow.

The following code:

---

\defineoverlay[Label][\useMPgraphic{Label}]

\startuniqueMPgraphic{Label}
  path p; p := (0,0) -- (OverlayWidth,0);
  draw p yshifted -1cm withpen pencircle scaled 1mm withcolor .667red;
\stopuniqueMPgraphic

\def\Text#1{\inframed[background=Label,frame=off]{#1}}

\starttext
  AAA
  \Text{BBB}
  CCC
\stoptext

---

results in a horizontal line going exactly through the middle of the text.

And I'd like to draw it bellow; thus yshifted -1cm.

How to do it?

Best regards,

Lukas

t-TxMP.mkiv
Description: Binary data


t-TxMP.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] Text with background (overlay with a line by MP)

2011-03-19 Thread Peter Münster
Procházka Lukáš l...@pontex.cz writes:

   draw p yshifted -1cm withpen pencircle scaled 1mm withcolor .667red;

draw p withpen pencircle scaled 0mm withcolor white;
draw p yshifted -OverlayHeight withpen pencircle scaled 1mm withcolor .667red;

(quick and dirty, there is certainly a cleaner solution...)
-- 
   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] Text with background (overlay with a line by MP)

2011-03-19 Thread Peter Münster
Procházka Lukáš l...@pontex.cz writes:

 \def\Text#1{\inframed[background=Label,frame=off]{#1}}

Or like this (less quick and perhaps less dirty):

\def\Text#1{\inframed[location=top, background=Label, boffset=\lineheight,
frame=off]{#1}}

-- 
   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] Text with background (overlay with a line by MP)

2011-03-19 Thread Peter Münster
pmli...@free.fr (Peter Münster) writes:

 Procházka Lukáš l...@pontex.cz writes:

 \def\Text#1{\inframed[background=Label,frame=off]{#1}}

 Or like this (less quick and perhaps less dirty):

 \def\Text#1{\inframed[location=top, background=Label, boffset=\lineheight,
 frame=off]{#1}}

Oh, no, please forget that!

-- 
   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] Text with background (overlay with a line by MP)

2011-03-19 Thread Procházka Lukáš

... Thanks,

so a dirty trick must be done anyway? A trick which would cause MP to 
evaluate a higher bounding box?


draw p withpen pencircle scaled 0mm withcolor white;


---
draw (0,0);
---

instead works as well.


draw p yshifted -OverlayHeight withpen pencircle scaled 1mm withcolor .667red;

(quick and dirty, there is certainly a cleaner solution...)


(I guess so as well.)

(BTW: I don't want to just \underbar the text - this is a simplified 
task/sample; drawing should be more complicated in reality.)

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] Text with background (overlay with a line by MP)

2011-03-19 Thread Aditya Mahajan

On Sat, 19 Mar 2011, Procházka Lukáš wrote:


Hello,

I'm trying to create an overlay - text with a line drawn bellow.

The following code:

---

\defineoverlay[Label][\useMPgraphic{Label}]

\startuniqueMPgraphic{Label}
path p; p := (0,0) -- (OverlayWidth,0);
draw p yshifted -1cm withpen pencircle scaled 1mm withcolor .667red;
\stopuniqueMPgraphic

\def\Text#1{\inframed[background=Label,frame=off]{#1}}

\starttext
AAA
\Text{BBB}
CCC
\stoptext

---

results in a horizontal line going exactly through the middle of the text.

And I'd like to draw it bellow; thus yshifted -1cm.

How to do it?


You do not need yshifted. But you need to set the bounding box of the 
resulting image correctly.


\startuniqueMPgraphic{Label}
 path p; p := (0,0) -- (OverlayWidth,0);
 draw p withpen pencircle scaled 1mm withcolor .667red;
 setbounds currentpicture to boundingbox OverlayBox ;
\stopuniqueMPgraphic

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

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


[NTG-context] [OT] No panic --- it's a polar bear

2011-03-19 Thread luigi scarso
http://en.wikipedia.org/wiki/Knut_(polar_bear)

-- 
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] Text with background (overlay with a line by MP)

2011-03-19 Thread Procházka Lukáš

On Sat, 19 Mar 2011 23:13:46 +0100, Aditya Mahajan adit...@umich.edu wrote:


You do not need yshifted. But you need to set the bounding box of the
resulting image correctly.

\startuniqueMPgraphic{Label}
  path p; p := (0,0) -- (OverlayWidth,0);
  draw p withpen pencircle scaled 1mm withcolor .667red;
  setbounds currentpicture to boundingbox OverlayBox ;
\stopuniqueMPgraphic

Aditya


Perfect, thank you.

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] Producing quotesingle glyph

2011-03-19 Thread Pontus Lurcock
Thanks, Mojca and Khaled!

Taking trep out of the default features works nicely, but since in
this case I want quote-replacement as the default and straight
quotes only occasionally, I ended up with the following solution:

\definefontfeature[default][liga=yes,kern=yes,tlig=yes,trep=yes,mode=node]
\definefontfeature[notrep][liga=yes,kern=yes,tlig=yes,trep=no,mode=node]
\def\realquotesingle{{\setfontfeature{notrep}'}}

\starttext

Straight quote: \realquotesingle

Standard quote: '

\stoptext

Will wikify later today in case anyone else ever needs this.

Pont
___
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] Producing quotesingle glyph

2011-03-19 Thread Pontus Lurcock
On Sun 20 Mar 2011, Pontus Lurcock wrote:

 Will wikify later today in case anyone else ever needs this.

Done: http://wiki.contextgarden.net/Quotesingle . At present it is
only linked from http://wiki.contextgarden.net/Visuals , because
I couldn't find many appropriate related pages.

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