Closed VerenaHeld closed 8 years ago
yup, I don't know how to solve that either @VerenaKasztantowicz – would you mind putting this on tex.stackexchange.com?
Maybe someone has an idea.
(I guess implementing the whole thing via minipages would have avoided this, but caused other problems).
I guess unless we do find a \lineheight
argument somewhere in TeX, that yields the respective cell height, we have to go another way.
Seems almost unlikely that this would exist, because TeX is of course meant to scale cell heights as necessary; they're not supposed to be fixed height.
(For that, I suppose, there's stuff like the minipage environment, which we're not using, for better or for worse -> https://github.com/aiorazabala/qmethod/issues/330).
Maybe there is a relatively easy/elegant way to do this:
AveryZweck....Rnw
) has a known cell height, we can just hard-code assign that somewhere in make.cards()
, like (pseudocode ahead, don't remember exact var names etc):if (template = "AverayZweck...Rnw") {
height <- 30mm - 2mm # minus some margin, to be safe
}
# switch would be the better here than lots of if clauses obviously
Then we just pass that to that paste()
part as \imageheight
or whatever, and we're done.
I think I initially overthought this, was afraid we'd have to add another argument, but that seems unecessary.
thank's for adding it @maxheld83!
need sth like this in the beginning, then paste it later:
# Prepare Vars =============
# ATTENTION: this cell height has to be assigned for EVERY template
switch(paper.format,
"AveryZweckformC32010.Rnw" = {cellheight <- 54-4}, #
"2x2a4.Rnw" = {cellheight <- 130-4}
)
cellheight <- paste0(cellheight, "mm") # latex needs this in mm
@VerenaKasztantowicz I added the above fix – can you try this with your use case whether this works as expected? (works for me, but I don't have your real usecase)
works for me :) @maxheld83
there's no equivalent for the
\lineheight
, so currently the size of images as per #296 only scales based on the width of the cell.Will have to figure out a measurement that scales image to maximum cell height depending on template.