Re: [NTG-context] Error Line Number

2012-01-14 Thread luigi scarso
On Sat, Jan 14, 2012 at 12:55 AM, Kip Warner k...@thevertigo.com wrote:

 On Fri, 2012-01-13 at 10:08 +0100, luigi scarso wrote:
  Usually the strategy is to isolate the culprit by including progressively
  lengthy  chunks of tex
  from the begin to end
  and then narrowing the selection until you find a macro or paragraph.
  Then surround it with
  \tracingall
  ...
  \trancingnone
  and you have a *huge* amount of informations.
 
  (btw, discover where an error happens  it's  known to be problematic due
  the inherently asynchronous nature of TeX
  and the   macro programming language, where expansion can be  very hard
 to
  understand)

 That sounds very tedious and is definitely a major problem with ConTeXt.
 But like you said, it's difficult to alleviate based on how all of its
 components were designed.

 It's not a problem of ConTeXt, it's a problem of TeX , at least when you
use a complex macro format
like LaTeX or ConTeXt. It's the nature of the macro language.


-- 
luigi
___
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] \setuppapersize \externalfigure

2012-01-14 Thread Peter Münster
On Fri, Jan 13 2012, Gerben Wierda wrote:

 The following snippet:

 \page\setuppapersize[A4,portrait][A4,portrait]
 \externalfigure[foo.pdf][factor=fit,orientation=90]

 behaves like this:

 the size is set to what fits *before* rotation. The order of orientation and
 factor does not matter. Is there anything I can do about that?

Perhaps with something like:

\scale[width=\textwidth,height=\textheight]{\externalfigure[foo.pdf][orientation=90]}

(not tested...)

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


[NTG-context] Syntax highlighting for C-code

2012-01-14 Thread Richard Weickelt

Hi,

I've tried to include some C-code into my document, but failed to enable 
syntax highlighting.


Tested on: linux-64, context-2011.05.18 (same with the beta) stand-alone mkIV

1) \starttyping[option=C] just prints verbatim text. There seems to be no 
formatter for C out of the box.


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


3) http://wiki.contextgarden.net/Verbatim_text
I tried to download pret-c and put it into the modules folder, but writing 
\installprettytype[C][C] failed, because it's not known (in mkIV).


4) mkII does not complain to exec \installprettytype[C][C], but this does 
not change anything either. \starttyping[option=C] seems to call a (maybe 
builtin?) formatter, but I could not get colors to work.


I'm also lost in the documentation, because there are many places talking 
about syntax-highlighting. Does this thing work for anybody or is ist just 
my installation?


Thanks
Richard
___
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] starttyping/stoptyping broken?

2012-01-14 Thread Hans Hagen

On 14-1-2012 00:40, mathew wrote:

Just this minute updated via wget
http://minimals.contextgarden.net/setup/first-setup.sh and running
first-setup.sh, getting errors trying to use \starttyping/\stoptyping.

--- example file ---

\starttext
\startframedtext[width=5.5cm]
\starttyping
Line 1
Line 2
Line 3
\stoptyping
\stopframedtext
\stoptext

--- output ---
This is LuaTeX, Version beta-0.70.1-2011051923 (rev 4277)
  \write18 enabled.
(test2.tex

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

(/usr/local/context/tex/texmf-context/tex/context/base/cont-new.mkiv)
(test2.top){/usr/local/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
(/usr/local/context/tex/texmf-context/tex/context/base/type-otf.mkiv){/usr/local/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/local/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
! Missing } inserted.

  1
  2 \starttext
  3 \startframedtext[width=5.5cm]
  4 \starttyping
  5 Line 1
  6 Line 2
  7 Line 3
  8   \stoptyping
  9 \stopframedtext
10 \stoptext
11

inserted text




this related to the buffer bug (still no new beta as i'm redoing some 
font code and have not much time today)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] Why doesn't his URL work?

2012-01-14 Thread Gerben Wierda
This code below gets me a working URL, but instead of the word kudos in blue I 
get the entire URL in my text. Why is that?

\setupcolors  [state=start]
\setupurl [color=blue]
\setupinteraction [state=start,color=blue]
\useURL[kudos][http://nl.wikipedia.org/wiki/Kudos_(computerterm)][][kudos]
\setuppapersize[A4,portrait][A4,portrait]
\starttext
\url[kudos]
\stoptext

G
___
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] Lucida lVert rVert - no glyph printed

2012-01-14 Thread Daniel Edwards
Hello everybody,

Problem 1: I just notices that (at least for me) the $\lVert$ / $\rVert$
commands print no glyph with Lucida New Math. I search in the source
files a bit, and found that in char-def.lua the lVert character is
defined as U+02016 but in lucida-math.lfg it is mapped as U+02225.

I was only able to reproduce this with context-current because with the
beta I got some font-related internal errors when including lucida - but
I guess this is another story :) but the two files are identical in
those points in current and beta.

According to gucharmap U+02225 is the parallel-symbol used to denote
that eg. two lines are parallel and the U+02016 is the character usually
used to denote the norm of a matrix/vector.

Solution 1: I changed the entry in lucida-math.lfg from U+02225 to U
+02016 and the lVert command produces the right glyph (any glyph at
all :). As far as I can say, the spacing is a bit bigger than that of
the absolute value $\lvert$ and $\rvert$, but that may be intentional.

Just wanted to post this, if anyone has that problem too :)

Problem 2: TikZ is not working in context-beta right now.

a) When simply doing \usemodule[tikz] you get many errors Undefined
control sequence for the \active command. I think this happens due some
changes in the catc-ini module. I simply redefined \active with the
\activecatcode macro and it compiles.

b) But even then, parts of the diagram are shifted (see the examples
below).

I have prepared some minimal examples here:

http://www.stud.mathematik.uni-stuttgart.de/~edwarddl/

I use TikZ mainly for drawing such diagramms, as it it relatively easy
to use, but I use the current version for that and I simply testes the
beta and it seemed not to work.

Sincerely,
Daniel

___
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] [***SPAM***] Re: Syntax highlighting for C-code

2012-01-14 Thread Peter Münster
On Fri, Jan 13 2012, Richard Weickelt wrote:

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

Usually, t-vim works quite well. Perhaps it's just broken with your
particular context version.


 3) http://wiki.contextgarden.net/Verbatim_text
 I tried to download pret-c and put it into the modules folder, but writing
 \installprettytype[C][C] failed, because it's not known (in mkIV).

Should work with an old context version (end of 2010).

You can also try
http://tlcontrib.metatex.org/cgi-bin/package.cgi/action=view/id=367

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


[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
  #includestdio.h

  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
)
fontslatin modern fonts are not preloaded
languageslanguage en is active
resolversmodules  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)
resolversmodules  loaded: 'filter'
(../home/wagner/Programs/context_beta/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv
loading  Filter (ver: 2011.12.27)
resolversmodules  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)
))
resolversmodules  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)
resolversmodules  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)
resolversmodules  already loaded: 'module-catcodes'
)
resolversmodules  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}
fontspreloading latin modern fonts (second stage)
(/home/wagner/Programs/context_beta/tex/texmf-context/tex/context/base/type-otf.mkiv)
filesreadfile  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}
fontsvirtual math  unable to resolve name mapsfromchar
fontsfallback 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 -s -C -n -c set 
tabstop=4 -c syntax on -c set syntax=ruby -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-ruby-0.tmp 
teste-temp-ruby-0.vimout
(teste-temp-ruby-0.vimout)
backend  xmp  using file 
'/home/wagner/Programs/context_beta/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pagesflushing realpage 1, userpage 1, subpage 1
 

Re: [NTG-context] [***SPAM***] Re: Syntax highlighting for C-code

2012-01-14 Thread Aditya Mahajan

On Sat, 14 Jan 2012, Peter Münster wrote:


On Fri, Jan 13 2012, Richard Weickelt wrote:


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


Usually, t-vim works quite well. Perhaps it's just broken with your
particular context version.


In the current beta, \installspacehandler has been renamed to 
\installspacemethod. So, saying


\let\installspacehandler\installspacemethod

before loading vim module should fix this bug (untested).

However, since buffers are also broken in the current beta (see other 
messages), t-vim (and t-filter) will not work with the current beta. 
I'll check and upload a new version of the module, but you'll have to wait 
until Hans uploads a new beta to get everything working.


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

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

Re: [NTG-context] footnote mechanism broken (3)

2012-01-14 Thread Wolfgang Schuster

Am 13.01.2012 um 12:17 schrieb Steffen Wolfrum:

 
 Am 13.01.2012 um 11:38 schrieb luigi scarso:
 
 On Fri, Jan 13, 2012 at 11:01 AM, Steffen Wolfrum cont...@st.estfiles.de 
 wrote:
 
 This one is even more disturbing:
 
 Just by setting the note's color to green, each footnote is set on a single 
 page!!!
 
 \setupnote[footnote][textcolor=green]% - without this line the notes are 
 set right
 
 \starttext
 \dorecurse{10}{\input ward\footnote{just one line. a test footnote. just one 
 line. a test footnote.}}
 \stoptext
 
 I don't use footnotes at all, so I can say if it's a bug or not, but this is 
 ok
 \setupnotes[textcolor=green]
 
 \starttext
 \dorecurse{10}{\input ward\footnote{just one line. a test footnote. just one 
 line. a test footnote.}}
 \stoptext
 
 I assumed \setupnote[footnote][textcolor=green] is the recommended and 
 correct way to do,
 as I found it in an example from Wolfgang (December 2011):

\setupnotes changes the values of all note (footnote, endnote etc.) while 
\setupnote changes
only the values of the given note type.

I sent a fix for the bug with the wrong placement of the footnote to the dev 
list.

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
___


[NTG-context] Lettrine misbehaving in beta

2012-01-14 Thread Michael Guravage
Greetings,

If you run the following example with the current beta you will see that
the second and subsequent lines of the paragraph are pushed down below the
extent of the drop cap. This behavior appeared sometime after 2011.10.24.
Can anyone explain what is happening and suggest a solution?

\usemodule[lettrine]
\showgrid

\def\myhook {\definefontsynonym[LettrineFont][eusm10]}
\setuplettrine
  [Lines=5,
   FontHook={\red\myhook},
   Findent=0.2em,
   Nindent=0.2em,
   Oversize=1.0,
   Hang=0.15]

\setuplayout
  [grid=yes]

\starttext

  \lettrine{W}{e thrive} in information||thick worlds because of our
  marvelous and everyday capacity to select, edit, single out,
  structure, highlight, group, pair, merge, harmonize, synthesize,
  focus, organize, condense, reduce, boil down, choose, categorize,
  catalog, classify, list, abstract, scan, look into, idealize,
  isolate, discriminate, distinguish, screen, pigeonhole, pick over,
  sort, integrate, blend, inspect, filter, lump, skip, smooth, chunk,
  average, approximate, cluster, aggregate, outline, summarize,
  itemize, review, dip into, flip through, browse, glance into, leaf
  through, skim, refine, enumerate, glean, synopsize, winnow the wheat
  from the chaff and separate the sheep from the goats.

\stoptext


With kind regards,

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