From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24058 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: Placing a scaled symbol within the flow of text Date: Fri, 02 Dec 2005 19:56:16 +0100 Message-ID: <439098D0.6020708@elvenkind.com> References: <4A78B8B834217341AA3152A47BB3C44701F23FFA@CAPITACAREXCH01.central.ad.capita.co.uk> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1133550073 3931 80.91.229.2 (2 Dec 2005 19:01:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Dec 2005 19:01:13 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Dec 02 20:01:10 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1EiG6E-0006hA-Sw for gctc-ntg-context-518@m.gmane.org; Fri, 02 Dec 2005 19:57:38 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4E6991286A; Fri, 2 Dec 2005 19:57:38 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19099-03-5; Fri, 2 Dec 2005 19:57:32 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 606591282C; Fri, 2 Dec 2005 19:57:32 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1BAC21282C for ; Fri, 2 Dec 2005 19:57:31 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19099-03-4 for ; Fri, 2 Dec 2005 19:57:30 +0100 (CET) Original-Received: from post-22.mail.nl.demon.net (post-22.mail.nl.demon.net [194.159.73.192]) by ronja.ntg.nl (Postfix) with ESMTP id 2D2F7127A0 for ; Fri, 2 Dec 2005 19:57:30 +0100 (CET) Original-Received: from boo.demon.nl ([82.161.175.147]:56807 helo=[192.168.1.3]) by post-22.mail.nl.demon.net with esmtp (Exim 4.51) id 1EiG65-00011W-Op for ntg-context@ntg.nl; Fri, 02 Dec 2005 18:57:29 +0000 User-Agent: Mozilla Thunderbird 1.0 (X11/20050215) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <4A78B8B834217341AA3152A47BB3C44701F23FFA@CAPITACAREXCH01.central.ad.capita.co.uk> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:24058 Archived-At: Pearson, Mark (Capita Symonds) wrote: > Hi all, > > I am attempting to insert a symbol at a reduced size within the > text flow but I'm not sure how to achieve this. > > I've included my test script below. > > \starttext > > \definefontsynonym[Dingbats][uzdr] > \definesymbol[filledSq][\getglyph{Dingbats}{\char110}] > > \def\FilledSq{\symbol[filledSq]} > \def\FilledSquare{\scale[height=0.5ex]{\symbol[filledSq]}} > > \switchtobodyfont[20pt] > > \startlines > \FilledSq Here is a line > This is one line > and this should be another > \FilledSq Hello again > \FilledSquare and again!! > and here are some more lines > this is the last one > \stoplines > > \stoptext > > When a \FilledSq is inserted, the text which follows appears > on the same line but when a \FilledSquare is inserted the text > which follows appears on the line below. I'm probably using > \scale in an inappropriate way and I'm sure don't know my > \vbox's from my \hbox's! > > Any examples of how to reduce the size of a glyph whilst > still being able to insert it as a normal character in the > text flow would be greatly appreciated. In TeX terms, \scale creates a \hbox. If TeX is in vertical mode (as it is when \startlines is in effect, because every line is a paragraph by itself in the mode), then a simple \hbox is not a good enough hint to make it switch to horizontal (paragraph) mode. So need another command to switch TeX to paragraph building mode, and it is: \def\FilledSquare% {\dontleavehmode\scale[height=0.5ex]{\symbol[filledSq]}} Cheers, Taco