\unexpanded\def\includePDF[#1]%
{\getfiguredimensions[#1]
\dorecurse{\noffigurepages}
{\startTEXpage
\externalfigure[#1][page=\recurselevel]
\stopTEXpage}}
At least, otherwise it will only work with "talk.pdf".
Or am I missing something?
Many t
\getfiguredimensions[\Doc]
> \dorecurse{\noffigurepages}
> {\externalfigure[\Doc]
>[page=\recurselevel, width=20cm, scale=950]}}
> \stoptext
>
> > I didn’t know how to get an array (or indexed table or whatever you
> > call it) in ConTeXt/Tex.
>
I
> have at the moment:
I think this might be what you intend:
\setuplayout[page]
\starttext
\doloopoverlist{ass1,ass2,ass3,ass4,ass5,ass6,ass7,ass8}
{\def\Doc{\recursestring.pdf}
\getfiguredimensions[\Doc]
\dorecurse{\noffigurepages}
{\externalfigure[\Doc]
[page=\
) but I don’t know how to do this with the \clip command. Any
>> ideas? I already tried using \input but it gives some weird output in
>> some places. It doesn’t have to use this method as long as it does
>> what I need it to do.
>
> Hi Jethro,
>
> it works using
>> ideas? I already tried using \input but it gives some weird output in
>> some places. It doesn’t have to use this method as long as it does
>> what I need it to do.
>
> Hi Jethro,
>
> it works using \clip with \externalfigure inside a loop (\dorecurse).
>
> Wi
oesn’t have to use this method as long as it does
what I need it to do.
Hi Jethro,
it works using \clip with \externalfigure inside a loop (\dorecurse).
With \getfiguredimensions you get the number of pages of each PDF
document (\noffigurepages).
The following source both generates the source PD
me places. It doesn’t have to use this method as long as it does
> what I need it to do.
Hi Jethro,
it works using \clip with \externalfigure inside a loop (\dorecurse).
With \getfiguredimensions you get the number of pages of each PDF
document (\noffigurepages).
The following source bo
le,
style=\BigFontOne,
numbercommand=\outlineTitle,
% align = middle,
number=yes]
\setupexternalfigures[location={default,local,global}]
%\definefont[fancy][Zapfino at 24pt]
\starttext
\startchapter[title={Very Long Long Long Title}]
\startcombination[3*1]
{\externalfigure[cow] [combina
}
\placefigure[right] {} {\externalfigure[cow.pdf] [width=3cm]}
\input lorem
}
\stoptext
I actually want \placefigure[right,none] in my real doc but that also goes awry.
LMTX current version: 2022.08.05 11:44
My actual requirement is to have a set of short biographies, including a small
'passport' photo
Things start to go awry after about 5 or 6 iterations, 12 shows it up clearly
with three or so nearly blank (except for the subject) pages produced.
\setuppapersize [A5] [A5]
\starttext
\dorecurse{12}{
\subject{Some heading}
\placefigure[right] {} {\externalfigure[cow.pdf] [width=3cm]}
\input
Long Long Title}]
\startcombination[3*1]
{\externalfigure[cow] [combination]}{cow}
{\externalfigure[mill] [combination]}{mill}
{\externalfigure[hacker][combination]}{hacker}
\stopcombination
\stopchapter
\stoptext
> On Aug 15, 2022, at 7:42 PM, Pablo Rodriguez via ntg-context
> wrote
the output to "wg.pdf" and run the following
code:
\setuppapersize[A6]
\setuplayout[page]
\starttext
\dorecurse{26}
{\ifnum\recurselevel = 1
\externalfigure[wg.pdf][page=\recurselevel]\else
\externalfigure[wg.pdf][page=\recurselevel]
\externalfigure[wg.pdf][page={\t
to (roundedsquare(OverlayWidth,OverlayHeight,EmWidth));
\stopMPclip
\clip[nx=1,ny=1,mp=rounded corner]{\externalfigure[mill]}
\stoptext
Thank you!
Hraban
___
If your question is of interest to others as well, please add an entry
Henning Hraban Ramm via ntg-context schrieb am 12.08.2022 um 10:57:
Hi, can ConTeXt make rounded image corners?
Both of my approaches don’t work:
\externalfigure[mill][
width=3cm,
frame=on,
corner=round,radius=1cm,
backgroundcorner=round,backgroundradius=1cm,
]
\defineoverlay[Mill
.pdf" to convert an image (JPG or
PNG) to grayscale/CMYK, but the resolution isn’t used for downsampling
(of course, it’s not mentioned in the command template):
\externalfigure[hacker][conversion={gray.pdf},resolution=72]
I tried to write my own downsampling converter, but do
Hi, can ConTeXt make rounded image corners?
Both of my approaches don’t work:
\externalfigure[mill][
width=3cm,
frame=on,
corner=round,radius=1cm,
backgroundcorner=round,backgroundradius=1cm,
]
\defineoverlay[Mill][{%
\externalfigure[mill][width=\overlaywidth]
}]
\framed[background
You probably know about combinations to place images side by side:
\startcombination[3*1]
{\externalfigure[cow]}{cow}
{\externalfigure[mill]}{mill}
{\externalfigure[hacker]}{hacker}
\stopcombination
Now, the widths aren’t calculated automatically.
You could define them on your own
but the resolution isn’t used for downsampling
(of course, it’s not mentioned in the command template):
\externalfigure[hacker][conversion={gray.pdf},resolution=72]
I tried to write my own downsampling converter, but don’t understand how
I can hook it into the list of converters:
""&quo
be applied because there's
no process action. % Default (\textwidth) is used, as defined above.
\defineexternalfigure[pdf][width=6cm] \starttexdefinition
includegraphics #1 \splitfilename{#1} \processaction[\splitofftype][
jpg=>{\externalfigure[#1][jpg]}, png=>{\externalfigure[#1][png]}
(\textwidth) is used, as defined
above.\defineexternalfigure[pdf][width=6cm]
\starttexdefinition includegraphics #1
\splitfilename{#1}
\processaction[\splitofftype][
jpg=>{\externalfigure[#1][jpg]},
png=>{\externalfigure[#1][png]},
svg=>{\externalfigure[#1][svg][conversion=mp]},
[location={default,local,global}]
\starttext
\startplacefigure[location=right,]
\externalfigure[cow][width=.3\makeupwidth]
\stopplacefigure
\startformula
U(f,P) \alignhere = f(2,2)\Delta A_{11}+f(2,3)\Delta A_{12}\breakhere
\skiphere[1em] +f(3,2)\Delta A_{21}+f(3,3)\Delta A_{22} \breakhere
xt.externalfigure("{cow.pdf}",{width="0.5\\textwidth"})
It is subtle, but you need:
context.externalfigure({“cow.pdf"},{width="0.5\\textwidth"})
A “lua table” becomes [] stuff, a “lua string” becomes {} stuff. Your original
resulted in
\externalfigure{{cow.pdf}}[width={
Thangalin via ntg-context schrieb am 18.07.2022 um 19:10:
Thank you, Wolfgang.
That looks promising.
SVG files are converted using MetaPost. I thought the following would
work:
svg=>{\externalfigure[#1][svg][conversion=mp]}
You can probably remove the second argument ([svg]) wh
Thank you, Wolfgang.
That looks promising.
SVG files are converted using MetaPost. I thought the following would work:
svg=>{\externalfigure[#1][svg][conversion=mp]}
Is there anything else that needs to happen to ensure SVG files are piped
through MetaPost?
Thanks ag
ng][
> width=\textwidth,
> height=\textheight,
> ]
> \unprotect
> \let\old_externalfigure=\externalfigure
> \tolerant\def\externalfigure[#1]#,[#2]#,[#3]{%
> \doifelseinstring{.png}{#1}{%
> \old_externalfigure[#1][png][#2
}, ] \defineexternalfigure[png][
width=\textwidth, height=\textheight, ] \unprotect
\let\old_externalfigure=\externalfigure
\tolerant\def\externalfigure[#1]#,[#2]#,[#3]{%
\doifelseinstring{.png}{#1}{% \old_externalfigure[#1][png][#2]% }{%
\doifelsefileexists{#1.png}{% \old_externalfigure[#1.png][png
}, ] \defineexternalfigure[png][
width=\textwidth, height=\textheight, ] \unprotect
\let\old_externalfigure=\externalfigure
\tolerant\def\externalfigure[#1]#,[#2]#,[#3]{%
\doifelseinstring{.png}{#1}{% \old_externalfigure[#1][png][#2]% }{%
\doifelsefileexists{#1.png}{% \old_externalfigure[#1.png
,
height=\textheight,
]
\unprotect
\let\old_externalfigure=\externalfigure
\tolerant\def\externalfigure[#1]#,[#2]#,[#3]{%
\doifelseinstring{.png}{#1}{%
\old_externalfigure[#1][png][#2]%
}{%
\doifelsefileexists{#1.png}{%
\old_externalfigure[#1.png][png][#2
tell
them to forget everything they believe to know about TeX ;P
– Layout, i.e. \setuppapersize, \setuplayout and \showlayout
– Structure, i.e. \startchapter, \startitemize
– Images & Floats, i.e. \externalfigure, \startplacefigure
Project structure makes sense if you have more than one
based alternative.
\starttext
\startcollecting
%
\startcollect
\startcombination[3*1]
\stopcollect
%
\dorecurse{3}
{\startcollect
{\externalfigure[dummy]}{}
\stopcollect}
%
\startcollect
\stopcombination
\stopcollect
%
\stopcollecting
\stoptext
Wolfgang
Hi, I’d like to place pages from a multipage PDF in a combination:
\startcombination[3*1]
\dorecurse{3}{%
{\externalfigure[multipage][width=\textwidth/3,page=\recurselevel]}{}
}
\stopcombination
That doesn’t work, because ConTeXt expects a { after \startcombination.
(“A left brace
Thanks Aditya,
I tried your suggestion, but the result is the same. Here's the XML setup
for all images in the document:
\startxmlsetups xml:img
\starttexcode
\placefloat[here,force]{}{%
\hbox{\externalfigure[\xmlatt{#1}{src}][conversion=mp]}
}
\stoptexcode
\stopxmlsetups
Am 23.06.22 um 15:08 schrieb Taco Hoekwater:
Hi,
You could just convert these separately to pdf/svg/jpg/png and then load them
as \externalfigure.
I thought about this solution.
You could also use the filter module to be able to take them inline into the
ConTeXt code:
Thanks
Hi,
You could just convert these separately to pdf/svg/jpg/png and then load them
as \externalfigure.
You could also use the filter module to be able to take them inline into the
ConTeXt code:
\usemodule[filter]
\define[1]\ReadFigure{\externalfigure[#1]}
\defineexternalfilter[graphviz
[force,
none]{}{\framed[frame=off]{\externalfigure[comic.pdf][page=\n,
width=\textwidth]}}
For reasons I cannot understand, after an update of ConTeXt, the code
no longer works, though trying to reduce it to a minimum working
example it works, so I cannot figure out what is wrong in my code
]{\externalfigure[comic.pdf][page=\n,
width=\textwidth]}}
For reasons I cannot understand, after an update of ConTeXt, the code no longer
works, though trying to reduce it to a minimum working example it works, so I
cannot figure out what is wrong in my code.
Undefined control sequence
...domseed
> \def\insert##1\bgroup##2\egroup{
> > \normalexpanded{
> > \noexpand\save_footnote_data
> > {\cldcontext{userdata.input_order}}
> > }
> > \normalinsert##1{
f
\startplacefigure[title={My caption with a long footnote.\footnote{\input
ward}}]
\externalfigure[cow.pdf]
\stopplacefigure
\stoptext
___
If your question is of interest to others as well, please add an entry to the
nly the width of
the corresponding caption. Is that on purpose, a context bug or a user bug?
Best,
Denis
\starttext
asdf
\startplacefigure[title={My caption with a long footnote.\footnote{\input
ward}}]
\externalfigure[cow.pdf]
\stopplacefigu
caption. Is that on
purpose, a context bug or a user bug?
Best,
Denis
\starttext
asdf
\startplacefigure[title={My caption with a long
footnote.\footnote{\input ward}}]
\externalfigure[cow.pdf]
\stopplacefigure
\stoptext
>
> \old_footnote{#1}
> \endgroup
> \stoptexdefinition
>
> \protect
>
> % Original Example
>
> \starttext
>
> \footnote{asdf} \footnote{asdf} \footnote{asdf}
>
> \input ward
>
>
={My caption with a long footnote.\footnote{\input
ward}}]
\externalfigure[cow.pdf]
\stopplacefigure
\stoptext
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg
on
\protect
% Original Example
\starttext
\footnote{asdf} \footnote{asdf} \footnote{asdf}
\input ward
\startplacefigure[title={asdfasdf\footnote{test 1}}]
\externalfigure[cow.pdf]
\stopplacefigure
\footnote{asdf} \footnote{asdf} \footnote{asdf}
\startpla
{#2, Courtesy #3, photo no.
#1\nocite[#4]{}}{\externalfigure[#1][maxheight=.7\paperheight,
maxwidth=.5\paperwidth, minwidth=.5\paperwidth]}
}
#1 = filename, other variables are used for reference/credit details.
The problem is, somehow some images are inexplicably displayed very tiny
]{}}{\externalfigure[#1][maxheight=.7\paperheight,
maxwidth=.5\paperwidth, minwidth=.5\paperwidth]}
}
#1 = filename, other variables are used for reference/credit details.
The problem is, somehow some images are inexplicably displayed very tiny on the
page. I check the image file and they are not small
} \footnote{asdf} \footnote{asdf}
\input ward
\startplacefigure[title={asdfasdf\footnote{test 1}}]
\externalfigure[cow.pdf]
\stopplacefigure
\footnote{asdf} \footnote{asdf} \footnote{asdf}
\startplacefigure[title={asdfasdf\footnote{test 2}}]
\externalfigure[cow.pdf][height=10cm]
\stopplacefigure
raw "circle 32,128 16,112"
> demo1.jpg
> exiftool -Orientation='Rotate 90 CW' demo1.jpg -o demo2.jpg
>
> Then, include "demo1.jpg" and "demo2.jpg" in a ConTeXt file using
> \externalfigure. Both pictures should display as circles; if you get oval
-Orientation='Rotate 90 CW' demo1.jpg -o demo2.jpg
Then, include "demo1.jpg" and "demo2.jpg" in a ConTeXt file using
\externalfigure. Both pictures should display as circles; if you get
ovals, then it's definitely EXIF-related.
2. The output contains this line
. location=loc
aps there is
> a simpler solution !):
>
> \startMPpage
> picture TheImage ;
> TheImage := image(
> draw externalfigure "cow.pdf";
> );
> TheImage := TheImage shifted -center(TheImage);
> draw TheImage ;
> draw (0,0) withpen pencircle scaled .2in withcolor mage
draw externalfigure "cow.pdf";
);
TheImage := TheImage shifted -center(TheImage);
draw TheImage ;
draw (0,0) withpen pencircle scaled .2in withcolor magenta ;
\stopMPpage
Fabrice.
>
> On Sat, Jun 11, 2022 at 4:46 PM Fabrice L <ma
t (0, 0), centered at original size on a
> MPpage, and draw over it. But using the input command doesn't work. How
> should I approach this?
>
>
> Like this ?
>
> \startMPpage
>draw externalfigure "thefile.pdf";
>(… other
d I approach this?
Like this ?
\startMPpage
draw externalfigure "thefile.pdf";
(… other commands…)
\stopMPpage
>
> Sincerely,
> Stefan
Fabrice.
> ___
> If your question is o
is only a guess.
juh
--
Autoren-Homepage: . http://literatur.hasecke.com
Satiren & Essays: . http://www.sudelbuch.de
Privater Blog: http://www.hasecke.eu
Netzliteratur-Projekt: http://www.generationenprojekt.de
\starttext
%\externalfigure[figure][width
One more question. How would
>> I
>> > import the eps file back into MPpage, so I could do trickery with text.
>>
>> Convert the PostScript file into PDF with either "ps2pdf" or
>> GhostScript, then you can import the file with "externalfigure":
>&
ript, then you can import the file with "externalfigure":
>
> \startMPpage
> draw externalfigure "belgrade_gm.pdf";
> draw textext.top("One") shifted (264.352, 116.362);
> dr
can import the file with "externalfigure":
\startMPpage
draw externalfigure "belgrade_gm.pdf";
draw textext.top("One") shifted (264.352, 116.362);
draw textext.top("Two") s
between stack=yes or no:
\usemodule[visual]
\useMPlibrary[dum]
\setupmargindata[inmargin][stack=yes]
\starttext
\dorecurse{20}{%
\fakewords{5}{30}
\inmargin{\externalfigure[dummy\recurselevel][width=15mm,height=15mm]}
\fakewords{5}{40}\par
}
\stoptext
Hraban
pinteraction[state=start]
>
> \definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
> \definesymbol[no][]
>
> \newcount\chk
> \def\checkmark{%
> \global\advance\chk by 1
> \setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt,
> co
On 5/24/22 10:18, Jan-Erik Hägglöf via ntg-context wrote:
> HI Again!
>
> I discovered what went wrong, such a silly syntax error, here comes a
> working code:
Hi Jan-Erik,
this will also make it:
\setupinteraction[state=start]
\definesymbol [yes] [{\externalfigure[on.svg][c
HI Again!
I discovered what went wrong, such a silly syntax error, here comes a working
code:
\setupinteraction[state=start]
\definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
\definesymbol[no][]
\newcount\chk
\def\checkmark{%
\global\advance\chk by 1
\setupfield
I’ve tried this
\setupinteraction[state=start]
\definesymbol[yes][{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
\definesymbol[no][]
\newcount\chk
\def\chk{%
\global \advance \chk by 1
\setupfield[setup1][width=0.5cm, height=0.5cm,rulethickness=1pt, corner=round,
framecolor=red
[yes] [{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]\definesymbol [no] []\setupfield[setup 3][width=0.5cm, height=0.5cm,rulethickness=1pt, corner=round, framecolor=red]\definefield [check-me] [check] [setup 3] [yes,no] [no]\define\chk{\field[check-me]}\starttext\chk\blank[3cm]\chk
successfully placed floats
\placefigure[here][fig1]{First windmill}{
\externalfigure[mill][width=1cm]
}
\placefigure[here][fig2]{Second windmill}{
\externalfigure[mill][width=1cm]
}
\startcolumns[n=3]
% Overfull lines will have slugs in colum margins.
\input linden
% Underful
So far I accomplished this but problem is that when I check it checks all, not
individually.
\setupinteraction[state=start]
\setupexternalfigures[location=global]
\definesymbol [yes]
[{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
\definesymbol [no] []
\setupfield
[setup 3
]
\definesymbol [yes] [{\externalfigure[mp-cont.502]}]
\definesymbol [no] []
\setupfield
[setup 3]
[width=2cm, height=2cm,
rulethickness=3pt, corner=round, framecolor=red]
\definefield [check-me] [check] [setup 3] [yes,no] [no]
\starttext
\field[check-me]
\stoptext
> 20 maj 2022 kl. 12:28 skrev Henn
the
background, these might work with \startknockout etc.
When I try my example:
\useMPlibrary[dum]
\setupcolors[
rgb=no,cmyk=yes,
intent=overprint,% or knockout
]
\setupbodyfont[modern,ss,18pt]
\starttext
\definecollector[Test]
\setcollector [Test] {\externalfigure[none][width=8cm,height
le.pdf]]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]
Where the \translatelocation command can be used inside an \externalfigure
command and \translatephrase can be used as as text.
In the end I’d like to compile with
context language=f
TX-Output/without-ids/nl/file-simple.pdf]]
>> \translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]
>>
>>
>> Where the \translatelocation command can be used inside an \externalfigure
>> command and \translatephra
]]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]
Where the \translatelocation command can be used inside an
\externalfigure command and \translatephrase can be used as as text.
In the end I’d like to compile with
context language=fr mode
]]
\translatelocation[../LMTX-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]
Where the \translatelocation command can be used inside an
\externalfigure command and \translatephrase can be used as as text.
In the end I’d like to compile with
context language=fr mode
y tweaks, hence could not reproduce any
>> error.
>>
>> cheers
>> Heinrich
>>
>> ———
>>
>> R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
>> Copyright (C) 2022 The R Foundation for Statistical Computing
>> Platform: x8
-Output/without-ids/en/file.pdf][none][nl][../LMTX-Output/without-ids/nl/file.pdf]]
Where the \translatelocation command can be used inside an \externalfigure
command and \translatephrase can be used as as text.
In the end I’d like to compile with
context language=fr mode=simple mainfile.tex
) x86_64-apple-darwin17.0]
>
> > svg("/Users/hp/filename.svg");
> > plot(rnorm(200));
> > dev.off()
> null device
> 1
> >
>
> ———
>
> % !TEX program = lmtx
>
> \starttext
> \externalfigure[/Users/hp/filename.svg][conver
form: x86_64-apple-darwin17.0 (64-bit)
>
> [R.app GUI 1.78 (8075) x86_64-apple-darwin17.0]
>
> > svg("/Users/hp/filename.svg");
> > plot(rnorm(200));
> > dev.off()
> null device
> 1
> >
>
> ———
>
> % !TEX program = lmtx
>
>
75) x86_64-apple-darwin17.0]> svg("/Users/hp/filename.svg");> plot(rnorm(200));> dev.off()null device 1 > ———% !TEX program = lmtx\starttext \externalfigure[/Users/hp/filename.svg][conversion=mp]\stoptext———
tst-svg-mp.pdf
Description: Adobe PDF document
On 9. May 2
Thank-you Adam, Hraban and Richard for your suggestions.
In the end it was remarkably simple:
\starttext
\definecollector[example]
\setcollector [example] {\externalfigure[cow][width=6cm,frame=off]}
\setcollector [example] [corner={right,bottom},location={right,top}]
{\rotate[rotation=90
Bruce,
I tend to do something such as the following:
\startplacefigure[reference={fig:0007},location={here},title={{\it
Vīkṣya}, 5b},list={Ch.\ {\sc ix}\TI {\it Vīkṣya}, 5b}]
\externalfigure[plates/01-09/01-09-07-
c.jpg][scale=1000,frame=off,equalwidth=325pt]
{{\NI}{\tfx \copyright\ 2012
. \placefigure{A picture of a cow. Image of a cow that may or may not be
under copyright anymore.}{\externalfigure[cow][height=6cm]}
then the copyright bit will appear in the Table of Figures which I don't really
want to happen. Is there a way to truncate this?
Using
\startplacefigure[title={complete
][{\directsetup{figure}\tightlayer[figure]}]
\startsetups figure
\setlayerframed[figure][frame=off,preset=rightbottom]{\copyright\ 2022}
\stopsetups
\externalfigure[cow][background={foreground,figure}]
\stoptext
\starttext
\definecollector[example]
\setcollector [example] {\externalfigure[cow
not be
under copyright anymore.}{\externalfigure[cow][height=6cm]}
then the copyright bit will appear in the Table of Figures which I don't really
want to happen. Is there a way to truncate this?
Option 2: some magazines print the copyright credit running up the side of the
image, independently
upexternalfigures[width=3em,height=2em,frame=on,]
>
> %\def\TXT{\ruledhbox{\bf(XyX)}}
> \def\TXT{\externalfigure[pic]}
>
> \starttabulate[|l|l|l|l|l|l|]
> \NC\NC normal\NC depth\NC fit\NC broad\NC high\NC\NR
> \HL
> \dostepwiserecurse{0}{359}{45}{%
> %\exp
Hi,
I was playing with the example from
https://wiki.contextgarden.net/Scaling_Rotating_Mirroring_Clipping#Location_parameter
and tried to put it in a tabulate:
\useMPlibrary[dum]
\setupexternalfigures[width=3em,height=2em,frame=on,]
%\def\TXT{\ruledhbox{\bf(XyX)}}
\def\TXT{\externalfigure
figures.
>
> Below is my try of defining a marginnote that does this, by calculating the
> textarea size and setting the width to that. However, I can't seem to then
> figure out how to center the externalfigure inside of the figure.
>
> Thanks in advance!
> Yann
>
>
in normal figures.
Below is my try of defining a marginnote that does this, by calculating the
textarea size and setting the width to that. However, I can't seem to then
figure out how to center the externalfigure inside of the figure.
Thanks in advance!
Yann
\useMPlibrary[dum]
\setuplayout
}
\blank
}
\startsetups adaptive:test
\setbox\usedadaptivebox\hbox to \usedadaptivewidth yoffset
-\usedadaptivedepth \bgroup
\externalfigure
[cow.pdf]
[width=\usedadaptivewidth,
height=\dimexpr\usedadaptiveheight+\usedadaptivedepth\relax]%
\egroup
%frame=off,
width=\measure{MaxWidth},
height=\measure{MaxHeight},
]{\externalfigure[cow][
width=\measure{MaxWidth},height=\measure{MaxHeight}
]}
\stoptext
___
If your question is of interest t
},
height=\measure{MaxHeight},
]{\externalfigure[dummy][
width=\measure{MaxWidth},height=\measure{MaxHeight}
]}
\flushlayer[papier]
\stoptext
___
If your question is of interest to others as well, please add an entry
> \setlayerframed[papier][
> preset=lefttop,
> %x=-\measure{Bleed},
> %y=-\measure{Bleed},
> offset=overlay,
> %frame=off,
> width=\measure{MaxWidth},
> height=\measure{MaxHeight},
> ]{\externalfigure[dummy][
> width=\measure{MaxWidth},height=\measure{MaxHeight}
> ]}
=overlay,
%frame=off,
width=\measure{MaxWidth},
height=\measure{MaxHeight},
]{\externalfigure[dummy][
width=\measure{MaxWidth},height=\measure{MaxHeight}
]}
\flushlayer[papier]
\stoptext
___
If your question
% with images
% a weird one
\setupexternalfigures
[location={default,global}]
\startsetups adaptive:test
\setbox\usedadaptivebox\hbox to \usedadaptivewidth yoffset
-\usedadaptivedepth \bgroup
\externalfigure
[cow.pdf]
[width=\usedadaptivewidth,
height
ure[page]{a floating cow}{\externalfigure[cow]}
\dorecurse{4}{\samplefile{knuth}}
\blank
\dorecurse{2}{\samplefile{tufte}}
\stopchapter
\stoptext
Sreeram
___
If your question is of interest to others as w
pagestate=start,
> align=middle,
> footerstate=normal]
>
> \setupheadertexts[]
> \setupheadertexts[chapter][\date]
> \setupfootertexts[pagenumber]
>
> \starttext
> \startchapter [title={Chapter title}]
>\startpostponing[+1]
> \startFloatPagemakeup
>
ure{a floating cow}{\externalfigure[cow]}
\stopFloatPagemakeup
\stoppostponing
\dorecurse{6}{\samplefile{knuth}}
\blank
\dorecurse{2}{\samplefile{tufte}}
\stopchapter
\stoptext
%%% stop example
Of course, I think some manual hand-tuning is required (in the final sta
e for me now:
>
> https://mailman.ntg.nl/pipermail/ntg-context/2021/103822.html
> https://mailman.ntg.nl/pipermail/ntg-context/2021/103827.html
>
> Adam
Thank you, that’s already very useful! I should have looked if there is a
“delayed” alternative for externalfigure as well, b
but couldn’t make it compile. Combinations,
> combined with framed and externalfigure, are difficult to write in Lua - or
> am I too stupid to find the winning combination (sorry for the puns).
>
> 3. columns
>
> Again, this would seen like a natural approach, having every A4 pag
combinations
are for), but I ran into expansion problems, added a few “function () end” in
my code, but couldn’t make it compile. Combinations, combined with framed and
externalfigure, are difficult to write in Lua - or am I too stupid to find the
winning combination (sorry for the puns).
3. columns
tertilde c\textasciitilde d
\stoptext
\definepageinjectionalternative
[chapter:image]
[renderingsetup=pageinjection:chapter:image]
\startsetups [pageinjection:chapter:image]
\centerbox{\externalfigure[\dummyparameter{name}]}
\stopsetups
\definepageinjection
[chapter:start]
[empt
=pageinjection:chapter:image]
\startsetups [pageinjection:chapter:image]
\centerbox{\externalfigure[\dummyparameter{name}]}
\stopsetups
\definepageinjection
[chapter:start]
[empty]
[page=left]
\definepageinjection
[chapter:insert]
[previouspage]
[alternative=chapter:image,
offset=1cm,
pagestate
[pageinjection:chapter:image]
\centerbox{\externalfigure[\dummyparameter{name}]}
\stopsetups
\definepageinjection
[chapter:start]
[empty]
[page=left]
\definepageinjection
[chapter:insert]
[previouspage]
[alternative=chapter:image,
offset=1cm,
pagestate=stop]
\setuphead
[chapter
[pageinjection:chapter:image]
\clip
[width=\framedwidth,height=\framedheight]
{\centerbox{%
\externalfigure
[\dummyparameter{name}]
[%factor=,
width=\structureuservariable{width},
height=\structureuservariable{height
201 - 300 of 3786 matches
Mail list logo