ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: increase space on the left of pages included using \copypages
Date: Wed, 23 Feb 2011 15:10:40 +0100	[thread overview]
Message-ID: <DCFD7591-D0C0-49F3-A77A-279D4F624FB3@uni-bonn.de> (raw)
In-Reply-To: <AANLkTinLL25CXicFtq7Op3O5Dhe9DaN9auWAFW_QWAoo@mail.gmail.com>


On Feb 23, 2011, at 1:41 PM, Curiouslearn wrote:

> I will try to do this using lua loop. I should learn it. I am learning
> so many new things currently that I have not had a chance to learn
> Lua.
> 
lua is not all that different from other languages such as python or perl; once you've grasped the concept of one syntax, you should be able to learn others and write lua code pretty soon.

> I was wondering if Aditya's filter module could be used to use Python
> instead of Lua, but I suppose I should ask that as a new question.

Aditya's filter module is for highlighting code, it will not run python code within luatex. I think Luigi once played with a module that allowed embedding python within luatex (http://wiki.contextgarden.net/User:Luigi.scarso#Luatex_hosts_python and http://wiki.contextgarden.net/User:Luigi.scarso/luatex_lunatic), but I think he has since given up on this project.

As for the lua loop, maybe this can be helpful (this is how I create "offprints" of my scanned articles):

\startluacode
  for i = 1,21 do
  tex.sprint('\\hskip1cm\\externalfigure[includethis][page=' .. i .. ',height=\\textheight]')
  end
\stopluacode

tex.sprint() passes its argument to the typesetting engine, '..' concatenates the lua variable 'i' into this code. Od course, this is mkiv only.

That should get you started.

Best

Thomas

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


  reply	other threads:[~2011-02-23 14:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21 15:58 Curiouslearn
2011-02-22 14:16 ` Curiouslearn
2011-02-23 11:11   ` Curiouslearn
2011-02-23 11:21     ` Hans Hagen
2011-02-23 11:26       ` Curiouslearn
2011-02-23 11:33     ` Thomas A. Schmitz
2011-02-23 12:41       ` Curiouslearn
2011-02-23 14:10         ` Thomas A. Schmitz [this message]
2011-02-23 14:22           ` luigi scarso
2011-02-23 15:27         ` Aditya Mahajan
2011-02-23 15:33           ` Andreas Harder
2011-02-23 16:01             ` Marco
2011-02-23 15:53           ` Curiouslearn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DCFD7591-D0C0-49F3-A77A-279D4F624FB3@uni-bonn.de \
    --to=thomas.schmitz@uni-bonn.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).