Re: [NTG-context] backgrounds

2014-10-19 Thread Hongwen Qiu

在 2014年10月17日 19:32, Procházka Lukáš Ing. - Pontex s. r. o. 写道:

Source  result attached.
I didn't expect your source even to compile since you missed out the 
\starttext thing.

___
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] Latest beta stops loading some ttc fonts

2014-09-25 Thread Hongwen Qiu

The following minimal example used to work fine:
\starttypescript [serif] [zhfonts]
  \definefontsynonym [Serif] [name:nsimsun]
\stoptypescript

\starttypescript [zhfonts]
  \definetypeface [zhfonts] [rm] [serif] [zhfonts]
\stoptypescript

\usetypescript [zhfonts]
\setupbodyfont [zhfonts, rm, 11pt]

\starttext

测试

\stoptext

but it's no longer the case.

The font used here is 'simsun.ttc' which ships with Chinese edition 
Windows systems by default.
When I require name:nsimsun as above, the TTFAddLangStr() function in 
the luatex code base will have the following information:

fontname lang
NSimSun   0
NSimSun  1033
新宋体   2052
That is when lang equals 0 or 1033, the fontname will be NSimSun, but 
when lang equals 2052, the fontname will be 新宋体, the Chinese words 
for NSimSun.
Although the ValidatePostScriptFontName() complains about the Chinese 
name of this font, and set 'bad_ps_fontname' to true, luatex itself 
don't stop the font fromgetting the right fontname NSimSun, since it 
chooses ASCII names when there're multiple fontnames.


But actions[check metadata](font-otf.lua, 1812),sets the 
metadata.fontname from the correct NSimSun to bad-fontname-simsun, 
and this change causes ff_get_ttc_index() to always return -1 as the 
index, which caused ConTeXt to complain about the following error 
message before bail out:


(bad-fontname-simsun:-1)Invalid TTC index number

mtx-context | fatal error: return code: 1

So, maybe font-otf.lua may need not change metadata.fontname and 
metadata.fullname if these two names are not nil?

___
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] Latest beta stops loading some ttc fonts

2014-09-25 Thread Hongwen Qiu

在 2014年09月25日 18:50, Hans Hagen 写道:

On 9/25/2014 10:50 AM, Hongwen Qiu wrote:

The following minimal example used to work fine:
\starttypescript [serif] [zhfonts]
   \definefontsynonym [Serif] [name:nsimsun]
\stoptypescript

\starttypescript [zhfonts]
   \definetypeface [zhfonts] [rm] [serif] [zhfonts]
\stoptypescript

\usetypescript [zhfonts]
\setupbodyfont [zhfonts, rm, 11pt]

\starttext

测试

\stoptext

but it's no longer the case.


is it context or the binary?
Don't know which one changed that caused the above example to fail. I 
havn't used nsimsun for months, and indeed the above code used to run 
properly. Just heard from someone that it works in the current but not 
in the beta.


In my opinion, it's much easier to change the context code to fix this 
problem (about 2 line lua code), but maybe tweaking with the luatex code 
is the way that should be done.


I don't know anything about font format. In the luatex code, a comment 
said that PLRM only support ASCII fontnames. I suppose PLRM is short for 
PostScript Language Reference. I have a quick glance of the 3rd edition 
of PLRM, and only find that fontname have this explanation: (Optional) 
The name of the font. This entry is for information only; it is not
used by the PostScript interpreter. Ordinarily, it is the same as the 
key passed

to definefont , but it need not be.
I noticed that font can have multiple fotnames, each for a lang, just as 
I posted in the previous message that there're 3 fontnames for index 1 
of simsun.ttc. And many other Unicode fonts have non ASCII font names 
for lang other than 0 too. Just enable the warning message when loading 
font, and I noticed a lot of arabic font in the Linux box have Arabic 
font names. So I don't think that context (or luatex) should refuse to 
work when font have non-ASCII fontnames.


Currently there're other font related bugs that I'd wish getting fixed too.
I'm currently trying to find out why typesetting with sourcehansanscn 
will cause some glyphs to disapper.
e.g. the following code should typeset two glyphs 理 and 论. But the 
理 just get deleted from the output.

\starttypescript [serif] [zhfonts]
   \definefontsynonym [Serif] [name:sourcehansanscn]
\stoptypescript

\starttypescript [zhfonts]
   \definetypeface [zhfonts] [rm] [serif] [zhfonts]
\stoptypescript

\usetypescript [zhfonts]
\setupbodyfont [zhfonts, rm, 11pt]

\starttext

理论

\stoptext
FYI. this font can display 理, when I use libreOffice. I have no clue 
how to debug this problem. So some advice about debugging this kind of 
problem is helpful if you're busy to debug the problem. I'd glad to find 
out the reason why it won't work myself.


By the way, I belived that something like \definefontsynonym [Serif] 
[sourcehansanscn] used to load sourcehansanscn correctly but you must 
prefix it with name: now, otherwise it won't load any font.

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

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

Re: [NTG-context] how to change the distance between two words?

2013-01-19 Thread Hongwen Qiu

On 01/20/2013 12:42 AM, ??? wrote:


luatex has not been updated after executing

first-setup.sh --keep, what should I do for updating Luatex?
Usually, luatex get updated regularly along with ConTeXt updating. If 
for some reason, you want to use the latest luatex binary, you need to 
compile it from source code yourself. If you have difficultly compile 
binary from source, you can ask others to compile for you, or just wait 
for the binary to eventually come into the ConTeXt repo.
___
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] \subsection produces the wrong result

2012-07-09 Thread Hongwen Qiu
With ConTeXt version: 2012.07.10 00:56, the following minimal example 
produces the wrong result:


\starttext

\section{Section}

\subsection{Subsection} % This generates a section other than a subsection

\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] Check brackets and parentheses

2012-07-06 Thread Hongwen Qiu

On 07/06/2012 03:38 PM, Pontus Lurcock wrote:

brace-lint.py


#!/usr/bin/python

import sys

'''Count opening and closing braces in a file.'''

def count(filename, opening, closing):
 print opening, closing
 f = open(sys.argv[1], 'r')

Shouldn't this line be
 f = open(filename, 'r')
otherwise the 'filename' parameter will not be used

 braces = 0
 i = 1
 last_zero = -1
 for line in f.readlines():
 braces += line.count(opening)
 braces -= line.count(closing)
 if braces==0: last_zero = i
 i += 1
 f.close()
 print last_zero

count(sys.argv[1], '{', '}')
count(sys.argv[1], '[', ']')
count(sys.argv[1], '\\start', '\\stop')



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

2012-07-04 Thread Hongwen Qiu

On 07/04/2012 04:56 PM, Hans Hagen wrote:

Hi,

I uploaded a beta. There has been the usual amount of renamings going 
on so there might be problems.


Hans 

This is broken:

! Undefined control sequence.

system   tex  error on line 4 in file test.tex: Undefined 
control sequence ...


1 \starttext
2 \startformula
3 a
4   \stopformula
5 \stoptext
6

argument vspacing(\p_spaceafter
   )
\ctxcommand #1-\directlua \zerocount {commands.#1
  }
\spac_vspacing_yes_indeed ...mand {vspacing(#1)}
  \fi
\afterdisplayspace ...else \blank [\p_spaceafter ]
  \fi
\stopdisplaymath ...ath $$\par \afterdisplayspace
  \par \egroup
\strc_formulas_stop_formula ...native \v!formula }
  \dostoptagged 
\dostoptagge...

l.4 \stopformula
___
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] The bTABLE is still broken in latest beta

2012-06-20 Thread Hongwen Qiu

The bTABLE is still broken in latest beta. Minimal example:

\starttext
\setupTABLE[c][each][width=1cm]
\bTABLE
  \bTR\bTD Test \eTD\eTR
\eTABLE
\stoptext

Error log:

! Missing number, treated as zero.

system   tex  error on line 5 in file test.tex: Missing 
number, treated as zero ...


1 \starttext
2 \setupTABLE[c][each][width=1cm]
3 \bTABLE
4   \bTR\bTD Test \eTD\eTR
5   \eTABLE
6 \stoptext
7

to be read again
   \2752:1
argument ...n \tabl_ntb_get_aut \c_tabl_ntb_col
  \relax \ifdim 
\localwidth ...

\secondoftwoarguments #1#2-#2

\tabl_ntb_cell_process ...\tabl_tnb_cell_finalize
  }}\scratchdimen 
\tabl_ntb_...

inserted text ...align_start \tabl_ntb_pass 1 1
\tabl_ntb_column_next \tab...
\tabl_ntb_flush_content ...p \cr \the \t_tabl_ntb
  \dostoptagged \egroup 
\dos...

...
l.5 \eTABLE

?
___
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] upload

2012-06-19 Thread Hongwen Qiu

On 06/20/2012 04:40 AM, Hans Hagen wrote:
I uploaded a version that has the bTABLE mechanism reorganized 
(different low level names etc). Hopefully nothing got broken in the 
process. 

Unfortunately it is broken. Minimal example:


\starttext

\bTABLE
  \bTR\bTD[nc=2] r1c1 \eTD\eTR
  \bTR\bTD r2c1 \eTD\bTD r2c2 \eTD\eTR
\eTABLE

\stoptext

Error message:

! Missing number, treated as zero.

system   tex  error on line 6 in file test.tex: Missing 
number, treated as zero ...


1 \starttext
2
3 \bTABLE
4   \bTR\bTD[nc=2] r1c1 \eTD\eTR
5   \bTR\bTD r2c1 \eTD\bTD r2c2 \eTD\eTR
6   \eTABLE
7
8 \stoptext
9

to be read again
   \relax
\21 ...l_ntb_get_dis \scratchcounter \fi \relax
  \advance 
\scratchcounter \...

\redorecurse -\expandrecursecontent
 \dodorecurse
to be read again
   {
inserted text
2
\dodorecurse ... \expandafter {\the \innerrecurse
  }{#2}
...
l.6 \eTABLE

?
___
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] Is it possible to generate eps files using metafun and context?

2012-06-18 Thread Hongwen Qiu

On 06/18/2012 04:19 PM, Hans Hagen wrote:
and then use pstopdf to turn the pdf into an eps 
You must mean pdftops, since pstopdf cannot convert pdf files into eps 
but pdftops can.


I tried pdftops, the result quality is high, but since my desire is to 
provide eps figures to others that have to insert high quality figures 
into Microsoft Word, the pdftops converted eps files cannot insert into 
Microsoft Word. Fortunately, I have found out that pstopdf uses 
ghostscript/Inkscape to do the real job, and I use ghostscript directly 
to convert pdf into eps, the quality is high enough with the -dNOCACHE 
option (I had tried inkscape before my last posting a few weeks ago, and 
the resulting quality is not high enough when I'm using Fedora 16. But 
it seems that inkscape in Fedora 17 produces better quality now, though 
ghostscript is better), and it can be recognized by Microsoft Word.


Thanks for the information.
___
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] Is it possible to generate eps files using metafun and context?

2012-06-14 Thread Hongwen Qiu

Hi,

Is it possible to typeset the label with context and generate eps output 
files using the metafun format? If yes, then how?


TIA.
___
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] localfootnotes broken in latest beta?

2012-06-14 Thread Hongwen Qiu

Hi,

The following minimal example works fine with context version 2011.05.18 
18:04 and luatex version beta-0.70.1-2011061410 (rev 4277) comes along 
texlive 2011, but gives error with latest beta (context version 
2012.06.13 23:46 and luatex version beta-0.70.2-2012052410 (TeX Live 2012)).


Minimal example:

\starttext

\startlocalfootnotes
Test\footnote{test}
\placelocalfootnotes
\stoplocalfootnotes

\stoptext

Error emitted by latest beta:
! Missing number, treated as zero.

system   tex  error on line 7 in file test.tex: Missing 
number, treated as zero ...


1 \starttext
2
3 \startlocalfootnotes
4 Test\footnote{test}
5 \placelocalfootnotes
6 \stoplocalfootnotes
7 
8 \stoptext
9

to be read again
   f
\v!fit -f
  it
\369footnote ...dimexpr \noteparameter \c!height
*\c_strc_notes_columns \re...
\strc_notes_set_properties ..._notes_set_location
\strc_notes_set_delayed
inserted text ...yed \strc_notes_set_properties
\strc_notes_check_locations
\strc_notes_synchronize ... \everysynchronizenote

...
l.6 \stoplocalfootnotes


___
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] localfootnotes broken in latest beta?

2012-06-14 Thread Hongwen Qiu

On 06/15/2012 12:18 PM, Wolfgang Schuster wrote:

Use this for the moment:

\placelocalfootnotes[height=\textheight]

Thanks, this works fine.

___
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] Equilibrium in chemical resulted in Undefined Control Sequence error

2011-10-11 Thread Hongwen Qiu
Hi,

The following minimal example:

==
\starttext

\chemical{A,+,B,-,AB}

\stoptext
==

gives the following error under context version: 2011.10.08 11:42,
luatex version beta-0.70.1-2011051918:

! Undefined control sequence.

system   tex  error on line 10 in file test.tex: Undefined
control sequence ...

1 \starttext
2 
3 \chemical{A,+,B,-,AB}
4 
5 \stoptext
6 

argument \xrightpverleftarrow 
{}{}
\mathematics ...mmode #1\else \normalstartimath #1
  \normalstopimath \fi 
\@@cm::i:equilibrium ...\xrightpverleftarrow {}{}}
  \enspace 
l.10 \chemicalequilibrium
 
\inlinechemical ...emicals.inline(\!!bs #1\!!es )}
  }
l.3 \chemical{A,+,B,-,AB}
   
? 

___
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] Strange problem related to \usemodule

2011-10-11 Thread Hongwen Qiu
On Tue, 2011-10-11 at 09:26 +0200, Hans Hagen wrote:
 can you try to load the file directly with
 
 \input{/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-modules/tex/context/third/vim/t-vim.tex}
 
 and see if the command is defined then? 
This method works with other modules, e.g. t-ruby.tex, but not
t-vim.tex, I think that's because the vim module depends on other
modules that's still in texmf-modules.

___
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] I look for an item bullet with a size between \bullet and \cdot

2011-10-11 Thread Hongwen Qiu
On Tue, 2011-10-11 at 14:42 +0200, Stéphane Klein wrote:
 I don't understand, with this code, you display three bullet.
One is really \bullet, the other one is \cdot and than one smaller than
\bullet and bigger than \cdot, which is what you want.
 Personnaly, I would like *one* bullet with a size smaller that
 \bullet 
 but bigger that \cdot. 

___
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] Strange problem related to \usemodule

2011-10-10 Thread Hongwen Qiu
It seems that if I copied all of the module files under the current
directory, it works perfectly.
And of course mtxrun --locate t-vim.tex gives the correct location just
as indicated by my previously attached log file.

And there's only one environment variable corresponding to TeX settings:
$ env |grep -i TEX
PATH=/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-linux-64/bin: (It's
very long)

Actually not only the modules under tex/texmf-modules not work on the
Remote, but also modules under tex/texmf-local don't work either.

On Mon, 2011-10-10 at 12:57 +0800, Hongwen Qiu wrote:
 Hi,
 
 I have access to three machines both running GNU/Linux x86-64, I call
 them Laptop, Desktop and Remote respectively here on.
 
 The Laptop has full access to the internet, so I always install and
 upgrade my ConTeXt Standalone on it when I'm home.
 
 At workplace, I can surfer the internet with the Desktop while the
 RSYNC port is blocked.
 
 I only can access the Remote through ssh from the Desktop without
 root privilege and can not access the internet.
 
 So, I always copied the ConTeXt standalone from my Laptop onto my
 Desktop, and from my Desktop onto Remote if necessary. Then, I'll
 delete the cache before I set the PATH to the appropriate location and
 run context --make and mtxrun --generate.
 
 So the ConTeXt standalones are almost identical on both my Desktop and
 Remote. And the following minimal example just works fine on my
 Desktop but failed on the Remote,
 === Minimal Example 
 \usemodule[vim]
 
 \definevimtyping[RUBY][syntax=ruby]
 
 \starttext
 
 \startRUBY
 puts Hello
 \stopRUBY
 
 \stoptext
 =
 Actually, on Remote, whatever module I use, it will prompt the
 Undefined Control Sequence error regarding the first command I used from
 that module with the module loaded correctly. Attached is the error log
 accompany the above minimal example.
 
 So, what can be the problem with my Remote.
 
 TIA. for any help. 


___
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] Strange problem related to \usemodule

2011-10-10 Thread Hongwen Qiu
On Mon, 2011-10-10 at 14:09 +0200, Hans Hagen wrote:
 can you run with \enabletrackers[modules.loading]
Attached is the log with \enabletrackers[modules.loading].
(b.tex

ConTeXt  ver: 2011.10.08 11:42 MKIV  fmt: 2011.10.10  int: english/english

system   cont-new.mkiv loaded
(/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-context/tex/context/base/cont-new.mkiv
system   beware: some patches loaded from cont-new.mkiv
)
system   b.top loaded

system   options  start used options

used options % runtime options files (command line driven)
used options \unprotect
used options % feedback and basic job control
used options % handy for special styles
used options \startluacode
used options document = document or { }
used options document.arguments={
used options }
used options document.files={
used options  b.tex,
used options }
used options \stopluacode
used options % process info
used options \setupsystem[inputfile=b.tex]
used options \setupsystem[\c!n=1,\c!m=1]
used options % modes
used options % options (not that important)
used options \startsetups *runtime:options
used options \stopsetups
used options % styles and modules
used options \startsetups *runtime:modules
used options \stopsetups
used options % done
used options \protect \endinput

system   options  stop used options

(b.top)
fontslatin modern fonts are not preloaded
languageslanguage en is active
resolversmodules  locating: prefix: '', askedname: 'vim', truename: 'vim'
resolversmodules  checking file: 'm-vim.mkvi'
resolversmodules  checking file: 'm-vim.mkiv'
resolversmodules  checking file: 'm-vim.tex'
resolversmodules  checking file: 'm-vim.cld'
resolversmodules  checking file: 'm-vim.lua'
resolversmodules  checking file: 'p-vim.mkvi'
resolversmodules  checking file: 'p-vim.mkiv'
resolversmodules  checking file: 'p-vim.tex'
resolversmodules  checking file: 'p-vim.cld'
resolversmodules  checking file: 'p-vim.lua'
resolversmodules  checking file: 's-vim.mkvi'
resolversmodules  checking file: 's-vim.mkiv'
resolversmodules  checking file: 's-vim.tex'
resolversmodules  checking file: 's-vim.cld'
resolversmodules  checking file: 's-vim.lua'
resolversmodules  checking file: 'x-vim.mkvi'
resolversmodules  checking file: 'x-vim.mkiv'
resolversmodules  checking file: 'x-vim.tex'
resolversmodules  checking file: 'x-vim.cld'
resolversmodules  checking file: 'x-vim.lua'
resolversmodules  checking file: 'v-vim.mkvi'
resolversmodules  checking file: 'v-vim.mkiv'
resolversmodules  checking file: 'v-vim.tex'
resolversmodules  checking file: 'v-vim.cld'
resolversmodules  checking file: 'v-vim.lua'
resolversmodules  checking file: 't-vim.mkvi'
resolversmodules  checking file: 't-vim.mkiv'
resolversmodules  checking file: 't-vim.tex'
resolversmodules  loading: '/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-modules/tex/context/third/vim/t-vim.tex'
resolversmodules  loaded: 'vim'
! Undefined control sequence.

system   tex  error on line 4 in file b.tex: Undefined control sequence ...

 1 \enabletrackers[modules.loading]
 2 \usemodule[vim]
 3 
 4   \definevimtyping[RUBY][syntax=ruby]
 5 
 6 \starttext
 7 
 8 \startRUBY
 9 puts Hello
10 \stopRUBY
11 
12 \stoptext
13 

l.4 \definevimtyping
[RUBY][syntax=ruby]
? X

system   files  start used files

used files  1: filename=mult-mps.lua | filetype=tex | format=tex | foundname=/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-context/tex/context/base/mult-mps.lua | usedmethod=database
used files  2: filename=b.tex | foundname=b.tex | usedmethod=direct
used files  3: filename=cont-new.mkiv | filetype=tex | foundname=/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-context/tex/context/base/cont-new.mkiv | usedmethod=database
used files  4: filename=b.top | foundname=b.top | usedmethod=direct
used files  5: filename=lang-us.lua | filetype=lua | foundname=/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-context/tex/context/patterns/lang-us.lua | usedmethod=database
used files  6: filename=t-vim.tex | filetype=tex | foundname=/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-modules/tex/context/third/vim/t-vim.tex | usedmethod=database

system   files  stop used files


system   structure  start used structure

used structure   text: b

system   structure  stop used structure

mkiv lua stats   used config file  - selfautoparent:texmf/web2c/texmfcnf.lua
mkiv lua stats   used cache path   - 

Re: [NTG-context] Strange problem related to \usemodule

2011-10-10 Thread Hongwen Qiu
On Mon, 2011-10-10 at 23:09 -0400, Aditya Mahajan wrote:
 What are the first 10-15 lines of
 /ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-modules/tex/context/third/vim/t-vim.tex?

$ head
-15 
/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-modules/tex/context/third/vim/t-vim.tex
%D \module
%D   [ file=t-vim,
%D  version=2011.09.03,
%Dtitle=\CONTEXT\ User Module,
%D subtitle=Vim syntax highlighting,
%D   author=Aditya Mahajan,
%D date=\currentdate,
%Dcopyright=Aditya Mahajan,
%Demail=adityam at ieee dot org,
%D  license=Simplified BSD License]

\writestatus{loading}{Vim syntax highlighting (ver: 2011.09.03)}

\startmodule[vim]
\usemodule  [filter]

 
 The vim module usually gives a message
 
 loadingVim syntax highlighting
 
 (or some variation of it...I have changed the default message
 recently), 
 but that message is missing in your log.
 
 My guess is that the t-vim module that you have is somehow corrupted,
 and 
 therefore, \definevimtyping command is undefined. 
This couldn't be the problem (anyhow, I attached the 15 lines of
t-vim.tex above), since I have said in my previous messages that if I
copied the neccessary files from the tex/texmf-modules to the current
directory it works just fine, and the problem are not only relates to
t-vim module, all of the modules under tex/texmf-modules and
tex/texmf-local just does not work.

___
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] Strange problem related to \usemodule

2011-10-09 Thread Hongwen Qiu
Hi,

I have access to three machines both running GNU/Linux x86-64, I call
them Laptop, Desktop and Remote respectively here on.

The Laptop has full access to the internet, so I always install and
upgrade my ConTeXt Standalone on it when I'm home.

At workplace, I can surfer the internet with the Desktop while the
RSYNC port is blocked.

I only can access the Remote through ssh from the Desktop without
root privilege and can not access the internet.

So, I always copied the ConTeXt standalone from my Laptop onto my
Desktop, and from my Desktop onto Remote if necessary. Then, I'll
delete the cache before I set the PATH to the appropriate location and
run context --make and mtxrun --generate.

So the ConTeXt standalones are almost identical on both my Desktop and
Remote. And the following minimal example just works fine on my
Desktop but failed on the Remote,
=== Minimal Example 
\usemodule[vim]

\definevimtyping[RUBY][syntax=ruby]

\starttext

\startRUBY
puts Hello
\stopRUBY

\stoptext
=
Actually, on Remote, whatever module I use, it will prompt the
Undefined Control Sequence error regarding the first command I used from
that module with the module loaded correctly. Attached is the error log
accompany the above minimal example.

So, what can be the problem with my Remote.

TIA. for any help. 
(b.tex

ConTeXt  ver: 2011.10.08 11:42 MKIV  fmt: 2011.10.10  int: english/english

system   cont-new.mkiv loaded
(/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-context/tex/context/base/cont-new.mkiv
system   beware: some patches loaded from cont-new.mkiv
)
system   b.top loaded

system   options  start used options

used options % runtime options files (command line driven)
used options \unprotect
used options % feedback and basic job control
used options % handy for special styles
used options \startluacode
used options document = document or { }
used options document.arguments={
used options }
used options document.files={
used options  b.tex,
used options }
used options \stopluacode
used options % process info
used options \setupsystem[inputfile=b.tex]
used options \setupsystem[\c!n=1,\c!m=1]
used options % modes
used options % options (not that important)
used options \startsetups *runtime:options
used options \stopsetups
used options % styles and modules
used options \startsetups *runtime:modules
used options \stopsetups
used options % done
used options \protect \endinput

system   options  stop used options

(b.top)
fontslatin modern fonts are not preloaded
languageslanguage en is active
resolversmodules  loaded: 'vim'
! Undefined control sequence.

system   tex  error on line 3 in file b.tex: Undefined control sequence ...

 1 \usemodule[vim]
 2 
 3   \definevimtyping[RUBY][syntax=ruby]
 4 
 5 \starttext
 6 
 7 \startRUBY
 8 puts Hello
 9 \stopRUBY
10 
11 \stoptext
12 

l.3 \definevimtyping
[RUBY][syntax=ruby]
? X

system   files  start used files

used files  1: filename=mult-mps.lua | filetype=tex | format=tex | foundname=/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-context/tex/context/base/mult-mps.lua | usedmethod=database
used files  2: filename=b.tex | foundname=b.tex | usedmethod=direct
used files  3: filename=cont-new.mkiv | filetype=tex | foundname=/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-context/tex/context/base/cont-new.mkiv | usedmethod=database
used files  4: filename=b.top | foundname=b.top | usedmethod=direct
used files  5: filename=lang-us.lua | filetype=lua | foundname=/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-context/tex/context/patterns/lang-us.lua | usedmethod=database
used files  6: filename=t-vim.tex | filetype=tex | foundname=/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-modules/tex/context/third/vim/t-vim.tex | usedmethod=database

system   files  stop used files


system   structure  start used structure

used structure   text: b

system   structure  stop used structure

mkiv lua stats   used config file  - selfautoparent:texmf/web2c/texmfcnf.lua
mkiv lua stats   used cache path   - /ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606
mkiv lua stats   resource resolver - loadtime 0.016 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 6 found files, scanned paths: 
mkiv lua stats   stored bytecode data  - 295 modules, 63 tables, 358 chunks
mkiv lua stats   cleaned up reserved nodes - 32 nodes, 9 lists of 424
mkiv lua stats   node memory usage - 18 glue_spec, 1 dir
mkiv lua stats   node list callback tasks  - 6 unique task lists, 1 instances (re)created, 104 calls
mkiv lua stats   used 

Re: [NTG-context] Captions

2011-09-22 Thread Hongwen Qiu

On 09/23/2011 06:10 AM, Felix Ingram wrote:

I'm defining a new float that I'd like to caption with its own label.
Something like:

\definefloat[picture][pictures]

I'd then like the caption to read:

Picture 1 - my caption text
Picture 2 - etc

At the moment I've used \setupcaption[picture][way=bytext] to sort out
the numbering but I cannot figure out how to do the label.

\setupcaption[picture][way=bytext,label=Picture] does the trick
___
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] Setup of the title of Contents

2011-09-13 Thread Hongwen Qiu

On 09/13/2011 04:48 PM, Honza Hejzl wrote:
I wish I were able to set tup my custom title (for example, for table 
of contents). I have chapter titles split over two lines and with 
different sizes so I need something different as a title of Contents. 
I know about many possibilities of \setuplist options but can't find 
anything about changing the title style. It seems the basic style is 
simply derived from the chapter title style.
Use \placetableofcontents instead of \completetableofcontents and 
generate the title with your customized title command.

___
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] \startalign[n=3] don't work properly in MKIV

2011-09-08 Thread Hongwen Qiu
Hi, the following minimal example works fine in MKII, but the third
columns are not aligned in MKIV

\starttext

\startformula\startalign[n=3]
\NC X \NC = 1 + 2 \NC = 3 \NR
\NC Y \NC = 1 + 2 + 3 \NC = 6 \NR
\NC Z \NC = 1 + 2 + 3 + 4 \NC = 10 \NR
\stopalign\stopformula

\stoptext

Is this a bug or the interface has changed in MKIV?

$ context --version
mtx-context | current version: 2011.09.06 17:46
$ luatex --version
This is LuaTeX, Version beta-0.70.1-2011051918 (rev 4277)
___
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] about the line break after \inframed

2011-02-22 Thread Hongwen Qiu

On 02/22/2011 09:58 PM, Jeong Dalyoung wrote:

\startuseMPgraphic{lions b}
picture pic;
path p ; p := fullsquare xyscaled (\overlaywidth,\overlayheight) randomized 5pt 
;
pickup pencircle scaled 1pt ;
fill p withcolor .850yellow ;
draw p withcolor .5yellow ;
\stopuseMPgraphic

\defineoverlay[leopard][\uniqueMPgraphic{lions b}]

\def\nota#1 {\inframed[frame=off,background=leopard]{#1}}

\starttext
\nota{test 1:} This is a test for line separation.
%\midaligned{\nota{test 2}}
\stoptext


Change the definition of \nota, and it just works:
\startuseMPgraphic{lions b}
picture pic;
path p ; p := fullsquare xyscaled (\overlaywidth,\overlayheight) 
randomized 5pt ;

pickup pencircle scaled 1pt ;
fill p withcolor .850yellow ;
draw p withcolor .5yellow ;
\stopuseMPgraphic

\defineoverlay[leopard][\uniqueMPgraphic{lions b}]

\define[1]\nota {\dontleavehmode\inframed[frame=off,background=leopard]{#1}}

\starttext
\nota{test 1:} This is a test for line separation.

\midaligned{\nota{test 2}}
\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] metapost fill between outlines

2011-02-21 Thread Hongwen Qiu

On 02/21/2011 05:09 PM, Reviczky, Adam wrote:

The only letter (g) I have left in the logo has two spaces that I want to cut 
out.
I can't make a single path out of it so that it doesn't go through the entire 
letter, so what to do in this case?
Can't you construct four outlines instead of three, so that you can 
construct two paths for filling. Hope you understand what I mean.

___
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] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu

On 02/20/2011 04:25 PM, Reviczky, Adam wrote:

As a workaround I fill out the bigger one with color black and the smaller one 
with color white, but I need to put this on different background colors, so the 
use of this is very limited.

You can fill out the bigger one, than clips the smaller one.
And alternately, you can construct the path of the difference out of the 
two circles, and fill the constructed path.

___
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] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu

On 02/21/2011 03:52 AM, Reviczky, Adam wrote:

As for the path of the difference, how do you mean that? Example?

\startMPpage
path p ;
p := fullcircle scaled 1cm ;
path q ;
q := fullcircle scaled .5cm ;
path r ;
r := p -- reverse q -- cycle ;
drawarrow r withcolor green ;
fill r withcolor red ;
\stopMPpage

This works here.
___
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] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu

On 02/21/2011 01:12 PM, Reviczky, Adam wrote:

\starttext
\framed[background=color,backgroundcolor=red,height=fit,width=fit]{
\startMPcode
path p[];
p1 := (6.949220,13.046900)..controls (9.539060,13.046900) and 
(10.023400,10.781200)..(10.023400,8.679690)..controls (10.023400,5.335940) and 
(6.949220,0.00)..(3.234380,0.00)..controls (0.890625,0.00) and 
(0.00,1.886720)..(0.00,3.828120)..controls (0.00,8.492190) and 
(3.316410,13.046900)..(6.949220,13.046900) --cycle;

p2 := (7.488280,12.293000)..controls (4.933590,12.293000) and 
(1.265620,6.226560)..(1.265620,2.531250)..controls (1.265620,1.562500) and 
(1.695310,0.835938)..(2.722660,0.835938)..controls (5.230470,0.835938) and 
(8.972660,7.035160)..(8.972660,10.296900)..controls (8.972660,11.269500) and 
(8.703120,12.293000)..(7.488280,12.293000)--cycle;

p3 := p1 -- reverse p2 -- cycle;
fill p3 withcolor black;
\stopMPcode
}
\stoptext
%%%
This doesn't work.

\starttext
\framed[background=color,backgroundcolor=red,height=fit,width=fit]{
\startMPcode
path p[];
p1 := (6.949220,13.046900)..controls (9.539060,13.046900) and 
(10.023400,10.781200)..(10.023400,8.679690)..controls 
(10.023400,5.335940) and 
(6.949220,0.00)..(3.234380,0.00)..controls (0.890625,0.00) 
and (0.00,1.886720)..(0.00,3.828120)..controls 
(0.00,8.492190) and (3.316410,13.046900)..(6.949220,13.046900) --cycle;


p2 := (7.488280,12.293000)..controls (4.933590,12.293000) and 
(1.265620,6.226560)..(1.265620,2.531250)..controls (1.265620,1.562500) 
and (1.695310,0.835938)..(2.722660,0.835938)..controls 
(5.230470,0.835938) and 
(8.972660,7.035160)..(8.972660,10.296900)..controls (8.972660,11.269500) 
and (8.703120,12.293000)..(7.488280,12.293000)--cycle;


drawarrow p1 withcolor green ;
drawarrow p2 withcolor blue ;
p3 := p1 -- p2 -- cycle;
fill p3 withcolor black;
\stopMPcode
}
\stoptext

Maybe you can know why now, from the above code. The direction of the 
path is important.

___
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] metapost fill between outlines

2011-02-20 Thread Hongwen Qiu

On 02/21/2011 02:41 PM, Reviczky, Adam wrote:

but for this example it draws a small line through the letter:

\starttext
\framed[background=color,backgroundcolor=red,height=fit,width=fit]{
\startMPcode
path db[],df[],dc[];

drawoptions (withcolor (0.00,0.329412,0.560784));
db1 := (86.812500,0.519531)--(92.457001,0.519531)--(92.457001,32.386700)
--(86.812500,32.386700)--(86.812500,19.679701)--(86.722702,19.679701)
..controls (85.390602,21.589800) and 
(82.816399,22.718800)..(79.929703,22.718800)
..controls (73.976601,22.718800) and 
(69.800797,17.253901)..(69.800797,11.617200)
..controls (69.800797,4.683590) and 
(73.664101,0.00)..(79.484398,0.00)
..controls (82.949203,0.00) and 
(85.257797,1.820310)..(86.722702,3.640620)

--(86.812500,3.640620)--cycle;

df1 := (81.437500,19.246099)..controls (84.992203,19.246099) and 
(86.812500,15.734400)..(86.812500,11.964800)
..controls (86.812500,7.625000) and 
(85.128899,3.464840)..(81.171898,3.464840)
..controls (77.753899,3.464840) and 
(76.062500,7.542970)..(76.062500,11.746100)
..controls (76.062500,15.953100) and 
(77.621101,19.246099)..(81.437500,19.246099)

--cycle;

dc1 := db1 -- df1 -- cycle;
fill dc1;
drawdot (86.812500,0.519531) withcolor blue withpen pencircle scaled 2pt;
drawdot (81.437500, 19.246099) withcolor green withpen pencircle scaled 2pt;
drawarrow db1 withcolor green; drawarrow df1 withcolor blue;
drawarrow dc1 withcolor white;
\stopMPcode
}
\stoptext

The above code is just intend to tell you that you can change the way 
you construct db1 and df1 to achieve your desired results. The actual 
changes necessary to this example are not given.

___
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] [BUG] \placepublications[criterium=all] triggers error in ConTeXt 2010.09.29

2010-09-29 Thread Hongwen Qiu
 Please see the attached minimal example and its error log.
\placepublications[criterium=all] triggers error in ConTeXt 2010.09.29.
It works fine in ConTeXt 2010.09.24.
Both the luatex versions are beta-0.63.0-2010091123.
@unpublished{test,
title={Test},
author={test},
journal={Test},
year=2010,
month=9,
day=29,
}
sorters  using sort sequence: mm mc uc

(test.tex

ConTeXt  ver: 2010.09.29 15:00 MKIV  fmt: 2010.9.29  int: english/english

system  : cont-new loaded
(/home/qiuhw/context/tex/texmf-context/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
(/home/qiuhw/context/tex/texmf-context/tex/context/base/cont-new.mkiv))
system  : cont-fil loaded
(/home/qiuhw/context/tex/texmf-context/tex/context/base/cont-fil.tex
loading : ConTeXt File Synonyms
)
system  : cont-sys.rme loaded
(/home/qiuhw/context/tex/texmf-context/tex/context/user/cont-sys.rme 
(/home/qiuhw/context/tex/texmf-context/tex/context/base/type-def.mkiv) 
(/home/qiuhw/context/tex/texmf-context/tex/context/base/type-lua.mkiv) 
(/home/qiuhw/context/tex/texmf-context/tex/context/base/type-siz.mkiv) 
(/home/qiuhw/context/tex/texmf-context/tex/context/base/type-otf.mkiv))
system  : cont-err loaded
(/home/qiuhw/context/tex/texmf-context/tex/context/base/cont-err.tex
systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead
)
system  : test.top loaded
%
%   begin of optionfile
%
%   % runtime options files (command line driven)
%   \unprotect
%   % feedback and basic job control
%   % handy for special styles
%   \startluacode
%   document = document or { }
%   document.arguments={
%   }
%   document.files={
%test,
%   }
%   \stopluacode
%   % process info
%   \setupsystem[inputfile=test]
%   \setupsystem[\c!n=1,\c!m=1]
%   % modes
%   % options (not that important)
%   \startsetups *runtime:options
%   \setupoutput[pdftex]
%   \stopsetups
%   % styles and modules
%   \startsetups *runtime:modules
%   \stopsetups
%   % done
%   \protect \endinput
%
%   end of optionfile
%
(test.top)
fonts   : preloading latin modern fonts
{/home/qiuhw/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/qiuhw/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{/home/qiuhw/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
bodyfont: 12pt rm is loaded
language: language en is active
publications: wrote a new auxiliary file cont-en.aux
publications: loading formatting style from bxml-apa
(/home/qiuhw/context/tex/texmf-context/tex/context/base/bxml-apa.mkiv)
systems : begin file test at line 3
! LuaTeX error ...text/tex/texmf-context/tex/context/base/strc-lst.lua:195: bad 
argument #1 to 'gsub' (string expected, got nil)
stack traceback:
[C]: in function 'gsub'
...text/tex/texmf-context/tex/context/base/strc-lst.lua:195: in 
function ...text/tex/texmf-context/tex/context/base/strc-lst.lua:192
(tail call): ?
...text/tex/texmf-context/tex/context/base/strc-lst.lua:392: in 
function 'analyze'
main ctx instance:1: in main chunk.

system   error on line 5 in file test.tex: LuaTeX error  ...

1 \setupbibtex[database=test]
2 
3 \starttext
4 \cite[test]
5   \placepublications[criterium=all]
6 \stoptext


\analyzestructurelist analyze(#1,#2,#3)}
  
\dodeterminelistcharacteristics ...ter \c!number }
  \xdef \utilitylistlength {...
to be read again 
   \initializepubslist 
\dodoplacepublications ...ubs]\initializepubslist 
  \doifnot {\namedlistparame...
l.5 \placepublications[criterium=all]
 
? X
mkiv lua stats : used config file  - 
/home/qiuhw/context/tex/texmf/web2c/texmfcnf.lua
mkiv lua stats : used cache path   - 
/home/qiuhw/context/tex/texmf-cache/luatex-cache/context/3525c3c2a591596c39048524c75fec75
mkiv lua stats : input load time   - 0.047 seconds
mkiv lua stats : stored bytecode data  - 239 modules, 56 tables, 295 chunks
mkiv lua stats : cleaned up reserved nodes - 30 nodes, 9 lists of 411
mkiv lua stats : node memory usage - 1 hlist, 3 glue, 1 penalty, 10 
glyph, 6 attribute, 20 glue_spec, 2 attribute_list, 1 temp, 1 local_par, 1 dir
mkiv lua stats : node list callback tasks  - 6 unique task lists, 1 instances 
(re)created, 281 calls
mkiv lua stats : used backend  - pdf (backend for directly 
generating pdf output)
mkiv lua stats : loaded patterns   - en::2
mkiv lua stats : callbacks - direct: 369, indirect: 4462, 
total: 4831
mkiv lua stats : result saved in file  - test.pdf
mkiv lua stats : loaded fonts  - 33 files: 

[NTG-context] problem with tabulate header and footer

2010-09-20 Thread Hongwen Qiu
 \setuptabulate[footer=repeat] has no effect, so is this a bug or if
something has been changed?

And \setuptabulate[header=repeat] can only repeat a single row(see the
minimal example below). So is this a bug or is it never been implemented
or thought like this?

TIA for any help or feedback.

Minimal example:

\starttext

\setuptabulate[header=repeat, footers=repeat]

\starttabulatehead
\HL
\NC A \NC B \NC C \NC \NR
\NC D \NC E \NC F \NC \NR
\HL
\stoptabulatehead

\starttabulatetail
\HL
\stoptabulatetail

\startluacode
context.starttabulate{|c|c|c|}
for i=1,200 do
context.NC() context(G)
context.NC() context(H)
context.NC() context(I)
context.NC() context.NR()
end
context.stoptabulate()
\stopluacode

\stoptext

The example and its output are attached.


tabulate.pdf
Description: Adobe PDF document


tabulate.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] \big has no effect in Mkiv with opentype math fonts

2010-09-15 Thread Hongwen Qiu
 \big \bigg \Big and \Bigg has no effect in Mkiv with opentype math fonts.
___
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] [xits] \sqrt not work properly

2010-09-13 Thread Hongwen Qiu
 The \sqrt is not work properly in Mkiv. The following is the minimal
example, and the result is attached
\setupbodyfont[xits]
\starttext
\startformula
\sqrt{abcde}
\stopformula
\stoptext


math.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] pdf file not found

2010-09-10 Thread Hongwen Qiu

 于 2010年09月10日 20:25, Peter Münster 写道:

Hello,

Can anybody reproduce the following problem (Taco can't ...):

No problem here.

\startbuffer[pdf-pages]
   \starttext
 page 1 \page page 2
   \stoptext
\stopbuffer
\savebuffer[pdf-pages][pdf-pages.tex]
\executesystemcommand{context pdf-pages; mkdir testdir;
   mv pdf-pages.pdf testdir/2*8.pdf}
\starttext
\setupexternalfigures[directory={./testdir}]
\externalfigure[2*8][page=2]
\stoptext

-  !LuaTeX error: PDF inclusion: required page2  does not exist

No problem with page=1.

No problem with other name for pdf-file (for example pdftest.pdf
instead of 2*8.pdf).

No problem, if pdf-file is in current directory instead of testdir.

My system is latest minimals on linux-amd64.

Latest minimals on linux i386.

Cheers, Peter



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

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


Re: [NTG-context] table row span question

2010-08-25 Thread Hongwen Qiu

 于 2010年08月26日 12:42, Martin Althoff 写道:

\DC \DL \DL \DL 
\DR

As far as I know, this should be written as

\DC \DL[3] \DR
___
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] sharp (#) and flat (b) signs

2010-08-19 Thread Hongwen Qiu

 于 2010年08月19日 20:29, Vyatcheslav Yatskovsky 写道:
Currently I use F\#m7b5 sequence, but # and b symbols look unnatural, 
I want real ones.

You can use \sharp and \flat.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] PDF's generated by XeTeX and LuaTeX, font licensing

2010-08-17 Thread Hongwen Qiu

 于 2010年08月17日 15:30, Giulio Bertellini 写道:
What exactly does it mean to subset the fonts, when the fonts are 
included in a PDF?

Just included the used characters, not the whole font file.
___
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] Roman page numbers

2010-08-12 Thread Hongwen Qiu

 于 2010年08月13日 00:21, Wolfgang Schuster 写道:

Should be \setupuserpagenumber.

Thanks, this works.
___
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] an issue with line numbers in the verbatim text

2010-08-11 Thread Hongwen Qiu

 On 08/11/2010 08:23 PM, Li Yanrui (李延瑞) wrote:

Hi all,

this is an example.

\setuptyping[numbering=line]
\setuplinenumbering[location=intext]
\showframe
\starttext
\starttyping
This is the first line.
Last line after an empty line.
\stoptyping
\stoptext

the linenumbering setup of location=intext can not work. the line
numbers still be inmargin.

Not location=intext, but location=text will do.
___
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] Roman page numbers

2010-08-11 Thread Hongwen Qiu
 Hi,
The following minimal example has no effect on page numbering(MkIV):

\setuppagenumbering[conversion=romannumerals] %
\setuppagenumbering[numberconversion=romannumerals] has no effect too.
\starttext
\chapter{Alpha}
\input tufte
\stoptext

$ context --version
MTXrun | current version: 2010.08.10 17:14
$ luatex --version
This is LuaTeX, Version beta-0.61.0-2010072816
___
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] Roman page numbers

2010-08-11 Thread Hongwen Qiu

 于 2010年08月12日 11:08, Wolfgang Schuster 写道:

Am 12.08.10 03:52, schrieb Hongwen Qiu:

Hi,
The following minimal example has no effect on page numbering(MkIV):

\setuppagenumbering[conversion=romannumerals] %
\setuppagenumbering[numberconversion=romannumerals] has no effect too.


\setupuserpagenumbering[numberconversion=romannumerals]

Thanks for the reply, but I get the following error:
! Undefined control sequence.
l.10 \setupuserpagenumbering
[numberconversion=romannumerals]
?

___
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] Problems using new beta

2010-06-07 Thread Hongwen Qiu

于 2010年06月07日 16:37, Ivo Solnický 写道:
On Sunday, after I installed new package, I realized, that my workflow 
is broken.
The ConTeXt beta was broken, and it should work now. So, you may need to 
upgrade the whole.

___
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] 3. Re: \MPpos, pxy, initialize_box(), oh my! (Hongwen Qiu)

2010-06-05 Thread Hongwen Qiu

? 2010?06?05? 10:56, Adam Fuller ??:
my initial post had a mistake:  i meant to refer to the /Metafun/ 
manual, not the Metapost manual.  that probably didn't help.

Actually, I know that you mean the /Metafun/ manual.
i guess what i should have said is, i know that pxy can give me the 
bounding /box/ (the rectangle with the maximum horizontal and vertical 
extents of its contents, be they set in horizontal or vertical mode), 
but can it give me the subset of that, the bounding /path/, if you 
will, when the contents are text which flows over several lines.  the 
bounding /path/ may not be rectangular, although it will be something 
like the union of the bounding boxes of the text's individual lines.

So now, I understand what mean.
i think if you look at the correct reference, the difference of the 
effects is clear.  i think the challenge is that you don't know where 
the line breaks will occur until you typeset it.   --adam 

And the source code from the manual may help you:

\setupMPvariables[mpos:box][linecolor=darkred]
\setupMPvariables[mpos:par][linecolor=darkred]

\startpositionoverlay{backgraphics}
  \setMPpositiongraphic{A-3}{mpos:box}{self=A-3}
  \setMPpositiongraphic{A-4}{mpos:box}{self=A-4}
  \setMPpositiongraphic{b:A-5}{mpos:par}{self=A-5}
  \setMPpositiongraphic{b:A-6}{mpos:par}{self=A-6}
\stoppositionoverlay

\fpos {A-5} Because the text must be laid on top of
the graphic, the graphic must precede the first word in the
typeset stream or it must be positioned on a separate layer.
In the latter case it can be calculated directly after the
paragraph is typeset, but in the former case a second pass
is needed. \tpos {A-5}

Given the above code, I think you can get some information about the 
horizontal and vertical pos of texts from \fpos and \tpos. And the 
mpos:par is defined in anch-pgr.mkii and anch-pgr.mkiv. But I haven't 
dig into the code which implement mpos:par. Hope you can find useful 
information there.


And hope the following message I just searched out will help you too:

http://archive.contextgarden.net/message/20080107.024554.314d9fee.ca.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] \MPpos, pxy, initialize_box(), oh my!

2010-06-04 Thread Hongwen Qiu

于 2010年06月04日 23:41, Adam Fuller 写道:
initialize_box sets `pxy' to \hpos's contents bounding box. what if 
you want pxy to be not strictly a rectangle, but the path that 
encloses text, etc., which is just part of flowing text in a paragraph
If I'm not misunderstanding some concepts, bounding boxes are sure to be 
rectangles. But why you need `pxy` to not be rectangle. Since you can 
get the center and all the four-corner cordinates (and so it's easy to 
get the diameter if you want to use it as circles or something like that 
latter) of the bounding box, you can construct all kinds of path shapes 
if needed.

___
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] Color tables in MKIV

2010-05-25 Thread Hongwen Qiu
Hi!
There's an example at
http://wiki.contextgarden.net/Table#Background_Colors about color tables.
I found that \BL and \CL works fine in MKII.

Since I get black background for \BL(which is not gray) and get the
following error for \CL in MKIV:

! Missing \endgroup inserted.
inserted text
\endgroup
to be read again
\endtemplate
template \endtemplate

\normalTABLEmultirule #1-
\use {#1}\normalTABLElongrule 
\dodocomplexTableGL ...LEmultirule {#3}}\fi \next
\doPostTableGL #2
\TABLEgrayline -\complexTableCOLOR [2,green]
\SR
...
l.12 \NC
\tex{AR} \NC automatic row\NC\SR

Is there a easy way to achive this in MKIV?
Thanks in advance.
___
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] Running standalone metapost file omits spaces between btex and etex

2010-05-07 Thread Hongwen Qiu
I found that the following example

\starttext

\startuseMPgraphic{test}
draw btex some text with space etex;
\stopuseMPgraphic
\useMPgraphic{test}

\stoptext

can generate the text between btex and etex correct no matter I use
MKII or MKIV.

But, when I running the following example

beginfig(0);
draw btex some text with space etex;
endfig;
end

with the command line:

$ mpost --mem=metafun test.mp

or

$ texexec --mptex test.mp

It dose generate output. But the output omits all the spaces between
btex and etex, with the resulting string to be sometextwithspace.

So, the question is how to get the correct results when running
standalong metapost file with btex-etex strings.

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

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


[NTG-context] \setuptyping[numbering=line] don't emit line numbers

2010-04-21 Thread Hongwen Qiu
$ context --version
MTXrun | current version: 2010.04.16 21:08

$ luatex --version
This is LuaTeX, Version beta-0.60.0-2010040422

I found that \setuptyping[numbering=line] no longer produces line
numbers any more. So are there something changed, or just it's ought to
be ok?
___
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] hyphens in verbatim text

2010-04-07 Thread Hongwen Qiu

于 2010年04月07日 16:12, Hans Hagen 写道:
looks ok here, so example needed 
I found that the problem can only be produced when using the simplefonts 
module, while loading the adobesongstd font and some other Chinese 
fonts. So, the problem maybe something's wrong with the simplefonts 
module. The following is a simple example.


\usemodule[simplefonts]

\setcjkmainfont[adobesongstd]

\starttext

\starttyping
--
\stoptyping

\type{--}

\stoptext

And if I use \setmainfont[some Western Fonts] instead of the 
\setcjkmainfont line, the problem still exists.

___
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] hyphens in verbatim text

2010-04-07 Thread Hongwen Qiu

于 2010年04月08日 07:14, Wolfgang Schuster 写道:

Add '\setmonofont[Latin Modern Mono][features=none]' to your file.

Yes, this works. Tanks.
___
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] hyphens in verbatim text

2010-04-06 Thread Hongwen Qiu
-- in verbatim text displayed as a single -, no matter in \type{} or in
typing environment or something like that.
current version: 2010.03.30 18:56
$ luatex --version
This is LuaTeX, Version beta-0.60.0-2010040422
___
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] tab disappears in LUA environment.

2010-04-06 Thread Hongwen Qiu
\startLUA
string.format(%s %d, person, total)
\stopLUA

produces the result as following:

string.format(%s%d, person, total)

while the following code has no such problem:

\starttyping
string.format(%s %d, person, total)
\stoptyping

$ context --version
MTXrun | current version: 2010.03.30 18:56

$ luatex --version
This is LuaTeX, Version beta-0.60.0-2010040422
___
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] standardmakeup environment didn't work in MKIV

2010-03-31 Thread Hongwen Qiu
Hi all,
standardmakeup didn't work in MKIV.
When I used this environment, It complains:

error: Invalid field id writable for node type glue_spec (0)
.
\stopmakeup ...ter \c!color }{\stopcolor }\egroup
\flushmarks \doflushmakeup...
l.3 \stopstandardmakeup

So, is this something deprecated or just some unexpected things
happened? And what I supposed to do if I want to get the same results?
___
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] standardmakeup environment didn't work in MKIV

2010-03-31 Thread Hongwen Qiu

于 2010年03月31日 14:43, Taco Hoekwater 写道:

This means your luatex is older than it should be for the current
mkiv beta. The 'writable' glue_spec field was introduced in
luatex 0.52.
   
It works now. Thanks. I thought that the luatex shipped with the latest 
ConTeXt was the latest beta. Now I know that it is just the stable one.

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