Re: [NTG-context] feature request

2011-11-14 Thread Hans Hagen

On 14-11-2011 08:57, Steffen Wolfrum wrote:


Am 13.11.2011 um 22:33 schrieb Andreas Schneider:


On 13.11.2011 11:55, Steffen Wolfrum wrote:


I am looking for the same functionality as the traditional TeX comment 
(starting with %), but used in-line not only after a paragraph.


That sounds a bit strange, because a paragraph doesn't end with a line break. 
That's how I usually do my comments too; just add a comment and continue after 
the line break with the content/sentence/paragraph:

-8
This is %some comment
an example.
-8

... will end up as: This is an example.




maybe paragraph was the wrong word (even though in your example between comment and 
an there is a pilcrow too, which is commonly used to denote individual paragraphs).

that's what I meant: a true in-line comment ... without a line-break, 
parapgraph-break, pilcrow for ending the comment:

This is ¿some comment¡ an example.


and next one would want:

This is ¿some
comment¡ an example.

and

\startchapter[title={This is ¿some comment¡ an example.}]

and ... so it's asking for a mess.

Just use a command as Wolfgang mentioned.

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] Simplefonts question

2011-11-14 Thread Wolfgang Schuster

Am 14.11.2011 um 07:00 schrieb Lutz Haseloff:

 2011/11/11 Wolfgang Schuster schuster.wolfg...@googlemail.com:
 
 Am 11.11.2011 um 13:01 schrieb Lutz Haseloff:
 
 Hi Wolfgang,
 
 I'm looking for documentation for your handy module.
 
 Particularly i'd like to know all the options i can use for
 the commands \setmainfont and \setupsimplefonts.
 
 My goal is to use a font in my document in
 different sizes (say 12, 17 and 35pt) with adequate
 line spacing.
 
 Do you want a whole family in this size or only a single style of a font?
 
 I need Linux Libertine as Serif, Aller as SansSerif and Aller in 35pt
 for large titles with proper line spacing.
 
 My success so far:
 
 \definefontfeature[cond][default][extend=.8]
 \usemodule[simplefonts]
 \setmainfont[linuxlibertineo]
 \setsansfont[aller][features=cond]
 \mainlanguage[de]
 \starttext
 Dudelsackpfeifenmachergeselle
 
 {\it
 Dudelsackpfeifenmachergeselle }
 
 {\bf
 Dudelsackpfeifenmachergeselle }
 
 {\bi
 Dudelsackpfeifenmachergeselle }
 
 \ss
 Dudelsackpfeifenmachergeselle
 
 {\it
 Dudelsackpfeifenmachergeselle }
 
 {\bf
 Dudelsackpfeifenmachergeselle }
 
 {\bi
 Dudelsackpfeifenmachergeselle }
 \stoptext
 
 
 Now some questions remain:
 How can i set the size of the fonts?
 \setsansfont[aller][features=cond,size=14pt]
 seems not to work.
 How can i define the 35pt .8 condensed Aller?


Define a style for the heading after you have set the font for serif and sans 
serif with:

\definefont[TtitleFont][Sans at 35pt]

\setuphead[chapter][style=TitleFont]
%\setuphead[chapter][style=TitleFont,interlinespace=40pt]

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] Simplefonts question

2011-11-14 Thread Christian
  Hi Wolfgang,
 
  I'm looking for documentation for your handy module.
 
  Particularly i'd like to know all the options i can use for the
  commands \setmainfont and \setupsimplefonts.
 
  My goal is to use a font in my document in different sizes (say 12,
  17 and 35pt) with adequate line spacing.
 
  Do you want a whole family in this size or only a single style of a font?
 
 I need Linux Libertine as Serif, Aller as SansSerif and Aller in 35pt for 
 large
 titles with proper line spacing.
 
 My success so far:
 
 \definefontfeature[cond][default][extend=.8]
 \usemodule[simplefonts]
 \setmainfont[linuxlibertineo]
 \setsansfont[aller][features=cond]
 \mainlanguage[de]
 \starttext
 Dudelsackpfeifenmachergeselle
 
 {\it
 Dudelsackpfeifenmachergeselle }
 
 {\bf
 Dudelsackpfeifenmachergeselle }
 
 {\bi
 Dudelsackpfeifenmachergeselle }
 
 \ss
 Dudelsackpfeifenmachergeselle
 
 {\it
 Dudelsackpfeifenmachergeselle }
 
 {\bf
 Dudelsackpfeifenmachergeselle }
 
 {\bi
 Dudelsackpfeifenmachergeselle }
 \stoptext
 
 
 Now some questions remain:
 How can i set the size of the fonts?
 \setsansfont[aller][features=cond,size=14pt]
 seems not to work.
 How can i define the 35pt .8 condensed Aller?
 
 Greetings Lutz

Here is how I would do it:

\definefontfeature[cond][default][extend=.8]
\usemodule[simplefonts]
\setmainfont[Linux Libertine O]
\setsansfont[aller][scale=0.9] % downscale Aller a bit, since it has a bigger 
x-height than Libertine
\definesimplefonttypeface[titlefont][aller][features=cond] % this way, only 
titles are condensed
\setuphead[chapter][style={\switchtobodyfont[titlefont,35pt]}]
\mainlanguage[de]

\starttext
\chapter{Dudelsackpfeifenmachergesellen sind lustige Leute}

Dudelsackpfeifenmachergeselle {\ss Dudelsackpfeifenmachergeselle}

{\it Dudelsackpfeifenmachergeselle} {\ss \it Dudelsackpfeifenmachergeselle}

{\bf Dudelsackpfeifenmachergeselle } {\ss \bf Dudelsackpfeifenmachergeselle}

{\bi Dudelsackpfeifenmachergeselle } {\ss \bi Dudelsackpfeifenmachergeselle}
\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] Too many }'s in latest beta

2011-11-14 Thread Hans Hagen

On 14-11-2011 07:24, Peter Münster wrote:

On Mon, Nov 14 2011, Hans Hagen wrote:


context.environment(false, my-env )


Thanks, this solves all problems!



msybe \environment should accept [name] as well


You've already added support for this in January:
http://archive.contextgarden.net/message/20110114.182134.7ec49be5.en.html


yes, but i was more wondering about the lua end (some commands need a 
special treatment) ... however, it was something else .. fixed in next beta


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] scaling the mp figure in ConTeXt

2011-11-14 Thread Hans Hagen

On 14-11-2011 08:23, Jeong Dalyoung wrote:

\startbuffer[test]
draw fullcircle scaled 3cm;
\stopbuffer

\starttext
\placefigure[][]{}
\processMPbuffer[test]
\stoptext


currentpicture := currentpicture xsized(TextWidth) ;

or

\placefigure[][]{}{\scale[width=\textwidth]{\processMPbuffer[test]}}

--

-
  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] margin notes at page breaks

2011-11-14 Thread Hans Hagen

On 13-11-2011 12:12, Stefan Müller wrote:


It still looks the same. Does the stacking only influence the behaviour
of (the breaking between) multiple margin notes?


each margin data blob is seen as a whole .. no breaking inside that .. 
depending on the content (only text) it should be possible to break 
notes but it's not provided now


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] feature request

2011-11-14 Thread Aditya Mahajan

On Fri, 11 Nov 2011, Steffen Wolfrum wrote:


quite often I wish we could have a kind of in line comment:
Something like ¿this is my comment¡ this.

I assume it is not trivial due to catcode issues, to say the least.
But nevertheless, as it is getting close to christmas, I just wanted to mention 
this idea here.


As long as there is no line break in the comment, the following lua based 
solution works (inspired by m-translate)


\startluacode
  local comments = {}
  thirddata = thirddata or {}

  thirddata.comments = comments

  function comments.translate(s)
  return string.gsub(s, ¿.-¡,)
  end

  local textlineactions = resolvers.openers.helpers.textlineactions
  
utilities.sequencers.appendaction(textlineactions,after,thirddata.comments.translate)

  function comments.enable()

utilities.sequencers.enableaction(textlineactions,thirddata.comments.translate)
  end

  function comments.disable()

utilities.sequencers.disableaction(textlineactions,thirddata.comments.translate)
  end

  comments.disable()
\stopluacode

\def\enablecomments {\ctxlua{thirddata.comments.enable()}}
\def\disablecomments{\ctxlua{thirddata.comments.disable()}}

\appendtoks
  \enablecomments
  \to \everystarttext

\starttext
\section{An ¿in \iffalse comment¡ works}
Multiple ¿in \iffalse comment¡ with something  ¿in \iffalse comment¡ in betweeen
\stoptext

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] Simplefonts question

2011-11-14 Thread Lutz Haseloff
Thanks Wolfgang and Christian, works now.

Lutz

2011/11/14 Christian meta...@gmx.de:
  Hi Wolfgang,
 
  I'm looking for documentation for your handy module.
 
  Particularly i'd like to know all the options i can use for the
  commands \setmainfont and \setupsimplefonts.
 
  My goal is to use a font in my document in different sizes (say 12,
  17 and 35pt) with adequate line spacing.
 
  Do you want a whole family in this size or only a single style of a font?

 I need Linux Libertine as Serif, Aller as SansSerif and Aller in 35pt for 
 large
 titles with proper line spacing.

 My success so far:

 \definefontfeature[cond][default][extend=.8]
 \usemodule[simplefonts]
 \setmainfont[linuxlibertineo]
 \setsansfont[aller][features=cond]
 \mainlanguage[de]
 \starttext
 Dudelsackpfeifenmachergeselle

 {\it
 Dudelsackpfeifenmachergeselle }

 {\bf
 Dudelsackpfeifenmachergeselle }

 {\bi
 Dudelsackpfeifenmachergeselle }

 \ss
 Dudelsackpfeifenmachergeselle

 {\it
 Dudelsackpfeifenmachergeselle }

 {\bf
 Dudelsackpfeifenmachergeselle }

 {\bi
 Dudelsackpfeifenmachergeselle }
 \stoptext


 Now some questions remain:
 How can i set the size of the fonts?
 \setsansfont[aller][features=cond,size=14pt]
 seems not to work.
 How can i define the 35pt .8 condensed Aller?

 Greetings Lutz

 Here is how I would do it:

 \definefontfeature[cond][default][extend=.8]
 \usemodule[simplefonts]
 \setmainfont[Linux Libertine O]
 \setsansfont[aller][scale=0.9] % downscale Aller a bit, since it has a bigger 
 x-height than Libertine
 \definesimplefonttypeface[titlefont][aller][features=cond] % this way, only 
 titles are condensed
 \setuphead[chapter][style={\switchtobodyfont[titlefont,35pt]}]
 \mainlanguage[de]

 \starttext
 \chapter{Dudelsackpfeifenmachergesellen sind lustige Leute}

 Dudelsackpfeifenmachergeselle {\ss Dudelsackpfeifenmachergeselle}

 {\it Dudelsackpfeifenmachergeselle} {\ss \it Dudelsackpfeifenmachergeselle}

 {\bf Dudelsackpfeifenmachergeselle } {\ss \bf Dudelsackpfeifenmachergeselle}

 {\bi Dudelsackpfeifenmachergeselle } {\ss \bi Dudelsackpfeifenmachergeselle}
 \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
___

Re: [NTG-context] feature request

2011-11-14 Thread Steffen Wolfrum

Am 14.11.2011 um 09:07 schrieb Hans Hagen:

 On 14-11-2011 08:57, Steffen Wolfrum wrote:
 
 Am 13.11.2011 um 22:33 schrieb Andreas Schneider:
 
 On 13.11.2011 11:55, Steffen Wolfrum wrote:
 
 I am looking for the same functionality as the traditional TeX comment 
 (starting with %), but used in-line not only after a paragraph.
 
 That sounds a bit strange, because a paragraph doesn't end with a line 
 break. That's how I usually do my comments too; just add a comment and 
 continue after the line break with the content/sentence/paragraph:
 
 -8
 This is %some comment
 an example.
 -8
 
 ... will end up as: This is an example.
 
 
 
 maybe paragraph was the wrong word (even though in your example between 
 comment and an there is a pilcrow too, which is commonly used to denote 
 individual paragraphs).
 
 that's what I meant: a true in-line comment ... without a line-break, 
 parapgraph-break, pilcrow for ending the comment:
 
 This is ¿some comment¡ an example.
 
 and next one would want:
 
 This is ¿some
 comment¡ an example.
 
 and
 
 \startchapter[title={This is ¿some comment¡ an example.}]

of course! how did you know that :o)


 and ... so it's asking for a mess.
 
 Just use a command as Wolfgang mentioned.

yes, that what I thought right away too. 
for the sake of completeness, I just wanted to answer Idris question and wait 
what he thinks.

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

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


Re: [NTG-context] url: Add macros to the ConTeXt core

2011-11-14 Thread Aditya Mahajan

On Sun, 13 Nov 2011, Paul Menzel wrote:



looking into typesetting URLs I find typesetting URLs quite cumbersome.

Maybe I have not used that feature that often so I am not seeing the
advantage to first define a URL somewhere and give it a name

   \useURL[aurl]   [http://xkcd.com/149/] [] [I prefer hot
   dogs.]

and then later use it.

   \url[aurl]


You just showed below why this is useful, by first using the urls ...


The proposed macros(?) in the section »Tipps and Tricks« [2]
[snip]


and then defining them.


[1] http://wiki.contextgarden.net/url
[2] http://wiki.contextgarden.net/url#Tipps_and_Tricks


ConTeXt is just doing the reverse: first define the urls and then use 
them :)


I support having commands which typeset the urls directly, but the macros on the
wiki are not the best ones.


\def\href#1#2{\useURL[#2][{#2}][][{#1}]\goto{\url[#2]}[url(#1)]}


Why not simply:

\def\href#1#2{\goto{#2}[url(#1)]}

Or did I miss something?


\def\ahref#1{\color[linkcolor]{\ttx \href{#1}{#1}}}
\def\fullahref#1{\color[linkcolor]{\ttx \href{#1}{http://#1}}}


These could be easily wrapped around using \useURL and \url (perhaps by adding
left and right keys to \setupurl) but \url does not create a hyperlink:

http://archive.contextgarden.net/message/20110915.115247.f23c2aad.en.html


\def\mailto#1{\useURL[#1][mailto:#1][][#1]\from[{#1}]}
\def\MailTo#1#2{\useURL[#1][mailto:#1][][#2]\from[{#1}]}


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] footnotes and linenumbering

2011-11-14 Thread Martin Fechner

Am 12.11.2011 13:59, schrieb Hans Hagen:

On 11-11-2011 12:24, Martin Fechner wrote:

Hi all,

is it possible to have a linenumbering also in the footnotes? I tried it
with

--
\setuplinenumbering[method=page]
\setupfootnotedefinition[location=serried]
\setupfootnotes[before={\startlinenumbering[continue]},after={\stoplinenumbering}]



\starttext
\startlinenumbering
\input knuth

some text\footnote{the first footnote}
more text\footnote{\dorecurse{10}{a very long footnote }}
\stoplinenumbering
\stoptext
--

but only the whole footnotefigure has one linenumber and it doesn't
continue right if method=page is set.
Is there any solution to this?


This is not supported. I can imagine it becoming part of one of the
critical edition ctx projects. There is no quick hack and it would be a
specific option to for notes.

Hans



That is what I assumed. Is it possible to say which amount of work is 
necessary to implement this feature and what period of time you have in 
mind (three months, one year, five years)?


Thanks,

Martin
___
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] Error with export

2011-11-14 Thread Andreas Harder
Hi Hans,

todays beta breaks the following example. It worked the day before yesterday.

\setupbackend[export=yes]

\definehighlight[Title][color=red]

\startsetups document:start
  \Title{\documentvariable{title}}
\stopsetups

\startdocument [title=Test]
  some text
\stopdocument


Thank you in advance

Andreas
___
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] margin notes at page breaks

2011-11-14 Thread Stefan Müller



On 14.11.2011 09:32, Hans Hagen wrote:

On 13-11-2011 12:12, Stefan Müller wrote:


It still looks the same. Does the stacking only influence the behaviour
of (the breaking between) multiple margin notes?


I was not very clear here, I think.


each margin data blob is seen as a whole .. no breaking inside that ..
depending on the content (only text) it should be possible to break
notes but it's not provided now


Thanks, okay, I understand that.  But I don't understand why in your 
first example the three margin notes go to the next page, together with 
the paragraph while in my example the single note does not go to the 
next page (the complete note, I don't want the margin note itself to 
break).  I would choose some extra blank lines at the end of the page 
over a margin note that is in the bottom margin...


Kind regards,
Stefan
___
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

2011-11-14 Thread Hans Hagen

On 14-11-2011 09:47, Aditya Mahajan wrote:

On Fri, 11 Nov 2011, Steffen Wolfrum wrote:


quite often I wish we could have a kind of in line comment:
Something like ¿this is my comment¡ this.

I assume it is not trivial due to catcode issues, to say the least.
But nevertheless, as it is getting close to christmas, I just wanted
to mention this idea here.


As long as there is no line break in the comment, the following lua
based solution works (inspired by m-translate)

\startluacode
local comments = {}
thirddata = thirddata or {}

thirddata.comments = comments

function comments.translate(s)
return string.gsub(s, ¿.-¡,)
end

local textlineactions = resolvers.openers.helpers.textlineactions
utilities.sequencers.appendaction(textlineactions,after,thirddata.comments.translate)


function comments.enable()
utilities.sequencers.enableaction(textlineactions,thirddata.comments.translate)

end

function comments.disable()
utilities.sequencers.disableaction(textlineactions,thirddata.comments.translate)

end

comments.disable()
\stopluacode

\def\enablecomments {\ctxlua{thirddata.comments.enable()}}
\def\disablecomments{\ctxlua{thirddata.comments.disable()}}

\appendtoks
\enablecomments
\to \everystarttext

\starttext
\section{An ¿in \iffalse comment¡ works}
Multiple ¿in \iffalse comment¡ with something ¿in \iffalse comment¡ in
betweeen
\stoptext


or ...

\startluacode

thirddata  = thirddata or { }
local comments = { filters = { } }
thirddata.comments = comments

local textlineactions = resolvers.openers.helpers.textlineactions
local sequencers  = utilities.sequencers
local constants   = interfaces.constants

local gsub, find, format = string.gsub, string.find, string.format

function comments.install(name,settings)
local settings = utilities.parsers.settings_to_hash(settings)
local start = string.escapedpattern(settings[constants.start] 
or )

local stop = string.escapedpattern(settings[constants.stop] or )
if start ~=  and stop ~=  then
local pattern = start .. .- .. stop
comments.filters[name] = function(s)
if s ==  then
return 
elseif find(s,start) then
return (gsub(s,pattern,))
else
return s
end
end

sequencers.appendaction(textlineactions,after,format(thirddata.comments.filters.%s,name))
comments.disable(name)
end
end

function comments.enable(name)

sequencers.enableaction(textlineactions,format(thirddata.comments.filters.%s,name))
end

function comments.disable(name)

sequencers.disableaction(textlineactions,format(thirddata.comments.filters.%s,name))
end

\stopluacode

\unprotect

\unexpanded\def\installcomments{\dodoubleargument\doinstallcomments}

\def\doinstallcomments[#1][#2]%

{\ctxlua{thirddata.comments.install(\!!bs#1\!!es,\!!bs\detokenize{#2}\!!es)}}

\unexpanded\def\enablecomments[#1]%
  {\ctxlua{thirddata.comments.enable (\!!bs#1\!!es)}}

\unexpanded\def\disablecomments[#1]%
  {\ctxlua{thirddata.comments.disable(\!!bs#1\!!es)}}

\protect

\installcomments[test] [start=¿,stop=¡]
\installcomments[test2][start=¡,stop=¿]

\enablecomments[test]
\enablecomments[test2]

\starttext

\section{An ¿in \iffalse comment¡ works}
Multiple ¿in \iffalse comment¡ with something  ¿in \iffalse comment¡ in 
betweeen


oeps ¿oeps¡ oeps ¡oeps¿ oeps

\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] [solved] Metafun manual section titles

2011-11-14 Thread Romain Diss
Hi,

On 14.11.2011, Andreas Harder wrote:
 On 13.11.2011, at 23:24, Romain Diss wrote:
  I'm trying to make some section titles which look like the ones of the
  metafun manual: title and number underlined [...]
 
 you can try something like this:
 [...]

Thank you very much. It works perfectly! It take me some time to understand 
every line but the solution is quite nice. Context never stop to surprise me 
with all these not so much documented powerfull macros...

-- 
Romain Diss
romain.d...@yahoo.fr
___
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] lemmas for headers

2011-11-14 Thread Idris Samawi Hamid ادريس سماوي حامد



Dear gang,

Consider the following global setup:

  \setupheadertexts%
  [][section][chapter][]

Sometimes a given section heading may be too long to comfortably fit in  
the header. Is there any mechanism or good workaround that will allow me  
to define, for a given header, a lemma such that it replaces section  
with sectionlemma.


Of course I can interrupt the main flow with

  \setupheadertexts%
  [][sectionlemma][chapter][]

manually, but what usually happens is that at least one header gets lost  
completely, generally the page immediately preceding the onset of the  
given section.


Any help or tips greatly appreciated and

Best wishes
Idris
--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shiʿi Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

___
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] url: Add macros to the ConTeXt core

2011-11-14 Thread Khaled Hosny
On Mon, Nov 14, 2011 at 04:42:54AM -0500, Aditya Mahajan wrote:
 I support having commands which typeset the urls directly, but the macros on 
 the
 wiki are not the best ones.
 
 \def\href#1#2{\useURL[#2][{#2}][][{#1}]\goto{\url[#2]}[url(#1)]}
 
 Why not simply:
 
 \def\href#1#2{\goto{#2}[url(#1)]}

I use something like that all the time.

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] lemmas for headers

2011-11-14 Thread Hans Hagen

On 14-11-2011 18:35, Idris Samawi Hamid ادريس  سماوي حامد wrote:



Dear gang,

Consider the following global setup:

\setupheadertexts%
[][section][chapter][]

Sometimes a given section heading may be too long to comfortably fit in
the header. Is there any mechanism or good workaround that will allow me
to define, for a given header, a lemma such that it replaces section
with sectionlemma.

Of course I can interrupt the main flow with

\setupheadertexts%
[][sectionlemma][chapter][]

manually, but what usually happens is that at least one header gets lost
completely, generally the page immediately preceding the onset of the
given section.

Any help or tips greatly appreciated and


\startchapter[title={a lot of bla bla},marking={just bla}]

title list marking bookmark

given that you bring up an issue that has quite probably been answered 
before you have to wikify it for future reference


Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] Small issue with dimensions

2011-11-14 Thread Vedran Miletić
Hi,

the following code

\starttext
1\unit{bit / second}
\stoptext

gives

1 econd

tested with: mtx-context | current version: 2011.11.14 16:17

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

2011-11-14 Thread Idris Samawi Hamid ادريس سماوي حامد



On Mon, 14 Nov 2011 02:22:17 -0700, Steffen Wolfrum  
cont...@st.estfiles.de wrote:



 I just wanted to answer Idris question and wait what he thinks.


Your request is a bit different from what I had in mind ...

OTOH, why not just use

bla bla \message{Here is a note to myself.} bla bla

It'll show up in the log file, but who cares?

:-)

Best wishes
Idris
--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shiʿi Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

___
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] lemmas for headers

2011-11-14 Thread Idris Samawi Hamid ادريس سماوي حامد



On Mon, 14 Nov 2011 10:49:01 -0700, Hans Hagen pra...@wxs.nl wrote:


\startchapter[title={a lot of bla bla},marking={just bla}]



 title list marking bookmark


 given that you bring up an issue that has quite probably been answered  
before you have to wikify it for future reference


Ok, I did it just for you ;-)

http://wiki.contextgarden.net/Headers_and_Footers#Substituting_a_shorter_lemma_for_a_section_header

But no time to test each key so I ask others to augment or edit etc.

Thanks again for the helpful tip, and

Best wishes
Idris
--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shiʿi Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

___
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] Small issue with dimensions

2011-11-14 Thread Romain Diss
Hi,

On 14 nov 2011, Vedran Miletić wrote:
 the following code
 
 \starttext
 1\unit{bit / second}
 \stoptext
 
 gives
 1 econd
It works correctly here with the latest beta. It gives 1 bit/s.

I take the opportunity of this mail to mention again another \unit problem. I 
copy/paste here a part of a mail I sent two weeks ago but which didn't get any 
answer...

 It seems that some unit combinations don't work very well with the \unit 
 macro. I have some problems with the m- (milli-) prefix but some tests reveal 
 other strange errors.

 Here is a minimal example. The entries 02, 07, 08, 09, 10, 11, 12 and 15
 cause problem :

 \starttext
 \startbuffer
 00: \unit{10 mm}
 01: \unit{10 km}
 02: \unit{10,2 mA}
 03: \unit{123 kA}
 04: \unit{0,001 MA}
 05: \unit{1 dal}
 06: \unit{2.21 GW}
 07: \unit{345 mW}
 08: \unit{152.20 mHz}
 09: \unit{55.5 mmol}
 10: \unit{6.7 mol/l}
 11: \unit{125 g/l}
 12: \unit{125 g / l}
 13: \unit{125 km/s}
 14: \unit{125 m/s}
 15: \unit{125 mA/s}
 16: 1\unit{bit / second}
 \stopbuffer
 \typebuffer
 Result: \startlines \getbuffer \stoplines
 \stoptext

All the best.

-- 
Romain Diss
romain.d...@yahoo.fr
___
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] Arrows and boxes in metapost.

2011-11-14 Thread Christian
Hello,

I need a simple graphic that shows some boxes (frames) with text in it and has 
some arrows pointing to and from these boxes. (examples 267 and 268 on this 
page [1])
I was hoping to do this in MetaPost.

Earlier this year this question went un-answered on this list:
How to use boxit MetaPost macros with ConTeXt minimals?

So, is there a solution or do I have to use 
label.rt(btex \framed[width=3cm,align=middle]{Text} etex, (1u,1.5u));

Which really feels uncomfortable in this case.

Best regards
Christian

[1] http://tex.loria.fr/prod-graph/zoonekynd/metapost/metapost.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] Small issue with dimensions

2011-11-14 Thread Vedran Miletić
Datuma 14. studenoga 2011. 20:19 Romain Diss romain.d...@yahoo.fr je
napisao/la:
 Hi,

 On 14 nov 2011, Vedran Miletić wrote:
 the following code

 \starttext
 1\unit{bit / second}
 \stoptext

 gives
 1 econd
 It works correctly here with the latest beta. It gives 1 bit/s.

It does. I posted the wrong code, sorry. Therefore:

\starttext
1\unit{second}
\stoptext

gives 1 econd.

Vedran
___
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] url: Add macros to the ConTeXt core

2011-11-14 Thread mathew
On Mon, Nov 14, 2011 at 03:42, Aditya Mahajan adit...@umich.edu wrote:

 Why not simply:

 \def\href#1#2{\goto{#2}[url(#**1)]}

 Or did I miss something?


I use this:

% Define \Site[id][url]{description} to put in a clickable link

% with footnoted URL

\def\Site[#1][#2]#3{\useURL[#1][#2][][#3]\from[#1]\footnote[#1]{\tt\hyphenatedurl{#2}}}

That way people reading PDFs on a computer can click the site name in the
text to go there, and not have to see a URL; those with printed copies can
look at the footnote at the bottom of the page to find the URL and type it
in.


mathew
-- 
URL:http://www.pobox.com/~meta/
___
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] Small issue with dimensions

2011-11-14 Thread Romain Diss
On 14 nov 2011, Vedran Miletić wrote:
 Datuma 14. studenoga 2011. 20:19 Romain Diss romain.d...@yahoo.fr je
 napisao/la:
  On 14 nov 2011, Vedran Miletić wrote:
  the following code
  
  \starttext
  1\unit{bit / second}
  \stoptext
  
  gives
  1 econd
  
  It works correctly here with the latest beta. It gives 1 bit/s.
 
 It does. I posted the wrong code, sorry. Therefore:
 
 \starttext
 1\unit{second}
 \stoptext
 
 gives 1 econd.

But \unit{1 second} gives the correct result... 

-- 
Romain Diss
romain.d...@yahoo.fr
___
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] defineframed has no effect

2011-11-14 Thread Christian
This gives only a framed Hello, no red, frame still on.
Did something change for setting up own frames?

\defineframed[GreyBg][backgroung=color,backgroundcolor=red,frame=off]
\starttext
\GreyBg[frame=on]{Hallo}
\stoptext

Info: ConTeXt  ver: 2011.11.09 20:58 MKIV



___
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] defineframed has no effect

2011-11-14 Thread Andreas Harder

On 14.11.2011, at 21:54, Christian wrote:

 This gives only a framed Hello, no red, frame still on.
 Did something change for setting up own frames?
 
 \defineframed[GreyBg][backgroung=color,backgroundcolor=red,frame=off]

You’ve written backgroung instead of background.

Greeting
Andreas
___
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] defineframed has no effect

2011-11-14 Thread Christian
  This gives only a framed Hello, no red, frame still on.
  Did something change for setting up own frames?
 
 
 \defineframed[GreyBg][backgroung=color,backgroundcolor=red,frame=off]
 
 You’ve written backgroung instead of background.

Lol, that's what I get for copy-pasting the wiki :D

Seriously, the typo is in the wiki code...
http://wiki.contextgarden.net/Reference/en/defineframed

Works now!

___
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] defineframed has no effect

2011-11-14 Thread Christian
   This gives only a framed Hello, no red, frame still on.
   Did something change for setting up own frames?
  
  
 
 \defineframed[GreyBg][backgroung=color,backgroundcolor=red,frame=off]
 
  You’ve written backgroung instead of background.
 
 Lol, that's what I get for copy-pasting the wiki :D
 
 Seriously, the typo is in the wiki code...
 http://wiki.contextgarden.net/Reference/en/defineframed
 
 Works now!

I spoke too soon. The style is ignored. Example:

\defineframed[myFrame][frame=on,align=middle,style={\it}]
\starttext
\myFrame{Hello}
\stoptext

Is it on purpose?

___
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] defineframed has no effect

2011-11-14 Thread Aditya Mahajan

On Mon, 14 Nov 2011, Christian wrote:


This gives only a framed Hello, no red, frame still on.
Did something change for setting up own frames?





\defineframed[GreyBg][backgroung=color,backgroundcolor=red,frame=off]


You’ve written backgroung instead of background.


Lol, that's what I get for copy-pasting the wiki :D

Seriously, the typo is in the wiki code...
http://wiki.contextgarden.net/Reference/en/defineframed

Works now!


I spoke too soon. The style is ignored. Example:

\defineframed[myFrame][frame=on,align=middle,style={\it}]
\starttext
\myFrame{Hello}
\stoptext

Is it on purpose?


IIRC, the name of the key is foregroundstyle.

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] defineframed has no effect

2011-11-14 Thread Andreas Harder

On 14.11.2011, at 22:12, Aditya Mahajan wrote:

 On Mon, 14 Nov 2011, Christian wrote:
 
 This gives only a framed Hello, no red, frame still on.
 Did something change for setting up own frames?
 
 
 
 \defineframed[GreyBg][backgroung=color,backgroundcolor=red,frame=off]
 
 You’ve written backgroung instead of background.
 
 Lol, that's what I get for copy-pasting the wiki :D
 
 Seriously, the typo is in the wiki code...
 http://wiki.contextgarden.net/Reference/en/defineframed
 
 Works now!
 
 I spoke too soon. The style is ignored. Example:
 
 \defineframed[myFrame][frame=on,align=middle,style={\it}]
 \starttext
 \myFrame{Hello}
 \stoptext
 
 Is it on purpose?
 
 IIRC, the name of the key is foregroundstyle.

Or use \framedtext{…}

\defineframedtext[myFrame][frame=on,align=middle,style=\it,width=fit]

Andreas
___
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] defineframed has no effect

2011-11-14 Thread Christian
  This gives only a framed Hello, no red, frame still on.
  Did something change for setting up own frames?
 
 
 
 
 \defineframed[GreyBg][backgroung=color,backgroundcolor=red,frame=off]
 
  You’ve written backgroung instead of background.
 
  Lol, that's what I get for copy-pasting the wiki :D
 
  Seriously, the typo is in the wiki code...
  http://wiki.contextgarden.net/Reference/en/defineframed
 
  Works now!
 
  I spoke too soon. The style is ignored. Example:
 
  \defineframed[myFrame][frame=on,align=middle,style={\it}]
  \starttext
  \myFrame{Hello}
  \stoptext
 
  Is it on purpose?
 
 IIRC, the name of the key is foregroundstyle.

It truely is, thanks for the hint. The wiki directs from defineframed to 
setupframedtexts which has the key style. I thought my search was over.

I fixed the backgrounG typo.

___
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] defineframed has no effect

2011-11-14 Thread Hans Hagen

On 14-11-2011 22:12, Aditya Mahajan wrote:

On Mon, 14 Nov 2011, Christian wrote:


This gives only a framed Hello, no red, frame still on.
Did something change for setting up own frames?





\defineframed[GreyBg][backgroung=color,backgroundcolor=red,frame=off]


You’ve written backgroung instead of background.


Lol, that's what I get for copy-pasting the wiki :D

Seriously, the typo is in the wiki code...
http://wiki.contextgarden.net/Reference/en/defineframed

Works now!


I spoke too soon. The style is ignored. Example:

\defineframed[myFrame][frame=on,align=middle,style={\it}]
\starttext
\myFrame{Hello}
\stoptext

Is it on purpose?


IIRC, the name of the key is foregroundstyle.


indeed: foregroundcolor and foregroundstyle ... they are always present 
when something used framed while style/color ... keys are used by thw 
wrapper macros


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] texnansi.enc

2011-11-14 Thread Yue Wang
Still not fixed!


btw, Hans, how to enable hz in MKII for officina?

\usetypescriptfile[type-buy]
\definetypeface[officina][rm][serif][officina][default][encoding=texnansi]
\definetypeface[officina][ss][sans] [officina][default][encoding=texnansi]
\usetypescript[serif,sans,mono][handling,hanging][highquality]

\setupbodyfont[officina,ss]
\setupalign[hz,hanging]


just don't work at all.


On Thu, Nov 10, 2011 at 9:18 AM, Yue Wang yuleo...@gmail.com wrote:
 still not fixed

 On Wed, Nov 9, 2011 at 2:31 PM, Hans Hagen pra...@wxs.nl wrote:
 On 9-11-2011 18:02, Yue Wang wrote:

 Hi, Mojca:

 just updated context and mkii told me

 !pdfTeX error: pdftex (file texnansi.enc): cannot open encoding file for
 reading

 is this file removed?

 not on purpose .. it should be there

 -
                                          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] feature request

2011-11-14 Thread Aditya Mahajan

On Mon, 14 Nov 2011, Hans Hagen wrote:


On 14-11-2011 09:47, Aditya Mahajan wrote:

 On Fri, 11 Nov 2011, Steffen Wolfrum wrote:

  quite often I wish we could have a kind of in line comment:
  Something like ¿this is my comment¡ this.
 
  I assume it is not trivial due to catcode issues, to say the least.

  But nevertheless, as it is getting close to christmas, I just wanted
  to mention this idea here.

 As long as there is no line break in the comment, the following lua
 based solution works (inspired by m-translate)


or ...



Why not go all the way with full multiline comments then? See attached.

Aditya\startluacode
 thirddata  = thirddata or { }
 local comments = { filters = { } }
 thirddata.comments = comments

 local textlineactions = resolvers.openers.helpers.textlineactions
 local sequencers  = utilities.sequencers
 local constants   = interfaces.constants

 local gsub, find, format = string.gsub, string.find, string.format

 function comments.install(name,settings)
 local settings = utilities.parsers.settings_to_hash(settings)
 local start = string.escapedpattern(settings[constants.start] or )
 local stop  = string.escapedpattern(settings[constants.stop] or )
 local any   = .-
 if start ~=  and stop ~=  then
local strip_inline = function(s) return gsub(s, start .. any .. stop, , 1) end
local strip_start  = function(s) return gsub(s, start .. any, , 1) end
local strip_stop   = function(s) return gsub(s, ^   .. any .. stop, , 1) end 
local insideComment = false 
comments.filters[name] = function(s)
local filter = comments.filters[name]
if s ==  then
return s
elseif insideComment then
if find(s,stop) then
insideComment = false
return filter(strip_stop(s))
else
return 
end
elseif find(s,start) then
if find(s, stop) then
return filter(strip_inline(s))
else
insideComment = true 
return strip_start(s)
end
else
return s
end
 end
 sequencers.appendaction(textlineactions,after,format(thirddata.comments.filters.%s,name))
 comments.disable(name)
 end
 end

 function comments.enable(name)
sequencers.enableaction(textlineactions,format(thirddata.comments.filters.%s,name))
 end

 function comments.disable(name)
sequencers.disableaction(textlineactions,format(thirddata.comments.filters.%s,name))
 end

\stopluacode

\unprotect

\unexpanded\def\installcomments{\dodoubleargument\doinstallcomments}

\def\doinstallcomments[#1][#2]%
{\ctxlua{thirddata.comments.install(\!!bs#1\!!es,\!!bs\detokenize{#2}\!!es)}}

\unexpanded\def\enablecomments[#1]%
   {\ctxlua{thirddata.comments.enable (\!!bs#1\!!es)}}

\unexpanded\def\disablecomments[#1]%
   {\ctxlua{thirddata.comments.disable(\!!bs#1\!!es)}}

\protect

\installcomments[test] [start=/*,stop=*/]

\starttext
\enablecomments[test]

\section{Test of /*inline*/ comments}
/* Test for multiline comments
 * to see if they work
 */

Another test for /* inline comments */ with multiple /* commented lines
that span /* false nested comments as well */ to see if it works

\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] feature request

2011-11-14 Thread Aditya Mahajan

On Mon, 14 Nov 2011, Aditya Mahajan wrote:


On Mon, 14 Nov 2011, Hans Hagen wrote:


 On 14-11-2011 09:47, Aditya Mahajan wrote:
   On Fri, 11 Nov 2011, Steffen Wolfrum wrote:
 
quite often I wish we could have a kind of in line comment:

Something like ¿this is my comment¡ this.
  
I assume it is not trivial due to catcode issues, to say the least.

But nevertheless, as it is getting close to christmas, I just wanted
to mention this idea here.
 
   As long as there is no line break in the comment, the following lua

   based solution works (inspired by m-translate)

 or ...



Why not go all the way with full multiline comments then? See attached.



Here is a slightly cleanup version that handles multiline comments better

https://github.com/adityam/context-comments/blob/master/t-comments.mkvi

But this will only work if % has its usual catcode. I don't know how to 
get around that limitation.


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] Footnote Problem

2011-11-14 Thread Kip Warner
Hey folks,

The second \footnote doesn't show in the generated PDF. The number is
listed where it should at the end of the sentence, but the text of the
footnote is not listed at the bottom of the page.

\definestartstop
[SomeDocument]
[before={
\crlf
\setupbackground[frame=on,
 before=\blank,
 after=\blank,
 corner=round,
 topoffset=0.5cm,
 leftoffset=0.5cm,
 rightoffset=0.5cm,
 bottomoffset=0.5cm]
\startbackground
},
 after={
\stopbackground
\crlf
   },
 commands={\setupalign[yes]},
 style=italic]

\starttext
First footnote.\footnote{This one works.}
\startSomeDocument
Second footnote.\footnote{This one doesn't.}
\stopSomeDocument
\stoptext

Thanks anyone.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] scaling the mp figure in ConTeXt (Hans Hagen)

2011-11-14 Thread Jeong Dalyoung
Dear Hans and Mojca,

Thank you for your solution.
It works well.

Best regards,

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