* Layers + simplefonts: Using different font in layers? @ 2011-12-09 8:24 Mari Voipio 2011-12-09 9:01 ` Hans Hagen 2011-12-09 9:10 ` Willi Egger 0 siblings, 2 replies; 9+ messages in thread From: Mari Voipio @ 2011-12-09 8:24 UTC (permalink / raw) To: mailing list for ConTeXt users 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_Booklet>, 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Layers + simplefonts: Using different font in layers? 2011-12-09 8:24 Layers + simplefonts: Using different font in layers? Mari Voipio @ 2011-12-09 9:01 ` Hans Hagen 2011-12-09 9:10 ` Willi Egger 1 sibling, 0 replies; 9+ messages in thread From: Hans Hagen @ 2011-12-09 9:01 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Mari Voipio 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Layers + simplefonts: Using different font in layers? 2011-12-09 8:24 Layers + simplefonts: Using different font in layers? Mari Voipio 2011-12-09 9:01 ` Hans Hagen @ 2011-12-09 9:10 ` Willi Egger 2011-12-09 10:00 ` Mari Voipio 1 sibling, 1 reply; 9+ messages in thread From: Willi Egger @ 2011-12-09 9:10 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: text/plain, Size: 391 bytes --] 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 [-- Attachment #2: test-simplefonts.tex --] [-- Type: application/octet-stream, Size: 1363 bytes --] % Context file % Filename: test-simplefonts.tex % % 09-12-2011 % Copyright (c) 2011 BOEDE. All rights reserved. % % \nopdfcompression % \enabletrackers[context.trace] % \enabletrackers[system.jobfiles] \usemodule[simplefonts] \setmainfont[arial] \setuplayout [topspace=2.5cm, backspace=1.5cm, header=0pt, footer=1.5\bodyfontsize, height=middle, width=middle] \mainlanguage[nl] \setuppagenumbering[location={footer,right},alternative=doublesided] \definelayer[Cover][width=\paperwidth,height=\paperheight] \startsetups Cover:setups \setmainfont[arial] \stopsetups \startsetups[Main] \setmainfont[palatino] \stopsetups %\showframe \starttext \setlayerframed [Cover] [x=-\marginwidth,y=-\topspace] [setups=Cover:setups,width=\paperwidth,height=\paperheight,frame=off] {\godown[.3\textheight] This is the Front Cover\vfill} \startstandardmakeup[page=yes,doublesided=yes] \placelayer[Cover] \stopstandardmakeup \page[right] \setups[Main] \dorecurse{3} {\input tufte \page} % \page[left] % \page[empty] \setups[Cover] \setlayerframed [Cover] [x=-\marginwidth,y=-\topspace] [setups=Cover:setups,width=\paperwidth,height=\paperheight,frame=off] {\godown[.3\textheight] This is the Back Cover\vfill} \startstandardmakeup[page=no,doublesided=no] \placelayer[Cover] \stopstandardmakeup \stoptext [-- Attachment #3: Type: text/plain, Size: 2857 bytes --] 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_Booklet>, > 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 > ___________________________________________________________________________________ [-- Attachment #4: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Layers + simplefonts: Using different font in layers? 2011-12-09 9:10 ` Willi Egger @ 2011-12-09 10:00 ` Mari Voipio 2011-12-09 11:04 ` Willi Egger 2011-12-09 11:08 ` Hans Hagen 0 siblings, 2 replies; 9+ messages in thread From: Mari Voipio @ 2011-12-09 10:00 UTC (permalink / raw) To: mailing list for ConTeXt users On Fri, Dec 9, 2011 at 11:10, Willi Egger <context@boede.nl> 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} 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 ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Layers + simplefonts: Using different font in layers? 2011-12-09 10:00 ` Mari Voipio @ 2011-12-09 11:04 ` Willi Egger 2011-12-09 13:54 ` Mari Voipio 2011-12-09 11:08 ` Hans Hagen 1 sibling, 1 reply; 9+ messages in thread From: Willi Egger @ 2011-12-09 11:04 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: text/plain, Size: 1241 bytes --] Hi Mari, On 9 Dec 2011, at 11:00, Mari Voipio wrote: > On Fri, Dec 9, 2011 at 11:10, Willi Egger <context@boede.nl> 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. [-- Attachment #2: test-simplefonts.tex --] [-- Type: application/octet-stream, Size: 1534 bytes --] % Context file % Filename: test-simplefonts.tex % % 09-12-2011 % Copyright (c) 2011 BOEDE. All rights reserved. % % \nopdfcompression % \enabletrackers[context.trace] % \enabletrackers[system.jobfiles] \usemodule[simplefonts] \setmainfont[arial] \setuplayout [topspace=2.5cm, backspace=1.5cm, header=0pt, footer=1.5\bodyfontsize, height=middle, width=middle] \mainlanguage[nl] \setuppagenumbering[location={footer,right},alternative=doublesided] \definelayer[Cover][width=\paperwidth,height=\paperheight] \startsetups Cover:setups \setmainfont[arial] \stopsetups \startsetups[Main] \setmainfont[palatino] \stopsetups %\showframe \starttext \setlayerframed [Cover] [x=-\marginwidth,y=-\topspace] [setups=Cover:setups,width=\paperwidth,height=\paperheight,frame=off] {\godown[.3\textheight] This is the Front Cover\vfill} \startstandardmakeup[page=yes,doublesided=yes] \placelayer[Cover] \stopstandardmakeup \page[right] \setups[Main] \startsubject[title=The content] \placecontent \stopsubject \page[right] \dorecurse{3} {\startsection[title=Section]\input tufte \stopsection\page} \startsection[title=Section]\input tufte \stopsection % \page[left] % \page[empty] \setups[Cover] \setlayerframed [Cover] [x=-\marginwidth,y=-\topspace] [setups=Cover:setups,width=\paperwidth,height=\paperheight,frame=off] {\godown[.3\textheight] This is the Back Cover\vfill} \startstandardmakeup[page=left,doublesided=no] \placelayer[Cover] \stopstandardmakeup \stoptext [-- Attachment #3: Type: text/plain, Size: 561 bytes --] 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 > ___________________________________________________________________________________ [-- Attachment #4: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Layers + simplefonts: Using different font in layers? 2011-12-09 11:04 ` Willi Egger @ 2011-12-09 13:54 ` Mari Voipio 2011-12-09 14:43 ` Willi Egger 0 siblings, 1 reply; 9+ messages in thread From: Mari Voipio @ 2011-12-09 13:54 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: text/plain, Size: 866 bytes --] On Fri, Dec 9, 2011 at 13:04, Willi Egger <context@boede.nl> 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?) [-- Attachment #2: maoutput_cover_mari.tex --] [-- Type: application/x-tex, Size: 2191 bytes --] [-- Attachment #3: maoutput_cover_test_willi.tex --] [-- Type: application/x-tex, Size: 3332 bytes --] [-- Attachment #4: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Layers + simplefonts: Using different font in layers? 2011-12-09 13:54 ` Mari Voipio @ 2011-12-09 14:43 ` Willi Egger 2011-12-09 14:52 ` Wolfgang Schuster 0 siblings, 1 reply; 9+ messages in thread From: Willi Egger @ 2011-12-09 14:43 UTC (permalink / raw) To: mailing list for ConTeXt users 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 <context@boede.nl> 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?) > <maoutput_cover_mari.tex><maoutput_cover_test_willi.tex>___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Layers + simplefonts: Using different font in layers? 2011-12-09 14:43 ` Willi Egger @ 2011-12-09 14:52 ` Wolfgang Schuster 0 siblings, 0 replies; 9+ messages in thread From: Wolfgang Schuster @ 2011-12-09 14:52 UTC (permalink / raw) To: mailing list for ConTeXt users 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 ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Layers + simplefonts: Using different font in layers? 2011-12-09 10:00 ` Mari Voipio 2011-12-09 11:04 ` Willi Egger @ 2011-12-09 11:08 ` Hans Hagen 1 sibling, 0 replies; 9+ messages in thread From: Hans Hagen @ 2011-12-09 11:08 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Mari Voipio On 9-12-2011 11:00, Mari Voipio wrote: > On Fri, Dec 9, 2011 at 11:10, Willi Egger<context@boede.nl> 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-12-09 14:52 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-12-09 8:24 Layers + simplefonts: Using different font in layers? Mari Voipio 2011-12-09 9:01 ` Hans Hagen 2011-12-09 9:10 ` Willi Egger 2011-12-09 10:00 ` Mari Voipio 2011-12-09 11:04 ` Willi Egger 2011-12-09 13:54 ` Mari Voipio 2011-12-09 14:43 ` Willi Egger 2011-12-09 14:52 ` Wolfgang Schuster 2011-12-09 11:08 ` Hans Hagen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).