[NTG-context] Using fourier-GUT as math font

2010-10-27 Thread Nitralime

Hi folks!

I'm new to ConTeXt and right now playing around with its minimal 
distribution (MkIV).
Trying to tinker with my very first typescript I have downloaded the ZIP 
archive
of fourier-GUT fonts from CTAN and extracted the afm and pfb files into 
a new

directory on the OSFONTDIR path and updated the ConTeXt font cache.
Looking at the typescript definition of fourier in type-one.mkii
and using the other samples on ConTeXt wiki pages I produced the 
following typescript:




%%== Serif Fonts 
===


\starttypescript [serif] [baskerville]
\definefontsynonym [Baskerville-Regular]
[name:baskerville]   [features=default]
\definefontsynonym [Baskerville-Bold]   
[name:baskervillebold]   [features=default]
\definefontsynonym [Baskerville-Italic] 
[name:baskervilleitalic] [features=default]
\definefontsynonym [Baskerville-BoldItalic] 
[name:baskervillebolditalic] [features=default]
\definefontsynonym [Baskerville-Semibold]   
[name:baskervillesemibold]   [features=default]
\definefontsynonym [Baskerville-SemiboldItalic] 
[name:baskervillesemibolditalic] [features=default]

\stoptypescript

\starttypescript [serif] [baskerville] [name]
\usetypescript [serif][fallback]
\definefontsynonym [Serif]   
[Baskerville-Regular][features=default]
\definefontsynonym [SerifItalic] 
[Baskerville-Italic] [features=default]
\definefontsynonym [SerifBold]   
[Baskerville-Bold]   [features=default]
\definefontsynonym [SerifBoldItalic] 
[Baskerville-BoldItalic] [features=default]
\definefontsynonym [SerifSemibold]   
[Baskerville-Semibold]   [features=default]
\definefontsynonym [SerifSemiboldItalic] 
[Baskerville-SemiboldItalic] [features=default]

\stoptypescript

%%== Sans Serif Fonts 
==


\starttypescript [sans] [gillsans]
\definefontsynonym [GillSans-Regular]  
[name:gillsans][features=default]
\definefontsynonym [GillSans-Bold] 
[name:gillsansbold][features=default]
\definefontsynonym [GillSans-Italic]   
[name:gillsansitalic]  [features=default]
\definefontsynonym [GillSans-BoldItalic]   
[name:gillsansbolditalic]  [features=default]
\definefontsynonym [GillSans-Light]
[name:gillsanslight]   [features=default]
\definefontsynonym [GillSans-LightdItalic] 
[name:gillsanslightitalic] [features=default]

\stoptypescript

\starttypescript [sans] [gillsans] [name]
\usetypescript [sans][fallback]
\definefontsynonym [Sans]   [GillSans-Regular] 
[features=default]
\definefontsynonym [SansItalic] [GillSans-Italic]  
[features=default]
\definefontsynonym [SansBold]   [GillSans-Bold]
[features=default]
\definefontsynonym [SansBoldItalic] [GillSans-BoldItalic]  
[features=default]
\definefontsynonym [SansLight]  [GillSans-Light]   
[features=default]
\definefontsynonym [SansLightItalic][GillSans-LightItalic] 
[features=default]

\stoptypescript

%%== Mono Type Fonts 
===


\starttypescript [mono] [consolas]
\definefontsynonym [Consolas-Regular]  
[name:consolas][features=default]
\definefontsynonym [Consolas-Bold] 
[name:consolasbold][features=default]
\definefontsynonym [Consolas-Italic]   
[name:consolasitalic]  [features=default]
\definefontsynonym [Consolas-BoldItalic]   
[name:consolasbolditalic]  [features=default]

\stoptypescript

\starttypescript [mono] [consolas] [name]
\usetypescript [mono][fallback]
\definefontsynonym [Mono]   [Consolas-Regular] 
[features=default]
\definefontsynonym [MonoItalic] [Consolas-Italic]  
[features=default]
\definefontsynonym [MonoBold]   [Consolas-Bold]
[features=default]
\definefontsynonym [MonoBoldItalic] [Consolas-BoldItalic]  
[features=default]

\stoptypescript


%%== Math Fonts 



\starttypescript [math] [fourier][texnansi]
\definefontsynonym [Fourier-Math-Letters][name:fourier-ml]
\definefontsynonym [Fourier-Math-Letters-Italic] 
[name:fourier-mlit]

\definefontsynonym [Fourier-Math-Letters-Bold]   [name:fourier-mlb]
\definefontsynonym [Fourier-Math-Letters-BoldItalic] 
[name:fourier-mlbit]

\definefontsynonym [Fourier-Math-Blackboard] [name:fourier-bb]
\definefontsynonym [Fourier-Math-Calligraphic]   [name:fourier-mcl]
\definefontsynonym [Fourier-Math-Symbols][name:fourier-ms]
\definefontsynonym [Fourier-Math-Extension] 

Re: [NTG-context] Using fourier-GUT as math font

2010-10-27 Thread Mikael P. Sundqvist
On Tue, Oct 26, 2010 at 6:00 PM, Nitralime nitral...@googlemail.com wrote:
 Hi folks!

 I'm new to ConTeXt and right now playing around with its minimal
 distribution (MkIV).
 Trying to tinker with my very first typescript I have downloaded the ZIP
 archive
 of fourier-GUT fonts from CTAN and extracted the afm and pfb files into a
 new
 directory on the OSFONTDIR path and updated the ConTeXt font cache.
 Looking at the typescript definition of fourier in type-one.mkii
 and using the other samples on ConTeXt wiki pages I produced the following
 typescript:

 

 %%== Serif Fonts
 ===

 \starttypescript [serif] [baskerville]
     \definefontsynonym [Baskerville-Regular]
 [name:baskerville]   [features=default]
     \definefontsynonym [Baskerville-Bold]
 [name:baskervillebold]   [features=default]
     \definefontsynonym [Baskerville-Italic]
 [name:baskervilleitalic] [features=default]
     \definefontsynonym [Baskerville-BoldItalic]
 [name:baskervillebolditalic] [features=default]
     \definefontsynonym [Baskerville-Semibold]
 [name:baskervillesemibold]   [features=default]
     \definefontsynonym [Baskerville-SemiboldItalic]
 [name:baskervillesemibolditalic] [features=default]
 \stoptypescript

 \starttypescript [serif] [baskerville] [name]
     \usetypescript [serif][fallback]
     \definefontsynonym [Serif]   [Baskerville-Regular]
 [features=default]
     \definefontsynonym [SerifItalic] [Baskerville-Italic]
 [features=default]
     \definefontsynonym [SerifBold]   [Baskerville-Bold]
 [features=default]
     \definefontsynonym [SerifBoldItalic] [Baskerville-BoldItalic]
 [features=default]
     \definefontsynonym [SerifSemibold]   [Baskerville-Semibold]
 [features=default]
     \definefontsynonym [SerifSemiboldItalic] [Baskerville-SemiboldItalic]
 [features=default]
 \stoptypescript

 %%== Sans Serif Fonts
 ==

 \starttypescript [sans] [gillsans]
     \definefontsynonym [GillSans-Regular]  [name:gillsans]
 [features=default]
     \definefontsynonym [GillSans-Bold] [name:gillsansbold]
 [features=default]
     \definefontsynonym [GillSans-Italic]   [name:gillsansitalic]
 [features=default]
     \definefontsynonym [GillSans-BoldItalic]   [name:gillsansbolditalic]
 [features=default]
     \definefontsynonym [GillSans-Light]    [name:gillsanslight]
 [features=default]
     \definefontsynonym [GillSans-LightdItalic] [name:gillsanslightitalic]
 [features=default]
 \stoptypescript

 \starttypescript [sans] [gillsans] [name]
     \usetypescript [sans][fallback]
     \definefontsynonym [Sans]   [GillSans-Regular]
 [features=default]
     \definefontsynonym [SansItalic] [GillSans-Italic]
 [features=default]
     \definefontsynonym [SansBold]   [GillSans-Bold]
 [features=default]
     \definefontsynonym [SansBoldItalic] [GillSans-BoldItalic]
 [features=default]
     \definefontsynonym [SansLight]  [GillSans-Light]
 [features=default]
     \definefontsynonym [SansLightItalic]    [GillSans-LightItalic]
 [features=default]
 \stoptypescript

 %%== Mono Type Fonts
 ===

 \starttypescript [mono] [consolas]
     \definefontsynonym [Consolas-Regular]  [name:consolas]
 [features=default]
     \definefontsynonym [Consolas-Bold] [name:consolasbold]
 [features=default]
     \definefontsynonym [Consolas-Italic]   [name:consolasitalic]
 [features=default]
     \definefontsynonym [Consolas-BoldItalic]   [name:consolasbolditalic]
 [features=default]
 \stoptypescript

 \starttypescript [mono] [consolas] [name]
     \usetypescript [mono][fallback]
     \definefontsynonym [Mono]   [Consolas-Regular]
 [features=default]
     \definefontsynonym [MonoItalic] [Consolas-Italic]
 [features=default]
     \definefontsynonym [MonoBold]   [Consolas-Bold]
 [features=default]
     \definefontsynonym [MonoBoldItalic] [Consolas-BoldItalic]
 [features=default]
 \stoptypescript


 %%== Math Fonts
 

 \starttypescript [math] [fourier][texnansi]
     \definefontsynonym [Fourier-Math-Letters]    [name:fourier-ml]
     \definefontsynonym [Fourier-Math-Letters-Italic] [name:fourier-mlit]
     \definefontsynonym [Fourier-Math-Letters-Bold]   [name:fourier-mlb]
     \definefontsynonym [Fourier-Math-Letters-BoldItalic]
 [name:fourier-mlbit]
     \definefontsynonym [Fourier-Math-Blackboard] [name:fourier-bb]
     \definefontsynonym [Fourier-Math-Calligraphic]   [name:fourier-mcl]
     \definefontsynonym [Fourier-Math-Symbols]    [name:fourier-ms]
     \definefontsynonym [Fourier-Math-Extension]  [name:fourier-mex]
     

Re: [NTG-context] Referencing line numbers inside a typing

2010-10-27 Thread Stefan Müller
Am Dienstag 26 Oktober 2010, 21:12:01 schrieb Wolfgang Schuster:
 Am 26.10.2010 um 20:47 schrieb Stefan Müller:
  One more question before wikifying: Is there a way to prevent the prefix
  line? I want to say something like In lines 3 to 13.
 
 The texts „line“ and „lines“ are set with \setuplabeltext but you can see
 alternative texts with \inline{...}[ref].
 
 \setuptyping[numbering=line,escape=yes]
 
 \starttext
 
 See \inline[line:single] and also \inline[line:range].
 
 See \inline{typeline}[line:single] and also \inline{typelines}[line:range].
 
 See line~\inlinerange[line:single] and also lines~\inlinerange[line:range].
 
 \starttyping
 line 1
 line 2/BTEX\startline[line:range]/ETEX
 line 3/BTEX\someline[line:single]/ETEX
 line 4
 line 5/BTEX\stopline[line:range]/ETEX
 line 6
 \stoptyping
 
 \stoptext
 
 Wolfgang

Thanks Wolgang, this looks pretty nice. Unfortunately I get the following 
error when running your example (ConTeXt  ver: 2010.10.22 16:46 MKIV  fmt: 
2010.10.27  int: english/english):

references  : unknown reference [][lr:b:line:single]
references  : unknown reference [][lr:b:line:range]

Any ideas?

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
___


[NTG-context] line correction and section marking

2010-10-27 Thread Philipp Gesang
Hi all,


line corrected headings seem to lose their marking.

···8

\showgrid

\setuppagenumbering[state=start,alternative=doublesided,location=]
\setuplayout[grid=yes]

\setupheadertexts
  [{\tfx\sc\getmarking[section]}]  [{\tfx\pagenumber}]
  [{\tfx\pagenumber}]  [{\tfx\sc\getmarking[chapter]}]

\setuphead[chapter][
  before={%
  \startlinecorrection% comment out line correction and the marking 
returns
  \blank[force,5*line]},
  after={\blank[2*line]%
 \stoplinecorrection%
}
]

\setuphead[section][style={\tf\it},before={\blank[line]},after={\blank[line]}]

\starttext
\dorecurse{5}{\chapter{a chapter} \input zapf
  \dorecurse{17}{\section{a section}\input ward }
}
\stoptext

···8

Anything wrong with this code? Any suggestions on how to get both
the page header and grid snapping around headings?
(‘\placeongrid’ shows the same behaviour.) Thanks for any help,


Philipp

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpIu87vXcWhE.pgp
Description: PGP 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] hyphenated url

2010-10-27 Thread Steffen Wolfrum

Am 26.10.2010 um 00:49 schrieb Philipp Gesang:

 On 2010-10-25 17:00:39, Aditya Mahajan wrote:
 On Mon, 25 Oct 2010, Steffen Wolfrum wrote:
 
 
 Am 25.10.2010 um 19:30 schrieb Aditya Mahajan:
 
 On Mon, 25 Oct 2010, Steffen Wolfrum wrote:
 
 Hi,
 
 the % is a frequently used character in URL.
 But \hyphenatedurl{} can deal with it ...
 
 Does someone has a fix?
 
 
 \starttext
 text\footnote{test \hyphenatedurl{www.test%it.com} test.} text.
 \stoptext
 
 An extreme solution:
 
 \startcatcodetable \txtcatcodes
  \catcode`\^^I = 10
  \catcode`\^^M =  5
  \catcode`\^^L =  5
  \catcode`\= 10
  \catcode`\^^Z =  9
  \catcode`\\   =  0
  \catcode`\{   =  1
  \catcode`\}   =  2
 %   \catcode`\%   = 14
 \stopcatcodetable
 \starttext
 \asciimode
 text\footnote{test \hyphenatedurl{www.test%it.com} test.} text.
 \stoptext
 
 
 
 As I don't have any experience with \asciimode I am not sure if I can 
 map this entirely on a complex book project...
 
 In addition to usual asciimode, I changed the definition so that %
 does not have its usual meaning. So, % is no longer a comment; it
 just typesets percentage sign. You can get a comment using
 
 \starthiding ... \stophiding.
 
 Any known side-effects?
 
 * You need to use \math{...} to go into math mode. $ will just give
 a dollar.
 
 * You need \startformula ... \stopformula to go into display math.
 $$...$$ will just print dollars.
 
 * _ in text mode will produce an underscore instead of an error. _
 in math mode will work fine. The same for ^.
 
 * You need
 
 \starttex(something) (I don't remember on the top of my head)
 \def\whatever#1{...}
 \stoptex(something)
 
 to change the definition of a macro.
 
 I have never really tested it on a large document. Maybe you can
 just add this and see if everything compiles.
 
 Hi Aditya, Steffen and others,
 
 I was toying around with catcode tables too. Shouldn’t it suffice
 to simply change % to ‘other’? This way you can keep the dollar
 style math.
 
 Philipp
 
 ···8
 
 \setupinteraction[state=start]
 
 \unprotect
 \newcatcodetable \urlcatcodes % ordinary \ctxcatcodes except for minor changes
 \startcatcodetable \urlcatcodes
\catcode`\^^I = 10
\catcode`\^^M =  5
\catcode`\^^L =  5
\catcode`\= 10
\catcode`\^^Z =  9
\catcode`\\   =  0
\catcode`\{   =  1
\catcode`\}   =  2
\catcode`\$   =  3
\catcode`\   =  4
\catcode`\#   =  6
\catcode`\^   =  7
\catcode`\_   =  8
\catcode`\~   = 13
\catcode`\|   = 13
\catcode`\%   = \@@other
\catcode`\*   = \@@comment % comment this out if you don’t need line 
 comments
 \stopcatcodetable
 
 \protect
 
 \starttext
 
 \bgroup
  TEST
  \setcatcodetable \urlcatcodes
  \hyphenatedurl{www.test%it.com}
  * this should be treated as comment
  \footnote{
\hyphenatedurl{www.test%it.com}
  }
  Math mode: $(x)(y)\,(Fx\,.\,x=y\,.\supset\,Fy)$
  TEST
 \egroup
 
 \stoptext
 
 ···8



Hi Hans and other catcode wizards,

isn't there a way to make this kind of catcode trickery only be available 
*inside* \hyphenatedurl{} environment?

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
___


[NTG-context] manipulate ttf-fonts loaded with luatex

2010-10-27 Thread Ulrike Fischer
Hello,

I'm currently a bit playing around with the idea to add some support 
in the (LaTeX) package chessfss (which handle chess fonts) for
fonts loaded with the luaotfload package. As luaotfload use the
context code to load the font I'm hoping that someone here can help
me with some of my problems.

Chess fonts are highly unstandard. The different authors of the
fonts did put the chars quite randomly in the character table and
also used various glyphs name. So in the psfonts.map almost every 
font has its own encoding vector:

chess-pirat-lsf ChessFigurinePirat  ChessPiratFigEncoding
ReEncodeFont  chess-pirat-fig.enc chess-pirat-fig-raw.pfb

So to be able to use ttf/otf-fonts directly I must reorder the 
glyphs in the fonts (without changing the original fonts).   

As a first step I was able to substitute glyphs with a .fea-file:

feature renc {
  substitute K by glyph name of king;
 } renc;
 
But doesn't work all the time. E.g. the pirat font
(http://www.enpassant.dk/chess/downl/pirat.zip) 
shows already some on the problems of the project: The king with the
glyph name c140 is shown in fontforge on position 140 with a å
above. The å is shown on position 229 with an Å. luaotfload seems
to think that there are two aring and so the temp-lua-file of the
font contains in the unicodes table the enrty c140={ 229, 140 }
and my substituation rule gets me an å instead of the King I want.

I get the correct substituation if I manually change the entry
c140={ 229, 140 } to c140=140. 

So here the questions:

1. How can I make this change after the font has been defined? I
tried to find table entries which do contain this setting and change
them, but without luck. So either I didn't find the right table or I
need to execute some reload funktion. 

2. Is there another way to reorder the font than using .fea-files?
E.g. by changing some font entries? 

3. I can print the king by using its position with \char140. But how
can I print the king in a document by using its glyph name (c140)? 

4. Quite a lot chess fonts are incomplete. Is is possible to insert
glyphs from other fonts?



Btw:
The font Alfonso (http://www.enpassant.dk/chess/downl/alfonso.zip)
gives an error message. Probably the font is faulty somehow (I
wouldn't be surprised) but perhaps it also indicates a hidden bug,
so I'm mentioning it:

\documentclass{article}

\usepackage{luaotfload}

\begin{document}
\font\test={name:Chess Alfonso-X}
\test \fbox{K}
\end{document}

! LuaTeX error 
J:/MiKTeX2.9/tex/luatex/luaotfload/otfl-font-otn.lua:2398: table
 index is nil.
to be read again 
   \test 


-- 
Ulrike Fischer 

___
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] line correction and section marking

2010-10-27 Thread Wolfgang Schuster

Am 27.10.2010 um 12:05 schrieb Philipp Gesang:

 Hi all,
 
 
 line corrected headings seem to lose their marking.

Headers have a grid key, use this and not linecorrection, e.g.

\setuphead[chapter][grid=line]

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] hyphenated url

2010-10-27 Thread Wolfgang Schuster

Am 27.10.2010 um 12:35 schrieb Steffen Wolfrum:

 Hi Hans and other catcode wizards,
 
 isn't there a way to make this kind of catcode trickery only be available 
 *inside* \hyphenatedurl{} environment?

It’s useless in this case because the „%“ is read from the footnote before 
\hyphenatedurl can see it and any local catcode changes have therefore no 
effect.

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] ConText, TikZ and definecolor: undefined control sequence

2010-10-27 Thread Cedric Mauclair
Hi,

Same problem here with the latest TikZ 2.10.

Regards.

-- Cédric



On Tue, Oct 26, 2010 at 12:20, Michael Murphy michael.mur...@uni-ulm.de wrote:
 Hi,

 I've been trying to get colors to work in TikZ, and found a nice fix by
 Aditya here:

 http://archive.contextgarden.net/message/20100120.220124.f2d3f8bc.en.html

 The problem is that the lua script doesn't work: I get a problem with
 'colors'.

 LuaTeX error main ctx instance:13: attempt to index global 'colors' (a
 nil value)
 stack traceback:
        main ctx instance:13: in function 'registercolor'
        main ctx instance:1: in main chunk.

 The input file from Aditya (called colorfix.tex) is

 \startluacode
  pgfutil = pgfutil or { }
  local texsprint, format = tex.sprint, string.format
  local prtcatcodes = tex.prtcatcodes

  function pgfutil.unsupported_color(name)
    texsprint(prtcatcodes,format(\\PackageError{pgf}{color %s has
 unsupported model}{}, name))
    texsprint(prtcatcodes,format(\\pgfu...@definecolor{%s}{gray}{0},
 name))
  end

  function pgfutil.registercolor(name, attributes)
    print(name, attributes)
    local cv = colors.value(attributes)
    if cv then
      local model = cv[1]
      if model == 1 then
        print(model=1)
        texsprint(prtcatcodes,format(\\pgfu...@definecolor{%s}{gray}{%
 1.3f}, name, cv[2]))
      elseif model == 3 then
        print(model=2)
        texsprint(prtcatcodes,format(\\pgfu...@definecolor{%s}{rgb}{%
 1.3f,%1.3f,%1.3f}, name, cv[3], cv[4], cv[5]))
      else
        print(no model)
        pgfutil.unsupported_color(name)
      end
    else
        print(no color)
        pgfutil.unsupported_color(name)
    end
  end
 \stopluacode

 \unprotect
 \def\pgfu...@registercolor#1%
  {\ctxlua{pgfutil.registercolor(#1,\thecolorattribute       {#1})}}
 \protect

 and my test file is

 \usemodule[tikz]
 \input colorfix

 \definecolor[mycolor][r=1,g=0,b=1]

 \starttext
 \starttikzpicture
 \fill[mycolor] (0,0) circle (1);
 \stoptikzpicture
 \stoptext

 I'm running the latest beta.

 ___
 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] Using fourier-GUT as math font

2010-10-27 Thread nitralime

I have made a mistake in my typescript. Here is the corrected version:

%%
.
\starttypescript [math] [fourier][texnansi]
\definefontsynonym [Fourier-Math-Letters]
[name:fouriermathletters]
\definefontsynonym [Fourier-Math-Letters-Italic] 
[name:fouriermathlettersitalic]
\definefontsynonym [Fourier-Math-Letters-Bold]   
[name:fouriermathlettersbold]
\definefontsynonym [Fourier-Math-Letters-BoldItalic] 
[name:fouriermathlettersbolditalic]
\definefontsynonym [Fourier-Math-Blackboard] 
[name:fouriermathblackboard]
\definefontsynonym [Fourier-Math-Calligraphic]   
[name:fouriermathcal]
\definefontsynonym [Fourier-Math-Symbols]
[name:fouriermathsymbols]
\definefontsynonym [Fourier-Math-Extension]  
[name:fouriermathextension]

%---

\definefontsynonym [Euler-Fraktur]   [name:eufm10]
\definefontsynonym [Euler-Fraktur-Bold]  [name:eufb10]

%---

\stoptypescript
.
%%

However, this correction has not affected the final result. The same 
problem as before:-(


Regards
Nik

On 10/27/2010 10:29 AM, Mikael P. Sundqvist wrote:

On Tue, Oct 26, 2010 at 6:00 PM, Nitralimenitral...@googlemail.com  wrote:

Hi folks!

I'm new to ConTeXt and right now playing around with its minimal
distribution (MkIV).
Trying to tinker with my very first typescript I have downloaded the ZIP
archive
of fourier-GUT fonts from CTAN and extracted the afm and pfb files into a
new
directory on the OSFONTDIR path and updated the ConTeXt font cache.
Looking at the typescript definition of fourier in type-one.mkii
and using the other samples on ConTeXt wiki pages I produced the following
typescript:



%%== Serif Fonts
===

\starttypescript [serif] [baskerville]
 \definefontsynonym [Baskerville-Regular]
[name:baskerville]   [features=default]
 \definefontsynonym [Baskerville-Bold]
[name:baskervillebold]   [features=default]
 \definefontsynonym [Baskerville-Italic]
[name:baskervilleitalic] [features=default]
 \definefontsynonym [Baskerville-BoldItalic]
[name:baskervillebolditalic] [features=default]
 \definefontsynonym [Baskerville-Semibold]
[name:baskervillesemibold]   [features=default]
 \definefontsynonym [Baskerville-SemiboldItalic]
[name:baskervillesemibolditalic] [features=default]
\stoptypescript

\starttypescript [serif] [baskerville] [name]
 \usetypescript [serif][fallback]
 \definefontsynonym [Serif]   [Baskerville-Regular]
[features=default]
 \definefontsynonym [SerifItalic] [Baskerville-Italic]
[features=default]
 \definefontsynonym [SerifBold]   [Baskerville-Bold]
[features=default]
 \definefontsynonym [SerifBoldItalic] [Baskerville-BoldItalic]
[features=default]
 \definefontsynonym [SerifSemibold]   [Baskerville-Semibold]
[features=default]
 \definefontsynonym [SerifSemiboldItalic] [Baskerville-SemiboldItalic]
[features=default]
\stoptypescript

%%== Sans Serif Fonts
==

\starttypescript [sans] [gillsans]
 \definefontsynonym [GillSans-Regular]  [name:gillsans]
[features=default]
 \definefontsynonym [GillSans-Bold] [name:gillsansbold]
[features=default]
 \definefontsynonym [GillSans-Italic]   [name:gillsansitalic]
[features=default]
 \definefontsynonym [GillSans-BoldItalic]   [name:gillsansbolditalic]
[features=default]
 \definefontsynonym [GillSans-Light][name:gillsanslight]
[features=default]
 \definefontsynonym [GillSans-LightdItalic] [name:gillsanslightitalic]
[features=default]
\stoptypescript

\starttypescript [sans] [gillsans] [name]
 \usetypescript [sans][fallback]
 \definefontsynonym [Sans]   [GillSans-Regular]
[features=default]
 \definefontsynonym [SansItalic] [GillSans-Italic]
[features=default]
 \definefontsynonym [SansBold]   [GillSans-Bold]
[features=default]
 \definefontsynonym [SansBoldItalic] [GillSans-BoldItalic]
[features=default]
 \definefontsynonym [SansLight]  [GillSans-Light]
[features=default]
 \definefontsynonym [SansLightItalic][GillSans-LightItalic]
[features=default]
\stoptypescript

%%== Mono Type Fonts
===

\starttypescript [mono] [consolas]
 \definefontsynonym [Consolas-Regular]  [name:consolas]
[features=default]
 \definefontsynonym [Consolas-Bold] [name:consolasbold]
[features=default]
 

Re: [NTG-context] hyphenated url

2010-10-27 Thread Aditya Mahajan

On Wed, 27 Oct 2010, Peter Münster wrote:


On Wed, Oct 27 2010, Peter Münster wrote:


Yes. But if I understand TeX right, then there will be only 2 possibilities:

1.)
\footnote{bla
\starthyphenatedurl
www.%.com
\stophyphenatedurl
bla bla}


Ok, I must be wrong, because this does not work neither:

\starttext
bla
\footnote{
 bla
 \starttyping
   bla%bla
 \stoptyping
 bla
}
\stoptext


That has to do with the definition of typing: 
http://tracker.luatex.org/view.php?id=505


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] manipulate ttf-fonts loaded with luatex

2010-10-27 Thread Aditya Mahajan

On Wed, 27 Oct 2010, Ulrike Fischer wrote:


Hello,

I'm currently a bit playing around with the idea to add some support
in the (LaTeX) package chessfss (which handle chess fonts) for
fonts loaded with the luaotfload package. As luaotfload use the
context code to load the font I'm hoping that someone here can help
me with some of my problems.

Chess fonts are highly unstandard. The different authors of the
fonts did put the chars quite randomly in the character table and
also used various glyphs name. So in the psfonts.map almost every
font has its own encoding vector:


What is the unicode support for chess fonts. Are there unicode glyphs for 
each symbol (just like card suits, I guess)?


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] hyphenated url

2010-10-27 Thread Peter Münster
On Wed, Oct 27 2010, Aditya Mahajan wrote:

 That has to do with the definition of typing:
 http://tracker.luatex.org/view.php?id=505

Ah, that means, that buffers can solve the problem:

\starttext
\startbuffer
  \starttyping
bla%bla
  \stoptyping
\stopbuffer
bla\footnote{
  bla
  \getbuffer
  bla
}

\startbuffer
  bla%bla
\stopbuffer
bla\footnote{
  bla
  \typebuffer
  bla
}

\startbuffer
\type{bla%bla}
\stopbuffer
bla\footnote{bla\getbuffer bla}
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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

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


Re: [NTG-context] manipulate ttf-fonts loaded with luatex

2010-10-27 Thread Ulrike Fischer
Am Wed, 27 Oct 2010 14:35:46 -0400 (EDT) schrieb Aditya Mahajan:

 On Wed, 27 Oct 2010, Ulrike Fischer wrote:
 
 Hello,

 I'm currently a bit playing around with the idea to add some support
 in the (LaTeX) package chessfss (which handle chess fonts) for
 fonts loaded with the luaotfload package. As luaotfload use the
 context code to load the font I'm hoping that someone here can help
 me with some of my problems.

 Chess fonts are highly unstandard. The different authors of the
 fonts did put the chars quite randomly in the character table and
 also used various glyphs name. So in the psfonts.map almost every
 font has its own encoding vector:
 
 What is the unicode support for chess fonts. Are there unicode glyphs for 
 each symbol (just like card suits, I guess)?

There are unicode code points only for a part of the symbols. 

-- 
Ulrike Fischer 

___
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] ConText, TikZ and definecolor: undefined control sequence

2010-10-27 Thread Michael Murphy

On 27/10/2010 19:18, Marius wrote:

Hello,
I had the same problem, so I desided to define colors by hand.

\definecolor [lightgray] [h=D3D3D3]

\usemodule[tikz]

\unprotect
\pgfu...@definecolor{black}{gray}{0}
\pgfu...@definecolor{gray}{gray}{0.5}
\pgfu...@definecolor{lightgray}{gray}{0.9}
\pgfu...@definecolor{white}{gray}{1}
\protect


Yes, this is what I've resorted to. But it would be nice to define 
things properly.



If you want to fix script, you need to change line:

local cv = colors.value(attributes)

into

local cv = attributes.colors.values

Just guess, untested.


Nope, doesn't work. Using

local colors = colors or { }

gets me a little further, but then complains that 'value' is a nil 
value. I don't know enough Lua to fix this either. Strangely, it seems 
to work on some older MkIV versions of ConTeXt...


Michael.
___
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] hyphenated url

2010-10-27 Thread Steffen Wolfrum

Hi,

I tried an other approach: \useURL

But here the letterpercent trick doesn't work at all ... ie. there is no 
clickable link at all anymore!


\setupinteraction
   [state=start]

\showframe

\starttext

\useURL[aurl]   [http://www.kommers.se/upload/Analysarkiv/In\letterpercent 
English/Analyses/Woolcock\letterpercent paper\letterpercent on\letterpercent 
impact\letterpercent of\letterpercent Lisbontreaty\letterpercent 
on\letterpercent tradepolicy.pdf] [] 
[http://www.kommers.se/upload/Analysarkiv/In\letterpercent 
English/Analyses/Woolcock\letterpercent paper\letterpercent on\letterpercent 
impact\letterpercent of\letterpercent Lisbontreaty\letterpercent 
on\letterpercent tradepolicy.pdf] 

test \from[aurl] text
\stoptext




Steffen






Am 25.10.2010 um 15:12 schrieb Philipp Gesang:

 On 2010-10-25 12:45:17, Steffen Wolfrum wrote:
 
 Am 25.10.2010 um 12:26 schrieb Philipp Gesang:
 \unexpanded\gdef\hyphenatedurl
 
 Should work in footnotes. Regards, Philipp
 
 
 No, it doesn't (see below).
 Do you have an other idea?
 
 Right; it works in footnotes but doesn’t accomplish what you
 want. Sorry, I tried a lot but ‘\letterpercent’ is the only
 way it works for me.
 
 Concerning the urlencoding I referred to browsers automatically
 converting raw urls, like for instance
 
  http://www.google.com/search?q=ähre
 
 , which is encoded as
 
  http://www.google.com/search?q=%C3%A4hre
 
 by my browser. As long as your urls mainly consist of unicode
 strings you might not need the actual (ascii) percent sign.  In
 this case you could be fine simply by converting strings like
 ‘%C3%A4hre’ to ‘Ähre’, rendering urls percent-less, and rely on
 the browsers to re-encode them on the fly. Might be a bit far
 fetched, though.
 
 Philipp
 
 
 
 Thanks, Steffen
 (ConTeXt  ver: 2010.10.21)
 
 
 Runaway argument?
 {test \hyphenatedurl {www.test\par \stoptext \par 
 ! File ended while scanning use of \@@notemakedescription.
 
 system   error on line 0 in file : File ended while scanning use of 
 \@@notemakedescription ...
 
 
 \let\normalhyphenatedurl\hyphenatedurl
 
 \bgroup
 
 \catcode`\%=11
 
 \unexpanded\gdef\hyphenatedurl
 {\bgroup
  \catcode`\%=11
  \expandafter\egroup
  \normalhyphenatedurl}
 
 \egroup
 
 \setupinteraction
   [state=start]
 
 \starttext
 
 text\footnote{test \hyphenatedurl{www.test%it.com} test.} text.
 
 \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
 ___

___
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] 2SIDE-arranging + doublesided

2010-10-27 Thread Willi Egger
Hi Andreas,

[2SIDE] is an impositioning scheme for singlesided printing only. You can not 
make a booklet from this. This scheme is intended for e.g. handouts from a 
screenpresentation. The same applies for [2TOP]

If you want to prepare a booklet you might use [2UP] or [2DOWN]. These two 
schemes are for double sided printing.

When playing with impositioning it is a good idea to add pagenumbers, so you 
can see what happens.

e.g.
\starttext
\strut\page 
\dorecurse{5}{test~\pagenumber\page}
\stoptext

Willi
On 21 Oct 2010, at 18:05, Andreas Harder wrote:

 Hi all,
 
 please have a look at my example.
 
 \setuppapersize[A5][A4,landscape]
 \setuplayout[location=middle]
 \setuppagenumbering[alternative=doublesided]
 \setuparranging[2SIDE]
 \defineoverlay[right][{\scale[width=\textwidth]{right page}}]
 \defineoverlay[left] [{\scale[width=\textwidth]{left  page}}]
 \setupbackgrounds[rightpage][background=right]
 \setupbackgrounds[leftpage] [background=left]
 
 \starttext \showframe[text]
 \dorecurse{5}{test\page}
 \stoptext
 
 Is there a way to push the right pages on the right and the left on the left? 
 I tried to add a blank page at the beginning but then also a second page is 
 added and the problem remains.
 
 I appreciate any help
 
   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
 ___

___
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] hyphenated url

2010-10-27 Thread Peter Münster
On Mon, Oct 25 2010, Steffen Wolfrum wrote:
 
 http://www.cirp.ru/conferences/new%20neighborhood%20policy/publications/frellesen%20paper.doc
 
 There is no way to typeset this in ConTeXt MkIV???

No problem here:

\setupinteraction[state=start]
\starttext
No hexa-code after percent, so Acroread transforms \% to
\%25\footnote{\hyphenatedurl{www.test.com/\letterpercent/test}}

ok\footnote{\hyphenatedurl{www.test.com/\letterpercent24/test}}

ok\footnote{\hyphenatedurl{http://www.cirp.ru/conferences/new\letterpercent
20neighborhood\letterpercent20policy/publications/frellesen\letterpercent
20paper.doc}}

Does not work, perhaps bug in
\ConTeXt\footnote{\hyphenatedurl{http://www.cirp.ru/conferences/new
neighborhood policy/publications/frellesen paper.doc}}
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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

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


Re: [NTG-context] manipulate ttf-fonts loaded with luatex

2010-10-27 Thread Aditya Mahajan

On Wed, 27 Oct 2010, Ulrike Fischer wrote:


Am Wed, 27 Oct 2010 14:35:46 -0400 (EDT) schrieb Aditya Mahajan:


On Wed, 27 Oct 2010, Ulrike Fischer wrote:


Hello,

I'm currently a bit playing around with the idea to add some support
in the (LaTeX) package chessfss (which handle chess fonts) for
fonts loaded with the luaotfload package. As luaotfload use the
context code to load the font I'm hoping that someone here can help
me with some of my problems.

Chess fonts are highly unstandard. The different authors of the
fonts did put the chars quite randomly in the character table and
also used various glyphs name. So in the psfonts.map almost every
font has its own encoding vector:


What is the unicode support for chess fonts. Are there unicode glyphs for
each symbol (just like card suits, I guess)?


There are unicode code points only for a part of the symbols.


I checked the unicode list. The codepoints 0x2654 to 0x365F cover all the 
chess pieces. All the fonts in enpassent.dk and chessfss_gallery.pdf show 
only these symbols. So what is missing? I am guessing that the problem is 
not as simple as just mapping a font glyph to the corresponding unicode 
codepoint.


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] 2SIDE-arranging + doublesided

2010-10-27 Thread Andreas Harder
Hi Willi,

thanks for your reply. But I had no booklet in mind. I prepared a proceeding 
which will be published (DIN A5 format). In addition I would like to provide a 
print version with two A5-sites on a A4 site. So [2SIDE] suits my needs pretty 
well, except the problem with lefft/right. I thought there might be a trick …

Regards
Andreas

Am 27.10.2010 um 23:09 schrieb Willi Egger:

 Hi Andreas,
 
 [2SIDE] is an impositioning scheme for singlesided printing only. You can not 
 make a booklet from this. This scheme is intended for e.g. handouts from a 
 screenpresentation. The same applies for [2TOP]
 
 If you want to prepare a booklet you might use [2UP] or [2DOWN]. These two 
 schemes are for double sided printing.
 
 When playing with impositioning it is a good idea to add pagenumbers, so you 
 can see what happens.
 
 e.g.
 \starttext
 \strut\page 
 \dorecurse{5}{test~\pagenumber\page}
 \stoptext
 
 Willi
 On 21 Oct 2010, at 18:05, Andreas Harder wrote:
 
 Hi all,
 
 please have a look at my example.
 
 \setuppapersize[A5][A4,landscape]
 \setuplayout[location=middle]
 \setuppagenumbering[alternative=doublesided]
 \setuparranging[2SIDE]
 \defineoverlay[right][{\scale[width=\textwidth]{right page}}]
 \defineoverlay[left] [{\scale[width=\textwidth]{left  page}}]
 \setupbackgrounds[rightpage][background=right]
 \setupbackgrounds[leftpage] [background=left]
 
 \starttext \showframe[text]
 \dorecurse{5}{test\page}
 \stoptext
 
 Is there a way to push the right pages on the right and the left on the 
 left? I tried to add a blank page at the beginning but then also a second 
 page is added and the problem remains.
 
 I appreciate any help
 
  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
 ___
 
 ___
 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] hyphenated url

2010-10-27 Thread Philipp Gesang
On 2010-10-27 22:28:56, Steffen Wolfrum wrote:
 
 Hi,
 
 I tried an other approach: \useURL
 
 But here the letterpercent trick doesn't work at all ... ie.
 there is no clickable link at all anymore!

Hi Steffen,

if you consider an environment-style version of ‘\useURL’
appropriate, you could hack your way through like this:

···8

\setupinteraction[state=start]

\unprotect
\newcatcodetable \urlcatcodes
\startcatcodetable \urlcatcodes
\catcode`\^^I = 10
\catcode`\^^M =  5
\catcode`\^^L =  5
\catcode`\= 10
\catcode`\^^Z =  9
\catcode`\\   =  0
\catcode`\{   =  1
\catcode`\}   =  2
\catcode`\$   = \@@other
\catcode`\   = \@@other
\catcode`\#   = \@@other
\catcode`\^   = \@@other
\catcode`\_   = \@@other
\catcode`\~   = \@@other
\catcode`\|   = \@@other
\catcode`\%   = \@@other
\catcode`\*   = \@@other
\stopcatcodetable

\startluacode
function structures.references.urls.get(name,method,space)
local u = structures.references.urls.data[name]
if u then 
local url, file = u[1], u[2] 
if file and file ~=  then 
context(%s/%s,url,file)
else 
context.pushcatcodes(vrb)
context(url)
context.popcatcodes()
end  
end  
end

\stopluacode

\def\startuseURL{%
  \bgroup%
  \catcodetable \urlcatcodes
  \dodoubleempty\dostartuseURL%
}

\let\stopuseURL\relax

\def\dostartuseURL[#1][#2]#3\stopuseURL{
  \egroup
  
\ctxlua{structures.references.urls.define(#1,string.strip(\!!bs\detokenize{#3}\!!es),,\!!bs\detokenize{#2}\!!es)}
}

% Usage example here:

\startuseURL[anotherurl][urldescription]
http://test%it.example.com
\stopuseURL

\starttext

\from[anotherurl]\par
\url[anotherurl]\par

Test.\footnote{\url[anotherurl]}

\stoptext

···8

This deviates from standard ‘\useURL’ in the order of parameters:

  \startuseURL[#1][#2]
  #3
  \stopuseURL

where #1 is the id, #2 is the display text and #3 the url itself.
This eliminates the need to resort to ‘\letterpercent’ as well
and works in footnotes.

Philipp


 
 
 \setupinteraction
[state=start]
 
 \showframe
 
 \starttext
 
 \useURL[aurl]   
 [http://www.kommers.se/upload/Analysarkiv/In\letterpercent 
 English/Analyses/Woolcock\letterpercent paper\letterpercent on\letterpercent 
 impact\letterpercent of\letterpercent Lisbontreaty\letterpercent 
 on\letterpercent tradepolicy.pdf] [] 
 [http://www.kommers.se/upload/Analysarkiv/In\letterpercent 
 English/Analyses/Woolcock\letterpercent paper\letterpercent on\letterpercent 
 impact\letterpercent of\letterpercent Lisbontreaty\letterpercent 
 on\letterpercent tradepolicy.pdf] 
 
 test \from[aurl] text
 \stoptext
 
 
 
 
 Steffen
 
 
 
 
 
 
 Am 25.10.2010 um 15:12 schrieb Philipp Gesang:
 
  On 2010-10-25 12:45:17, Steffen Wolfrum wrote:
  
  Am 25.10.2010 um 12:26 schrieb Philipp Gesang:
  \unexpanded\gdef\hyphenatedurl
  
  Should work in footnotes. Regards, Philipp
  
  
  No, it doesn't (see below).
  Do you have an other idea?
  
  Right; it works in footnotes but doesn’t accomplish what you
  want. Sorry, I tried a lot but ‘\letterpercent’ is the only
  way it works for me.
  
  Concerning the urlencoding I referred to browsers automatically
  converting raw urls, like for instance
  
   http://www.google.com/search?q=ähre
  
  , which is encoded as
  
   http://www.google.com/search?q=%C3%A4hre
  
  by my browser. As long as your urls mainly consist of unicode
  strings you might not need the actual (ascii) percent sign.  In
  this case you could be fine simply by converting strings like
  ‘%C3%A4hre’ to ‘Ähre’, rendering urls percent-less, and rely on
  the browsers to re-encode them on the fly. Might be a bit far
  fetched, though.
  
  Philipp
  
  
  
  Thanks, Steffen
  (ConTeXt  ver: 2010.10.21)
  
  
  Runaway argument?
  {test \hyphenatedurl {www.test\par \stoptext \par 
  ! File ended while scanning use of \@@notemakedescription.
  
  system   error on line 0 in file : File ended while scanning use 
  of \@@notemakedescription ...
  
  
  \let\normalhyphenatedurl\hyphenatedurl
  
  \bgroup
  
  \catcode`\%=11
  
  \unexpanded\gdef\hyphenatedurl
  {\bgroup
   \catcode`\%=11
   \expandafter\egroup
   \normalhyphenatedurl}
  
  \egroup
  
  \setupinteraction
[state=start]
  
  \starttext
  
  text\footnote{test \hyphenatedurl{www.test%it.com} test.} text.
  
  \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] Referencing line numbers inside a typing

2010-10-27 Thread Stefan Müller
Am Mittwoch 27 Oktober 2010, 16:52:07 schrieb Wolfgang Schuster:
 Am 27.10.2010 um 11:34 schrieb Stefan Müller:
  Thanks Wolgang, this looks pretty nice. Unfortunately I get the following
  error when running your example (ConTeXt  ver: 2010.10.22 16:46 MKIV 
  fmt: 2010.10.27  int: english/english):
  
  references  : unknown reference [][lr:b:line:single]
  references  : unknown reference [][lr:b:line:range]
  
  Any ideas?
 
 Works for me with the same context version.
 
 Do you use 'texexec' or 'context' to process the file?
 
 Wolfgang

My mistake. I forgot \stoptext. It seems kind of inconvenient that I get such 
a misleading error message.

I added some stuff regarding this thread to the wiki.

http://wiki.contextgarden.net/Verbatim_text#Referencing_line_numbers
http://wiki.contextgarden.net/Reference/en/inline
http://wiki.contextgarden.net/Reference/en/someline
http://wiki.contextgarden.net/Reference/en/startline
http://wiki.contextgarden.net/Reference/en/inlinerange

I hope that helps others.

Best wishes,
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
___