Hello Pablo,
also Lua might be useful for you - some code like the one bellow, which
is based on an answer in this forum years ago:
assert(not figures.getinfo2)
figures.getinfo2 = function(name, page) -- [ [NTG-context] Pdf info with
Lua/Ctx API ]
if type(name) == "string" then
n
On 1/29/20 2:31 PM, Arthur Reutenauer wrote:
> On Tue, Jan 28, 2020 at 05:43:36PM +0100, Pablo Rodriguez wrote:
>> I’m afraid this is the second time I’m aware of the existence of \ifdim
>> (the first time was when reading previous message from Taco 😅).
>
> It’s a TeX primitive. From the TeXbook
On Tue, Jan 28, 2020 at 05:43:36PM +0100, Pablo Rodriguez wrote:
> I’m afraid this is the second time I’m aware of the existence of \ifdim
> (the first time was when reading previous message from Taco 😅).
It’s a TeX primitive. From the TeXbook, chapter 20:
* \ifdim (compares two dimen
On Tue, 28 Jan 2020 17:04:52 +0100
Taco Hoekwater wrote:
> Hi Pablo,
>
> I have had lots of problems with getting the correct figure dimensions
> for external images. In the end, I now use the code below. It is just
> as low-level and much more inefficient than your code, but it has not
> faile
On 1/28/20 5:15 PM, Wolfgang Schuster wrote:
> On Tue, 28 Jan 2020 16:51:35 +0100 Pablo Rodriguez wrote:
>> [...]
>> At least, I would like to know how to get image dimension numbers
>> suitable to be deployed with \ifnum.
>
> Use \ifdim to compare dimensions.
Many thanks for your reply, Wolfgang.
Many thanks for your reply, Taco. It helps me a lot to manipulate the
images (which are actually PDF documents).
I have another question about an issue that I experience at work.
Some of the PDF documents I have to deal with are poorly generated.
There are misplaced A4 pages inside legal paper si
On Tue, 28 Jan 2020 16:51:35 +0100
Pablo Rodriguez wrote:
> Dear list,
>
> I have to check whether an external PDF document is portrait or
> landscape (in order to manipulate it in different ways).
>
> From what I understand of grph-inc.mkiv, I came with the following sample:
>
> \unprotec
Hi Pablo,
I have had lots of problems with getting the correct figure dimensions
for external images. In the end, I now use the code below. It is just
as low-level and much more inefficient than your code, but it has not
failed me yet.
\newdimen\MYfigurewidth
\newdimen\MYfigureheight
\unex
Dear list,
I have to check whether an external PDF document is portrait or
landscape (in order to manipulate it in different ways).
From what I understand of grph-inc.mkiv, I came with the following sample:
\unprotect
\def\figureXSize{\clf_figurestatus{width}{}}
\def\figureYSize{\clf