From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: making horizontal space in luacode.
Date: Mon, 22 Oct 2012 01:15:57 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.2.02.1210220113380.30190@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <E4C6AA5A-3108-4D77-BD31-40FD212C794B@me.com>
On Mon, 22 Oct 2012, Jeong Dal wrote:
> Dear all,
>
> 1. I'd like to make a horizontal space using \hspace[3em] inside luacode.
>
> But context.hspace({3em}), context.hspace({"3em"}), context.hspace("3em") don't work.
> And print(" ") doesn't work either.
>
> How to make some horizontal space in luacode?
\hspace does not accept dimensions. The syntax for hspace is
\definehspace[whatever][3em]
\hspace[whatever].
So, you need:
\definehspace[skip][3em]
\starttext
\startluacode
context("Some text")
context.hspace{"skip"}
context("More text")
\stopluacode
\stoptext
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
___________________________________________________________________________________
next prev parent reply other threads:[~2012-10-22 5:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 4:25 Jeong Dal
2012-10-22 5:15 ` Aditya Mahajan [this message]
2012-10-22 7:40 ` Hans Hagen
[not found] <mailman.590.1350896809.2084.ntg-context@ntg.nl>
2012-10-22 11:56 ` Jeong Dal
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=alpine.LNX.2.02.1210220113380.30190@ybpnyubfg.ybpnyqbznva \
--to=adityam@umich.edu \
--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).