Re: [NTG-context] typesetting a url from variabless

2006-10-26 Thread Hans Hagen
Aditya Mahajan wrote:
 On Tue, 24 Oct 2006, Wolfgang Schuster wrote:

   
 2006/10/24, Aditya Mahajan [EMAIL PROTECTED]:
 
 Hi,
 What is the best way of typesetting a url from a variable. For
 example, if I have

 \setvariables[test][website=http://www.xyz.com/~abc/first_index.html]

 how can I print the url. I tried

 \starttext
 \goto{\getvariable{test}{website}}[URL(\getvariable{test}{website})]
 \stoptext

 but this does not seem to work. Any suggestions?

 Aditya
   
 Hi Aditya,

 you should look into the log-file and will see it is a problem with the
 tilde
 in the url.
 

 I know that the tilde is causing problems, but I do not know how to 
 prevent that.

   

\expanded{\setvariables[test][website=http://www.xyz.com/\string~abc/first_index.html]}

   

 \starttext
 \goto{\getvariable{garden}{website}}[URL(\getvariable{garden}{website})]
 \stoptext
 

\expanded{\goto{\getvariable{garden}{website}}[URL(\getvariable{garden}{website})]}

-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Directories of pictures

2006-10-26 Thread Hans Hagen
Sanjoy Mahajan wrote:
Note that ./png-images seems to look for 
 current_shell_directory/png-images.

  
   
 what is tex_file_directory? 
 

 I'm guessing the directory in which the tex source file lives, what
 I often wished TeX used as its search path for relative paths -- the
 way some (all?) C compilers will when looking for include files.
   
it depends on your texinputs variable: 

\setupexternalfigures[location={local,global,default}]

here, default will eventually fall back to tex's input path search 

\externalfigure[tmp/cow.pdf]

but, there need to be a tmp path relative to one of the paths that make up 
texinputs; in context mkiv we can use more clever methods because there we will 
have more control over finding and opening files; for now, we depend on what 
tex and kpse/web2c provide 

Hans 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] register fine tuning

2006-10-26 Thread Steffen Wolfrum
Sorry, same problem here as with your other posting:
How should I use this hack?

Given that I have a source TEX document (providing the \index{Keyword  
and the \placeregister{index}} and those TUI and TOU files.
Where should I store the line below in order to manipulate (filter?)  
the TUO?

Do I have to start a new file with a kind of \input command?


Steffen



Am 25.10.2006 um 22:45 schrieb Hans Hagen:

 Steffen Wolfrum wrote:
 Hi,

 I am not sure how a ConTeXt index register is generated and what role
 the tui and tuo files play.
 But could it be possible to manually fine tune the generated  
 register?

 Something like from ...

 Keywords
 -- secret  35
 -- popular  25, 26, 27, 88, 89

  to ...

 Keywords see also Commands
 -- secret  35
 -- popular  25-27, 88-89


  just by typing the changes in one of those helper files?


 it should not be to hard to filter the entries from a tuo into  
 another file and use that one: dirty hack:

 \bgroup\def\jobname{copyof}\placeregister\egroup

 if needed i can provide a \setupregister[file=copyof] feature ;

 in mkiv there will be more control because we may move index  
 handling in mem

 Hans

 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -

 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] register fine tuning

2006-10-26 Thread Hans Hagen
Steffen Wolfrum wrote:
 Sorry, same problem here as with your other posting:
 How should I use this hack?

 Given that I have a source TEX document (providing the \index{Keyword  
 and the \placeregister{index}} and those TUI and TOU files.
 Where should I store the line below in order to manipulate (filter?)  
 the TUO?

 Do I have to start a new file with a kind of \input command?


 Steffen



 Am 25.10.2006 um 22:45 schrieb Hans Hagen:

   
 Steffen Wolfrum wrote:
 
 Hi,

 I am not sure how a ConTeXt index register is generated and what role
 the tui and tuo files play.
 But could it be possible to manually fine tune the generated  
 register?

 Something like from ...

 Keywords
 -- secret  35
 -- popular  25, 26, 27, 88, 89

  to ...

 Keywords see also Commands
 -- secret  35
 -- popular  25-27, 88-89


  just by typing the changes in one of those helper files?


   
 it should not be to hard to filter the entries from a tuo into  
 another file and use that one: dirty hack:

 \bgroup\def\jobname{copyof}\placeregister\egroup

 if needed i can provide a \setupregister[file=copyof] feature ;
 
hm, you really want to do that now? 

i'll make a beta that can do: 


\placeregister[index]

\placeregister[index][file=testtest]

so, you can copy test.tuo to testtest.tuo and them edit testtest.tuo to suit 
your needs

of course, you need to keep in mind that it is possible to edit testtest.tuo to 
the extend that it starts influencing pagenumbers and such 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] register fine tuning

2006-10-26 Thread Thomas A. Schmitz

On Oct 25, 2006, at 10:45 PM, Hans Hagen wrote:

 in mkiv there will be more control because we may move index  
 handling in mem

 Hans


OK, since we're speaking of registers, may I repeat my question from  
last weekend and add something that could be a bug? First, here's the  
question:

I have defined a special index which will typeset numbers in bold:

\setupregister[index][imp][pagestyle=bold]

which I invoke like

\index[imp::]{modernity}

How can I get a register range to use this special style?  I tried
something like

\startregister[imp][signi][signifie]{\em signifié}

but get errors missing csname. What am i overlooking?


And then the bug: I want a \seeindex entry to be typeset in italics,  
but there seems to be a problem; I get this error message:

Runaway argument?
{\noexpand \gdef \noexpand \dosplitofffoliopart [1 
\sectionseparator \ETC.
! File ended while scanning use of \aftersplitstring.
inserted text
 \par
to be read again
\relax
\dodoreadfile ...\preprocesssuffix \or \fi \relax
   \the  
\everyafterreadfile
\emphasislook ...beginrobusttest \futurelet \next
   \emphasistest
\doifelsenothing #1-\edef \!!stringa {#1
  }\ifx \!!stringa \empty  
\expandafte...

\dolimitatetext #1#2-\doifelsenothing {#1}
 {\unhbox \nextbox }  
{\nopenaltie...
...
l.40 \registersee{index}{,}{two}{2--0-0-0-0-0-0-0}

! Missing number, treated as zero.
to be read again
\begingroup
\emphasislook -\begingroup
 \beginrobusttest \futurelet \next  
\emphasistest
argument ...s \scratchdimen \emphasiscorrection
   \relax \ifdim  
\scratchdime...

\secondoftwoarguments #1#2-#2

\dolimitatetext ...fi \else \unhbox \nextbox \fi }
   \egroup
\limitatetext ...ormallimitatetext {#1}\leftlimit
   {#3}\else  
\speciallimitate...
...
l.40 \registersee{index}{,}{two}{2--0-0-0-0-0-0-0}

! Illegal unit of measure (pt inserted).
to be read again
\begingroup
\emphasislook -\begingroup
 \beginrobusttest \futurelet \next  
\emphasistest
argument ...s \scratchdimen \emphasiscorrection
   \relax \ifdim  
\scratchdime...

\secondoftwoarguments #1#2-#2

\dolimitatetext ...fi \else \unhbox \nextbox \fi }
   \egroup
\limitatetext ...ormallimitatetext {#1}\leftlimit
   {#3}\else  
\speciallimitate...
...
l.40 \registersee{index}{,}{two}{2--0-0-0-0-0-0-0}

)

minimal test file:

\starttext

one\seeindex[one]{\em one}{two} \seeindex[Latex]{\LaTeX}{one}\LaTeX\  
\index{two}two

\page

\placeregister[index]

\stoptext

Thanks for any help!

Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] register fine tuning

2006-10-26 Thread Steffen Wolfrum

Am 26.10.2006 um 10:32 schrieb Hans Hagen:

 hm, you really want to do that now?



Yes, please: the printing house is wating for the book today...


 i'll make a beta that can do:


 \placeregister[index]

 \placeregister[index][file=testtest]

 so, you can copy test.tuo to testtest.tuo and them edit  
 testtest.tuo to suit your needs


Great, that sound very usably!

Steffen


 of course, you need to keep in mind that it is possible to edit  
 testtest.tuo to the extend that it starts influencing pagenumbers  
 and such


 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -

 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] url compared to hyperref

2006-10-26 Thread Sanjoy Mahajan
Your demimed ConTeXt source:

==
\starttext
\useURL[imara-web-page][http://imara.csail.mit.edu][http://imara.csail.mit.edu]
An interesting project can be found at \url[imara-web-page].
\stoptext
==

(by the way, I find it easiest if example tex code is placed inline in
a message, unless it needs attaching due to strange character codes or
whitespace issues, in which case quoted-printable encoding makes it
easier to scan than base64 encoding does.)

From an earlier message in this thread:

  Here is an example that I put on the wiki (because I kept forgetting
  how to do it and wanted one place to find it again, but I never can
  find it quickly there anyway, so now it's in the list archives at
  least):

  \setupcolors[state=start]
  \setupinteraction[state=start,color=middlered]
  \useURL [garden][http://contextgarden.net][][Context garden]
  \starttext
  The \from[garden] is useful.
  \stoptext

  I just tested it on the live context and it works fine with an active
  link in the pdf file.  But it didn't work in the 2006.10.05 beta (the
  space in the Context garden caused problems).

  Maybe your example didn't have \setupinteraction[state=start] ?

Which looks like one of the problems.  For the other, you need to
replace \url with \from, giving:

\setupinteraction[state=start]
\starttext
\useURL[imara-web-page][http://imara.csail.mit.edu][http://imara.csail.mit.edu]
An interesting project can be found at \from[imara-web-page].
\stoptext

which works fine here.  If you want colored links (green by default), add

  \setupcolors[state=start]

And to change the link color, use the color= option to \setupinteraction:

  \setupinteraction[state=start,color=middlered]

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
 --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] dashed or dotted lines in tables

2006-10-26 Thread Ricard Roca
Hi to all,

is there any way to make dashed or dotted lines in a table (instead of 
continuous) with ConTeXt?

Thanks,

Ricard Roca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] dashed or dotted lines in tables

2006-10-26 Thread Thomas A. Schmitz

On Oct 26, 2006, at 4:05 PM, Ricard Roca wrote:

 Hi to all,

 is there any way to make dashed or dotted lines in a table (instead of
 continuous) with ConTeXt?

 Thanks,

 Ricard Roca

You can draw the lines in a table by using Metapost (see the example  
in enattab.pdf, p. 9 and 10; there, you can easily have all kinds of  
dashed, dotted, and colored patterns, Does that help?

Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Roman numerals in headers

2006-10-26 Thread Jeff Smith
Hi again,

I've been searching through various docs in order to find how I can
have roman numbering with headers (namely, chapter titles), but I've
been unsuccessful. I'm sure it's possible! How does one do it?

Thank you in advance,
Jeff
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Roman numerals in headers

2006-10-26 Thread Aditya Mahajan
On Thu, 26 Oct 2006, Jeff Smith wrote:

 Hi again,

 I've been searching through various docs in order to find how I can
 have roman numbering with headers (namely, chapter titles), but I've
 been unsuccessful. I'm sure it's possible! How does one do it?


\setupsection[section-2][bodypartconversion=Romannumerals]

section-1 is parts
section-2 is chapter/title
section-3 is section

etc.

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] How to get a PhD with ConTeXt (+ hard work ;) )

2006-10-26 Thread Renaud AUBIN




Hi all,

Maybe some of yours (from the ConTeXt POV) can be interested by my PhD
dissertation and my presentation (both in french)...

http://www.nibua-r.org/ConTeXt/PhD/

The slides are made to work under linux with sh script to run mplayer
or custom simulations... These scripts will obviously not work without
the movies or my simulator binaries...


Renaud




___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] url compared to hyperref

2006-10-26 Thread Marko Schütz
Dear Sanjoy,

At Thu, 26 Oct 2006 13:07:22 +0100,
Sanjoy Mahajan wrote:
[..]
 Which looks like one of the problems.  For the other, you need to
 replace \url with \from, giving:

thank you very much: the \from did the trick!

 \setupinteraction[state=start]
 \starttext
 \useURL[imara-web-page][http://imara.csail.mit.edu][http://imara.csail.mit.edu]
 An interesting project can be found at \from[imara-web-page].
 \stoptext
 
 which works fine here.  If you want colored links (green by default), add

here too. 

Thanks,

Marko

pgpjo8cO5BXnz.pgp
Description: PGP signature
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] url compared to hyperref

2006-10-26 Thread Marko Schütz
Dear Aditya,

At Thu, 26 Oct 2006 00:03:44 -0400 (EDT),
Aditya Mahajan wrote:
 
 On Thu, 26 Oct 2006, Marko Schütz wrote:
 
  Dear Taco,
 
  At Wed, 25 Oct 2006 11:01:06 +0200,
  Taco Hoekwater wrote:
 
 
  Hi Marko,
 
  Marko Schütz wrote:
  When using hyperref and displaying the resulting PDF in xpdf, I see
  links that are active.
 
  I tried achieving the same with useURL, url and goto, but the
  resulting links aren't active in xpdf. I have to use acroread to have
  active links.
 
  Is there a compelling reason for this behavior?
 
  Quick test here works fine. Can you post a small example file?
 
  below I attach a LaTeX and a ConTeXt version. In xpdf the LaTeX
  version gives me the link that launches urlCommand, whereas the
  ConTeXt version presents the url text, but does not make it a link.
 
 Add
 
 \setupinteraction[state=start]

I tried your recommendation (see attached files), but did not obtain
the desired results.

Best regards,

Marko

 in the beginning of the file.
 
  In acroread both documents result in links, however they are 
  presented slightly different.
 
 That is because acroread tries to guess the url from the text.
 
 Aditya
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
 


test-context.tex
Description: TeX document



test-context.pdf
Description: Adobe PDF document


pgpV8lStQbOV5.pgp
Description: PGP signature
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Roman numerals in headers

2006-10-26 Thread Marcus Vinicius Mesquita de So
\setupsection[chapter][conversion=Romannumerals](you get I, II, III, IV... )or\setupsection[chapter][conversion=romannumerals](you get i, ii, iii, iv ... )MarcusJeff Smith [EMAIL PROTECTED] wrote: Hi again,I've been searching through various docs in order to find how I canhave roman numbering with headers (namely, chapter titles), but I'vebeen unsuccessful. I'm sure it's possible! How does one do it?Thank you in advance,Jeff___ntg-context mailing listntg-context@ntg.nlhttp://www.ntg.nl/mailman/listinfo/ntg-context 
		 All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Roman numerals in headers

2006-10-26 Thread Jeff Smith
On 10/26/06, Aditya Mahajan [EMAIL PROTECTED] wrote:

 section-1 is parts
 section-2 is chapter/title
 section-3 is section


Oh, God, page 146 of the manual! I must have been blind or something,
I'm truly sorry... Thanks for the reply though. :(

That being said, I now have a problem with the separator. I want to
use a different separator between chapter and section (-), and between
section and subsection (.).

So, assuming I'm using roman numerals for chapters, I'd like numering
of sections to be I-1, I-2, I-3, etc., of subsections to be I-1.1,
I-1.2, I-2.1, I-2.2, I-2.3, etc.

Now when I use \setuphead for section and subsection blocks with
different [separator=] attributes:

\setuphead[section][separator=-]
\setuphead[subsection][separator=.]

... it defines the separator for the _whole_ header level, not the
number position within any relevant header. So I get this instead:

sections are numbered I-1, I-2, I-3, etc.
subsections are numbered I.1.1, 1.1.2, I.2.1, I.2.2, I.2.3, etc.

Am I clear as to what  I'd like to do? Is there a way to do it?

Thank you in advance, as always!
Jeff
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context