ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* makeupwidth in externalfigure yields invalid escape sequence
@ 2012-12-31 12:38 Andreas Mang
  2012-12-31 13:08 ` Peter Münster
  2013-01-01  8:02 ` Wolfgang Schuster
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Mang @ 2012-12-31 12:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi there,

did I miss something or is there a problem with the use of "makeupwidth" in conection with the "externalfigure" command in the latest beta?

The error I get (minimal example below) is:

! LuaTeX error [string "\directlua "]:1: invalid escape sequence near '\m'.

Cheers,
Andreas


ConTeXt  ver: 2012.12.28 20:30 MKIV

%%% minimal example %%%

\starttext 
\externalfigure[cow][width=5cm] % works
\externalfigure[cow][width=0.5\makeupwidth] % error
\stoptext

%%% minimal example %%%


Bart Simpson mode:

You should never update your context version during holidays.
You should never update your context version during holidays.
You should never update your context version during holidays.
You should never update your context version during holidays.

Happy New Year's Eve to y'all.


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: makeupwidth in externalfigure yields invalid escape sequence
  2012-12-31 12:38 makeupwidth in externalfigure yields invalid escape sequence Andreas Mang
@ 2012-12-31 13:08 ` Peter Münster
  2013-01-01  8:02 ` Wolfgang Schuster
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Münster @ 2012-12-31 13:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Dec 31 2012, Andreas Mang wrote:

> \externalfigure[cow][width=0.5\makeupwidth] % error

Here a patch that helps:

http://www.ntg.nl/pipermail/ntg-context/2012/068393.html

Then, type "context --make".

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: makeupwidth in externalfigure yields invalid escape sequence
  2012-12-31 12:38 makeupwidth in externalfigure yields invalid escape sequence Andreas Mang
  2012-12-31 13:08 ` Peter Münster
@ 2013-01-01  8:02 ` Wolfgang Schuster
  2013-01-01 13:10   ` Andreas Mang
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2013-01-01  8:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 31.12.2012 um 13:38 schrieb Andreas Mang <mang@imt.uni-luebeck.de>:

> Hi there,
> 
> did I miss something or is there a problem with the use of "makeupwidth" in conection with the "externalfigure" command in the latest beta?

The \externalfigure commands passes the values of the width/height keys to Lua which can’t handle relative values.

When you want to dimension to Lua they have to be in the form “10pt”, "5cm” or “1200” (dimension without units are in scaled points), to convert a relative (e.g. \textwidth) in a absolute value (e.g. 12pt) you can use the \dimexpr command.

  \externalfigure[…][width=\the\dimexpr.3\textwidth\relax]

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: makeupwidth in externalfigure yields invalid escape sequence
  2013-01-01  8:02 ` Wolfgang Schuster
@ 2013-01-01 13:10   ` Andreas Mang
  2013-01-03 21:50     ` Andreas Mang
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Mang @ 2013-01-01 13:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

Thanks for the quick responses.

> The \externalfigure commands passes the values of the width/height keys to Lua which can’t handle relative values [...] to convert a relative (e.g. \textwidth) in a absolute value (e.g. 12pt) you can use the \dimexpr command.
> 
>  \externalfigure[…][width=\the\dimexpr.3\textwidth\relax]

I'm seem to be not educated enough about dos and don'ts: To me it seemed mandatory to use relative sizes as I might have to change the layout of my document (*). So, do I get it right that the idea of this change is to stick to a rigid A4 setting (i.e. all figures are e.g. of width 5 cm) and then simply change the print out size to A5: 

\setuppapersize[A4][A5]

A quick "yes, keep it rigid" or "no, do it adaptively" would be enough to get me on track (in case I am not telling bull****). I'll adapt my doc accordingly. 

Cheers,
Andreas

(*) I am currently working on a document, which Iis going through assessment in A4 and very likely published in A5
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: makeupwidth in externalfigure yields  invalid  escape sequence
  2013-01-01 13:10   ` Andreas Mang
@ 2013-01-03 21:50     ` Andreas Mang
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Mang @ 2013-01-03 21:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear...

...invisible man probably known as Hans...

Thanks for fixing this!

Cheers,
Andreas

FYI followers:

\starttext 
\externalfigure[cow][width=0.5\makeupwidth] 
\stoptext

works with the latest beta (MKIV)

Am Jan 1, 2013 um 2:10 PM schrieb Andreas Mang <mang@imt.uni-luebeck.de>:

> Hi,
> 
> Thanks for the quick responses.
> 
>> The \externalfigure commands passes the values of the width/height keys to Lua which can’t handle relative values [...] to convert a relative (e.g. \textwidth) in a absolute value (e.g. 12pt) you can use the \dimexpr command.
>> 
>> \externalfigure[…][width=\the\dimexpr.3\textwidth\relax]
> 
> I'm seem to be not educated enough about dos and don'ts: To me it seemed mandatory to use relative sizes as I might have to change the layout of my document (*). So, do I get it right that the idea of this change is to stick to a rigid A4 setting (i.e. all figures are e.g. of width 5 cm) and then simply change the print out size to A5: 
> 
> \setuppapersize[A4][A5]
> 
> A quick "yes, keep it rigid" or "no, do it adaptively" would be enough to get me on track (in case I am not telling bull****). I'll adapt my doc accordingly. 
> 
> Cheers,
> Andreas
> 
> (*) I am currently working on a document, which Iis going through assessment in A4 and very likely published in A5
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-03 21:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-31 12:38 makeupwidth in externalfigure yields invalid escape sequence Andreas Mang
2012-12-31 13:08 ` Peter Münster
2013-01-01  8:02 ` Wolfgang Schuster
2013-01-01 13:10   ` Andreas Mang
2013-01-03 21:50     ` Andreas Mang

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).