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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleHow 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
More Pages to Explore .....