Nicholas,
> Is there any way to get a multi-page textbackground to respect
> topoffset on each page? From the second page onwards,
> it leaves no offset at the top.
I have the same problem. A small-not-so-good-hack would be to define a
tiny backgroundoffset as well. This messes the layout a littl
> It's somewhat experimental. Up to you to update the wiki.
Anyone can suggest a category for it?
http://wiki.contextgarden.net/Category:Commands
Nodes?
André Caldas.
___
If your question is of interest to others as
> I've added the markers code to the beta so that we have an
> abstract way to deal with such matters.
> [...]
> Node lists are processed \hbox \boxmarker{mymarker}{1} {nested from
> [...]
Does it have to be an "hbox"?
>
> It's somewhat experimental. Up to you to update the wiki.
I've never upd
Hello!
1. How does a metapost figure (\startMPcode) becomes a node?
2. When does it become a node?
3. What type of node it becomes?
4. Can I change its attributes?
5. Can I change its colors or transparency levels?
André Caldas.
___
>> How do I identify a specific node? Like...
>> [...]
>
> Here is a start. I've added the markers code to the beta so that we
> have an abstract way to deal with such matters.
> [...]
> \hbox \boxmarker{mymarker}{2}
Can't the mark be a string?
André Caldas.
_
What is the correct way to install the beta version of context?
André Caldas.
___
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
Another question...
> function userdata.processmystuff(head)
Shall I use this?
userdata = userdata or {}
> \startbuffer
> whatever \hbox{you} want
> \stopbuffer
How do I identify a specific node? Like...
\startbuffer
Will this be
\boxtobechanged{transparent?}
\stopbuffer
André Caldas.
_
> here's an example (I'll add it to the cld manual):
Wow!!! Thank you for your time, Hans!
I will study your sample... :-)
Cheers,
André Caldas.
___
If your question is of interest to others as well, please add an e
Hello!
Given some
\startbuffer
Blah, blah, blah...
\stopbuffer
I'd like to get a "node tree" corresponding to how the buffer would be
processed at a given point. Using luatex, I'd like to identify certain
sub-nodes and change their attributes (to be specific: transparency).
Any hint on how to
Hello!
How can I have a "framed text" that can cross page boundaries?
Cheers,
André Caldas.
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / ht
> Here's the animated (video) version.
>
> http://www.youtube.com/watch?v=2_OZ-yKMd7g
How did you produce a video out of the PDF?
___
If your question is of interest to others as well, please add an entry to the
Wiki!
Instead of writing
$\left( x+y \right)$,
I'd like to simply write
$(x + y)$.
For unmatched parenthesis, I would like to write
$:-\unmatched)$.
How can I accomplish that in context?
Cheeers,
André Caldas.
___
If your
>> How can I define the transparency of some text?
>
> http://wiki.contextgarden.net/Color
I want to set up the transparency without messing with the colors
(that were setup by the user).
André Caldas.
___
If your qu
Hello!
Some days ago, I have written a module for writing "commutative
diagrams" using MetaPost.
Definition of "commutative diagrams":
https://duckduckgo.com/?q=commutative+diagrams
The module lives here, now:
https://bitbucket.org/andrecaldas/context-commutativediagrams
The module still needs a
Hi!
> As ranges are sometimes handy I've added a parser to the core
Nice. I will use it as soon as it is available.
It is a very good thing that range specifications will be uniform
across different modules.
André Caldas.
_
> %% begin example
> \grabbufferdata[mybuffer][thisisthestart][thisistheend]
> \thisisthestart
> My friend, you would not tell with such high zest
> To children ardent for some desparate glory,
> The old Lie: Dulce et decorum est
> Pro patria mori.
> \thisistheend
>
> \typebuffer[mybuffer]
> %% end
Hello, Hans!
I had just managed to do it. I will switch to yours instead of mine...
I don't have any experience in Lua. Sorry for bothering with such easy
requests...
By the way, simplesteps recognizes number ranges! :-)
https://bitbucket.org/andrecaldas/context-simplesteps/src/1c7ced45208b782895
Hi!
I have to use pattern matching in lua. I tried the function "string.gmatch".
I want to match (iterate over) strings of the type
([0-9]+)(-([0-9]*))?(,|$)
For example:
1,3- (iterations: 1 and 3-)
1-3,6,7 (iterations: 1-3 then 6 then 7)
1-2,5-6,10- (iterations 1-2 then 5-6 then 10-)
André Cal
> thanks for the interesting contribution! Have a look at the patch
> I hopefully don’t forget to append.
I didn't quite understood how this works:
\unexpanded\def\startframe{\dosingleempty\frame_start}
\def\frame_start[#1]{%
\iffirstargument
\section{#1}%% solution needed here!
\fi
\be
Hello, OK!
> You were so quick to write your module…
> Thanks for sharing,
:-)
> but I could not typeset the example file you sent:
> I didn't get whether your file simplesteps.mkiv should be renamed
I did this on my machine:
1. Copy simplesteps.{lua,mkiv} to
texmf-local/tex/context/third/simp
> These expand to Lua long strings, [===[ and ]===] respectively,
> without checking, so theoretically the same issue will arise iff
> your string contains ]===]. I consider the likelihood for this to
> happen to be too low to bother, but if you want to be absolutely
> on the safe side you can also
> \unexpanded\def\uncover[#1]%
> {\ctxlua{
> distance = simplesteps.distance_to_step(\!!bs#1\!!es)
> ...
> }}
>
> it works because the " is now only part of the string.
Thanks. That's what I needed. I guess
bs = begin string
es = end string.
Cheers,
André Caldas.
__
>> I have one question:
>> - What does it happen when there is a quotation mark (") inside the
>> parameter? Do I need to "escape" the contents passed to the macro?
>
>
> No you don’t have to but you could have checked yourself :)
Sorry... I didn't try it when I asked, but I had the impression I d
>>> - maybe switch to mkvi as named parameters make rewriting
>>>macros a breeze
>>
>> Would you elaborate a bit further?
>
> You can use for the parameter in your macros names instead of number,
> as you can see below the first definition uses “#1” for the argument while
> the second uses “#t
Hello!
> thanks for the interesting contribution! Have a look at the patch
> I hopefully don’t forget to append.
Thank you! I will take a look and learn... ;-)
>> [...]
>> I use \startbuffer and \stopbuffer, and also Lua. As I said, I don't
>> really know how to write a module... comments are v
Well since Raw Steps did not work with mkiv, I tried making a very
very simple module for a "beamer-like" behaviour.
I don't really know how to write a module... but here is what I did:
https://bitbucket.org/andrecaldas/math-video-classes/src/9116599821fc246cb54d3e6d7b8e6304649eaffb/lib?at=def
Hello, Philipp!
>> If I load a lua file from a module using
>> \registerctxluafile{file}{1.001}
>> or
>> \ctxloadluafile{file}
>> How can I be sure the file was in fact loaded?
>
> The related tracker output is quite comprehensive:
>
> \enabletrackers[resolvers.locating]
> \ctxloadluafile{
> http://www.tug.org/interviews/voipio.html
> http://www.lucet.fi/craftex
Nice!
___
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.n
Is there any working alternative to Raw Steps?
I need an alternative without JavaScript because the slides PDF will
become JPG and then OGV/MPG/MP8...
The idea is to record a lecture on video and then play it back with
the slides alongside.
https://bitbucket.org/andrecaldas/math-video-classes
C
>> But I would like to use some "object oriented" like approach.
>> [...]
>> How do I do that in METAFUN/METAPOST?
>
> You may want to take a look at my attempt:
>
> http://users.dimi.uniud.it/~nicola.vitacolonna/home/content/metappeal
Looks nice! I didn't find any "license" explaining the licensi
> But I would like to use some "object oriented" like approach.
I have done some OOP like coding...
https://bitbucket.org/andrecaldas/math-video-classes/src/77036fe1001ede35e301305700943ac952089d32/src/environments/diagrams.tex?at=default
This is my first METAFUN experience. Comments are very wel
Hello, list!
I am writing down a macro package for commutative diagrams using metafun.
This is my first try:
https://bitbucket.org/andrecaldas/math-video-classes/src/9a050eab20348c9a9c9e50740618173648979f45/src/environments/diagrams.tex?at=default
Used here:
https://bitbucket.org/andrecaldas/math
Hello!
> My case is more complicated - a file is included from more other files in
> various directory levels.
I do this with \component:
https://bitbucket.org/andrecaldas/math-video-classes/src/92a8e5b1a6eee07ed3475e20b54b0a566ab57738/src/products/assorted.tex?at=default
André Caldas.
Hello!
> Is 'toppath:' prefix working?
I use it only with \component, \environment, \product, \project. It
works even if I do like this:
$ mkdir build
$ cd build
$ context ../src/products/assorted.tex
> context.exe Test\t-TopPath.mkiv
> In this situation compilation fails.
> How to make it wor
>> Are we giving up the feature? I was kind of using it already... :-(
>
> you have a messed up system ... the code is in data-pre.lua
Indeed! :-)
Sorry for the mess!
Now, I have a bug at data-pre.lua. The variable inputstack is not
defined there. Here is a fix:
diff --git a/tex/context/base/da
Hello, Hans!
I quoted this from your message:
>>> local function toppath()
>>> [...]
>>> resolvers.toppath = topath
When you commited version "eb24ffd", the following bug was introduced:
>> There is a bug here. It should be
>> resolvers.toppath = toppath
>> (double "p" in the right side)
>
> I
Hello!
> local function toppath()
> [...]
> resolvers.toppath = topath
There is a bug here. It should be
resolvers.toppath = toppath
(double "p" in the right side)
André Caldas.
--
- Por que altera a ordem natural da conversação!
- Por que não?
- Eu não gosto, não.
- Você gosta quando copiam a
>> Same error. But if I comment the definition of
>> resolvers.prefixes.toppath, the error goes away.
>
> fixed (tested on opensuse and ubuntu)
The problem was that in some places there was a
toppath with double "p" (pp)
and in some places it was
topath with single "p" (p).
Will "toppath" be brou
Hello!
>> It would be REALLY NICE if the functionality of "pathrelativetome" was
>> provided by ConTeXt.
>
> in file-job.lua add around the function 'process':
>
> local function toppath()
> [...]
>
> \component toppath:/subpath/somefile.tex
Works like a charm, Hans! Sorry I took so long to t
Hello!
I have the context standalone installed.
How do I update it to reflect the last changes in the GIT repo?
http://gitorious.org/context
Cheers,
André Caldas.
--
- Por que altera a ordem natural da conversação!
- Por que não?
- Eu não gosto, não.
- Você gosta quando copiam a mensagem origin
1. check for "stack underflow"; and/or
>>>
>>> such things are dealt with
>>
>> By assert, I mean:
>> assert(inputstack[#inputstack], "Input stack should never be empty
>> when toppath() is called.")
>
> normally
>
> if inputstack[#inputstack] == nil then
> assume path "."
> end
>
> is
>> 1. check for "stack underflow"; and/or
>
> such things are dealt with
By assert, I mean:
assert(inputstack[#inputstack], "Input stack should never be empty
when toppath() is called.")
>> 2. check if the file "somefile.tex" exists in the directory being
>> popped from the stack.
>> Just for "b
>> It would be REALLY NICE if the functionality of "pathrelativetome" was
>> provided by ConTeXt.
>
> in file-job.lua add around the function 'process':
You make me really happy, Hans! :-)
I will change file-job.lua on my system to test. I can do this only on
Wednesday.
> local function toppath(
> allow/disallow printing &c.
Set it free!!! :-P
Technically speaking, I'd like to tell you that there is no easy way
(without controlling the user's computer) to disallow printing. The
viewer program has to VOLUNTARILY refuse itself to obey the user and
opt to obey you. There is no easy way to a
Once, I've read about someone who, a long time ago, found it really
difficult to look for pages related to LaTeX on the internet. He used
to get a lot of "fetish" related pages!!!
Since "context" is a very common word, I'd like to know from ConTeXt users...
How do you look for "ConTeXt" stuff usin
Dear gurus,
How can I make commutative diagrams in ConTeXt?
Cheers,
André Caldas.
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.n
Hello, list!
A while ago, I raised a question about how to, in a tex, specify a
file with a path relative to the currently being processed file.
http://www.ntg.nl/pipermail/ntg-context/2012/069132.html
http://www.ntg.nl/pipermail/ntg-context/2012/068902.html
Even though the issue did not get much
> \startproduct text
> \component [\MyMacro]
> \stopproduct
Didn't work for me... does it work for you?
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@n
>>> Why is "document.MyCharacterMess" a string?
>>
>> The sequencers use loadstring() internally (util-seq.lua), so you
>> need to supply the namespace as a string. This happens all over
>> the place with action/callbacks.
>
> more flexible this way (one can redefine, nil or whatever such functions
Hello!
> Why don’t you use the \usepath command.
Because it is too magical. We DO need magic to locate system
libraries. But we DO NOT need magic to locate our own project files.
For this reason, the C language has
#include
and
#include "local_lib.h"
I don't want the file to be searched in a pi
Hi!
This works:
\startproduct assorted
\project math_video_classes
\unexpanded\def\pathrelativetome%
{src/products/assorted/open_mapping_theorem/notes}
%\component{\pathrelativetome}
\component{src/products/assorted/open_mapping_theorem/notes}
\stopproduct
But this does not work (no PD
I am trying to redefine the ’open_read_file’ callback.
> [...]
> utilities.sequencers.appendaction(textfileactions,
> "system","document.MyCharacterMess")
All I want is to get the full path (or path relative to
lfs.currentdir()). Is "textfileactions" the action I should trap?
Also, shall I
Hello, Hans!
>> Shall I simply do something like this?
>>
>> [...]
>
> this is not the recommended way .. better do somethign like this:
> [...]
> function document.MyCharacterMess(str,filename)
Loved your function naming! :-)
What is this "str"?
> if file.nameonly(filename) == "war
>> I am trying to redefine the ’open_read_file’ callback.
>
> [...]
> direct callback access is disabled. There are usually some layers
> of abstraction on top of them, different ones for different
> callbacks. Mapping them all is a huge effort, so best refer to
> the source.
>
> In your case the f
Hello!
I am trying to redefine the ’open_read_file’ callback.
I am getting this error:
callback ’open_read_file’ is frozen
Why is it "frozen"? Can I "unfreeze it"?
André Caldas.
___
If your question is of interest
> You have to load the lua file in your module, e.g.
> \ctxloadluafile{my_module}.
Thank you!
André Caldas.
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-con
Hello!
>> Where should I put a module if I have the following project strucutre?
>>
> You can load your module with \usemodule[…]
> from your environment file.
So, inside "environments/load_mymodule.tex" I call
\usemodule[mymodule]
But how will it be found?
My module is composed of a mkiv and a
> Where should I put a module if I have the following project strucutre?
Can't I have a module inside a project?
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-
Where should I put a module if I have the following project strucutre?
math-books/
math-books.tex
environments/
layout.tex
products/
book1.tex
book1/
chapter1.tex
chapter2.tex
book2.tex
> My mistake: I tested the code I gave you in \startluacode, but then
> for the e-mail I wrapped it in \cldcontext.
I had tested it using startluacode, also. :-(
> These two versions both work, and I actually tested them this time:
>
> \startluacode
> context(environment.runpath .. '/' ..
>> - Do I need to "include" "file-job.lua" somehow?
>
> No need to include it, it's part of the ConTeXt core.
> [...]
> Is it working for you?
No. I get:
! LuaTeX error :1: attempt to get length of field
'inputstack' (a nil value)
stack traceback:
:1: in main chunk.
system > tex
Hi!
> the following should work.
>
> \cldcontext{
> environment.runpath .. '/' ..
> file.pathpart(resolvers.inputstack[#resolvers.inputstack])
> }
Sorry, to ask such a dumb question...
- Do I need to "include" "file-job.lua" somehow?
André Caldas.
__
Dear Sietse,
Thanks a lot!!!
> Finally found it, after lots of trial-and-erroring through
> likely-looking table names in file-job.lua: the stack of input files
> is kept in resolvers.inputstack.
I don't program any "lua". But I was taking a look at "file-job.lua"
myself. I have a lot to learn!!
Thank you for yor time, Peter. But this is not what I wanted... :-(
>> Is there a way to know the directory of the currently being processed
>> source file?
>
> This works with mkiv:
>
> \starttext
> PWD: \cldcontext{io.popen"pwd":read()}
> \stoptext
This gives the directory where the "context" c
Hello!
Is there a way to know the directory of the currently being processed
source file?
Something like
dirname(__FILE__)
in PHP.
Cheers,
André Caldas.
___
If your question is of interest to others as well, please
>> I have a macro to typeset function definitions:
>>
>> \define[5]\functionarray
>> [...]
>>
>> How should I implement my "functionarray"?
>
>
> Use mathmatrix.
> [...]
Works very well, thank you.
André Caldas.
___
I have a macro to typeset function definitions:
\define[5]\functionarray
{
\startalign[n=4, align={left,right,center,left}]
\NC #1: \NC #2 \NC \to \NC #3 \NR
\NC \NC #4 \NC \mapsto \NC #5
\stopalign
}
I use it like this: (notice the period at the end)
\start
>> When I write a project, product, component or environment file, why
>> would I want the references I made to be dependent on the directory
>> where the script was called? Shouldn't things be like the
>> #include "relative_path.h"
>> used in the C language, for example? That is, shouldn't those p
Hello, list!
I am really new to ConTeXt. I am writing a book
http://topologia-geral.ourproject.org/
It is written in LaTeX and I intend to migrate it to ConTeXt.
I want to migrate and I want to be as far from HACKS as I can. So I
want to know the recommended way to do things. One of my first
diff
69 matches
Mail list logo