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: Sun, 07 May 2006 16:39:30 +0100
Henri Lesourd wrote:
On my computer, the following markup :> Therefore, it is clear that the <margin-first-other|...> macro works
[[
<bib-list|[99]|
<margin-first-other|0mm|5mm|X>aaa aa aa aa aa aa aa aa aa aa aaa aaa aa aaa
aaa aa aaa aa aa aaaa aaaa aaaa aaa aaa aa aa aa aa aa aa aa aa aa aaa aaa
aa aaa aaa aa aaa aa aa aaaa aaaa aaaa aaa
]]
is displayed as (the string ">>>" being used below to show the indentation) :
[[
Xaaa aa aa aa aa aa aa aa aa aa aaa aaa aa aaa aaa aa aaa
>>>> aaaa aaaa aaa aaa aa aa aa aa aa aa aa aa aa aaa aaa
>>>> aaa aa aaa aa aa aaaa aaaa aaaa aaa
]]
> the same for each line, it is definitely not operating only on the
> first line of the first reference.
That's interesting. Just writing a biblist + bibitem as you do there (without using the automatic generation), with the following markup:
[[
<\bib-list|[99]>
<bibitem*|X>aaa aaaaaaa aaaaa aaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaa aaaaa\
<bibitem*|<margin-first-other|0mm|50mm|X>>aaa aaaaaaa aaaaa aaaaaaa
aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaa
</bib-list>
]]
produces a biblist with two _identical_ entries. Note the deliberately exaggerated argument to margin-first-other (MFO), just to be certain the indent isn't getting 'lost' anywhere. Any values given to MFO make no difference.
Of course, let's say we give bibitem the argument "Squirrel":
<bibitem*|Squirrel>
This argument goes through the mill of subroutines boiling down to render-bibitem and produces:
[Squirrel] aaa aaaaaaa aaaaa aaaaaaa aaaaaaaaaaaa
>>>> aaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaa aaaaaa
>>>> aaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaa
>>>> a aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaa
The text of the entry (aaaa etc.) is superficially indented with respect to the label "Squirrel" that results, but crucially _not_ with respect to the first character of the entry (i.e. the first 'a' in the above examples. So if you don't want a label like [Squirrel] in front of each entry (and I don't), and you get rid of it by changing:
<render-bibitem|<macro|x|[x]>>
to (keeping the empty macro for no good reason):
<render-bibitem|<macro|x|>>
Then bibitem's argument renders as a 'zero-length string':
aaa aaaaaaa aaaaa aaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaa aaaaaa
aaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaa
a aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaa
And the indentation doesn't happen. My contention is that margin-first-other isn't responsible for this indentation - it just happens 'anyway' provided the label is of finite length (i.e. exists). The fact that it appears to act on every entry is a consequence of the fact that every entry is rendered in the same way in this regard ( because it's a list, and this is how 'lists' work?).
>The question is, how do you do something to _each_ entry in the list?
If you look at the markup for a bibliography, you see that it is
of the shape :
[[
<bibliography|bib|alpha|TeXmacs_Core1.bib|
<bib-list|[99]|
<bibitem*|X1><label|Y1><margin-first-other|0mm|5mm|aaa aa aa aa aa aa
aa aa aa aa aaa aaa aa aaa aaa aa aaa aa aa aaaa aaaa aaaa aaa>aaa aa
aa aa aa aa aa aa aa aa aaa aaa aa aaa aaa aa aaa aa
<bibitem*|X2><label|Y2><margin-first-other|0mm|5mm|aaa aa aa aa aa aa
aa aa aa aa aaa aaa aa aaa aaa aa aaa aa aa aaaa aaaa aaaa aaa>aaa aa
aa aa aa aa aa aa aa aa aaa aaa aa aaa aaa aa aaa aa
...........>
]]
therefore, if you change <bibitem*|...>, the effect of the change should
clearly have effect on all the items of the <bib-list|...>, just because
each item starts by <bibitem*|...> itself.
This sounds so obvious it's hard to see why it wouldn't be the case. Throw some text into the argument of bibitem and, as it passes through the subroutine mill, it duly appears in front of every entry. As the opening example demonstrates, MFO works on stuff beyond its closing bracket (why does it have a 'body' argument if that's the case?), so one would assume that throwing a <margin-first-other|0mm|5mm|> into <bibitem*|****> would do the job, as you say.
Instead, have a look at the following manually-created biblist:
[[
<\bib-list|[99]>
<bibitem*|X><margin-first-other|40mm|60mm|>aaa aaaaaaa aaaaa aaaaaaa
aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaa\
<bibitem*|<margin-first-other|40mm|60mm|X>>aaa aaaaaaa aaaaa aaaaaaa
aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa
aaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaaaaaa aaaaa
</bib-list>
]]
There is a distinct difference between these two entries. The position of MFO in the first clearly has an effect. In the second, it has no (useful) effect. Let's consider a related question: how would you go about wrapping the text of each biblist entry into a routine that _required_ the text to be given as an argument, e.g. <with|colour|green|Some text>?
Are you sure you performed the change I suggested on <bibitem*|...> itself,
and not on some of its (many) subroutines (i.e., <bibitem|...>, without
the '*', for example...) ?
I performed the change as you indicated (and many other ways besides). Anyway, still no progress.
Thanks for your help so far.
--
Andrew
- Second-line indentation in text of bibliography entries, Andrew Cooper, 05/06/2006
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Henri Lesourd, 05/06/2006
- Message not available
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Henri Lesourd, 05/06/2006
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Andrew Cooper, 05/07/2006
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Henri Lesourd, 05/07/2006
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Andrew Cooper, 05/08/2006
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Henri Lesourd, 05/08/2006
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Andrew Cooper, 05/08/2006
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Andrew Cooper, 05/08/2006
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Henri Lesourd, 05/07/2006
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Andrew Cooper, 05/07/2006
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Henri Lesourd, 05/06/2006
- Message not available
- Re: [TeXmacs] Second-line indentation in text of bibliography entries, Henri Lesourd, 05/06/2006
Archive powered by MHonArc 2.6.19.