From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77621 Path: news.gmane.org!not-for-mail From: Jan Kula Newsgroups: gmane.comp.tex.context Subject: Re: fit text to page Date: Sat, 28 Jul 2012 13:56:52 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1343476641 19295 80.91.229.3 (28 Jul 2012 11:57:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 28 Jul 2012 11:57:21 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Jul 28 13:57:19 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sv5e2-00068p-3R for gctc-ntg-context-518@m.gmane.org; Sat, 28 Jul 2012 13:57:18 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3AE0A101E7; Sat, 28 Jul 2012 13:57:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rfp7dxfv6xqt; Sat, 28 Jul 2012 13:57:15 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 70C16101DF; Sat, 28 Jul 2012 13:57:15 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 07AB5101DF for ; Sat, 28 Jul 2012 13:57:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5MGe2L58HN30 for ; Sat, 28 Jul 2012 13:57:13 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 070EC101DD for ; Sat, 28 Jul 2012 13:57:12 +0200 (CEST) Original-Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q6SBv9Mu026949 for ; Sat, 28 Jul 2012 13:57:12 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Sv5dr-000614-E0 for ntg-context@ntg.nl; Sat, 28 Jul 2012 13:57:07 +0200 Original-Received: from 109.80.130.156 ([109.80.130.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Jul 2012 13:57:07 +0200 Original-Received: from jano.kula by 109.80.130.156 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 28 Jul 2012 13:57:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 47 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 109.80.130.156 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.91.229.3; country=NO; latitude=62.0000; longitude=10.0000; http://maps.google.com/maps?q=62.0000,10.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0VHDLV9Qr - 2d045eaa6dda - 20120728 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:77621 Archived-At: Hallo Adam, On 07/27/2012 07:01 PM, Reviczky Adam wrote: > Hi list, > > I'm trying to scale a text to the textwidth and textheight by keeping > the aspect ratio, using different papersizes. > When the dimensions get too big I get an "Arithmetic overflow". > (I'm trying to do something similar to resizebox in LaTeX: > http://tex.stackexchange.com/questions/55394/perfectly-scale-line-paragraph-image-anything-up-to-textwidth) > > Minimal example: > \setuppapersize[A4][A4] %% [A1][A1] > \showframe > \starttext > \scale[factor=max,width=\textwidth,height=\textheight]{\framed[frame=on]{!}} > \stoptext > > Error message: > ! Arithmetic overflow. > \c_grph_scale_used_y_scale > > \grph_scale_convert_large_scale ...scratchdimen #3 > \relax \fi \scratchdimen -... > \grph_scale_calculations_yes ...grph_scale_temp_y > \xdef \finalscaleboxwidth ... > \grph_scale_calculate ...h_scale_calculations_yes > \fi \fi \fi > \syst_boxes_with_next_box ...grph_scale_calculate > \ifconditional \c_grph_sca... > l.6 ...h,height=\textheight]{\framed[frame=on]{!}} > > > Adam Not sure where exactly, but likely you have reached a size calculation limit of TeX (seems like a box calculation since more text works fine). Start with the bigger font size if you want to enlarge the box that much: \setuppapersize[A4][A4] %% [A1][A1] \showframe \starttext \definedfont[Serif at 20pt] \scale[factor=max,width=\textwidth,height=\textheight]{\framed[frame=on]{!}} \stoptext Jano ___________________________________________________________________________________ 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 ___________________________________________________________________________________