ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Reviczky Adam <reviczky@gmail.com>
To: ntg-context@ntg.nl
Subject: fit text to page
Date: Fri, 27 Jul 2012 19:01:31 +0200	[thread overview]
Message-ID: <CABaoHuuPtv7+_Ye3xJr4P16ns9MRFA7kPi0OqP3B12J+txOaxQ@mail.gmail.com> (raw)

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.
<recently read> \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
___________________________________________________________________________________
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:[~2012-07-27 17:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27 17:01 Reviczky Adam [this message]
2012-07-28 11:56 ` Jan Kula
2012-07-28 12:03 ` Hans Hagen

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=CABaoHuuPtv7+_Ye3xJr4P16ns9MRFA7kPi0OqP3B12J+txOaxQ@mail.gmail.com \
    --to=reviczky@gmail.com \
    --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).