Listing of typical beginner-questions
Dear all, Last weekend I had my first hands-on experience with Context. I was told that a listing of the type of problems that I encountered would have a certain value to the Context project. That's why below you'll find an overview of my beginner-questions, to some of which I already found answers. My aim is not to have all questions answered via the list, but rather to document them for later use in some kind of manual. For I know that finding the answers is mostly a matter of searching the documentation. Kind regards, Luuk Beurskens The Netherlands PS: I have been using Latex for some years. The questions below came up using a stand-alone Context environment in MS Windows. Q: Starting with Context, the use of which language is to be preferred for the commands? A: The English version is most commonly applied, even in the Netherlands Q: If one starts in a Context document in one language, can it be easily converted to another language (form English to Dutch or German, for example)? A: This is possible, but no ready-available tool exists. Q: Why does background=color not work inside \bTABLE ... \eTABLE? A: Put \setupcolors[state=start] in the beginning of the document Q: How to apply a background colour for the margin space? A: This is possible but not easy to explain. See info by Patrick Gundlach and the section Crossing Borders in the Metafun manual in chapter Pagebackgrounds by Hans Hagen. Q: Where to put the commands that apply to the whole document? Is there a 'preferred sectioning' of a Context source? A: Q: What is the equivalent of the Latex \begin{thebibliography} environment? A: Q: The command \setupwhitespace[big] doesn't have an impact on the paragraph spacing. What am I doing wrong? A: Q: Using \startcombination[*] it is possible to display several pictures into one figure. How could one achieve that several figures are treated as one picture, i.e. that they are all forced to be placed on one page? A: Q: One cell in a table (\bTABLE ... e\TABLE) should contain a unit (EJ for example) in square brackets: [EJ]. The result is that the respective row is not displayed at all. What is wrong? Could I possibly use the Latex equivalent \symbol{code}? A: Q: How can I change the fontsize inside a table? A: Q: How can I change the fontsize of an \inmargin? A: Q: How can I make a line in the header or footer of a document? A: Q: How can I define a fancy page numbering (i.e. large and coloured number)? A: Q: How to make sure that numbers in a colomn align correctly, for example: 9400 60 100 3 Inserting ~ works fine when using a proportional font. An extra difficulty occurs when the figures should be centered below the heading of the column. A: Q: a question related to the use of SciTE: changing the file scite.properties for a proportional fontsize doesn't work, although it is very well explained in the SciTE helpfile. What's the trick? A: Q: Installing the minimal context distribution on a Windows 98 machine gives problems when copying on harddisk E:. Running the batch-file cscite.bat results in the following message: "cscite root, e.g. cscite d:\copyofcdrom" (more info: C: exists but D: is a non-writable linux partition). On a different computer the same directory structure on C: didn't give this message and worked well. A:
On Thu, 29 Mar 2007 19:36:10 +0200
Luuk Beurskens
Dear all,
Last weekend I had my first hands-on experience with Context. I was told that a listing of the type of problems that I encountered would have a certain value to the Context project. That's why below you'll find an overview of my beginner-questions, to some of which I already found answers.
My aim is not to have all questions answered via the list, but rather to document them for later use in some kind of manual. For I know that finding the answers is mostly a matter of searching the documentation.
Kind regards,
Luuk Beurskens The Netherlands
PS: I have been using Latex for some years. The questions below came up using a stand-alone Context environment in MS Windows.
Q: Starting with Context, the use of which language is to be preferred for the commands? A: The English version is most commonly applied, even in the Netherlands
Q: If one starts in a Context document in one language, can it be easily converted to another language (form English to Dutch or German, for example)? A: This is possible, but no ready-available tool exists.
Q: Why does background=color not work inside \bTABLE ... \eTABLE? A: Put \setupcolors[state=start] in the beginning of the document
Q: How to apply a background colour for the margin space? A: This is possible but not easy to explain. See info by Patrick Gundlach and the section Crossing Borders in the Metafun manual in chapter Pagebackgrounds by Hans Hagen.
Hi Luuk, \setupcolors[state=start] \setupbackgrounds[text][rightmargin][background=screen] \starttext \input knuth \stoptext
Q: Where to put the commands that apply to the whole document? Is there a 'preferred sectioning' of a Context source? A:
You should use \environment's: http://wiki.contextgarden.net/Project_structure
Q: What is the equivalent of the Latex \begin{thebibliography} environment? A:
Q: The command \setupwhitespace[big] doesn't have an impact on the paragraph spacing. What am I doing wrong? A:
\setupwhitespace[big] \starttext \input knuth \stoptext
Q: Using \startcombination[*] it is possible to display several pictures into one figure. How could one achieve that several figures are treated as one picture, i.e. that they are all forced to be placed on one page? A:
\starttext \setupframed[width=5cm,height=5cm] \input knuth \placefigure [page] [] {Four blocks} {\startcombination[2*2] {\framed{}}{Block 1} {\framed{}}{Block 2} {\framed{}}{Block 3} {\framed{}}{Block 4} \stopcombination} \input knuth \stoptext
Q: One cell in a table (\bTABLE ... e\TABLE) should contain a unit (EJ for example) in square brackets: [EJ]. The result is that the respective row is not displayed at all. What is wrong? Could I possibly use the Latex equivalent \symbol{code}? A:
\starttext \bTABLE \bTR \bTD {[EJ]} \eTD \eTR \eTABLE \bTABLE \bTR \bTD[left={[},right={]}] EJ \eTD \eTR \eTABLE \stoptext
Q: How can I change the fontsize inside a table? A:
\starttext Text \setupTABLE[style=small] \bTABLE \bTR \bTD Text \eTD \eTD \eTABLE \setuptables[bodyfont=small] \starttable[|l|] \NC Text \NC\AR \stoptable \setuptabulate[bodyfont=small] \starttabulate[|l|] \NC Text \NC\NR \stoptabulate \stoptext
Q: How can I change the fontsize of an \inmargin? A:
\starttext Text \setupinmargin[style=small] \inmargin{Text} \stoptext
Q: How can I make a line in the header or footer of a document? A:
\setupheadertexts[left][right] \setupfootertexts[left][right] \starttext Text \stoptext
Q: How can I define a fancy page numbering (i.e. large and coloured number)? A:
Q: How to make sure that numbers in a colomn align correctly, for example: 9400 60 100 3 Inserting ~ works fine when using a proportional font. An extra difficulty occurs when the figures should be centered below the heading of the column. A:
Q: a question related to the use of SciTE: changing the file scite.properties for a proportional fontsize doesn't work, although it is very well explained in the SciTE helpfile. What's the trick? A:
I think this is a bug in the version shipped with the ConTeXt distribution for Windows, because in the download version from the Scite homepage everything works as expected. Wolfgang
Q: Installing the minimal context distribution on a Windows 98 machine gives problems when copying on harddisk E:. Running the batch-file cscite.bat results in the following message: "cscite root, e.g. cscite d:\copyofcdrom" (more info: C: exists but D: is a non-writable linux partition). On a different computer the same directory structure on C: didn't give this message and worked well. A:
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Thanks to Wolfgang and Luuk for the many questions and answers. I'll accumulate such items in a file to upload from time to time to the Wiki -- with the goal of making a _ConTeXt cookbook_, subtitled _Or how do I do X in ConTeXt?_. -Sanjoy `Not all those who wander are lost.' (J.R.R. Tolkien)
Am 2007-03-29 um 22:10 schrieb Sanjoy Mahajan:
I'll accumulate such items in a file to upload from time to time to the Wiki -- with the goal of making a _ConTeXt cookbook_, subtitled _Or how do I do X in ConTeXt?_.
I once planned such a cookbook myself, so there's already a title picture: http://wiki.contextgarden.net/Image:Kochloewe_c.jpg Feel free to use it. ;-) Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
Am 2007-03-29 um 20:56 schrieb Wolfgang Schuster:
Q: Where to put the commands that apply to the whole document? Is there a 'preferred sectioning' of a Context source? A:
You should use \environment's: http://wiki.contextgarden.net/Project_structure
Not always, makes sense only for multi-file projects. For simple documents, just place your setups before \starttext
Q: What is the equivalent of the Latex \begin{thebibliography} environment? A:
What *does* the LaTeX environment? (Same for every "like in LaTeX" question - here are not a lot of LaTeX users...)
Q: How can I define a fancy page numbering (i.e. large and coloured number)? A:
some hints here: http://wiki.contextgarden.net/Headers_and_Footers http://wiki.contextgarden.net/Chapters_headers but you're right, a page about pagination is missing
Q: How to make sure that numbers in a column align correctly, for example: 9400 60 100 3 Inserting ~ works fine when using a proportional font. An extra difficulty occurs when the figures should be centered below the heading of the column. A:
There are several different kinds of tables, each uses other setups for right-aligned columns. see http://wiki.contextgarden.net/Tables_Overview NEVER use spaces (or ~) for alignment! (That's a very bad typewriter habit!) Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
2007/3/30, Henning Hraban Ramm
Am 2007-03-29 um 20:56 schrieb Wolfgang Schuster:
Q: Where to put the commands that apply to the whole document? Is there a 'preferred sectioning' of a Context source? A:
You should use \environment's: http://wiki.contextgarden.net/Project_structure
Not always, makes sense only for multi-file projects. For simple documents, just place your setups before \starttext
Q: What is the equivalent of the Latex \begin{thebibliography} environment? A:
What *does* the LaTeX environment? (Same for every "like in LaTeX" question - here are not a lot of LaTeX users...)
It is something like this \startitemize \item[reference] Describtion of your bibiography \stopitemize I found something done by a user in a old Maps article: http://maps.aanhet.net/maps/pdf/27_14.pdf I don't why one should us this mothod and not the one provided by Tacos bib module: http://dl.contextgarden.net/modules/t-bib/doc/context/bib/bibmod-doc.pdf Wolfgang
Q: How can I define a fancy page numbering (i.e. large and coloured
number)? A:
some hints here: http://wiki.contextgarden.net/Headers_and_Footers http://wiki.contextgarden.net/Chapters_headers
but you're right, a page about pagination is missing
Q: How to make sure that numbers in a column align correctly, for example: 9400 60 100 3 Inserting ~ works fine when using a proportional font. An extra difficulty occurs when the figures should be centered below the heading of the column. A:
There are several different kinds of tables, each uses other setups for right-aligned columns. see http://wiki.contextgarden.net/Tables_Overview
NEVER use spaces (or ~) for alignment! (That's a very bad typewriter habit!)
Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
On Mar 29, 2007, at 8:56 PM, Wolfgang Schuster wrote:
On Thu, 29 Mar 2007 19:36:10 +0200 Luuk Beurskens
wrote: Dear all,
Last weekend I had my first hands-on experience with Context. I was told that a listing of the type of problems that I encountered would have a certain value to the Context project. That's why below you'll find an overview of my beginner-questions, to some of which I already found answers.
My aim is not to have all questions answered via the list, but rather to document them for later use in some kind of manual. For I know that finding the answers is mostly a matter of searching the documentation.
Kind regards,
Luuk Beurskens The Netherlands
PS: I have been using Latex for some years. The questions below came up using a stand-alone Context environment in MS Windows.
Q: Starting with Context, the use of which language is to be preferred for the commands? A: The English version is most commonly applied, even in the Netherlands
Q: If one starts in a Context document in one language, can it be easily converted to another language (form English to Dutch or German, for example)? A: This is possible, but no ready-available tool exists.
Q: Why does background=color not work inside \bTABLE ... \eTABLE? A: Put \setupcolors[state=start] in the beginning of the document
Q: How to apply a background colour for the margin space? A: This is possible but not easy to explain. See info by Patrick Gundlach and the section Crossing Borders in the Metafun manual in chapter Pagebackgrounds by Hans Hagen.
Hi Luuk,
\setupcolors[state=start] \setupbackgrounds[text][rightmargin][background=screen]
\starttext
\input knuth
\stoptext
Q: Where to put the commands that apply to the whole document? Is there a 'preferred sectioning' of a Context source? A:
You should use \environment's:
Often I use a file with the name layout.tex to put there all kind of general issues to the document. \startenvironment layout \setupbodyfont[ss,12pt] \setuplayout[ ...] ... \stopenvironment Load this file in the doucment with \environment layout \starttext ... \stoptext
Q: What is the equivalent of the Latex \begin{thebibliography} environment? A:
Q: The command \setupwhitespace[big] doesn't have an impact on the paragraph spacing. What am I doing wrong? A:
\setupwhitespace[big]
\starttext
\input knuth
\stoptext
Q: Using \startcombination[*] it is possible to display several pictures into one figure. How could one achieve that several figures are treated as one picture, i.e. that they are all forced to be placed on one page? A:
\starttext
\setupframed[width=5cm,height=5cm]
\input knuth
\placefigure [page] [] {Four blocks} {\startcombination[2*2] {\framed{}}{Block 1} {\framed{}}{Block 2} {\framed{}}{Block 3} {\framed{}}{Block 4} \stopcombination}
\input knuth
\stoptext
Q: One cell in a table (\bTABLE ... e\TABLE) should contain a unit (EJ for example) in square brackets: [EJ]. The result is that the respective row is not displayed at all. What is wrong? Could I possibly use the Latex equivalent \symbol{code}? A:
\starttext
\bTABLE \bTR \bTD {[EJ]} \eTD \eTR \eTABLE
\bTABLE \bTR \bTD[left={[},right={]}] EJ \eTD \eTR \eTABLE
\stoptext
Q: How can I change the fontsize inside a table? A:
\starttext
Text
\setupTABLE[style=small]
\bTABLE \bTR \bTD Text \eTD \eTD \eTABLE
\setuptables[bodyfont=small]
\starttable[|l|] \NC Text \NC\AR \stoptable
\setuptabulate[bodyfont=small]
\starttabulate[|l|] \NC Text \NC\NR \stoptabulate
\stoptext
you can also say \switchtobodyfont[rm,6pt] where ever you need to change the fontsize and or switch from rm to ss.
Q: How can I change the fontsize of an \inmargin? A:
\starttext
Text
\setupinmargin[style=small]
\inmargin{Text}
\stoptext
Q: How can I make a line in the header or footer of a document? A:
\setupheadertexts[left][right] \setupfootertexts[left][right]
\starttext
Text
\stoptext In case that you want to place a rule beneath the running header:
\setupbackgrounds[...][...,...,...][...,...=...,...] [...] top header text footer bottom page paper leftpage rightpage [...,...,...] leftedge leftmargin text rightmargin rightedge state = start stop repeat [...,...=...,...] see \setupframed I.e. you can say things like \setupbackgrounds[header][text] [bottomframe=on]
Q: How can I define a fancy page numbering (i.e. large and coloured number)? A:
Q: How to make sure that numbers in a colomn align correctly, for example: 9400 60 100 3 Inserting ~ works fine when using a proportional font. An extra difficulty occurs when the figures should be centered below the heading of the column. A:
Q: a question related to the use of SciTE: changing the file scite.properties for a proportional fontsize doesn't work, although it is very well explained in the SciTE helpfile. What's the trick? A:
I think this is a bug in the version shipped with the ConTeXt distribution for Windows, because in the download version from the Scite homepage everything works as expected.
Wolfgang
Q: Installing the minimal context distribution on a Windows 98 machine gives problems when copying on harddisk E:. Running the batch-file cscite.bat results in the following message: "cscite root, e.g. cscite d:\copyofcdrom" (more info: C: exists but D: is a non-writable linux partition). On a different computer the same directory structure on C: didn't give this message and worked well. A:
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Willi Egger w.egger@boede.nl
Thank you all for the answers provided to my list of beginner-questions, and also for the suggestions made of using the questions for further documentation. Best regards, Luuk Beurskens The Netherlands
Luuk Beurskens wrote:
Q: Installing the minimal context distribution on a Windows 98 machine gives problems when copying on harddisk E:. Running the batch-file cscite.bat results in the following message: "cscite root, e.g. cscite d:\copyofcdrom" (more info: C: exists but D: is a non-writable linux partition).
This maybe a "feature" in your Windows installation and may occasionally turn up with installation from CD and such. I've stumbled on this problem several times with earlier versions of Windows (95, 98, NT) - the common nominator for all was that Windows had been installed from CD to unpartitioned hard disk and thus the CD drive letter became D. After another hard drive was added or the existing one partitioned in two, the CD drive or similar moved to become drive E. Unfortunately, this kind of changes didn't always make it to Windows registry and thus programs still attempt to use D when they mean E. Once upon a time I knew how to fix this in a Windows-only computer, but don't unfortunately remember very well any more how to do it. I think it involved time and some careful searching in the registry editor to get rid of all the obsolete D letters. This is the main reason why I still change my drive letters in a new Windows to R for read (for CD reader) and W for write (for CD/DVD writer), so additional hard drives don't 'push' them. Nowadays I just go crazy with a multitude of external USB devices trying to use each other's drive letters or network drive letters and not showing up as result; I'm seriously running out of alphabets on my work XP! Good Luck, Mari the Windows user
participants (6)
-
Henning Hraban Ramm
-
Luuk Beurskens
-
Mari Voipio
-
Sanjoy Mahajan
-
Willi Egger
-
Wolfgang Schuster