I am new to ConTexT and TeX (thinking about migrating from InDesign). I am using TexShop and the teTeX distribution on Mac OS X 10.4. I have two questions that I cannot seem to answer after studying the manuals and the archives. 1. I have successfully set up a doublesided layout that has a text column and an outer margin for margin notes and some small figures. I would like to set up a header that has the chapter number and name (e.g. "3. Third Chapter Name") on the inner edge of the text column, and the page number aligned with the *outer* edge of the margin and a 1-pt rule below the entire header (from below the chapter number to below the page number). How would one do this elegantly (or even inelegantly)? 2. I would like the math environment to be as close to the LaTeX AMS environment as possible. I have figured out how to download the t- amsl module and can successfully invoke it as long as the t-amsl.tex file is in the same folder as my document files. But how do I install it permanently so that I can invoke it in all my documents? I was unable to find instructions in the ConTexT garden for this, and what I could find on the archives was not helpful (something about "running mktexlsr" and/or "texhash" that I have don't know how to do in OS X, and would be afraid to do without instructions anyway for fear of screwing up my TeX distribution). Thanks for any help, and sorry if the questions are stupid. Tom Moore
From: Thomas Moore
I have figured out how to download the t-amsl module and can successfully invoke it as long as the t-amsl.tex file is in the same folder as my document files. But how do I install it permanently so that I can invoke it in all my documents?
I don't know TeXShop or MacOS but I'm also using teTeX (but on Linux). t-amsl.tex is already in the distribution of ConTeXt that comes with teTeX: $ kpsewhich t-amsl /usr/share/texmf-tetex/tex/context/maths/t-amsl.tex If you don't have t-amsl already in the system path, then the command above won't find it. You could see where similar files live by searching for files that are very likely to exist, such as t-bib or m-graph. If you're using a recent-enough teTeX (I'm using 3.0), then ~/texmf/ is also on the search path and you could put t-amsl.tex somewhere analogous but in ~/texmf/tex/context/. The advantage of ~/texmf over /usr/share/texmf-tetex/ is that the ~/texmf tree, at least in the teTeX 3.0 default texmf.cnf file, is searched without requiring that the file be in the ls-R database, so you don't need to run mktexlsr to regenerate the ls-R databases. The system directories are, in the default config, searched only by looking at the ls-R database (to avoid searching through a directory tree of 6000+ files). One problem to watch for is version skew. The t-amsl.tex that you downloaded might require a more recent ConTeXt than came with teTeX. But maybe that's not an issue since you've been using it in your working directory with no problem.
I am new to ConTexT and TeX (thinking about migrating from InDesign).
Is that for a new edition of _Six Ideas That Shaped Physics_ (an excellent series)? What makes you consider migrating? I haven't used InDesign but I imagine that flowing text around or near figures might be easier with a page-layout program like InDesign (but I'm still learning ConTeXt and as a general rule one can do anything in ConTeXt with enough magic!). On the other hand, math typesetting might be easier and higher-quality in TeX/ConTeXt. Best of luck! -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
On Jun 24, 2006, at 8:46 AM, Sanjoy Mahajan wrote:
I have figured out how to download the t-amsl module and can successfully invoke it as long as the t-amsl.tex file is in the same folder as my document files. But how do I install it permanently so that I can invoke it in all my documents?
I don't know TeXShop or MacOS but I'm also using teTeX (but on Linux). t-amsl.tex is already in the distribution of ConTeXt that comes with teTeX...
You are correct -- it took a bit of finding on the Mac but it is indeed there. That fixes problem #2. Thanks!!
I am new to ConTexT and TeX (thinking about migrating from InDesign).
Is that for a new edition of _Six Ideas That Shaped Physics_ (an excellent series)?
Thank you for your kind words -- yes, I am thinking about the next edition, but also for a book on General Relativity that I am working on and for future projects.
What makes you consider migrating? I haven't used InDesign but I imagine that flowing text around or near figures might be easier with a page-layout program like InDesign (but I'm still learning ConTeXt and as a general rule one can do anything in ConTeXt with enough magic!). On the other hand, math typesetting might be easier and higher-quality in TeX/ConTeXt.
The Six Ideas texts (first edition) were typeset as AppleWorks drawings, if you can believe it. To go to the third edition, I have to migrate to something more modern -- either InDesign or something TeX-based. Problems with figure and equation references, indexing issues, and inconsistent styles were driving me crazy with AppleWorks, and many of these problems would persist in InDesign. I have also been having difficulty setting up mathematics in a satisfactory way. On the other hand, I am a very visual thinker, and I don't remember commands well, so even ConTexT (which seems a lot simpler than LaTeX) is a big stretch for me. We will see...
Best of luck!
Thanks, I will need it! Tom
Thomas Moore wrote:
The Six Ideas texts (first edition) were typeset as AppleWorks drawings, if you can believe it. To go to the third edition, I have to migrate to something more modern -- either InDesign or something TeX-based. Problems with figure and equation references, indexing issues, and inconsistent styles were driving me crazy with AppleWorks, and many of these problems would persist in InDesign. I have also been having difficulty setting up mathematics in a satisfactory way. On the other hand, I am a very visual thinker, and I don't remember commands well, so even ConTexT (which seems a lot simpler than LaTeX) is a big stretch for me. We will see...
it's a stepwise process - first set up a basic page style (next time in a big bookshop i'll take a look at the series) and set up a font; that way you get an idea how well things will fit - then develop the structure + associated style mapping while writing (or converting) ask yourself: - do i need to render this differently - do i get the feeling that i enter too much code if so, then add structure This is how context itself evolved (after all, it was written in an educational context where structure, reuse etc is important). Just don't try to make up the style at the beginning, polishing it every now and then is a nice distraction. Also, using metapost for the graphics is fun in itself (and may save you lots of time). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Dear Hans:
it's a stepwise process
- first set up a basic page style (next time in a big bookshop i'll take a look at the series) and set up a font; that way you get an idea how well things will fit
- then develop the structure + associated style mapping while writing (or converting)
ask yourself:
- do i need to render this differently - do i get the feeling that i enter too much code
if so, then add structure
This is how context itself evolved (after all, it was written in an educational context where structure, reuse etc is important). Just don't try to make up the style at the beginning, polishing it every now and then is a nice distraction.
Also, using metapost for the graphics is fun in itself (and may save you lots of time).
Thanks for the very thoughtful advice! Best wishes, Tom
On 6/24/06, Thomas Moore wrote:
2. I would like the math environment to be as close to the LaTeX AMS environment as possible. I have figured out how to download the t- amsl module and can successfully invoke it as long as the t-amsl.tex file is in the same folder as my document files. But how do I install it permanently so that I can invoke it in all my documents? I was unable to find instructions in the ConTexT garden for this, and what I could find on the archives was not helpful (something about "running mktexlsr" and/or "texhash" that I have don't know how to do in OS X, and would be afraid to do without instructions anyway for fear of screwing up my TeX distribution).
You can put the file to any location where TeX can find it. For example if the file context.tex is located under [somepath]/texmf[-local]/tex/context/base/context.tex you might put the file to [somepath]/texmf[-local]/tex/context/third/t-amsl.tex (but basically any location under "texmf" would do). ... and then run mktexlsr without any additinal arguments. You cannot screw up your TeX distribution by running mktexlsr or texhash: they're only meant to refresh the database (to know which file is where). Either of the commands should be present on your distribution I believe (most probably mktxlsr). Mojca
Dear Mojca:
...it permanently so that I can invoke it in all my documents? I was unable to find instructions in the ConTexT garden for this, and what I could find on the archives was not helpful (something about "running mktexlsr" and/or "texhash" that I have don't know how to do in OS X, and would be afraid to do without instructions anyway for fear of screwing up my TeX distribution).
You can put the file to any location where TeX can find it. For example if the file context.tex is located under [somepath]/texmf[-local]/tex/context/base/context.tex you might put the file to [somepath]/texmf[-local]/tex/context/third/t-amsl.tex (but basically any location under "texmf" would do).
... and then run mktexlsr without any additinal arguments.
You cannot screw up your TeX distribution by running mktexlsr or texhash: they're only meant to refresh the database (to know which file is where). Either of the commands should be present on your distribution I believe (most probably mktxlsr).
Mojca
Thanks. The previous response on the list solved this particular problem, but for future reference, how do I "run" mktexlsr? from the OS X Terminal? I have never used that before, so I would need pretty basic instructions (e.g. would I have tell the Terminal where to find "mktexlsr"?). I appreciate your help! Tom
how do I "run" mktexlsr? from the OS X Terminal
Since you're using tetex, 'mktexlsr' should be in the PATH already (on my linux system it's in /usr/bin, one of the very standard components of PATH), so 'mktexlsr' from the Terminal should work. If that doesn't work, what's the output of 'printenv PATH'? And does MacOS have 'locate'? On Linux, 'locate mktexlsr' will tell you all files that contain 'mktexlsr' in their full name (including directory). That often helps in finding where packages put files. On (Debian) Linux an easier way is to ask the package management system to list the files in a package, e.g: dpkg -L tetex-base which produces thousands of lines. Maybe Mac gurus know something similar for Mac OS? Even more useful is to use a pipe (|) to connect the output of dpkg to pattern-matching utility grep: dpkg -L tetex-base | grep t-amsl which produces /usr/share/texmf-tetex/tex/context/maths/t-amsl.tex For finding mktexlsr 'dpkg -L tetex-bin | grep mktexlsr' produces /usr/share/man/man1/mktexlsr.1.gz /usr/bin/mktexlsr (also useful to use grep after a 'locate'). If locate doesn't exist, the elephant gun is 'find', e.g. find /usr -name 'mktexlsr' or another example: find /usr -name 't-amsl.tex' Find traverses the file system tree starting where you tell it (/usr in the above examples) looking for whatever you ask, and prints out the matching path names. ('locate' is just an optimized version of find: Once a week or so, the system does a 'find /' and stores all the paths in a monster file, and then 'locate' just looks in that file). -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
2. I would like the math environment to be as close to the LaTeX AMS environment as possible. I have figured out how to download the t- amsl module and can successfully invoke it as long as the t-amsl.tex file is in the same folder as my document files.
Others have already answered on how to "install t-amsl.tex" so I will not go into that. Context has a much improved math support since Giuseppe Bilotta wrote t-amsl.tex. I think it is better to use the "native" math environments of context which provide a lot more features. The syntax does not follow the latex ams syntax, but like everything in Context you can customize the behaviour a lot. You can look at http://dl.contextgarden.net/myway/mathalign.pdf which contains some examples of using the built-in context support. Aditya
On 6/24/06, Thomas Moore wrote:
1. I have successfully set up a doublesided layout that has a text column and an outer margin for margin notes and some small figures. I would like to set up a header that has the chapter number and name (e.g. "3. Third Chapter Name") on the inner edge of the text column, and the page number aligned with the *outer* edge of the margin and a 1-pt rule below the entire header (from below the chapter number to below the page number). How would one do this elegantly (or even inelegantly)?
First forget about the wrong pagenumber positioning. Here's the most elegant solution for drawing the line: \setuppagenumbering [alternative=doublesided, location=] \setupheadertexts [pagenumber] [chapter] [chapter] [pagenumber] \setuplayout [header=15pt, headerdistance=20pt] \setupbackgrounds [header] [text] [bottomframe=on, rulethickness=1pt] \starttext \chapter{first} \dorecurse{50}{\input tufte } \chapter{second} \dorecurse{20}{\input tufte } \stoptext But I don't know if there's a simple extention to it to draw the missing line inbetween. Here's another solution, which is the wrong way of doing things (it's way too slow and meant for more complex things than a simple rule, but could be optimezed if "useMPgraphic" was replaced with "reusable" or "unique"). Also try \showlayout and see meta-pag.tex in the ConTeXt source. \startuseMPgraphic{PageFrame} StartPage ; y1=y2=PaperHeight-TopSpace-HeaderHeight; if OnRightPage : x2 = BackSpace+TextWidth = x1 + LeftMarginDistance + LeftMarginWidth + TextWidth; else: x2 = BackSpace = x1 - (RightMarginDistance + RightMarginWidth + TextWidth); fi; draw z1--z2 withpen pencircle scaled 1pt; StopPage; \stopuseMPgraphic \defineoverlay [PageFrame][\useMPgraphic{PageFrame}] \setupbackgrounds [page] [background=PageFrame] The trird solutions is probably the way to go, but it influences only a single page and \getmarking[chapter] has no influence. I guess that a minor modification is needed to handle both left & right page properly and to put that layer over all pages, not only on the first one: \definelayer [page] [width=\paperwidth, height=\paperheight] \setupbackgrounds [page] [background=page] \setlayerframed [page] [voffset=\topspace, hoffset=\the\dimexpr\backspace-\leftmarginwidth-\leftmargindistance\relax, preset=lefttop] [width=\the\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance\relax, rulethickness=1pt, frame=off, bottomframe=on] {\pagenumber\hfill\getmarking[chapter][first]} Hoping that someone can fix at least one of the solutions above to work as intended, Mojca
Mojca Miklavec wrote:
\definelayer [page] [width=\paperwidth, height=\paperheight] \setupbackgrounds [page] [background=page] \setlayerframed [page] [voffset=\topspace, hoffset=\the\dimexpr\backspace-\leftmarginwidth-\leftmargindistance\relax, preset=lefttop] [width=\the\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance\relax, rulethickness=1pt, frame=off, bottomframe=on] {\pagenumber\hfill\getmarking[chapter][first]}
Hoping that someone can fix at least one of the solutions above to work as intended,
ok, here is a trick: \definelayer [page] [hoffset=\the\dimexpr\backspace- \leftmarginwidth-\leftmargindistance\relax, voffset=\topspace, width=\paperwidth, height=\paperheight] \setupbackgrounds [page] [background=page] \startsetups page:setup \setlayerframed [page] [preset=lefttop] [width=\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance\relax, rulethickness=1pt, frame=off, bottomframe=on] {\pagenumber\hfill\getmarking[chapter][first]} \stopsetups \setupheadertexts [\setups{page:setup}] so, - makea setup (clean) - hook it into something that is done each page (maybe i should cook up a hook for that) now, the left right page problem is up to you ... keep in mind that we have \setupbackgrounds [leftpage] [...] \setupbackgrounds [rightpage] [...] ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Jun 25, 2006, at 9:54 AM, Hans Hagen wrote:
Mojca Miklavec wrote:
....Hoping that someone can fix at least one of the solutions above to work as intended,
ok, here is a trick: .... now, the left right page problem is up to you ... keep in mind that we have
\setupbackgrounds [leftpage] [...]
\setupbackgrounds [rightpage] [...] Thanks, Mojca, for your ideas! Special thanks to Hans, whose solution seemed efficient and worked like a charm (after I made one minor fix). I have attached to the end of this message code that works well on *either* right pages *or* left pages. Now I'd like to extend the code so that it would work on *both* kinds of pages. But my experimentation has raised the following questions:
1. When I change the \setupbackgrounds [page][background=thepage] in the code shown below to \setupbackgrounds [rightpage] [background=thepage], I expected that the left page would have no header and the right page would have the appropriate header. However, when I do this, I get two superimposed headers with different lengths on right pages (and nothing, as expected, on left pages). Why do I get *two* headers on the right page? 2. I also do not understand \startsetups command, which I could not find in the ConTexT manual or in the online summary of ConTexT commands. It looks like the purpose of this command is to put a wrapper around the \setlayerframed command so that it can be used in the \setupheadertexts command. Is this right? Also: a. I guess that I don't understand why the \setlayerframed command could not be used directly in the \setupheadertexts command: why do we need the wrapper? b. And why this particular wrapping command? (\startfoo ... \stopfoo doesn't work.) c. Also, I am assuming that the colon is simply part of the name assigned to this setup and has no other significance: is this right? 3. So, my guess (once problem 1 is fixed), is that I will define *two* layers (one for right pages and one for left pages), and do a \setupbackground [rightpage][background=therightpage] and a \setupbackground[leftpage][background=theleftpage]. But I don't know what to do inside the \startsetup ... \stopsetup. Do I have a pair of \setlayerframed statements? Do I surround this pair with something like an if onRightPage ... if onLeftPage statement? Or do I put the if-then statements *inside* the \setlayerframed statement? Thanks for any help... Tom Code follows: \usemodule[amsl] \usemodule[newmat] \setuppapersize[letter] \setuppagenumbering [alternative=doublesided] \setuplayout [backspace=1.0in, topspace=0.5in, width=4.5in, height=9.5in, rightmargin=2.35in, rightmargindistance=0.15in, leftmargin=0in, leftmargindistance=0in, header=0.5 in, footer=0in] \definelayer [thepage] %[hoffset=\the\dimexpr\cutspace-\leftmarginwidth- \leftmargindistance\relax, % for left pages [hoffset=\the\dimexpr\backspace\relax, % for right pages voffset=\topspace, width=\paperwidth, height=\paperheight] \setupbackgrounds [page] [background=thepage] \startsetups page:setup \setlayerframed [thepage] [preset=lefttop] % [width=\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance \relax, % for left pages [width=\dimexpr\textwidth+\rightmarginwidth+\rightmargindistance \relax, % for right pages rulethickness=1pt, frame=off, bottomframe=on] % {\pagenumber\hfill\getmarking[chapter][first]} % for left pages {\getmarking[chapter][first]\hfill\pagenumber} % for right pages \stopsetups \setupheadertexts [\setups{page:setup}] \starttext \chapter{Test} This is a test of some math stuff. $0 = g_{\mu\nu}dx^\nu dx^\nu$. \dorecurse{10}{\input knuth} \showlayout \stoptext
Dear ConTeXt gurus: OK, I have gotten some off-list help from Mojca, who has answered most of my questions and helped me polish the two page version of my code (thanks, Mojca!). I have included what he helped me work out below. There is one remaining problem. The first page is correct, but very subsequent page has a correct-looking header and another superimposed. The second superimposed header is not wide enough and has the wrong page number (the number of the previous page), though the page number is on the correct side. It is as if the page output command from TeX is issuing the \setups command *twice*, once before fully updating variables like \rightmarginwidth and the page number, and once after setups have been done correctly. Is this a bug, or am I doing something stupid? Thanks for any insight, Tom Code follows: \usemodule[amsl] \usemodule[newmat] \setuppapersize[letter] \setuppagenumbering [alternative=doublesided] \setuplayout [backspace=1.0in, topspace=0.5in, width=4.5in, height=9.5in, rightmargin=2.35in, rightmargindistance=0.15in, leftmargin=0in, leftmargindistance=0in, header=0.5 in, footer=0in] \definelayer [leftpage] [hoffset=\the\dimexpr\cutspace-\leftmarginwidth-\leftmargindistance \relax, % for left pages voffset=\topspace, width=\paperwidth, height=\paperheight] \definelayer [rightpage] [hoffset=\the\dimexpr\backspace\relax, % for right pages voffset=\topspace, width=\paperwidth, height=\paperheight] \setupbackgrounds [leftpage] [background=leftpage] \setupbackgrounds [rightpage] [background=rightpage] \startsetups page:setup \setlayerframed [leftpage] [preset=lefttop] [width=\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance \relax, % for left pages rulethickness=1pt, frame=off, bottomframe=on] {\pagenumber\hfill\getmarking[chapter][first]} % for left pages \setlayerframed [rightpage] [preset=lefttop] [width=\dimexpr\textwidth+\rightmarginwidth+\rightmargindistance \relax, % for right pages rulethickness=1pt, frame=off, bottomframe=on] {\getmarking[chapter][first]\hfill\pagenumber} % for right pages \stopsetups \setupheadertexts [\setups{page:setup}] \starttext \chapter{Test} This is a test of some math stuff. $0 = g_{\mu\nu}dx^\nu dx^\nu$. \dorecurse{10}{\input knuth} \showlayout \stoptext
On Wed, 28 Jun 2006, Thomas Moore wrote:
Dear ConTeXt gurus:
I am not a context guru, but will still give it a shot ;)
OK, I have gotten some off-list help from Mojca, who has answered most of my questions and helped me polish the two page version of my code (thanks, Mojca!). I have included what he helped me work out below. There is one remaining problem. The first page is correct, but very subsequent page has a correct-looking header and another superimposed. The second superimposed header is not wide enough and has the wrong page number (the number of the previous page), though the page number is on the correct side. It is as if the page output command from TeX is issuing the \setups command *twice*, once before fully updating variables like \rightmarginwidth and the page number, and once after setups have been done correctly. Is this a bug, or am I doing something stupid?
Thanks for any insight, Tom
I am not sure what about the exact layout you are trying to achieve. Does this give you what you want. \setuppapersize[letter] \setuppagenumbering [alternative=doublesided,location=] \setuplayout [backspace=1.0in, topspace=0.5in, width=4.5in, height=9.5in, rightmargin=2.35in, rightmargindistance=0.15in, leftmargin=0in, leftmargindistance=0in, header=\normallineheight, headerdistance=\dimexpr0.5in-\normallineheight, footer=0in] \setupheadertexts[chapter][pagenumber][pagenumber][chapter] \setupbackgrounds[header][text][bottomframe=on,rulethickness=1pt] \starttext \chapter{Test} This is a test of some math stuff. $0 = g_{\mu\nu}dx^\nu dx^\nu$. \dorecurse{10}{\input knuth} \showlayout \stoptext Aditya
Code follows:
\usemodule[amsl] \usemodule[newmat]
\setuppapersize[letter] \setuppagenumbering [alternative=doublesided] \setuplayout [backspace=1.0in, topspace=0.5in, width=4.5in, height=9.5in, rightmargin=2.35in, rightmargindistance=0.15in, leftmargin=0in, leftmargindistance=0in, header=0.5 in, footer=0in]
\definelayer [leftpage] [hoffset=\the\dimexpr\cutspace-\leftmarginwidth-\leftmargindistance \relax, % for left pages voffset=\topspace, width=\paperwidth, height=\paperheight]
\definelayer [rightpage] [hoffset=\the\dimexpr\backspace\relax, % for right pages voffset=\topspace, width=\paperwidth, height=\paperheight]
\setupbackgrounds [leftpage] [background=leftpage] \setupbackgrounds [rightpage] [background=rightpage]
\startsetups page:setup
\setlayerframed [leftpage] [preset=lefttop] [width=\dimexpr\textwidth+\leftmarginwidth+\leftmargindistance \relax, % for left pages rulethickness=1pt, frame=off, bottomframe=on] {\pagenumber\hfill\getmarking[chapter][first]} % for left pages
\setlayerframed [rightpage] [preset=lefttop] [width=\dimexpr\textwidth+\rightmarginwidth+\rightmargindistance \relax, % for right pages rulethickness=1pt, frame=off, bottomframe=on] {\getmarking[chapter][first]\hfill\pagenumber} % for right pages
\stopsetups
\setupheadertexts [\setups{page:setup}]
\starttext \chapter{Test} This is a test of some math stuff. $0 = g_{\mu\nu}dx^\nu dx^\nu$. \dorecurse{10}{\input knuth}
\showlayout \stoptext _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
-- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008
From: Thomas Moore
\setuppapersize[letter]
You want \setuppapersize[letter][letter] otherwise you get letter sized pages imposed on A4 paper (not widely available in Pomona probably!) because the default value for the second argument is A4. You might get lucky and end up with letter pages anyway if you have the right defaults in dvips, but that's a bit fragile (and probably direct pdf output would be on A4 paper). In an earlier thread I'd asked that the default be whatever the first argument is, but that idea was rejected on the (reasonable) grounds that the change would break too many documents. -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
On Jun 28, 2006, at 6:12 PM, Aditya Mahajan wrote:
Dear ConTeXt gurus:
I am not a context guru, but will still give it a shot ;)
Thanks for your help!
OK, I have gotten some off-list help from Mojca, who has answered most of my questions and helped me polish the two page version of my code (thanks, Mojca!). I have included what he helped me work out below. There is one remaining problem. The first page is correct, but very subsequent page has a correct-looking header and another superimposed. The second superimposed header is not wide enough and has the wrong page number (the number of the previous page), though the page number is on the correct side. It is as if the page output command from TeX is issuing the \setups command *twice*, once before fully updating variables like \rightmarginwidth and the page number, and once after setups have been done correctly. Is this a bug, or am I doing something stupid?
Thanks for any insight, Tom
I am not sure what about the exact layout you are trying to achieve. Does this give you what you want.
\setuppapersize[letter] \setuppagenumbering [alternative=doublesided,location=] \setuplayout [backspace=1.0in, topspace=0.5in, width=4.5in, height=9.5in, rightmargin=2.35in, rightmargindistance=0.15in, leftmargin=0in, leftmargindistance=0in, header=\normallineheight, headerdistance=\dimexpr0.5in-\normallineheight, footer=0in]
\setupheadertexts[chapter][pagenumber][pagenumber][chapter] \setupbackgrounds[header][text][bottomframe=on,rulethickness=1pt]
\starttext \chapter{Test} This is a test of some math stuff. $0 = g_{\mu\nu}dx^\nu dx^\nu$. \dorecurse{10}{\input knuth}
\showlayout \stoptext
Sorry, no. The additional feature that I need is to be able to extend the horizontal line over the margin region as well as the text region, and put the page number (outer-justified) at the outer edge of the margin region. The code that I attached to the previous message does that, but suffers from the superimposed headers problem. But I appreciate your effort! Best wishes, Tom
On Jun 24, 2006, at 16:56, Thomas Moore wrote:
2. I would like the math environment to be as close to the LaTeX AMS environment as possible. I have figured out how to download the t- amsl module and can successfully invoke it as long as the t-amsl.tex file is in the same folder as my document files. But how do I install it permanently so that I can invoke it in all my documents? I was unable to find instructions in the ConTexT garden for this, and what I could find on the archives was not helpful (something about "running mktexlsr" and/or "texhash" that I have don't know how to do in OS X, and would be afraid to do without instructions anyway for fear of screwing up my TeX distribution).
Thanks for any help, and sorry if the questions are stupid. Tom Moore
Depending on how you installed TeX, t-amsl.tex is there. If you installed with the TeX i-Package: $ kpsewhich t-amsl.tex /usr/local/teTeX/share/texmf.tetex/tex/context/maths/t-amsl.tex But it is the one from 1.5 years ago in the old ConTeXt that comes with the (discontinued) teTeX texmf tree. If you also installed the ConTeXt updater (which is pretty up-to-date), the math stuff is not in there (Hans, why not?) so you get a newer ConTeXt with an older t-amsl.tex and I have no idea if that works. If you have a (more recent) t-amsl.tex file and you are using the TeX i-Package, you can install th efile as ~/Library/texmf/tex/context/t-amsl.tex and it will be found. No mktexlsr or texhash is needed for that particular tree. If someone tells me what to include in the ConTeXt updater for this math stuff and where to get it, I can make life easy for you. If you installed with fink or in some other way, I have no idea how to help you. G
Gerben Wierda wrote:
On Jun 24, 2006, at 16:56, Thomas Moore wrote:
2. I would like the math environment to be as close to the LaTeX AMS environment as possible. I have figured out how to download the t- amsl module and can successfully invoke it as long as the t-amsl.tex file is in the same folder as my document files. But how do I install it permanently so that I can invoke it in all my documents? I was unable to find instructions in the ConTexT garden for this, and what I could find on the archives was not helpful (something about "running mktexlsr" and/or "texhash" that I have don't know how to do in OS X, and would be afraid to do without instructions anyway for fear of screwing up my TeX distribution).
Thanks for any help, and sorry if the questions are stupid. Tom Moore
Depending on how you installed TeX, t-amsl.tex is there. If you installed with the TeX i-Package:
$ kpsewhich t-amsl.tex /usr/local/teTeX/share/texmf.tetex/tex/context/maths/t-amsl.tex
But it is the one from 1.5 years ago in the old ConTeXt that comes with the (discontinued) teTeX texmf tree. If you also installed the ConTeXt updater (which is pretty up-to-date), the math stuff is not in there (Hans, why not?) so you get a newer ConTeXt with an older t-amsl.tex and I have no idea if that works.
it's a third party module, and when not present at the context garden, it will not end up on ctan (or in the extras zip)
If someone tells me what to include in the ConTeXt updater for this math stuff and where to get it, I can make life easy for you.
taco can give you details on how to auto-sync with the garden third party modules, Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Dear Gerben: Thanks, the t-amsl module does seemed to be pre- installed. I just downloaded TeX/LaTeX/ ConTexT recently (mid June) using an all-in-one-step installer, and I have not upgraded, so I guess that my t-amsl file might be outdated. Thanks for the suggestion about where to put the new module -- this will help in the future. Best wishes, Tom On Jun 27, 2006, at 12:53 PM, Gerben Wierda wrote:
On Jun 24, 2006, at 16:56, Thomas Moore wrote:
2. I would like the math environment to be as close to the LaTeX AMS environment as possible. I have figured out how to download the t- amsl module and can successfully invoke it as long as the t-amsl.tex file is in the same folder as my document files. But how do I install it permanently so that I can invoke it in all my documents? I was unable to find instructions in the ConTexT garden for this, and what I could find on the archives was not helpful (something about "running mktexlsr" and/or "texhash" that I have don't know how to do in OS X, and would be afraid to do without instructions anyway for fear of screwing up my TeX distribution).
Thanks for any help, and sorry if the questions are stupid. Tom Moore
Depending on how you installed TeX, t-amsl.tex is there. If you installed with the TeX i-Package:
$ kpsewhich t-amsl.tex /usr/local/teTeX/share/texmf.tetex/tex/context/maths/t-amsl.tex
But it is the one from 1.5 years ago in the old ConTeXt that comes with the (discontinued) teTeX texmf tree. If you also installed the ConTeXt updater (which is pretty up-to-date), the math stuff is not in there (Hans, why not?) so you get a newer ConTeXt with an older t-amsl.tex and I have no idea if that works.
If you have a (more recent) t-amsl.tex file and you are using the TeX i-Package, you can install th efile as ~/Library/texmf/tex/context/t-amsl.tex and it will be found. No mktexlsr or texhash is needed for that particular tree.
If someone tells me what to include in the ConTeXt updater for this math stuff and where to get it, I can make life easy for you.
If you installed with fink or in some other way, I have no idea how to help you.
G
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (6)
-
Aditya Mahajan
-
Gerben Wierda
-
Hans Hagen
-
Mojca Miklavec
-
Sanjoy Mahajan
-
Thomas Moore