Re: [NTG-context] problem with package.path

2010-05-08 Thread Taco Hoekwater

Hans Hagen wrote:

On 7-5-2010 10:52, Taco Hoekwater wrote:

Peter Münster wrote:

On Thu, May 06 2010, Hans Hagen wrote:


\startbuffer[test]
bla = nil
\stopbuffer
\savebuffer[test][../mytest.lua]
\starttext
\startluacode
package.path = ../?.lua;;
require(mytest)
\stopluacode
\stoptext

dofile ../mytest.lua


Bad example...

mytest.lua is a module, so it must be loaded with require:


You cannot always replace 'require' with 'dofile', and for
this reason it is important that package.path actually works
as explained in the lua manual. (escrito had similar problems,
and other external lua modules will run into it as well).


well, package path is supported (as is cpath) so it's more a question of 
why that paths fails .. maybe we need to explicitly assume ; instead 
of the platform separator (tests on my machine work ok as windows has ; 
as separator)


you can test this with adding an explcit ; to

libpaths = file.split_path(_path_,;)

in data-lua.lua


For me on linux, this change should make it work (package.path indeed
contains semicolons). However, require() is still broken:

! LuaTeX error /opt/tex/texmf-local/tex/context/base/l-file.lua:133: bad 
argument #1 to 'gsub' (string expected, got nil)

stack traceback:
[C]: in function 'gsub'
/opt/tex/texmf-local/tex/context/base/l-file.lua:133: in 
function 'split_path'
/opt/tex/texmf-local/tex/context/base/data-lua.lua:36: in 
function 'clibpaths'
/opt/tex/texmf-local/tex/context/base/data-lua.lua:97: in 
function /opt/tex/texmf-local/tex/context/base/data-lua.lua:79

[C]: in function 'require'
main ctx instance:2: in main chunk.
}inserted text ...equire('testmodule') -- fails

\dodostartluacode ...d \directlua \zerocount {#1}}

l.5 \stopluacode


Test files are attached. The definition of package.libpaths I used:

  function package.libpaths()
print (_path_, package.path)
if not _path_ or package.path ~= _path_ then
_path_ = package.path
libpaths = file.split_path(_path_,';')
print (table.serialize(libpaths))
end
return libpaths
  end

And it prints out:

nil 
./?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/lib/lua/5.1/?.lua;/usr/local/lib/lua/5.1/?/init.lua

t={
 ./?.lua,
 /usr/local/share/lua/5.1/?.lua,
 /usr/local/share/lua/5.1/?/init.lua,
 /usr/local/lib/lua/5.1/?.lua,
 /usr/local/lib/lua/5.1/?/init.lua,
}

But it looks like mkiv is not happy with the split path, as it goes
on trying clibpaths().


Also, I ran into another problem: if the module has the same name as the
base input file, package.libpaths is not called at all (initially the
module was called 'tryme.lua').

Best wishes,
Taco


module 'testmodule'

return {}



tryme.tex
Description: TeX document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Figure numbering without sectionnumber

2010-05-08 Thread Jaroslav Hajtmar

Hello.
I am looking for solutions of my problem and googling but without success.

I want get figurenumbering without sectionnumber.
For example:

List of figures:

1. figure one
2. figure two
...

I tried \setupnumber[figure][sectionnumber=no] and similar things with 
\setuplist etc.

but without efect.

I always get:

List of figures:

1.1. figure one
1.2.  figure two
...


Is there any solutions?

Thanx Jaroslav Hajtmar

___
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] Accent anomaly.

2010-05-08 Thread Taco Hoekwater

John Culleton wrote:
I created a sample sheet of accent marks using Context. I used Bitstream 
Charter as the font (bchr8r).  The following combination didn't work:

\t{uu}


You cannot use bitstream charter with tie, because that accent is not
in the font (in fact, there are many fonts that do not have it).

Best wishes,
Taco
___
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] Times Roman

2010-05-08 Thread John Culleton
I want to set up Times-Roman at 12pt as my body font. Following (but not 
understanding) the advice in Fonts in Context I set up the following:


\definebodyfont[12pt][rm][tf=Serif sa 1]
\definefontsynonym[Serif][Times-Roman]
\definefontsynonym [Times-Roman] [tir] [encoding=texnansi]
\switchtobodyfont[pos,tir]
\rm

As a result Acrobat Reader shows these fonts in the document:

TeXGyreCursor-Regular (Embedded Subset)
TeXGyreTermes-Regular (Embedded Subset)

1.Is the document using Times-Roman?

2. Are any of the above statements duplicative, redundant  or just plain 
wrong?

3. Is there a more up to date guide than Fonts in Context?
-- 
John Culleton

___
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] Figure numbering without sectionnumber

2010-05-08 Thread Wolfgang Schuster

Am 08.05.10 14:15, schrieb Jaroslav Hajtmar:

Hello.
I am looking for solutions of my problem and googling but without 
success.


I want get figurenumbering without sectionnumber.
For example:

List of figures:

1. figure one
2. figure two
...

I tried \setupnumber[figure][sectionnumber=no] and similar things with 
\setuplist etc.

but without efect.

I always get:

List of figures:

1.1. figure one
1.2.  figure two
...


Is there any solutions?

\setupcaption[figure][way=bytext]?

To less information for a better answer because you don't tell us
if the number should be reset at each chapter/section/... or continue
till the end of the document.

Wolfgang

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

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


Re: [NTG-context] PPCHTEX with PSTricks option

2010-05-08 Thread Helge Kruse

Am 07.05.2010 20:38, schrieb Marius:

http://wiki.contextgarden.net/ConTeXt_Minimals#Installation_and_use_on_Windows


I downloaded context-setup-mswin.zip, unzipped it to
  C:\Program Files(x86)\context
and ran first-setup.bat --context=current. Now I have a Directory 
C:\Program\context. In the command prompt window I can see a lot of 
error messages like


  rsync: change_dir 
/cygdrive/c/Program/texmf-context/scripts/context/lua failed: No such 
file or directory (2)


  rsync: change_dir /current/context/=current (in minimals) failed: 
No such file or directory (2)


I also created a shortcut to a command prompt as described in the wiki. 
The command prompt opens but context fails to start:


  C:\Users\Helge\Documents\TeX\contextcontext
  'context' is not recognized as an internal or external command,
  operable program or batch file.

  C:\Users\Helge\Documents\TeX\context

I found in the wiki:
  It is recommended that you choose a directory that does not have a
  space in its full path.

Ok. This recommendation should be a least a warning. But currently I 
have some new questions:

- How do I uninstall context?
- Which directories have been modified by the installer? Where do I have 
to repair my system?


Best regards,
Helge
___
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] Times Roman

2010-05-08 Thread Henning Hraban Ramm

Am 2010-05-08 um 17:15 schrieb John Culleton:

I want to set up Times-Roman at 12pt as my body font. Following (but  
not
understanding) the advice in Fonts in Context I set up the  
following:


\definebodyfont[12pt][rm][tf=Serif sa 1]
\definefontsynonym[Serif][Times-Roman]
\definefontsynonym [Times-Roman] [tir] [encoding=texnansi]
\switchtobodyfont[pos,tir]
\rm

As a result Acrobat Reader shows these fonts in the document:

TeXGyreCursor-Regular (Embedded Subset)


TeX Gyre Cursor = Courier New


TeXGyreTermes-Regular (Embedded Subset)


TeX Gyre Termes = Times


1.Is the document using Times-Roman?


Not the original.
Do you have it? Where? Under what name?

Do you use MkII or MkIV?
Font stuff is different.


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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] Times Roman

2010-05-08 Thread John Culleton
On Saturday 08 May 2010 14:10:13 Henning Hraban Ramm wrote:
 Am 2010-05-08 um 17:15 schrieb John Culleton:
  I want to set up Times-Roman at 12pt as my body font. Following (but
  not
  understanding) the advice in Fonts in Context I set up the
  following:
 
  \definebodyfont[12pt][rm][tf=Serif sa 1]
  \definefontsynonym[Serif][Times-Roman]
  \definefontsynonym [Times-Roman] [tir] [encoding=texnansi]
  \switchtobodyfont[pos,tir]
  \rm
 
  As a result Acrobat Reader shows these fonts in the document:
 
  TeXGyreCursor-Regular (Embedded Subset)

 TeX Gyre Cursor = Courier New

  TeXGyreTermes-Regular (Embedded Subset)

 TeX Gyre Termes = Times

  1.Is the document using Times-Roman?

 Not the original.
 Do you have it? Where? Under what name?

 Do you use MkII or MkIV?
 Font stuff is different.


 Greetlings from Lake Constance!
 Hraban
 ---
 http://www.fiee.net/texnique/
 http://wiki.contextgarden.net
 https://www.cacert.org (I'm an assurer)

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

I use MKII.

My install is TeXLive 2009. Times exists as ptmr and perhaps others. I 
don't care which Times Roman I use. It is required by the publisher in this 
case. 
-- 
John Culleton
Create Book Covers with Scribus
Printable E-book 38 pages $5.95
http://www.booklocker.com/books/4055.html
http://www.scribd.com/doc/24676863/

___
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] Figure numbering without sectionnumber

2010-05-08 Thread Jaroslav Hajtmar

Thanx Wolfgang!
I was tried your \setupcaption[figure][way=bytext].
In MKII is this OK, but in MKIV without efect.

I have to compiling by MKIV because part of source code is for MKII 
unknown.


I have more sections but only one set of figures for all document.

Is any solution in MKIV?

thanx Jaroslav Hajtmar



Dne 8.5.2010 18:35, Wolfgang Schuster napsal(a):

Am 08.05.10 14:15, schrieb Jaroslav Hajtmar:

Hello.
I am looking for solutions of my problem and googling but without 
success.


I want get figurenumbering without sectionnumber.
For example:

List of figures:

1. figure one
2. figure two
...

I tried \setupnumber[figure][sectionnumber=no] and similar things 
with \setuplist etc.

but without efect.

I always get:

List of figures:

1.1. figure one
1.2.  figure two
...


Is there any solutions?

\setupcaption[figure][way=bytext]?

To less information for a better answer because you don't tell us
if the number should be reset at each chapter/section/... or continue
till the end of the document.

Wolfgang




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

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


Re: [NTG-context] simple bibliography and dots after section numbering

2010-05-08 Thread Rogutės Sparnuotos
Marius (2010-05-07 09:32):
 I think what are you looking for is possible with bib module. Look at
 the 3.1 section Default and explicit citations
 
 http://dl.contextgarden.net/modules/bibmod-doc-2009.11.04.zip
 http://wiki.contextgarden.net/Bibliography

Yes, it looks very interesting and not as complicated as in LaTeX - thank
you.

But would it let me place such a list of publications:

  Books
  
  1. Author (year). Title.
  2. Author (year). Title.
  
  Internet resources

  3. URL

  Movies

  4. Author (year). Title.

It seems that I could easily use \setuppublicationlayout to define a
'movies' type, but is listing references by type implemented (or easily
done with MKIV)? Intuitively, I would use

  \placepublications[criterium=[type, book]]

for each list...

-- 
--  Rogutės Sparnuotos
___
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
___