Layers + simplefonts: Using different font in layers?
Hi! After a wee bit of struggle I've managed to get as far as to (re)creating front and back covers of a booklet as layers. They worked fine in separate files, but now I have to incorporate the layers into my main file and that turned out to be too complicated for my little brain. Thus I'd appreciate a bit of help... I'm using Windows 7 and SciTe and I just updated my ConTeXt to newest beta (and it works). Problem one: The text on the covers needs to be in Arial, but the contents should be in Candara. I can get this done in totally separate files with \usemodule[simplefonts] \setmainfont[arial] \usemodule[simplefonts] \setmainfont[candara] However, when I put the front cover before the main contents, I don't seem to be able to reset the font. The same goes for \setupinterlinespace, it is 1.8em on the cover and default in the contents. I'm not very familiar with the layers nor the font switching and this together makes it very difficult for me to figure out in what order my commands should be (and what they should be; doing a search on the wiki pages on "setmainfont" gives *no* results). So, can somebody provide me with a minimal example of a file that has a layer with text in one font (preferably using simplefonts) and a few pages of text in another font and then another layer as backcover in cover font? Problem two: Whatever I do, I can't get the final number of pages to be divisible by for (and in a way that the back cover ends up on the last page). I used to use the hack given at http://wiki.contextgarden.net/Imposition#Getting_to_the_Back_Cover_of_a_Book..., but it doesn't work any more (hangs on \fi} / line 18); I think it still worked in June 2011, but not any more in August. So, how do I get my back cover to pop up on the last page of my booklet? (Problem three: Having stuff under back matter causes a few extra empty pages that I don't seem to be able to suppress with any combination of \page commands (last one I tried seems to be \page[right,quadruple]). However, this problem may go away if 1 & 2 get solved.) Thankful for any help, Mari
On 9-12-2011 09:24, Mari Voipio wrote:
Problem one: The text on the covers needs to be in Arial, but the contents should be in Candara. I can get this done in totally separate files with
\usemodule[simplefonts] \setmainfont[arial]
\usemodule[simplefonts] \setmainfont[candara]
That is for Wolfgang to answer but you can try this: % at the top of the file \setupbodyfont[mscore,ss] % then \usemodule[simplefonts] \setmainfont[candara] % in the front page: \start \switchtobodyfont[mscore,ss] the front page \stop \page main text \page \start \switchtobodyfont[mscore,ss] the back page \stop ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Hi Mari, hm, although the master has given his answer already ... Here is what I interpreted from your mail. May be it answers the first question. Using setups does normally help in these cases. Making the number of pages divisible by four. quadruple works with arranging. So probably you must insert the number of pages needed manually? I hope this helps you going! Willi On 9 Dec 2011, at 09:24, Mari Voipio wrote:
Hi!
After a wee bit of struggle I've managed to get as far as to (re)creating front and back covers of a booklet as layers. They worked fine in separate files, but now I have to incorporate the layers into my main file and that turned out to be too complicated for my little brain. Thus I'd appreciate a bit of help...
I'm using Windows 7 and SciTe and I just updated my ConTeXt to newest beta (and it works).
Problem one: The text on the covers needs to be in Arial, but the contents should be in Candara. I can get this done in totally separate files with
\usemodule[simplefonts] \setmainfont[arial]
\usemodule[simplefonts] \setmainfont[candara]
However, when I put the front cover before the main contents, I don't seem to be able to reset the font. The same goes for \setupinterlinespace, it is 1.8em on the cover and default in the contents. I'm not very familiar with the layers nor the font switching and this together makes it very difficult for me to figure out in what order my commands should be (and what they should be; doing a search on the wiki pages on "setmainfont" gives *no* results).
So, can somebody provide me with a minimal example of a file that has a layer with text in one font (preferably using simplefonts) and a few pages of text in another font and then another layer as backcover in cover font?
Problem two: Whatever I do, I can't get the final number of pages to be divisible by for (and in a way that the back cover ends up on the last page). I used to use the hack given at http://wiki.contextgarden.net/Imposition#Getting_to_the_Back_Cover_of_a_Book..., but it doesn't work any more (hangs on \fi} / line 18); I think it still worked in June 2011, but not any more in August.
So, how do I get my back cover to pop up on the last page of my booklet?
(Problem three: Having stuff under back matter causes a few extra empty pages that I don't seem to be able to suppress with any combination of \page commands (last one I tried seems to be \page[right,quadruple]). However, this problem may go away if 1 & 2 get solved.)
Thankful for any help,
Mari ___________________________________________________________________________________ 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 Fri, Dec 9, 2011 at 11:10, Willi Egger
Here is what I interpreted from your mail. May be it answers the first question. Using setups does normally help in these cases.
It does sort out the font problem - turns out I was almost there, except that my TOC insisted on being in Arial (and *really* ugly as it is set up for Candara). Your alternative sorts out that problem, I tested with \placecontent \chapter{This is chapter 1} \dorecurse{3} {\input tufte \page} \chapter{This is chapter 2} \dorecurse{3} {\input tufte \page} Even on yours the back cover ends up on the next-to-last page (the last page being empty), so problem 2 persists. In a real pinch I can probably fiddle with it in Acrobat (or pdfarrange or something). Thank you, Mari
Hi Mari, On 9 Dec 2011, at 11:00, Mari Voipio wrote:
On Fri, Dec 9, 2011 at 11:10, Willi Egger
wrote: Here is what I interpreted from your mail. May be it answers the first question. Using setups does normally help in these cases.
It does sort out the font problem - turns out I was almost there, except that my TOC insisted on being in Arial (and *really* ugly as it is set up for Candara). Your alternative sorts out that problem, I tested with
\placecontent
\chapter{This is chapter 1}
\dorecurse{3} {\input tufte \page}
\chapter{This is chapter 2}
\dorecurse{3} {\input tufte \page}
When i use the attached test-file, the TOC is in palatino. May be you have to check, where the \setups is called. Before calling the setups there must be a page break.
Even on yours the back cover ends up on the next-to-last page (the last page being empty), so problem 2 persists. In a real pinch I can probably fiddle with it in Acrobat (or pdfarrange or something).
Yes it is. I tried to use \startstandardmakeup[page=left, doublesided=no] from which I would expect to give the desired result, but it does not. So I am stuck also. Willi
Thank you,
Mari ___________________________________________________________________________________ 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 Fri, Dec 9, 2011 at 13:04, Willi Egger
When i use the attached test-file, the TOC is in palatino. May be you have to check, where the \setups is called. Before calling the setups there must be a page break.
It works for me, too, once I managed to fix a stupid typo... Mostly your version works pretty well, correct fonts at correct places (I'd actually prefer Candara at cover, too, but it is not for me to decide...) and at correct size, too. On the other hand, of some reason my cover page now thinks that "righttop" is located at the right top of the text area, but the wiki says it should always refer to paper edge. Is this because of the command \placelayer or have I just piled things up in the wrong order? ...almost there... Mari (and now out to the darkness and horizontal sleet, could we get some real snow, please?)
Hi Mari, if you look into the test-file I sent you before, then you will see, that indeed the layer has to be moved. I was also a bit amazed to see, that the layer is anchored to the textarea. Willi On 9 Dec 2011, at 14:54, Mari Voipio wrote:
On Fri, Dec 9, 2011 at 13:04, Willi Egger
wrote: When i use the attached test-file, the TOC is in palatino. May be you have to check, where the \setups is called. Before calling the setups there must be a page break.
It works for me, too, once I managed to fix a stupid typo... Mostly your version works pretty well, correct fonts at correct places (I'd actually prefer Candara at cover, too, but it is not for me to decide...) and at correct size, too.
On the other hand, of some reason my cover page now thinks that "righttop" is located at the right top of the text area, but the wiki says it should always refer to paper edge. Is this because of the command \placelayer or have I just piled things up in the wrong order?
...almost there...
Mari (and now out to the darkness and horizontal sleet, could we get some real snow, please?)
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Am 09.12.2011 um 15:43 schrieb Willi Egger:
Hi Mari,
if you look into the test-file I sent you before, then you will see, that indeed the layer has to be moved. I was also a bit amazed to see, that the layer is anchored to the textarea.
\placelayer use the area of the current block (in this case the text are), one way out of this is to use the “pagemakeup” environment where all margins are set to 0pt. Wolfgang
On 9-12-2011 11:00, Mari Voipio wrote:
On Fri, Dec 9, 2011 at 11:10, Willi Egger
wrote: Here is what I interpreted from your mail. May be it answers the first question. Using setups does normally help in these cases.
It does sort out the font problem - turns out I was almost there, except that my TOC insisted on being in Arial (and *really* ugly as it is set up for Candara). Your alternative sorts out that problem, I tested with
always keep in mind that tex works asynchronous ... so, add a \page before you change settings that also might affect th epagebuilding Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
participants (4)
-
Hans Hagen
-
Mari Voipio
-
Willi Egger
-
Wolfgang Schuster