Quantcast
Channel: How to expand a macro into viewport= arguments(includegraphics) - TeX - LaTeX Stack Exchange
Browsing all 5 articles
Browse latest View live

Answer by Heiko Oberdiek for How to expand a macro into viewport=...

The four values for options viewport or trim are identified by the separating spaces. The parser, defined for these options by package graphicx expects explicit spaces and fails, if the spaces are...

View Article



Image may be NSFW.
Clik here to view.

Answer by egreg for How to expand a macro into viewport=...

You can define a new key for \includegraphics, I'll call it xviewport.\documentclass{article}\usepackage{graphicx}\usepackage{calc}\makeatletter\define@key{Gin}{xviewport}[]{% \begingroup\edef\x{%...

View Article

Image may be NSFW.
Clik here to view.

Answer by Werner for How to expand a macro into viewport=...

Here are a couple of ways:\documentclass{article}\usepackage{graphicx}\newcommand{\myviewport}{viewport=0pt 10pt 200pt 50pt}\begin{document}\includegraphics[clip, viewport=0pt 10pt 200pt...

View Article

Answer by Steven B. Segletes for How to expand a macro into viewport=...

This works, but may not be general enough for your need:\documentclass{article}\usepackage[demo]{graphicx}\begin{document}\newcommand*{\aport}{45.29pt 86.28pt 235pt 187pt}\def\X{\includegraphics[clip,...

View Article

How to expand a macro into viewport= arguments(includegraphics)

How do I properly expand a macro \myviewport so that it is parsed as the viewport=0pt 10pt 100pt 200pt argument of \includegraphics[clip,...

View Article

Browsing all 5 articles
Browse latest View live


Latest Images