First document — problems with bib module and layout
Hullo, I'm just making my first real document in ConTeXt and although I'm thinking more and more how this was a great idea. I also decided to simultaneously write an external document/module containing all definitions to fit the But as a newbie, of course, I stumbled upon some beginner's problems: 1. Chapter heading is not like I would expect — I would like to have the line above the chapter as long as the one below it 2. The empty page at the end of the document annoys me and doesn't want to go away. 3. The citations won't show any content, neither does the list of publications — I'm clearly doing something very wrong here. What I want is numbered citation with short references at the bottom and full references in the list of publications in the appendices. 4. If I want to include 'pf_ul.tex' and 'moja_bibliografija.bbl' into my user's local modules in Linux, where should I place the link to them? It's a bit annoying to have to place links to them in each directory where I make a new new file that uses them. And clearly, there will be many yet to come! If anything I just wrote doesn't make much sense, I excuse myself ...I'm tired, tried to learn and hack together this definitions the whole day today and didn't sleep much yesterday either. Cheers, Matija -- gsm: +386 41 849 552 e-mail: matija.suklje@rutka.net www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: matija.suklje@gabbler.org msn: matija.suklje@rutka.net yahoo: matija_suklje
Matija Šuklje wrote:
Hullo,
I'm just making my first real document in ConTeXt and although I'm thinking more and more how this was a great idea. I also decided to simultaneously write an external document/module containing all definitions to fit the
But as a newbie, of course, I stumbled upon some beginner's problems:
1. Chapter heading is not like I would expect — I would like to have the line above the chapter as long as the one below it
You need a \noindentation in the setuphead command: before={\page\noindentation\hairline\blank[line]}, this is not very obvious, but the \hairline is indented just like a normal paragraph if you don't add the \noidentation.
2. The empty page at the end of the document annoys me and doesn't want to go away.
This is a FAQ: Large documents that have front- and backmatters are likely books, and books should have an even number of pages. On a small document (article, letter), you would simply not use the section block commands at all. In any case, from the wiki page http://wiki.contextgarden.net/Empty_page_at_the_end comes this solution/workaround \setupsectionblock[appendix][page=no]
3. The citations won't show any content, neither does the list of publications — I'm clearly doing something very wrong here. What I want is numbered citation with short references at the bottom and full references in the list of publications in the appendices.
Here you've hit a number of problems, some of which are in the bib module, not your doing. * the module does not currently support all types of \cite across section block boundaries, and that is why you do not get output from your \cite commands. Solution: none. it is not possible to combine 'short' citation and mainmatter/backmatter/appendices. (this problem is nasty, but quite hard to fix). * the module also has a different problem; this time with your file name (konkurenčnaklavzula_context.tex). One of the internal references the bib module creates attaches the input file name to a reference, and if the document name is not 7-bit ascii this apparently fails. It is something I have never tested. Workaround: only use visible ASCII in your file names (for now, I intend to fix this). * You have to be a bit more careful about the \startpublication arguments: - watch out for extra space characters. The only ones that are ignored are the ones just before a key. - if a value contains equals signs, square brackets, or commas, you have to wrap it in braces. * The \author command inside bbl files takes three arguments: \author{Matija}{}{Šuklje} * monthconversion takes a 'conversion specifier', not a macro name. So you need this instead: \setuppublications[monthconversion=Romannumerals] Finally, if you want to have 'short' keys in the publication list, it makes sense to add a set up like this: \setuppublications[numbering=short,autohang=yes] \setuppublicationlist[samplesize=ZOFVI] After all those changes, fixes, and workarounds, I ended up with the attached files.
4. If I want to include 'pf_ul.tex' and 'moja_bibliografija.bbl' into my user's local modules in Linux, where should I place the link to them? It's a bit annoying to have to place links to them in each directory where I make a new new file that uses them. And clearly, there will be many yet to come!
The normal place would be <texmf>/tex/context/user in one of the <texmf> directories that is searched by context. You have to re-run maketexlsr after adding files to that directory, and then context should be able to find your files just like it knows where knuth.tex etc. are. Best wishes, Taco \setuppublicationlist[samplesize=ZOFVI] \startpublication[ k=ZOFVI, % key, po katerem citiraš t=zakon, % tip publikacije je zakon y=1996, s=ZOFVI, % short citation u={http://www.uradni-list.si/1/ulonline.jsp?urlid=199612&dhid=32248}] \title{Zakon o organizaciji in financiranju vzgoje in izobraževanja} \journal{Uradni list Republike Slovenije} \volume{35} \issue{12} \pubyear{1996}\month{2}\day{29} \biburl{http://www.uradni-list.si/1/ulonline.jsp?urlid=199612&dhid=32248} \pages{841-862} \stoppublication \startpublication[a={Matija Šuklje}, k=neki, t=test, y=2007, s=Neki] \title{Neki nekastga} \author{Matija}{}{Šuklje} \stoppublication
Dne sreda 26. decembra 2007 je Taco Hoekwater napisal(a): ad 1. & 2.: Thanks, works like a charm :]
Solution: none. it is not possible to combine 'short' citation and mainmatter/backmatter/appendices. (this problem is nasty, but quite hard to fix).
Damn. What I need to do is: * for each cititation to have a reference number in superscript and Romannummerals next to the citation * a footnote on the "same" page in the form like "T. Hoekwater, BIB (2006), pp. 2-4" * and in the appendix a list with longer forms like "Hoekwater, Taco: BIBLIOGRAPHIES (2. edition), Oxford press, London 2006" I don't know if I made this clear. But RTFM-ing and reading some examples on the Wiki brought me just this far and now I'm dead again.
Workaround: only use visible ASCII in your file names (for now, I intend to fix this).
done ...didn't imagine UTF-8 filenames to cause problems in ConTeXt though. Anyway, it's not that annoying and thanks for explaining this to me.
* You have to be a bit more careful about the \startpublication arguments: - watch out for extra space characters. The only ones that are ignored are the ones just before a key.
so that's why people add % at the end of them? nice failsafe mechanism :]
* The \author command inside bbl files takes three arguments:
Whoops.
Finally, if you want to have 'short' keys in the publication list, it makes sense to add a set up like this:
\setuppublications[numbering=short,autohang=yes] \setuppublicationlist[samplesize=ZOFVI]
I still don't understand this one, but I'm not even
After all those changes, fixes, and workarounds, I ended up with the attached files.
Thanks. I tried to apply what I thought relevant to my document and it somewhat worked, but then I suppose I broke it again. And I'm too lame to figure out what and how to fix it. Sorry that I'm such a pain in the arse :/ I'm attaching the newly-fixed-and-broken-again files
<texmf>/tex/context/user
would ~/.texmf/ be a suitable place? Again, thanks *A LOT* for your help. I had a hunch that the good dozen of different types of citation that our faculty demands would make my life miserable for a while. I just hope ConTeXt will make it all worth after the macros and definitions are done. Cheers, Matija -- gsm: +386 41 849 552 e-mail: matija.suklje@rutka.net www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: matija.suklje@gabbler.org msn: matija.suklje@rutka.net yahoo: matija_suklje
Dne sreda 26. decembra 2007 je Matija Šuklje napisal(a):
* for each cititation to have a reference number in superscript and Romannummerals next to the citation * a footnote on the "same" page in the form like "T. Hoekwater, BIB (2006), pp. 2-4" * and in the appendix a list with longer forms like "Hoekwater, Taco: BIBLIOGRAPHIES (2. edition), Oxford press, London 2006"
How I *imagined* it could be made — but failing at it miserably: * I defined a separate field 'kratko' in the .bbl file for shortened titles. * I *thought* that \cite would produce a numbred reference (e.g. [IV], or [4]) in the place in the text where I'm calling up \cite (just the number, not the 'extras' — e.g. \cite[extras={ str. 2-5}]) * I planned to convience \cite to place the content plus it's extras to form a footnote with a short(-ish) citation format — using 'kratko' instead of 'title' fields, skipping some fields, different layout etc. * and then to convience \placepublications to write a long citation format — using 'title', adding other fields, different layout etc. I thought that you can do that by defining (also for each 'type') a different setup for what \cite shows and for what and how things are placed in the \placepublications ...I thought that's what \setupcite (for \cite) and \setuppubplications and \setuppublicationlist (for \placepublications) are. ...slowly I'm beginning to think that either ConTeXt's bib module is not matching my (faculty's) needs or that I just simply don't understand how it works. From what I can tell the main problem is that in legal circles it's considered bad form to cite (the short one) right next to the cited text. The much preferred way is "below the line" in the footer. I'm really sorry if I'm annoying, but I just can't figure it out. Cheers, Matija -- gsm: +386 41 849 552 e-mail: matija.suklje@rutka.net www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: matija.suklje@gabbler.org msn: matija.suklje@rutka.net yahoo: matija_suklje
Dne četrtek 27. decembra 2007 je Matija Šuklje napisal(a):
From what I can tell the main problem is that in legal circles it's considered bad form to cite (the short one) right next to the cited text. The much preferred way is "below the line" in the footer.
I think I solved the problem with footnotes now by using \footnote{\cite[extras={, p. 12}][ref]} ...but I'm still not happy with too little information produced by \cite and not having a working \placepublications Any help appreciated. Cheers, Matija -- gsm: +386 41 849 552 e-mail: matija.suklje@rutka.net www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: matija.suklje@gabbler.org msn: matija.suklje@rutka.net yahoo: matija_suklje
Matija Šuklje wrote:
Dne četrtek 27. decembra 2007 je Matija Šuklje napisal(a):
From what I can tell the main problem is that in legal circles it's considered bad form to cite (the short one) right next to the cited text. The much preferred way is "below the line" in the footer.
I think I solved the problem with footnotes now by using \footnote{\cite[extras={, p. 12}][ref]} ...but I'm still not happy with too little information produced by \cite and not having a working \placepublications
Any help appreciated.
The solution is probably along the lines of \def\shortcitation#1{% \nocite[#1]% \begingroup \getcitedata[kratko][#1] to \shorttitle \getcitedata[avtor][#1] to \shortauthor %define this bibfield first! \expanded{\footnote{\shortitle, \shortauthor ...}}% \endgroup} More tomorrow, maybe. You have picked the worst possible time to ask me about computer stuff. ;-)
Dne četrtek 27. decembra 2007 je Taco Hoekwater napisal(a):
The solution is probably along the lines of [...] More tomorrow, maybe. You have picked the worst possible time to ask me about computer stuff. ;-)
Thanks, will try tomorrow. My day has been amazingly awful as well. I'll probably just do additions to the pf_ul.tex file where I think I'm on halfway familiar ground already. Cheers, Matija -- gsm: +386 41 849 552 e-mail: matija.suklje@rutka.net www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: matija.suklje@gabbler.org msn: matija.suklje@rutka.net yahoo: matija_suklje
Matija Šuklje wrote:
Dne četrtek 27. decembra 2007 je Taco Hoekwater napisal(a):
The solution is probably along the lines of [...] More tomorrow, maybe. You have picked the worst possible time to ask me about computer stuff. ;-)
Thanks, will try tomorrow. My day has been amazingly awful as well. I'll probably just do additions to the pf_ul.tex file where I think I'm on halfway familiar ground already.
Your pf_ul.tex had a spurious (or incomplete) \insert command at the end, that is what was causing an error problems "Missing number". For the footnoted references, this seems to work: % two new fields, for use in \mycite \newbibfield[avtor] \newbibfield[kratko] % footnote-based definition of \cite, with extra data \def\mycite[#1][#2]% {\bgroup % this adds the reference to the publication list % in the back: \nocite[#2]% % you can get all single-valued fields with this % \commands (title,issue,journal etc.) but not the % \author,\artauthor and \editor because they have % special arguments: \getcitedata[avtor][#2] to \localavtor \getcitedata[kratko][#2] to \localkratko % you may want more fields and/or better formatting: \footnote{\localavtor, \localkratko, #1}% \egroup} % use is like so: This is known\mycite[str. IV-VI in XI][bavcon_zkp] % this setup needs the extra \avtor and \kratko in the bbl file : \startpublication[ k=bavcon_zkp, a=Bavcon, t=clanek, y=2003] \title{Na rob peti noveli zakona o kazenskem postopku} \kratko{Na rob} \avtor{L. Bavcon} \author{Ljubo}[L.]{}{Bavcon} \journal{Pravna praksa} \volume{22} \issue{6/7} \pubyear{2003} \stoppublication You are operating on the border of what is doable for the current bibliographic module, and I have no time to spend a month on a rewrite just now, so if this is still not good enough, you are out of luck. Best wishes, Taco
Dne petek 28. decembra 2007 je Taco Hoekwater napisal(a):
Your pf_ul.tex had a spurious (or incomplete) \insert command at the end, that is what was causing an error problems "Missing number".
Yes, I figured that out not too long after I posted my files. Sorry about that.
For the footnoted references, this seems to work:
Thanks, I've reused this macro of yours to make it fit my needs better.
You are operating on the border of what is doable for the current bibliographic module, and I have no time to spend a month on a rewrite just now, so if this is still not good enough, you are out of luck.
With your help I managed to get together something useable. It's not perfect yet, but since the text I'm working on now is not that important and the next text where I would need a lot of different types of bibliography is still more then half a year away — there is no rush. Not that I would be bold enough to call this a bug ...it's more of a "feature request" if you will. During the process of learning how the bib module in ConTeXt works I came to these suggestions: * an autodetection/setting for \cite (e.g. \setupcitelayout) that works like \setuppublicationlayout, but outputs to the "cite field" * an autodetection/setting for \cite (e.g. in \setupcite) that works similar then \*author, \*sep, \*etal and \*etallimit in \setuppublicationlist when it comes to many authors in the citation field. * an autodetection/setting for \cite similar to the above with a script that would automatically shorten titles to the first X words, if the title exceeded Y characters or words; where X and Y could be set up * this might be a tough one — (at least in Slovenia's legal circles) legal documents get cited for the first time (e.g. with \cite) the same way as in the bibliography (full name, abbrev, journal, all changes etc.), but for each next time the same legal act gets cited only it's abbrevation should be used. Also in connection with that — is it possible (already) to utilise \useskip so that not only the empty space of the missing field, but also it's separators (e.g. \inserteditor{ed: }{, }{}) are being skipped? Thanks a million! Cheers, Matija p.s. all I have to do now is get some headers etc. ...but I think that should be doable even with my limited skills. p.p.s. I'm attaching the files a) if anyone finds any obvious faults in it and b) for anyone who could make use of the pf_ul.tex definitions. -- gsm: +386 41 849 552 e-mail: matija.suklje@rutka.net www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: matija.suklje@gabbler.org msn: matija.suklje@rutka.net yahoo: matija_suklje
Hi Matija, I can provide partial answers to your questions. On Sat, 29 Dec 2007, Matija Šuklje wrote:
* this might be a tough one — (at least in Slovenia's legal circles) legal documents get cited for the first time (e.g. with \cite) the same way as in the bibliography (full name, abbrev, journal, all changes etc.), but for each next time the same legal act gets cited only it's abbrevation should be used.
Once I needed something similar for abbreviations. When the abbreviation is used for the first time include the full meaning of the abbreviation in parenthesis, later, only use the abbreviated form. The approach that I followed was approximately \def\mycite{\dodoubleempty\domycite} \def\domycite[#1][#2]% {\doifdefinedelse{mycite:#2} {\cite[#1][#2]} {cite author, title, etc.% I don't remember the exact commands \setvalue{mycite:#2}{done}} This way, \mycite will give the complete citation the first time, and only the number when used later on. This does not take care of the compatibility method of cite, viz. \cite{ref}.
Also in connection with that — is it possible (already) to utilise \useskip so that not only the empty space of the missing field, but also it's separators (e.g. \inserteditor{ed: }{, }{}) are being skipped?
I am not sure I understand. From what I remember, if the editor is not present, only the last field will be used, so there will be no separators. Aditya
Dne sobota 29. decembra 2007 je Aditya Mahajan napisal(a):
This way, \mycite will give the complete citation the first time, and only the number when used later on. This does not take care of the compatibility method of cite, viz. \cite{ref}.
Hmmm, I'll try this later. Thanks for the code though. I hope I will be able to implement it.
Also in connection with that — is it possible (already) to utilise \useskip so that not only the empty space of the missing field, but also it's separators (e.g. \inserteditor{ed: }{, }{}) are being skipped?
I am not sure I understand. From what I remember, if the editor is not present, only the last field will be used, so there will be no separators.
That makes sense. I probably misunderstood in which entry/command I should put the \unskip command. It works nicely now, thank you :] Cheers and all the best in 2008, Matija -- gsm: +386 41 849 552 e-mail: matija.suklje@rutka.net www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: matija.suklje@gabbler.org msn: matija.suklje@rutka.net yahoo: matija_suklje
Dne sobota 29. decembra 2007 je Aditya Mahajan napisal(a):
\def\mycite{\dodoubleempty\domycite}
\def\domycite[#1][#2]% {\doifdefinedelse{mycite:#2} {\cite[#1][#2]} {cite author, title, etc.% I don't remember the exact commands \setvalue{mycite:#2}{done}}
Thanks, this did the trick :] Now I'm confident enough in my little scribbled-up solution to put it online: http://wiki.contextgarden.net/Law_Faculty_University_of_Ljubljana_Styling_an... Cheers, Matija -- gsm: +386 41 849 552 e-mail: matija.suklje@rutka.net www: http://matija.suklje.name aim: hookofsilver icq: 110183360 jabber/g-talk: matija.suklje@gabbler.org msn: matija.suklje@rutka.net yahoo: matija_suklje
participants (3)
-
Aditya Mahajan
-
Matija Šuklje
-
Taco Hoekwater