increase space on the left of pages included using \copypages
Hello, I am trying to use the \copypages command to include a pdf file, say file3pages.pdf with three pages in my context document. First, I issued the command: \copypages[file3pages.pdf] The pages from file3pages.pdf are too close to the left margin. There is not enough white space on the left whereas, there is a lot of space on the right of the included pages. So, I tried \hskip 0.5in \copypages[file3pages.pdf] This creates appropriate space on the left of the included pages, but only for the first page of file3pages.pdf. The second and third pages of file3pages.pdf are the same as before (too close to the left margin). How can I apply \hskip 0.5in to each of the pages included from the file3pages.pdf. Can someone please suggest if there is a better way to increase the space on the left. Please note that the included pages do not respect the margins I have set for the document. Thanks a lot.
Can someone please help me with this? I suppose I have not received an
answer because there is no minimal example. I thought it would be
straightforward for someone in the forum without seeing an example.
Anyhow I have attached a pdf file (includethis.pdf) and a tex file in
which I am trying to include pages from the pdf file. I want to
increase the left side margin on the pages on which included file is
present.
Thank you in advance.
On Mon, Feb 21, 2011 at 10:58 AM, Curiouslearn
Hello,
I am trying to use the \copypages command to include a pdf file, say file3pages.pdf with three pages in my context document. First, I issued the command:
\copypages[file3pages.pdf]
The pages from file3pages.pdf are too close to the left margin. There is not enough white space on the left whereas, there is a lot of space on the right of the included pages. So, I tried
\hskip 0.5in \copypages[file3pages.pdf]
This creates appropriate space on the left of the included pages, but only for the first page of file3pages.pdf. The second and third pages of file3pages.pdf are the same as before (too close to the left margin).
How can I apply \hskip 0.5in to each of the pages included from the file3pages.pdf. Can someone please suggest if there is a better way to increase the space on the left. Please note that the included pages do not respect the margins I have set for the document.
Thanks a lot.
Anyone? If it cannot be done, I would appreciate if someone can say that. I
Thanks you.
On Tue, Feb 22, 2011 at 9:16 AM, Curiouslearn
Can someone please help me with this? I suppose I have not received an answer because there is no minimal example. I thought it would be straightforward for someone in the forum without seeing an example.
Anyhow I have attached a pdf file (includethis.pdf) and a tex file in which I am trying to include pages from the pdf file. I want to increase the left side margin on the pages on which included file is present.
Thank you in advance.
On Mon, Feb 21, 2011 at 10:58 AM, Curiouslearn
wrote: Hello,
I am trying to use the \copypages command to include a pdf file, say file3pages.pdf with three pages in my context document. First, I issued the command:
\copypages[file3pages.pdf]
The pages from file3pages.pdf are too close to the left margin. There is not enough white space on the left whereas, there is a lot of space on the right of the included pages. So, I tried
\hskip 0.5in \copypages[file3pages.pdf]
This creates appropriate space on the left of the included pages, but only for the first page of file3pages.pdf. The second and third pages of file3pages.pdf are the same as before (too close to the left margin).
How can I apply \hskip 0.5in to each of the pages included from the file3pages.pdf. Can someone please suggest if there is a better way to increase the space on the left. Please note that the included pages do not respect the margins I have set for the document.
Thanks a lot.
On 23-2-2011 12:11, Curiouslearn wrote:
Anyone? If it cannot be done, I would appreciate if someone can say that. I
i have no time now, but you can always do \startTEXpage \hskip1cm\externalfigure[...][page=1] \stopTEXpage ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Thanks very much Hans. I suppose I will have to issue the command for
each page separately then (with possibly a loop). I was wondering if
there was an option in \copypages or some other command that applied
to each page of the PDF file. But having heard from you, now I know
there isn't. Thanks again. Context is really awesome.
On Wed, Feb 23, 2011 at 6:21 AM, Hans Hagen
On 23-2-2011 12:11, Curiouslearn wrote:
Anyone? If it cannot be done, I would appreciate if someone can say that. I
i have no time now, but you can always do
\startTEXpage \hskip1cm\externalfigure[...][page=1] \stopTEXpage
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
"Curiouslearn" (if you're older than 13 years, I'd appreciate a real name), it's not easy to see what you want to do. The included pages, like the document where you want to include them, are letter size. If you simply include them, they will take the entire width. The small margin left and big margin right are already in you includethis.pdf. If you want more margin left, all you can do is scale the image. Or adjust the papersize of the file you want to include. But if you want to have some special effect (like pushing part of your included image off the page), you'll have to use something like \externalfigure, as Hans suggested. Btw, if you know the number of pages you want to include, it's relatively trivial to write a simple loop, both in mkii (with \dorecurse and \recurselevel) or with a lua loop. Thomas On Feb 23, 2011, at 12:11 PM, Curiouslearn wrote:
Anyone? If it cannot be done, I would appreciate if someone can say that. I
Thanks you.
On Tue, Feb 22, 2011 at 9:16 AM, Curiouslearn
wrote: Can someone please help me with this? I suppose I have not received an answer because there is no minimal example. I thought it would be straightforward for someone in the forum without seeing an example.
Anyhow I have attached a pdf file (includethis.pdf) and a tex file in which I am trying to include pages from the pdf file. I want to increase the left side margin on the pages on which included file is present.
Thank you in advance.
On Mon, Feb 21, 2011 at 10:58 AM, Curiouslearn
wrote: Hello,
I am trying to use the \copypages command to include a pdf file, say file3pages.pdf with three pages in my context document. First, I issued the command:
\copypages[file3pages.pdf]
The pages from file3pages.pdf are too close to the left margin. There is not enough white space on the left whereas, there is a lot of space on the right of the included pages. So, I tried
\hskip 0.5in \copypages[file3pages.pdf]
This creates appropriate space on the left of the included pages, but only for the first page of file3pages.pdf. The second and third pages of file3pages.pdf are the same as before (too close to the left margin).
How can I apply \hskip 0.5in to each of the pages included from the file3pages.pdf. Can someone please suggest if there is a better way to increase the space on the left. Please note that the included pages do not respect the margins I have set for the document.
Thanks a lot.
Hi Thomas,
I am preparing notes for my lectures and I would like to include some
online news articles (such as NY times) that I save as PDF, in my
notes (these notes are for me). When I save these online articles as
pdf, I often get a small left margin and big right margin (just as in
includethis.pdf; I deliberately made it similar to these news
articles).
I will try to do this using lua loop. I should learn it. I am learning
so many new things currently that I have not had a chance to learn
Lua.
I was wondering if Aditya's filter module could be used to use Python
instead of Lua, but I suppose I should ask that as a new question.
Thanks for your help.
Bharat
On Wed, Feb 23, 2011 at 6:33 AM, Thomas A. Schmitz
"Curiouslearn" (if you're older than 13 years, I'd appreciate a real name), it's not easy to see what you want to do. The included pages, like the document where you want to include them, are letter size. If you simply include them, they will take the entire width. The small margin left and big margin right are already in you includethis.pdf. If you want more margin left, all you can do is scale the image. Or adjust the papersize of the file you want to include. But if you want to have some special effect (like pushing part of your included image off the page), you'll have to use something like \externalfigure, as Hans suggested. Btw, if you know the number of pages you want to include, it's relatively trivial to write a simple loop, both in mkii (with \dorecurse and \recurselevel) or with a lua loop.
Thomas
On Feb 23, 2011, at 12:11 PM, Curiouslearn wrote:
Anyone? If it cannot be done, I would appreciate if someone can say that. I
Thanks you.
On Tue, Feb 22, 2011 at 9:16 AM, Curiouslearn
wrote: Can someone please help me with this? I suppose I have not received an answer because there is no minimal example. I thought it would be straightforward for someone in the forum without seeing an example.
Anyhow I have attached a pdf file (includethis.pdf) and a tex file in which I am trying to include pages from the pdf file. I want to increase the left side margin on the pages on which included file is present.
Thank you in advance.
On Mon, Feb 21, 2011 at 10:58 AM, Curiouslearn
wrote: Hello,
I am trying to use the \copypages command to include a pdf file, say file3pages.pdf with three pages in my context document. First, I issued the command:
\copypages[file3pages.pdf]
The pages from file3pages.pdf are too close to the left margin. There is not enough white space on the left whereas, there is a lot of space on the right of the included pages. So, I tried
\hskip 0.5in \copypages[file3pages.pdf]
This creates appropriate space on the left of the included pages, but only for the first page of file3pages.pdf. The second and third pages of file3pages.pdf are the same as before (too close to the left margin).
How can I apply \hskip 0.5in to each of the pages included from the file3pages.pdf. Can someone please suggest if there is a better way to increase the space on the left. Please note that the included pages do not respect the margins I have set for the document.
Thanks a lot.
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Feb 23, 2011, at 1:41 PM, Curiouslearn wrote:
I will try to do this using lua loop. I should learn it. I am learning so many new things currently that I have not had a chance to learn Lua.
lua is not all that different from other languages such as python or perl; once you've grasped the concept of one syntax, you should be able to learn others and write lua code pretty soon.
I was wondering if Aditya's filter module could be used to use Python instead of Lua, but I suppose I should ask that as a new question.
Aditya's filter module is for highlighting code, it will not run python code within luatex. I think Luigi once played with a module that allowed embedding python within luatex (http://wiki.contextgarden.net/User:Luigi.scarso#Luatex_hosts_python and http://wiki.contextgarden.net/User:Luigi.scarso/luatex_lunatic), but I think he has since given up on this project. As for the lua loop, maybe this can be helpful (this is how I create "offprints" of my scanned articles): \startluacode for i = 1,21 do tex.sprint('\\hskip1cm\\externalfigure[includethis][page=' .. i .. ',height=\\textheight]') end \stopluacode tex.sprint() passes its argument to the typesetting engine, '..' concatenates the lua variable 'i' into this code. Od course, this is mkiv only. That should get you started. Best Thomas
On Wed, Feb 23, 2011 at 3:10 PM, Thomas A. Schmitz
On Feb 23, 2011, at 1:41 PM, Curiouslearn wrote:
I will try to do this using lua loop. I should learn it. I am learning so many new things currently that I have not had a chance to learn Lua.
lua is not all that different from other languages such as python or perl; once you've grasped the concept of one syntax, you should be able to learn others and write lua code pretty soon.
I was wondering if Aditya's filter module could be used to use Python instead of Lua, but I suppose I should ask that as a new question.
Aditya's filter module is for highlighting code, it will not run python code within luatex.
hm, no http://modules.contextgarden.net/filter Short description: A module to run external programs on the contents of start-stop evironment
I think Luigi once played with a module that allowed embedding python within luatex (http://wiki.contextgarden.net/User:Luigi.scarso#Luatex_hosts_python and http://wiki.contextgarden.net/User:Luigi.scarso/luatex_lunatic), but I think he has since given up on this project. Yes, it's too much old and messy code. Let's say that it's something to do, sooner or later (more later than sooner) .
-- luigi
On Wed, 23 Feb 2011, Curiouslearn wrote:
I will try to do this using lua loop. I should learn it. I am learning so many new things currently that I have not had a chance to learn Lua.
I was wondering if Aditya's filter module could be used to use Python instead of Lua, but I suppose I should ask that as a new question.
It is easy to do this in TeX, so no need to go to lua (or python). Call \getfiguredimensions[filename] Then you can use \noffigurepages \figurenaturalwidth \figurenaturalheight to place each page of the figure. Something like: \getfiguredimensions[filename] \dorecurse{\noffigurepages} {\externalfigure[figurename][page=\recurselevel]} Aditya
Am 23.02.2011 um 16:27 schrieb Aditya Mahajan:
On Wed, 23 Feb 2011, Curiouslearn wrote:
I will try to do this using lua loop. I should learn it. I am learning so many new things currently that I have not had a chance to learn Lua.
I was wondering if Aditya's filter module could be used to use Python instead of Lua, but I suppose I should ask that as a new question.
It is easy to do this in TeX, so no need to go to lua (or python).
Call
\getfiguredimensions[filename]
It seems that this is broken with the newest beta – at least for me. Can someone confirm? Greeting Andreas
On 2011-02-23 Andreas Harder
\getfiguredimensions[filename]
It seems that this is broken with the newest beta – at least for me. Can someone confirm?
Confirmed on solaris x86 LuaTeX ver: beta-0.65.0-2010121317 ConTeXt ver: 2011.02.18 17:17 and ConTeXt ver: 2011.02.20 20:34 Marco
Thanks to all. This time around I will use the lua route since I know
the number of pages and it seems more natural to me...I will
understand what it is doing even if I look at the thing after one
month.
Bharat
On Wed, Feb 23, 2011 at 10:27 AM, Aditya Mahajan
On Wed, 23 Feb 2011, Curiouslearn wrote:
I will try to do this using lua loop. I should learn it. I am learning so many new things currently that I have not had a chance to learn Lua.
I was wondering if Aditya's filter module could be used to use Python instead of Lua, but I suppose I should ask that as a new question.
It is easy to do this in TeX, so no need to go to lua (or python).
Call
\getfiguredimensions[filename]
Then you can use
\noffigurepages \figurenaturalwidth \figurenaturalheight
to place each page of the figure. Something like:
\getfiguredimensions[filename] \dorecurse{\noffigurepages} {\externalfigure[figurename][page=\recurselevel]}
Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (7)
-
Aditya Mahajan
-
Andreas Harder
-
Curiouslearn
-
Hans Hagen
-
luigi scarso
-
Marco
-
Thomas A. Schmitz