Re: [NTG-context] Is it possible to \cite with UPPERCASED author?

2012-02-10 Thread Wagner Macedo
On 10 February 2012 12:33, Thomas A. Schmitz wrote:

> 1. Edit a local copy of cont-au.bst and insert a function that will make
> the author name uppercase. bst is infamous for its incomprehensible syntax,
> but it appears to be possible. this would be the proper way. google is your
> friend here.
>

Yes, very incomprehensible. And another thing, I couldn't find any
"authoryear" word inside bst files. I think it usefulness is only for
publications list.


>  2. ConTeXt produces a .bbl file from which it retrieves the
> bibliographical information. The authorname used in the \cite command is
> captured in a key=value of the form
> a={{Hagen}},
> Write a simple lua script which will make the captured name uppercase and
> write everything out to a new file. Then, in your preamble, replace the
> \setupbibtex[database=...] line with
> \usepublications[.bbl]
> So this is something you would do at the very end of the editing process,
> when you're sure that all the references are in the bbl file.
>

Thank you. It's the best solution to my problem. But I'll do a Python or
Bash script to do this, as I'm more used to those languages, and I'll add
as a target on my Makefile.


> It may also be possible to hook a lua function into the process when
> ConTeXt typesets the value from the bbl, but that's beyond my knowledge,
> Hans is the only one who knows the internals of the mkiv bib mechanism well
> enough to say if/how this may work.
>

I found something into bibl-bib.lua, and I tried to change but didn't
result in anything. So, it's a black box.
___
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 \cite with UPPERCASED author?

2012-02-10 Thread Wagner Macedo
Ah, yes. I'm setuping my own style. As I'm not so good with TeX (if this
could be in Lua, will be perfect), I'm using apa, that is the closest to my
style.

So, all right, I'll try to customize my style, that is the only good
solution to this. Thanks by attention, Thomas.

--
Wagner Macedo


On 10 February 2012 09:40, Thomas A. Schmitz wrote:

> You're trying to set up your own style, so you need to customize, but
> there is no code for customization in your example.
___
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 \cite with UPPERCASED author?

2012-02-10 Thread Wagner Macedo
On 10 February 2012 08:23, Thomas A. Schmitz wrote:

> Longer answer: bib mod manual, section 2.3, \setupcite. You can hook
> something like \bgroup\WORD and \egroup into the left= and right= keys.


It didn't solve, because when I have an "author et al", results in "AUTHOR
ET AL", that is not the expected.


> (Untested and no real explanation since you didn't provide an example.)


Sorry, I really didn't think it was necessary. But with sample code in
http://wiki.contextgarden.net/Bibliography_mkiv I can explain.

%  --  %  --  %  --  %  --  %  --  %
  \setupbibtex[database={sample},sort=author]
  \setuppublications[alternative=apa]

  \starttext
\cite[author][hh2010a] and
\cite[authoryear][hh2010a] and
\cite[authoryears][hh2010a]
  \stoptext
%  --  %  --  %  --  %  --  %  --  %

I expected that is typeset HAGEN and HAGEN (2010a) and (HAGEN, 2010a)
___
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 \cite with UPPERCASED author?

2012-02-10 Thread Wagner Macedo
Is it possible to \cite with author in UPPERCASE without touch in my bib
file?

I couldn't find a tip about this, I already read Bib mod manual.

I'm using MkIV.

--
Wagner Macedo
___
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 make Figure captions justify if long?

2012-02-09 Thread Wagner Macedo
Yes, thank you.

And to not need to enclose \externalfigure with \FullWidth, I found that I
can set the command attribute on \setupfloat[figure] as following:

\defineframed[FullWidth][offset=overlay, width=\textwidth, frame=off,
align=middle]
\setupfloat[figure][command=\FullWidth]

--
Wagner Macedo


On 9 February 2012 09:06, Peter Münster  wrote:

> Is this a solution?
___
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 make Figure captions justify if long?

2012-02-09 Thread Wagner Macedo
In your example, the caption is limited to image width.

What I want is something as

\setupcaption[figure][width=\textwidth, align=middle]

does. But long texts should behave as document text (hyphenated, including).

Thanks by attention.

--
Wagner Macedo


On 9 February 2012 04:34, Steffen Wolfrum  wrote:

> How about this:
>
> \starttext
>
> \placefigure[here]{This is just an example for this is just an example for
> this is just an example for this is just an example for this is just an
> example for this is just an example for
> this}{\externalfigure[any][width=0.5\textwidth]}
>
> \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] How to make Figure captions justify if long?

2012-02-08 Thread Wagner Macedo
Thanks by the answer, but I had already thought in this. I would like
something more definitive.

By the way, at http://wiki.contextgarden.net/Reference/en/setupcaptions I
can see a command argument. I was wondering if a custom command can do the
trick, but I don't know how I should use this arg and what it is for.

--
Wagner Macedo


On 8 February 2012 21:43, Marco  wrote:

> I don't know if  I get you right, but I think  you are talking about
> the width  of the  caption. It  adaptes to the  with of  the figure.
> There is the “minwidth” parameter  for \setupcaptions, but since the
> short captions  will not be centred  it's probably not what  you aim
> for.  I don't  have a  solution, but  a workaround  that alters  the
> global width setting for an individual caption:
>
___
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] How to make Figure captions justify if long?

2012-02-08 Thread Wagner Macedo
Hello,

The title is not self explaining, I'll try to do this.

My layout style require that table or figure captions stay centered only if
short. If long, it needs that the caption be justified (like normal text,
but less width).

In LaTeX, I know that this works on article document class, like the pdf
file I attached shows.

--
Wagner Macedo


test.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] \definelayout[first] does not yield to default layout on page 2

2012-01-26 Thread Wagner Macedo
Well, I never need this, so I thought that information was correct.

I will do some tests when I'll have time to see if works for me.

--
Wagner Macedo


On 26 January 2012 14:40, Peter Park Nelson wrote:

> Oh crap, I thought Wagner's solution worked but it doesn't -- quite.
>
> \showframe indicates that the page areas are defined correctly, and
> the footer frame on page 2 and later is the correct size. But Context
> is not filling the text columns all the way to the bottom; The body
> text is still stopping short as though the larger footer was still in
> effect.
>
> Frustrating.
>
> On Thu, Jan 26, 2012 at 8:18 AM, Wagner Macedo 
> wrote:
> > According to http://wiki.contextgarden.net/Layout#Multiple_layouts, you
> can
> > do this by using the commands \setuplayout[yourcustomlayout] and
> > \setuplayout[reset] at the location you want to change the layout.
> >
> > --
> > Wagner Macedo
> >
> >
> > On 25 January 2012 23:41, Peter Park Nelson  >
> > wrote:
> >>
> >> First-page layout is an issue that I have asked about before, but
> >> maybe I am doing something wrong. Here is my question in an earlier
> >> thread:
> >>
> http://archive.contextgarden.net/message/20111228.041922.c60f9cd5.en.html
> >> .
> >>
> >> I want to define a layout for the first page of my document with
> >> different header and footer formatting -- specifically, no header and
> >> a large footer to hold publication information. Based on examples on
> >> Contextgarden and this list, I think my code below is correct.
> >> However, the first page formatting is continued on all pages of the
> >> document. The effect is the same when using \definelayout[first] and
> >> \definelayout[1].
> >>
> >> %%---
> >>
> >> setuppapersize[letter][letter]
> >> \setupindenting[yes, medium]
> >>
> >> \setuplayout
> >>  [width=middle,
> >>  backspace=15mm,
> >>  topspace=10mm,
> >>  height=254mm,
> >>  header=10mm,  % normal header
> >>  headerdistance=5mm,
> >>  footer=5mm,
> >>  footerdistance=5mm,
> >>  grid=yes]
> >>
> >> \definelayout
> >>  [first]
> >>  [width=middle,
> >>  backspace=15mm,
> >>  topspace=10mm,
> >>  height=254mm,
> >>  header=0mm,  % no header
> >>  headerdistance=0mm,
> >>  footer=25mm,  % big footer
> >>  footerdistance=5mm,
> >>  grid=yes]
> >>
> >> \definecolumnset[body][n=2,balancing=yes]
> >>
> >> \setupheadertexts
> >>  [This is a header]
> >>  [pagenumber]
> >>  [pagenumber]
> >>  [Some text]
> >>
> >> \setupfootertexts
> >>  [footer]
> >>  [footer]
> >>  [footer]
> >>  [footer]
> >>
> >> \starttext
> >>
> >> \startcolumnset[body]
> >>
> >> \dorecurse{20}{\input tufte\par}
> >>
> >> \stopcolumnset
> >>
> >> \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
> >
> ___
>
>
>
> --
> Peter Park Nelson
> peter.park.nel...@gmail.com
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] \definelayout[first] does not yield to default layout on page 2

2012-01-26 Thread Wagner Macedo
According to http://wiki.contextgarden.net/Layout#Multiple_layouts, you can
do this by using the commands \setuplayout[yourcustomlayout] and
\setuplayout[reset] at the location you want to change the layout.

--
Wagner Macedo


On 25 January 2012 23:41, Peter Park Nelson wrote:

> First-page layout is an issue that I have asked about before, but
> maybe I am doing something wrong. Here is my question in an earlier
> thread:
> http://archive.contextgarden.net/message/20111228.041922.c60f9cd5.en.html
> .
>
> I want to define a layout for the first page of my document with
> different header and footer formatting -- specifically, no header and
> a large footer to hold publication information. Based on examples on
> Contextgarden and this list, I think my code below is correct.
> However, the first page formatting is continued on all pages of the
> document. The effect is the same when using \definelayout[first] and
> \definelayout[1].
>
> %%---
>
> setuppapersize[letter][letter]
> \setupindenting[yes, medium]
>
> \setuplayout
>  [width=middle,
>  backspace=15mm,
>  topspace=10mm,
>  height=254mm,
>  header=10mm,  % normal header
>  headerdistance=5mm,
>  footer=5mm,
>  footerdistance=5mm,
>  grid=yes]
>
> \definelayout
>  [first]
>  [width=middle,
>  backspace=15mm,
>  topspace=10mm,
>  height=254mm,
>  header=0mm,  % no header
>  headerdistance=0mm,
>  footer=25mm,  % big footer
>  footerdistance=5mm,
>  grid=yes]
>
> \definecolumnset[body][n=2,balancing=yes]
>
> \setupheadertexts
>  [This is a header]
>  [pagenumber]
>  [pagenumber]
>  [Some text]
>
> \setupfootertexts
>  [footer]
>  [footer]
>  [footer]
>  [footer]
>
> \starttext
>
> \startcolumnset[body]
>
> \dorecurse{20}{\input tufte\par}
>
> \stopcolumnset
>
> \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] Documentation for Bibliography on MKIV

2012-01-21 Thread Wagner Macedo
Thanks.

I will read bib module manual. And, additionally, do you know if this MkIV
support brings some facilities to interact with bibliography via Lua?

--
Wagner Macedo


On 21 January 2012 21:36, Pontus Lurcock  wrote:

> Although the code has been rewritten, the user interface is largely
> the same as far as I know, so the Mk II documentation in
> http://modules.contextgarden.net/bibman still applies. (It is no
> longer necessary to include the \usemodule[bib] and \usemodule[bibltx]
> commands, however.)
>
___
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] Documentation for Bibliography on MKIV

2012-01-21 Thread Wagner Macedo
Hello,

In http://wiki.contextgarden.net/Bibliography_mkiv, it's little talked
about bibliography support on MKIV.

Does yet exist a documentation about how to use it?

--
Wagner Macedo
___
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] Command \thanks from LaTeX

2012-01-21 Thread Wagner Macedo
Good tip, but has some drawbacks.

1) It doesn't work on context current (2011.05.18 18:04). Instead a mark,
is displayed a normal numbered footnote.
2) On beta (2012.01.12 11:03), it's not displaying the symbol mark in the
text. The footnote is visible, but not the mark.
3) It can only be used with one author, because a second \footnote[+] is
typeset with the same symbol.

--
Wagner Macedo


On 21 January 2012 06:56, Wolfgang Schuster <
schuster.wolfg...@googlemail.com> wrote:

> The Author\footnote[+]{This is a regular footnote without the number.}
___
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] \externalfigure and file size

2012-01-20 Thread Wagner Macedo
On Debian Packages, at least, we can declare, basically, 3 levels of
dependencies, according to
http://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps

1) Depends - absolute dependency. Or else, packages that is strictly
necessary to works well.
2) Recommends - strong, but not absolute dependency.
3) Suggests - used to declare that one package may be more useful with one
or more others.

So, I think Inkscape would fit well as 'context' Suggests.

--
Wagner Macedo


On 20 January 2012 21:54, Hans Hagen  wrote:

> no, because not all users use svg (just an not all users use fonts defined
> in type-* files) and also because inkscape is close to impossible to
> install without x present which would render context 'unuseable due to a
> depency not being resolved'
___
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] \externalfigure and file size

2012-01-20 Thread Wagner Macedo
I just tested now. With Inkscape 0.48.2 r9819, I could do the conversion
job on pure console.

But, on the other hand, as nothing is perfect, to install Inkscape, it's
needed many X dependencies.

On 20 January 2012 06:08, Hans Hagen  wrote:

> There is no such depedency .. actually, i found it rather impossible to
> get an inkscape running on a headless linux box as there is some depedency
> on X (last time I tried).
___
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] Command \thanks from LaTeX

2012-01-20 Thread Wagner Macedo
Hello,

Searching for a \thanks equivalent command on ConTeXt, I ended up on
http://wiki.contextgarden.net/LaTeX_Thanks.

But I didn't like that solution, because the author footnote is placed on a
new area instead the same as text footnotes.

So I made a simple solution, that the author footnotes is placed in the
same area and doesn't interfere on real counter. I want here to share my
solution, below you can see it.

\definestartstop[author]
  [before={\savenumber[footnote]
\resetnumber[footnote]
\start
\let\thanks\footnote
\setupfootnotes[numberconversion=set 2]},
   after={\stop
\restorenumber[footnote]}]

It can be used as that:

\startauthor
  Wagner Macedo\thanks{Brazilian citizen}
\stopauthor

Of course, I could did a \author command, but I generally prefer to use
start/stop blocks.

What do you think? This could be improved?
___
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] \externalfigure and file size

2012-01-19 Thread Wagner Macedo
It would be good if you attach the svg file.

Could you do this?

--
Wagner Macedo


On 19 January 2012 21:01, Kip Warner  wrote:

> Hey Peter. The original SVG is about 7KB. With rasterize off and
> exported to PDF, its under 2KB. With rasterize on, its still only 78KB.
> Whatever ConTeXt is doing with it, that 7KB SVG gets bloated to nearly a
> meg at 976KB. This happens as Logo.svg is transformed into intermediate
> m_k_i_v_Logo.pdf. Something's up.
>
___
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] t-vim module problems

2012-01-14 Thread Wagner Macedo
Taking the message about "Syntax highlighting for C-code", I tried to use
t-vim module.

In that message:

Richard Weickelt wrote:

> 2) t-vim did not work. It failed somewhere (unknown command sequence
> \installspacehandler) on loading (\usemodule[vim])


I can confirm this on latest Beta, downloaded today, ver: 2012.01.12 11:03
MKIV  fmt: 2012.1.14  int: english/english. I attached the log file.

On my current version (2011.05.18 18:04), I can compile the file, but the
code cannot be viewed on generated PDF.

The content of file I'm trying to compile is below.

% teste.tex
\usemodule[vim]

\definevimtyping[C][syntax=C]
\definevimtyping[ruby][syntax=ruby]

\starttext

\startitemize
  \item A hello world example in C
\startC
  #include

  int main()
  {
printf("Hello World")
  }
\stopC
  \item A hello world example in ruby
\startruby
  puts "Hello World"
    \stopruby
\stopitemize

\stoptext

--
Wagner Macedo

mtx-context | run 1: luatex 
--fmt="/home/wagner/Programs/context_beta/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en"
 
--lua="/home/wagner/Programs/context_beta/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en.lui"
 --backend="pdf" "./teste.tex" \stoptext
This is LuaTeX, Version beta-0.70.1-2011051918 (rev 4277) 
 \write18 enabled.
(teste.tex
jobcontrol  > version mismatch with jobfile: 1.14 <> 1.17

ConTeXt  ver: 2012.01.12 11:03 MKIV  fmt: 2012.1.14  int: english/english

system  > cont-new.mkiv loaded
(/home/wagner/Programs/context_beta/tex/texmf-context/tex/context/base/cont-new.mkiv
system  > beware: some patches loaded from cont-new.mkiv
)
system  > teste.top loaded
(teste.top
)
fonts   > latin modern fonts are not preloaded
languages   > language en is active
resolvers   > modules > loaded: 'vim'
(../home/wagner/Programs/context_beta/tex/texmf-modules/tex/context/third/vim/t-vim.tex
loading > Vim syntax highlighting (ver: 2011.12.28)
resolvers   > modules > loaded: 'filter'
(../home/wagner/Programs/context_beta/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv
loading > Filter (ver: 2011.12.27)
resolvers   > modules > loaded: 'module-catcodes'
(../home/wagner/Programs/context_beta/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.tex
loading > Module Catcodes (ver: 2011.12.17)
))
resolvers   > modules > loaded: 'syntax-highlight'
(../home/wagner/Programs/context_beta/tex/texmf-modules/tex/context/third/vim/t-syntax-highlight.mkiv
loading > Code syntax highlighting (ver: 2011.12.28)
resolvers   > modules > loaded: 'syntax-groups'
(../home/wagner/Programs/context_beta/tex/texmf-modules/tex/context/third/vim/t-syntax-groups.tex
loading > Syntax highlighting groups (ver: 2012.01.03)
resolvers   > modules > already loaded: 'module-catcodes'
)
resolvers   > modules > already loaded: 'filter'
! Undefined control sequence.

system  > tex > error on line 181 in file teste.tex: Undefined control 
sequence ...


l.181 \installspacehandler
   {\syntaxhighlighting@namespace\v!on}
! Undefined control sequence.

system  > tex > error on line 189 in file teste.tex: Undefined control 
sequence ...


l.189 \installspacehandler
   {\syntaxhighlighting@namespace\v!off}
! Undefined control sequence.

system  > tex > error on line 195 in file teste.tex: Undefined control 
sequence ...


l.195 \installspacehandler
   {\syntaxhighlighting@namespace}
)){/home/wagner/Programs/context_beta/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts   > preloading latin modern fonts (second stage)
(/home/wagner/Programs/context_beta/tex/texmf-context/tex/context/base/type-otf.mkiv)
files   > readfile > asked name: 'loc', not found
{/home/wagner/Programs/context_beta/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/wagner/Programs/context_beta/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts   > virtual math > unable to resolve name mapsfromchar
fonts   > fallback modern rm 12pt is loaded
t-filter> command : vim -u NONE --noplugin -e -s -C -n -c "set 
tabstop=4" -c "syntax on" -c "set syntax=C" -c "let contextstartline=1" -c "let 
contextstopline=0" -c "let strip=0" -c "let escapecomments=0" -c "let 
highlight=[]" -c "source 2context.vim" -c "qa" teste-temp-C-0.tmp 
teste-temp-C-0.vimout
(teste-temp-C-0.vimout)
t-filter> command : vim -u NONE --noplugin -e 

Re: [NTG-context] Inline itemize

2012-01-05 Thread Wagner Macedo
Ah... sorry. I read the manual but I didn't remember this feature.

--
Wagner Macedo


On 5 January 2012 20:25, Wolfgang Schuster  wrote:

> No, this is a bug because with the “text” keyword you can create a inline
> item which doesn’t start a new paragraph.
___
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] Inline itemize

2012-01-05 Thread Wagner Macedo
As I know, yes, this is the intended behavior. You should be thinking in a
WYSIWYG way, but TeX, as most languages (except Python, that I know) works
apart you write every code in one line or write pretty indented.

I hope you understood.

--
Wagner Macedo


2012/1/5 Vianney le Clément 

> If I type
>
>Blabla. \startitemize[a,text] \item one \item two \stopitemize Blabla.
>
> I get a linebreak before and after the itemize. Is this the intended
> behaviour? How can I get a fully inline enumeration?
>
___
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] CLD: context.getvariable as Lua variable

2012-01-05 Thread Wagner Macedo
Don't worry. It's not needed. I just wanted to avoid mix Lua and TeX codes.

I will survive using:

local s = "\getvariable{namespace}{var}"

Thank you by attention.

--
Wagner Macedo


On 5 January 2012 14:39, Wolfgang Schuster  wrote:

>
> Am 05.01.2012 um 18:22 schrieb Wagner Macedo:
>
> > Firstly, thanks by answer.
> >
> > The second way is nice, but could be generic (e.g. save any variable in
> a namespace)?
>
> It would require a different method because \setvariables doesn’t provide
> information about the values which are set. Can you describe what do you
> want to achieve and I can try to provide a better solution.
>
> 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
>
> ___
>
___
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] CLD: context.getvariable as Lua variable

2012-01-05 Thread Wagner Macedo
Firstly, thanks by answer.

The second way is nice, but could be generic (e.g. save any variable in a
namespace)?

--
Wagner Macedo


On 5 January 2012 13:04, Wolfgang Schuster  wrote:

>
> Am 05.01.2012 um 15:49 schrieb Wagner Macedo:
>
> Hello,
>
> I'm relatively quite new to TeX world. This is my first message to list. I
> hope you understand me, English isn't my mother language.
>
> I'm trying to use a variable set by \setvariable in Lua. I tried some
> combinations, based on manual but I couldn't succeed. The code below
> exemplifies what I wanted to do.
>
> \starttext
> \setvariable{namespace}{var}{Some context}
> \ctxlua{
>   local s = context.getvariable("namespace", "var")
>
>   if s == "" then
> ...
>   else
> ...
>   end
> }
> \stoptext
>
> I know that I can use some of \if* TeX commands, but coding in Lua is
> better to me.
>
>
> What you’re trying is not possible but there are other ways to check the
> content of the variable in Lua.
>
> \startluacode
>
> userdata = userdata or { }
>
> function userdata.checkvariable(variable)
> if variable == "" then
>  context("EMPTY")
> else
> context("NOT EMPTY")
>  end
> end
>
> \stopluacode
>
> \setvariable{wagner}{name}{Wagner Macedo}
>
> \starttext
>
> \ctxlua{userdata.checkvariable("\getvariable{wagner}{name}")}
>
> % This does only with \startlua or \ctxlua
>
> \startlua
>
> local name = "\getvariable{wagner}{name}"
>
> if name == "" then
> context("No Text")
> else
> name = "Name: " .. name
>  context(name)
> end
>
> \stoplua
>
> \stoptext
>
> A different method is to save the \setvariables entries in a Lua table and
> check the entries of the table.
>
> \startluacode
>
> userdata= userdataor { }
> userdata.macedo = userdata.macedo or { }
>
> userdata.macedo.data = { }
>
> function userdata.macedo.savevariables(variables)
> userdata.macedo.data = variables
> end
>
> function userdata.macedo.checkvariables()
>  local variables = userdata.macedo.data
> -- check for name
> if variables.name == "" then
>  context("Name: No name set")
> context.par()
> else
>  context("Name: "..variables.name)
> context.par()
> end
>  -- check for address
> if variables.address == "" then
> context("Address: No address set")
>  context.par()
> else
> context("Address: "..variables.address)
>  context.par()
> end
> end
>
> \stopluacode
>
> \starttexdefinition SaveVariables
>  \startlua
> userdata.macedo.savevariables{
> name= "\getvariable{macedo}{name}",
>  address = "\getvariable{macedo}{address}",
> }
> \stoplua
> \stoptexdefinition
>
> \setvariables[macedo][set=\SaveVariables]
>
> \starttext
>
> \setvariables[macedo][name=Wagner Macedo]
>
> \ctxlua{userdata.macedo.checkvariables()}
>
> \setvariables[macedo][address=Secret]
>
> \ctxlua{userdata.macedo.checkvariables()}
>
> \stoptext
>
> 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
>
> ___
>
___
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] CLD: context.getvariable as Lua variable

2012-01-05 Thread Wagner Macedo
Hello,

I'm relatively quite new to TeX world. This is my first message to list. I
hope you understand me, English isn't my mother language.

I'm trying to use a variable set by \setvariable in Lua. I tried some
combinations, based on manual but I couldn't succeed. The code below
exemplifies what I wanted to do.

\starttext
\setvariable{namespace}{var}{Some context}
\ctxlua{
  local s = context.getvariable("namespace", "var")

  if s == "" then
...
  else
...
  end
}
\stoptext

I know that I can use some of \if* TeX commands, but coding in Lua is
better to me.

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