mac install & page layout & numbered margin notes
Hello context-helpers for newbie: in the documents planned (in and over the Westphalian language) I wish to use many margin notes (word translations, exlanations etc.). The margin notes should be numbered with reference number (or other indication) in the text body. And I should be able to input utf-8 (because of umlaute and phonetical notations, IPA etc.). Therefore I installed some week ago => MacTeX on my MacBook Pro with OSX 10.4 (Tiger) and would like to use => ConTeXt, possibly within => TexShop (or elsewise, if better). But I need a lot of start-up help. Therefore I put the main questions of the moment here hoping, that some take pity with me and answer the one or the other of the following questions: 1. Installation of ConTeXt complete and actual? Has MacTeX braught me with it the main components of the ConTeXt system or should I update/complete it and how? texexec --version TeXExec | version 6.2.0 - 1997-2006 - PRAGMA ADE/POD 2. How to switch to the German commands in ConTeXt? (Perheps that might help me a little to learn and remember commands. Therefore I want to switch if possible now at the beginning.) 3. How to setup page/layout dimensions? Because of the work with margin notes as a form of ever present accompanying, helping side text for the reader and learner, I need say ==> the third width of the right page for the margin notes. I read the applying chapters and passages in Hans Hagen's "ConTEXt the manual" (November 12, 2001) several times, but I couldn't get it yet. 4. How to set up => numbered margin notes and, thereover, => prevent, that they are printed one over the other, when there is not enough space between the referenced words/phrases in the text body? 5. How to find and learn the possible options to the commands? The few commands and options I found yet were token from the manuals, but this was rather trial and error. I attach the (abbreviated) Example of my first Text with ConTeXt, so that you can better see, what my most needed help could be (fo to come to an output with bride (right) margin and automatically numbered margin notes). The attached TeX file gave the pdf output, but nevertheless texexec (or what ever) gives me a FAILED message in the TexShop Console: ### /usr/texbin/dvips -R -Poutline -o /tmp/altpdflatex. 1646-1211465898/LyraV-TShop-source-u.ps LyraV-TShop-source-u.dvi This is dvips(k) 5.96 Copyright 2005 Radical Eye Software (www.radicaleye.com) /usr/texbin/dvips: ! DVI file can't be opened. ### FAILED to generate /tmp/altpdflatex.1646-1211465898/LyraV-TShop- source-u.ps () Any help suggestions also for that? Thank you for reading my cry fore help, best wishes, "Met echt-westfälsken Gröiten" joachim -- Kreimer-de Fries, Berlin
Hello Joachim,
Hello context-helpers for newbie:
in the documents planned (in and over the Westphalian language) I wish to use many margin notes (word translations, exlanations etc.). The margin notes should be numbered with reference number (or other indication) in the text body. And I should be able to input utf-8 (because of umlaute and phonetical notations, IPA etc.).
Therefore I installed some week ago => MacTeX on my MacBook Pro with OSX 10.4 (Tiger) and would like to use => ConTeXt, possibly within => TexShop (or elsewise, if better).
But I need a lot of start-up help. Therefore I put the main questions of the moment here hoping, that some take pity with me and answer the one or the other of the following questions:
1. Installation of ConTeXt complete and actual?
Has MacTeX braught me with it the main components of the ConTeXt system or should I update/complete it and how?
texexec --version TeXExec | version 6.2.0 - 1997-2006 - PRAGMA ADE/POD
What is the result from "ctxtools --contextversion"
2. How to switch to the German commands in ConTeXt?
(Perheps that might help me a little to learn and remember commands. Therefore I want to switch if possible now at the beginning.)
Don't do this, the german interface is not complete, new commands have english names and a few entries need better names and it would be hard for us to help you.
3. How to setup page/layout dimensions?
Because of the work with margin notes as a form of ever present accompanying, helping side text for the reader and learner, I need say ==> the third width of the right page for the margin notes. I read the applying chapters and passages in Hans Hagen's "ConTEXt the manual" (November 12, 2001) several times, but I couldn't get it yet.
\setuplayout [backspace=2cm, width=10cm, rightmargin=8cm, ...] Give us more information about your layout.
4. How to set up => numbered margin notes and, thereover, => prevent, that they are printed one over the other, when there is not enough space between the referenced words/phrases in the text body?
Try the following code from Hans: \definenote [glossary] [way=bypage, location={page,high}, factor=0, width=\leftmarginwidth, scope=page, %conversion=ownnote, %numbercommand=, %textcommand=, textstyle=, rule=, before=, after=] \setupnotedefinition [glossary] [location=left, width=fit, distance=.5em, align={right,tolerant,stretch}, headstyle=bold, hang=1] \setuplayout [width=middle, height=middle, backspace=5cm, margin=4cm, margindistance=.25cm, cutspace=2cm] \setuptexttexts [margin] [\setups{glossary}] [\setups{glossary}] \startsetups glossary \vbox to \textheight {\placenotes[glossary]\vfill} \stopsetups \starttext dog\glossary{Hund} \input knuth cat\glossary{Katze} \stoptext
5. How to find and learn the possible options to the commands?
The few commands and options I found yet were token from the manuals, but this was rather trial and error.
- texshow-web: http://texshow.contextgarden.net/ - Quick References: http://pragma-ade.nl/show-man-10.htm - The source files
I attach the (abbreviated) Example of my first Text with ConTeXt, so that you can better see, what my most needed help could be (fo to come to an output with bride (right) margin and automatically numbered margin notes).
Replace "..." with \unknown Use \quotation{my quoted text} instead of "my quoted text"
The attached TeX file gave the pdf output, but nevertheless texexec (or what ever) gives me a FAILED message in the TexShop Console:
### /usr/texbin/dvips -R -Poutline -o /tmp/altpdflatex. 1646-1211465898/LyraV-TShop-source-u.ps LyraV-TShop-source-u.dvi This is dvips(k) 5.96 Copyright 2005 Radical Eye Software (www.radicaleye.com) /usr/texbin/dvips: ! DVI file can't be opened. ### FAILED to generate /tmp/altpdflatex.1646-1211465898/LyraV-TShop- source-u.ps ()
Looks like a old ConTeXt version.
Any help suggestions also for that?
Thank you for reading my cry fore help, best wishes, "Met echt-westfälsken Gröiten" joachim
Pfiat di Wolfgang
22.05.2008 at 18:39 Wolfgang Schuster - thankworthily answering my help questions - asked :
What is the result from "ctxtools --contextversion"
joachim$ ctxtools --contextversion CtxTools | context version: 2007.01.12 15:56 (/usr/local/texlive/2007/ texmf-dist/tex/context/base/context.tex) CtxTools | context version: 2007.01.12 15:56 (/usr/local/texlive/2007/ texmf-dist/tex/context/base/cont-new.tex) Is that the actual version?
2. How to switch to the German commands in ConTeXt? Don't do this, the german interface is not complete, new commands have english names and a few entries need better names and it would be hard for us to help you.
Does this means, that the German interface _is_ complete together with the new commands that have English names? Then only the last argument ("it would be hard for us to help you") prevents me from switching to the German interface. (And ... not knowing how to do that...)
3. How to setup page/layout dimensions? \setuplayout [backspace=2cm, width=10cm, rightmargin=8cm, ...]
This worked immediatly. Thank you very much, Wolfgang, for your swift help!
4. How to set up => numbered margin notes and, thereover, => prevent, that they are printed one over the other, when there is not enough space between the referenced words/phrases in the text body?
Try the following code from Hans: [...]
That code sets the notes into the _left margin_, not into the right. I could not reverse that. Or because I didn't find out the right commands/option or because it is not possible. I even tried then to set reverse the width of the margins, e. g. the broader one left and small one at the right, so that the notes produced with the code of Hans in the left margin of the text body should find place. Without success. But I'd like to know if this is possible and how. The code of Hans is doubtlessly a very useful code for certain purposes but perhaps less for the purpose I asked for. It sets the (then indeed numbered, "glossary"-) notes pagewise from the top down one after another, so again (as with footnotes) far away from theyr reference text (word, phrase) in the body text. I wanted the effect that I experimented before with the package "footmisc" in LaTeX (footnotes as margin notes), but avoiding having printed two notes on the same place (one over the other, not readable) but in _those_ cases the second note below the first. Perhaps this is not possible in TeX and therefore in ConTeXt neither? Best wishes, joachim
On Fri, 23 May 2008 01:41:47 +0200
Joachim Kreimer-de Fries
22.05.2008 at 18:39 Wolfgang Schuster - thankworthily answering my help questions - asked :
What is the result from "ctxtools --contextversion"
joachim$ ctxtools --contextversion CtxTools | context version: 2007.01.12 15:56 (/usr/local/texlive/2007/ texmf-dist/tex/context/base/context.tex) CtxTools | context version: 2007.01.12 15:56 (/usr/local/texlive/2007/ texmf-dist/tex/context/base/cont-new.tex)
Is that the actual version?
No, the current version is from 21. May 2008 but you could update your installation with "ctxtools --updatecontext".
2. How to switch to the German commands in ConTeXt? Don't do this, the german interface is not complete, new commands have english names and a few entries need better names and it would be hard for us to help you.
Does this means, that the German interface _is_ complete together with the new commands that have English names? Then only the last argument ("it would be hard for us to help you") prevents me from switching to the German interface. (And ... not knowing how to do that...)
The german interface is not complete, Tobias Burnus translated a lot of the command names years ago but most of the new commands and keys in the last few years got no german names. I doubt you will be happy with the german interface because you're forced to look the names all by yourself, the manuals use only english commands and finding the german alternative takes time.
3. How to setup page/layout dimensions? \setuplayout [backspace=2cm, width=10cm, rightmargin=8cm, ...]
This worked immediatly. Thank you very much, Wolfgang, for your swift help!
THis was only meant as a simple example who the to setu a new layout, many more commands are avaiable and once you understood the system it is easy to set you own ones.
4. How to set up => numbered margin notes and, thereover, => prevent, that they are printed one over the other, when there is not enough space between the referenced words/phrases in the text body?
Try the following code from Hans: [...]
That code sets the notes into the _left margin_, not into the right. I could not reverse that. Or because I didn't find out the right commands/option or because it is not possible.
It is possible to change the location for the notes.
I even tried then to set reverse the width of the margins, e. g. the broader one left and small one at the right, so that the notes produced with the code of Hans in the left margin of the text body should find place. Without success. But I'd like to know if this is possible and how.
You should take a closer look at \setuplayout to change the layout.
The code of Hans is doubtlessly a very useful code for certain purposes but perhaps less for the purpose I asked for. It sets the (then indeed numbered, "glossary"-) notes pagewise from the top down one after another, so again (as with footnotes) far away from theyr reference text (word, phrase) in the body text. I wanted the effect that I experimented before with the package "footmisc" in LaTeX (footnotes as margin notes), but avoiding having printed two notes on the same place (one over the other, not readable) but in _those_ cases the second note below the first.
Perhaps this is not possible in TeX and therefore in ConTeXt neither?
More a questions Hans could answer.
Best wishes, joachim
Greetings Wolfgang
Hey friendly helpers, I see, this list is one for experts and programmers, less for simple users. But given that there is no list for beginners of ConTeXt, I make my last attempt to get help in the following problem: How to create _numbered_ margin notes in ConTeXt? I have already spent some week of my disposable time to that problem without success. I attach an example file as pdf, created in several attempts with OpenOffice-writer, with spare success and giving up after the 14th note on this half-page. But it can illustrate what I want and need: - Margin(al) notes, numbered/referenced like footnotes, preferably in the wider right margin of the page. - Each margin note possibly on the same line with the referenced word/ expression in the text body which shall be translated/explained => if possible, i. e. if this place is not yet occupied by a foregoing margin note for a word or phrase in the same or a former line. - In the latter case, the margin note shall be typeset _below_ the former margin note (without printing one note on the other). Is there a way to setup/define the inmargin in the preamble of a ConTeXt document but then getting this result with a normal or (foregoing defined) command? Any other advice for to get this result? Or is it - for TeXnical reasons - not possible to achieve this result with reasonable effort in ConTeXt neither? I would be happy to get assistance (best the necessary commands/setup text) or any other advice to get the wanted result. Hopefully, Joachim Kreimer-de Fries Am 23.05.2008 um 09:23 schrieb Wolfgang Schuster:
3. How to setup page/layout dimensions? \setuplayout [backspace=2cm, width=10cm, rightmargin=8cm, ...]
This worked immediatly. Thank you very much, Wolfgang, for your swift help!
Text from 1844 by F. W. Lyra in the Westphalian language:
Hi, Joachim Kreimer-de Fries wrote:
Hey friendly helpers,
I see, this list is one for experts and programmers, less for simple users. But given that there is no list for beginners of ConTeXt, I make my last attempt to get help in the following problem:
How to create _numbered_ margin notes in ConTeXt?
This may be possible, but if it is, I do not know how. I reply just to let you know that I have read your message. Best wishes, Taco
Joachim Kreimer-de Fries wrote:
Hey friendly helpers,
I see, this list is one for experts and programmers, less for simple users. But given that there is no list for beginners of ConTeXt, I make my last attempt to get help in the following problem:
How to create _numbered_ margin notes in ConTeXt?
quick and dirty command (instead one can use enumerations and do some complex setup) \def\mnote{\dosingleempty\domnote} \def\domnote[#1]#2% {\doglobal\increment\MyMarginalNote\plusone \inmargin {\MyMarginalNote: \doifsomething{#1} {\expanded{\textreference[#1]{\MyMarginalNote}}}% #2}} \setupinmargin[stack=yes] \starttext bla bla bla \mnote{xxx} bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla \mnote[foo]{xxx} bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla \mnote{xxx} bla \mnote{xxx} bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla in \in {note} [foo] \stoptext ----------------------------------------------------------------- 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 -----------------------------------------------------------------
In friendly and helpfully answering to my late night question
How to create _numbered_ margin notes in ConTeXt?
Hans Hagen wrote 05.06.2008 at 10:04:
quick and dirty command (instead one can use enumerations and do some complex setup)
Before ending this day, I want to thank you for your endeavour (also for Taco's attentive regret). Dear Hans, you know what your code produces: - indeed, the marginal notes are numbered (I can live with the fact that this is not the kind numbering of notes (cf. footnotes) one - the reader - expects); - indeed the notes are no longer printed one over the other. BUT: - the accent sign ( ´ ) placed in the text body before the next word following that wich is explained in the marginal note will not be accepted and understood by the readers. It must, of course, be a superscripts number (the same number as in the referencing marginal note). AND: You won't really expect that someone outside the circle of you programmers who have developed ConTeXt, i. e. a simple (beginning) user of ConTeXt - even if highly willing to learn, is able to change this code in a way to get the wanted results (which I had illustrated with the pdf-file produced under extremly frustrating formating effort with OpenOffice Writer). With two exceptions (\def and \setupinmargin) I did not find any of the used commands documented in "ConTEXt - the manual" or the "commands" quick reference of 2001. I could not verify in the http:// texshow.contextgarden.net/ because not available - as almost everytime. But from my last remember, when it - for once - was available, they are not in there, neither. On the one hand I have still the impression, that ConTeXt is a highly adaptable and flexible typesetting system within TeX (probably my intents with marginal notes as help for understanding texts could find a solution), on the other hand I'm almost giving up with my intention, because the only program/system with wich I a had hope to resolve this problem is not configurable for me, because ... I'm not a programmer or software developer, because you ConTeXt-developers don't care enough about usable, applicable documentation, because the cultural, didactical value of the old (hand-) typesetting technique of marginal notes has come out of fashion, what ever... N. B. I recommend the provision in ConTeXt for marginal notes in my intented sense warmly to you: they are an acquirement of civilization with big possibilities for the future and no other - at least no word processing program - is able to handle them yet in a acceptable manner! Nevertheless, be it pure curiousness or still persistant hope in acquiring the skills for ConTeXt, I would like to know: 1. in your sample code, Hans: between \starttext and \stoptext you write once (the first time of occurrence):
bla bla bla \mnote{xxx} bla bla
but in the second time:
bla bla bla \mnote[foo]{xxx} bla bla bla
and then again:
bla bla bla \mnote{xxx}
Has the [foo] after the first \mnote any relevance and which? 2. the last row of your "document" text is:
in \in {note} [foo]
in my pdf-output this appears as : "in note 2" This is not reasonable and desired (it should not appear). Was it a "slip of the pen" on your side or any purpose, if yes, which one? All the best and Goutgaun! joachim -- Kreimer-de Fries
Hi Joachim, Joachim Kreimer-de Fries wrote:
bla bla bla \mnote[foo]{xxx} bla bla bla
Has the [foo] after the first \mnote any relevance and which?
Preremark: Usually, in ConTeXt, text in curly braces is printed and in brackets is not. In this case, \mnote{xxx} and \mnote[foo]{xxx} print the same, but you defined a label "foo", which you can access later like in "See in my margin note 1 on page 22."
in \in {note} [foo]
in my pdf-output this appears as :
"in note 2" Well, this is exactly the purpose, if you want to refer to a previous margin note, you can access it again. \in[foo] prints the margin-note number. And "\in{note}[foo]" prefixes it with the word "note". If you have an setup interactivity, you can click on "note 2" and jump to the note.
It might well be that you do not need that feature, but sometimes it might becomes handy. Tobias
Joachim Kreimer-de Fries wrote:
- indeed, the marginal notes are numbered (I can live with the fact that this is not the kind numbering of notes (cf. footnotes) one - the reader - expects);
you can put anything there the way you want
- indeed the notes are no longer printed one over the other.
BUT:
- the accent sign ( ´ ) placed in the text body before the next word following that wich is explained in the marginal note will not be accepted and understood by the readers. It must, of course, be a superscripts number (the same number as in the referencing marginal note).
i'm not sure what accent you mean, anyhow, \def\domnote[#1]#2% {\doglobal\increment\MyMarginalNote\plusone \inmargin {\MyMarginalNote: \doifsomething{#1} {\expanded{\textreference[#1]{\MyMarginalNote}}}% #2}% \high{\MyMarginalNote}} this will put a footnote like number in the text
AND:
You won't really expect that someone outside the circle of you programmers who have developed ConTeXt, i. e. a simple (beginning) user of ConTeXt - even if highly willing to learn, is able to change this code in a way to get the wanted results (which I had illustrated with the pdf-file produced under extremly frustrating formating effort with OpenOffice Writer).
well, there are quite some users here who change code -) it takes a while but at somepoint any user can define simple macros; maybe the #1 is confusing but that's just the argument
With two exceptions (\def and \setupinmargin) I did not find any of the used commands documented in "ConTEXt - the manual" or the "commands" quick reference of 2001. I could not verify in the http:// texshow.contextgarden.net/ because not available - as almost everytime. But from my last remember, when it - for once - was available, they are not in there, neither.
i could have used \definenumber or \definelabel but the shown code was a quicky; the advantage of the other approach is that you can influence their rendering
On the one hand I have still the impression, that ConTeXt is a highly adaptable and flexible typesetting system within TeX (probably my intents with marginal notes as help for understanding texts could find a solution),
sure; the main probem is that everyone wants something slightly different and we end up with many commands that need examples and documentation and then get overseen ... the best resource for special cases is still this mailing list since others may have needed you rfeature before
on the other hand I'm almost giving up with my intention, because the only program/system with wich I a had hope to resolve this problem is not configurable for me, because ... I'm not a programmer or software developer, because you ConTeXt-developers don't care enough about usable, applicable documentation, because the cultural, didactical value of the old (hand-) typesetting technique of marginal notes has come out of fashion, what ever...
well, there's actually quite some marginal stuff in context (you don't wanna know what we need context for ourselves) you should keep one thing in mind: tex is a 30 year old system (ok it gets updated now) and some things are simply non trivial and marginal notes are one of them (the stacking code is quite tricky) concerning documentation ... if i had 60 hours in a day .... keeping up with user demands, developments, my work etc etc takes time too
N. B. I recommend the provision in ConTeXt for marginal notes in my intented sense warmly to you: they are an acquirement of civilization with big possibilities for the future and no other - at least no word processing program - is able to handle them yet in a acceptable manner!
Nevertheless, be it pure curiousness or still persistant hope in acquiring the skills for ConTeXt, I would like to know:
1. in your sample code, Hans: between \starttext and \stoptext you write once (the first time of occurrence):
bla bla bla \mnote{xxx} bla bla
but in the second time:
bla bla bla \mnote[foo]{xxx} bla bla bla
the [foo] is the optional cross reference; i thought that you might need that
and then again:
bla bla bla \mnote{xxx}
Has the [foo] after the first \mnote any relevance and which?
2. the last row of your "document" text is:
in \in {note} [foo]
in my pdf-output this appears as :
"in note 2"
This is not reasonable and desired (it should not appear). Was it a "slip of the pen" on your side or any purpose, if yes, which one?
huh? if you don't want it, just delete it; that;s the problem with example code ... all users have different demands -) 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 -----------------------------------------------------------------
On Fri, 6 Jun 2008, Hans Hagen wrote:
\def\domnote[#1]#2% {\doglobal\increment\MyMarginalNote\plusone \inmargin {\MyMarginalNote: \doifsomething{#1} {\expanded{\textreference[#1]{\MyMarginalNote}}}% #2}% \high{\MyMarginalNote}}
There should not be a \plusone in the first line. Read the documentation of \increment in syst-ext ;) Aditya
Aditya Mahajan wrote:
On Fri, 6 Jun 2008, Hans Hagen wrote:
\def\domnote[#1]#2% {\doglobal\increment\MyMarginalNote\plusone \inmargin {\MyMarginalNote: \doifsomething{#1} {\expanded{\textreference[#1]{\MyMarginalNote}}}% #2}% \high{\MyMarginalNote}}
There should not be a \plusone in the first line. Read the documentation of \increment in syst-ext ;)
yeah, stupid ... actualy, in the core i'm weeding out those increments because we now have many counters and \advance needs the plusone, but nevertheless for quick and dirty usage macro based counters are ok 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 -----------------------------------------------------------------
Aditya Mahajan wrote:
On Fri, 6 Jun 2008, Hans Hagen wrote:
\def\domnote[#1]#2% {\doglobal\increment\MyMarginalNote\plusone \inmargin {\MyMarginalNote: \doifsomething{#1} {\expanded{\textreference[#1]{\MyMarginalNote}}}% #2}% \high{\MyMarginalNote}}
There should not be a \plusone in the first line. Read the documentation of \increment in syst-ext ;)
btw, interesting side effect ... i used luatex and char 1 there is quite invisible -) ----------------------------------------------------------------- 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 -----------------------------------------------------------------
- hartelik dankseggen! - What a beatific surprise when I opened my Mail in the late morning for the first time: all my yesterdays problems with marginal notes in ConTeXt and Hans' Code resolved, almost all used commands and elements explained, so that I have won confidence that I shall make it to configure the marginalia in the wanted format and to learn and use ConTeXt. I'm really impressed of your helpfullness! Thank you, Hans, for the improved code and expanation, thank you, Tobias and Aditya for the explanations and the links, also for the correction of the code regarding "\plusone" (that was the reason for the typeset accent signs ´ instead of superscript numbers in the body text)! Despite your extended help, I have still acquire a lot to build my first little document in ConTeXt - I postponed this learning process to have more certainty that the marginalia question can be resolved and confidence that I can make it. Am 06.06.2008 um 00:24 schrieb Hans Hagen:
concerning documentation ... if i had 60 hours in a day .... keeping up with user demands, developments, my work etc etc takes time too
I understand this very well, the more I'm happy for the help.
the best resource for special cases is still this mailing list since others may have needed you rfeature before
As was demonstrated... I'll come back to this, when certainly needed again. Prachtig wiekenende! Goutgaun! joachim -- Kreimer-de Fries
On Thu, 5 Jun 2008, Joachim Kreimer-de Fries wrote:
In friendly and helpfully answering to my late night question
How to create _numbered_ margin notes in ConTeXt?
Hans Hagen wrote 05.06.2008 at 10:04:
quick and dirty command (instead one can use enumerations and do some complex setup)
Before ending this day, I want to thank you for your endeavour (also for Taco's attentive regret).
Dear Hans, you know what your code produces:
- indeed, the marginal notes are numbered (I can live with the fact that this is not the kind numbering of notes (cf. footnotes) one - the reader - expects);
- indeed the notes are no longer printed one over the other.
BUT:
- the accent sign ( ´ ) placed in the text body before the next word following that wich is explained in the marginal note will not be accepted and understood by the readers. It must, of course, be a superscripts number (the same number as in the referencing marginal note).
A slight bug in Hans's code. See below.
AND:
You won't really expect that someone outside the circle of you programmers who have developed ConTeXt, i. e. a simple (beginning) user of ConTeXt - even if highly willing to learn, is able to change this code in a way to get the wanted results (which I had illustrated with the pdf-file produced under extremly frustrating formating effort with OpenOffice Writer).
With two exceptions (\def and \setupinmargin) I did not find any of the used commands documented in "ConTEXt - the manual" or the "commands" quick reference of 2001. I could not verify in the http:// texshow.contextgarden.net/ because not available - as almost everytime. But from my last remember, when it - for once - was available, they are not in there, neither.
The user manual is for already existing features. In order to understand how to *extend* context, you need to know how the internals work. See http://wiki.contextgarden.net/Inside_ConTeXt Let me try to explain the code (slightly adapted). First the adapted code: \newcounter\MyMarginalNote \def\mnote{\dosingleempty\domnote} \def\domnote[#1]#2% {\doglobal\increment\MyMarginalNote \high{\MyMarginalNote}% \inmargin {\MyMarginalNote: \doifsomething{#1} {\expanded{\textreference[#1]{\MyMarginalNote}}}#2}} Now the explaination: \newcounter\MyMarginalNote Defines a new counter called MyMarginalNode. Hans did not use this because he knows how \increment works internally, but explicitly stating this helps in understanding. \def\mnote{\dosingleempty\domnote} This is the standard method in context of dealing with optimal arguments. See http://wiki.contextgarden.net/Commands_with_optional_arguments \def\domnote[#1]#2% #1 is the optional argument (in square brackets), and #2 is the required arugment (in curly brackets) {\doglobal\increment\MyMarginalNote Increment the counter MyMaginalNote. The \doglobal is there so that the counter is incremented even when the mnote occurs inside a group, for example, something like \startframedtext blah blah\mnote{abc} \stopfamedtext \high{\MyMarginalNote}% Place the number as a superscript. \inmargin Place the contents in the margin {\MyMarginalNote: Place margin note number followed by colon \doifsomething{#1} {\expanded{\textreference[#1]{\MyMarginalNote}}} if #1 is something (that is, #1 is not empty) create a textreference #1 with the text \MyMarginNote. The expanded is there so that the reference is to the value of MyMarginNote when the margin note was created and not want the value of text reference was asked. #2}} Place #2, that is the contents of the note.
On the one hand I have still the impression, that ConTeXt is a highly adaptable and flexible typesetting system within TeX (probably my intents with marginal notes as help for understanding texts could find a solution),
on the other hand I'm almost giving up with my intention, because the only program/system with wich I a had hope to resolve this problem is not configurable for me, because ... I'm not a programmer or software developer, because you ConTeXt-developers don't care enough about usable, applicable documentation, because the cultural, didactical value of the old (hand-) typesetting technique of marginal notes has come out of fashion, what ever...
This is not configurable because it was more like a proof of concept solution. There is no documentation because of the same reason.
N. B. I recommend the provision in ConTeXt for marginal notes in my intented sense warmly to you: they are an acquirement of civilization with big possibilities for the future and no other - at least no word processing program - is able to handle them yet in a acceptable manner!
Hans, would it be too difficult to incorporate marginal notes in the core, so that one could define \definenote[mnote][location=margin]. Most of the pieces are already there.
Nevertheless, be it pure curiousness or still persistant hope in acquiring the skills for ConTeXt, I would like to know:
1. in your sample code, Hans: between \starttext and \stoptext you write once (the first time of occurrence):
bla bla bla \mnote{xxx} bla bla
but in the second time:
bla bla bla \mnote[foo]{xxx} bla bla bla
and then again:
bla bla bla \mnote{xxx}
Has the [foo] after the first \mnote any relevance and which?
This is the standard approach in ConTeXt of providing a means to reference the notes later if you want. As you observed
2. the last row of your "document" text is:
in \in {note} [foo]
in my pdf-output this appears as :
"in note 2"
This is not reasonable and desired (it should not appear). Was it a "slip of the pen" on your side or any purpose, if yes, which one?
one can use \in {note} [foo] to recall the number of the note. In case you do not need it, simply do not type it.
Aditya Mahajan wrote:
Hans, would it be too difficult to incorporate marginal notes in the core, so that one could define \definenote[mnote][location=margin]. Most of the pieces are already there.
sure, but it would take a bit more code then, for instance we should use proper counters (definnumber) so that we get the goodies of numbering per chapter etc etc 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 -----------------------------------------------------------------
participants (6)
-
Aditya Mahajan
-
Hans Hagen
-
Joachim Kreimer-de Fries
-
Taco Hoekwater
-
Tobias Burnus
-
Wolfgang Schuster