ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* image align in \clip
@ 2020-12-09  8:38 Jan U. Hasecke
  2020-12-09 10:26 ` Hans Hagen
  2020-12-09 15:48 ` Pablo Rodriguez
  0 siblings, 2 replies; 5+ messages in thread
From: Jan U. Hasecke @ 2020-12-09  8:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear all,

I use \clip to simplify working with images.

I have a problem that I am unable to reproduce in a MWE.


\setupexternalfigure[location=default]
\showframe
\starttext
\externalfigure[cow.pdf][width=\textwidth]

\clip[height=50mm]
     {\externalfigure[cow.pdf][width=\textwidth]}
\stoptext

In my real document the clipped image is shifted to the right as if
indented by 1em or so.

Any hints where to look for the reason?

TIA
juh

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: image align in \clip
  2020-12-09  8:38 image align in \clip Jan U. Hasecke
@ 2020-12-09 10:26 ` Hans Hagen
  2020-12-09 11:08   ` Jan U. Hasecke
  2020-12-09 15:48 ` Pablo Rodriguez
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2020-12-09 10:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Jan U. Hasecke

On 12/9/2020 9:38 AM, Jan U. Hasecke wrote:
> Dear all,
> 
> I use \clip to simplify working with images.
> 
> I have a problem that I am unable to reproduce in a MWE.
> 
> 
> \setupexternalfigure[location=default]
> \showframe
> \starttext
> \externalfigure[cow.pdf][width=\textwidth]
> 
> \clip[height=50mm]
>       {\externalfigure[cow.pdf][width=\textwidth]}
> \stoptext
> 
> In my real document the clipped image is shifted to the right as if
> indented by 1em or so.
> 
> Any hints where to look for the reason?
what if you put \removeunwantedspaces in front of the clip

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: image align in \clip
  2020-12-09 10:26 ` Hans Hagen
@ 2020-12-09 11:08   ` Jan U. Hasecke
  2020-12-09 12:25     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Jan U. Hasecke @ 2020-12-09 11:08 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users

Am 09.12.20 um 11:26 schrieb Hans Hagen:
> what if you put \removeunwantedspaces in front of the clip

The space vanishes when I put it right before \externalfigure.

Thanks a lot, Hans!

(Still, I would like to know how the space came up in the first place.)


juh
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: image align in \clip
  2020-12-09 11:08   ` Jan U. Hasecke
@ 2020-12-09 12:25     ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2020-12-09 12:25 UTC (permalink / raw)
  To: Jan U. Hasecke, mailing list for ConTeXt users

On 12/9/2020 12:08 PM, Jan U. Hasecke wrote:
> Am 09.12.20 um 11:26 schrieb Hans Hagen:
>> what if you put \removeunwantedspaces in front of the clip
> 
> The space vanishes when I put it right before \externalfigure.
> 
> Thanks a lot, Hans!
> 
> (Still, I would like to know how the space came up in the first place.)
hard to say without knowing what happens before you do the 
\externalfigure command

you can put

\tracingall

someplace before it and

\tracingnone

after the \removeunwantesspaces and then check the log and see where a 
space is injected

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: image align in \clip
  2020-12-09  8:38 image align in \clip Jan U. Hasecke
  2020-12-09 10:26 ` Hans Hagen
@ 2020-12-09 15:48 ` Pablo Rodriguez
  1 sibling, 0 replies; 5+ messages in thread
From: Pablo Rodriguez @ 2020-12-09 15:48 UTC (permalink / raw)
  To: ntg-context

On 12/9/20 9:38 AM, Jan U. Hasecke wrote:
> Dear all,
>
> I use \clip to simplify working with images.

Hi Jan-Ulrich,

this command is really useful.

> In my real document the clipped image is shifted to the right as if
> indented by 1em or so.

I have read that Hans solved your issue.

I thought of another approach (which isn’t your case):

  \showframe\showgrid
  \setupindenting[yes, always, big]
  \setupexternalfigure[location=default]
  \showframe
  \starttext
  \clip[height=50mm]
       {\externalfigure[cow.pdf][width=\textwidth]}

  \dontleavehmode
  \clip[height=50mm]
       {\externalfigure[cow.pdf][width=\textwidth]}

  \noindentation
  \dontleavehmode
  \clip[height=50mm]
       {\externalfigure[cow.pdf][width=\textwidth]}
  \stoptext

I thought that you had your image in horizontal mode (inside a
paragraph) and then the paragraph was indented.

Cheers

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-12-09 15:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09  8:38 image align in \clip Jan U. Hasecke
2020-12-09 10:26 ` Hans Hagen
2020-12-09 11:08   ` Jan U. Hasecke
2020-12-09 12:25     ` Hans Hagen
2020-12-09 15:48 ` Pablo Rodriguez

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