Subject: mailing-list for TeXmacs Users
List archive
From : Andrew Cooper <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] Second-line indentation in text of bibliography entries
- Date: Sat, 06 May 2006 15:46:02 +0100
Henri Lesourd wrote:
Andrew Cooper wrote:
In the bibliography, for each entry in the list where the reference span multiple lines, I want to indent all subsequent lines relative to the first, i.e.:
Author. A, Author B., and Author C., year, Title of the paper which |
>>>>> is so long it wraps onto the next line, journal, volume, |
>>>>> pages 1-100.
where | represents the end of a line and >>>>> represents an indentation. I've tried the usual trial and error to do this, but I'm still no further forward. Can anyone help?
<snip>
... the following hack :
[[
<assign|bibitem*|<macro|x|<margin-first-other|0mm|5mm|{old code for bibitem*}>>
]]
should solve your problem (and then you put this macro inside a stylesheet of yours,
which you use in your document).
Thanks for you reply, Henri.
Margin-first-other works perfectly in ordinary text. I've tried the suggested hack, but it doesn't have the desired (or indeed, any) effect, for a reason that I've come across before in trying to solve this problem, which I'll now try and describe. Say I want to cite the following paper:
Smith A., 2006, Applications of musical newts to string theory, Journal of Bad Ideas, 6, pp300-400
I have a bibtex entry as follows: @ARTICLE{smith06, author={Smith, A.}, year=2006, etc. etc. }
This is rendered in the TeXmacs bibliography as some variant of (in sketch form):
[Smi06] <label|smith06> Smith A., 2006, Applications of musical newts to string theory, Journal of Bad Ideas, 6, pp300-400
That is to say:
[bibitem] <texmacs label> "Entry text"
where "Entry text" is formatted according to the BibTex style file used (alpha, plain or whatever, in my case a hacked-about variant of a standard astronomy format). We can forget about the TeXmacs label. The [bibitem] takes the BibTeX label as produced by the BibTeX process and decorates it via render-bibitem, the default being to put square braces around it to give [Smi06] or [1] or whatever. The "text" argument in the bibitem macro is just this label, not the body of the reference. Hence, whatever you put under any macros related to the "bibitem", the only thing you affect is the label. You can have [Smi06] or ***{Smi06}*** or the same in blue etc. etc., but it doesn't affect the text of the entry. As an example, say you alter bibitem* to the following:
<assign|bibitem*|<macro|text|SomeRandomString>>
This just produces the result:
SomeRandomStringSmith A., 2006, Applications of musical newts to string theory, Journal of Bad Ideas, 6, pp300-400
The same is true going up or down the chain of macros of which bibitem* is a part. All of this is, more or less, explained in the manual, if somewhat obscurely in places. So I'm still stuck on how to alter the text of the entry rather than the bibitem 'label'. The body of the bibliographic list appears in the bib-list macro, where you could do things like making the entire bibliography appear in green, if you wanted. But margin-first-other in here only distinguishes between the first line of the FIRST reference, and 'everything else', which is no use.
The question is, how do you do something to _each_ entry in the list? It seems to me that the potential must be there without doing anything too drastic, even if a strange sort of hack is necessary. The same principle presumably applies to the ordinary type of list as well.
I hope the above makes sense,
Andrew
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Andrew Cooper, 05/06/2006
Archive powered by MHonArc 2.6.19.