public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* References error with pandoc 1.15.2 context output
@ 2015-11-20  6:51 Michael Green
       [not found] ` <a4bdbcf5-5d29-4474-aac3-ef39bd8f9f3e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Green @ 2015-11-20  6:51 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1381 bytes --]

pandoc 1.15.2 is producing an empty \reference[refs]{} line with the 
context writer.

Sample file:

---
references:
- type: article-journal
  id: Frankfurt:1971fk
  author:
  - family: Frankfurt
 given: Harry
  issued:
 date-parts:
 - - 1971
  title: 'Freedom of the will and the concept of a person'
  container-title: Journal of Philosophy
...


Text [@Frankfurt:1971fk].


Output:

\starttext


Text (Frankfurt 1971).


\reference[refs]{}% <--- THIS SHOULD NOT BE HERE


\reference[ref-Frankfurt:1971fk]{}%
Frankfurt, Harry. 1971. “Freedom of the Will and the Concept of a
Person.” {\em Journal of Philosophy}.


\stoptext


I tried it with a few other output formats (markdown, rtf, plain). The 
problem seems to be unique to context.

Thank you!

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/a4bdbcf5-5d29-4474-aac3-ef39bd8f9f3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 9632 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: References error with pandoc 1.15.2 context output
       [not found] ` <a4bdbcf5-5d29-4474-aac3-ef39bd8f9f3e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-20  7:27   ` John MACFARLANE
       [not found]     ` <20151120072722.GA19633-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: John MACFARLANE @ 2015-11-20  7:27 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

That's a link target for the bibliography as a whole.
Is it problematic?

+++ Michael Green [Nov 19 15 22:51 ]:
>   pandoc 1.15.2 is producing an empty \reference[refs]{} line with the
>   context writer.
>   Sample file:
>   ---
>   references:
>   - type: article-journal
>     id: Frankfurt:1971fk
>     author:
>     - family: Frankfurt
>    given: Harry
>     issued:
>    date-parts:
>    - - 1971
>     title: 'Freedom of the will and the concept of a person'
>     container-title: Journal of Philosophy
>   ...
>   Text [@Frankfurt:1971fk].
>   Output:
>   \starttext
>   Text (Frankfurt 1971).
>   \reference[refs]{}% <--- THIS SHOULD NOT BE HERE
>   \reference[ref-Frankfurt:1971fk]{}%
>   Frankfurt, Harry. 1971. “Freedom of the Will and the Concept of a
>   Person.” {\em Journal of Philosophy}.
>   \stoptext
>   I tried it with a few other output formats (markdown, rtf, plain). The
>   problem seems to be unique to context.
>   Thank you!
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/a4bdbcf5-5d29-4474-
>   aac3-ef39bd8f9f3e%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/a4bdbcf5-5d29-4474-aac3-ef39bd8f9f3e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20151120072722.GA19633%40protagoras.berkeley.edu.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: References error with pandoc 1.15.2 context output
       [not found]     ` <20151120072722.GA19633-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
@ 2015-11-20 17:44       ` Michael Green
       [not found]         ` <d381d44b-a60d-4256-891a-fb9224310681-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Green @ 2015-11-20 17:44 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1128 bytes --]

On Thursday, November 19, 2015 at 11:27:40 PM UTC-8, John MacFarlane wrote:
>
> That's a link target for the bibliography as a whole. 
> Is it problematic? 
>

It introduces a vertical space of about two lines.

However, this may be a ConTeXt problem. Looking at the examples of how to 
use this command, I don't think it should add any space at all.

http://wiki.contextgarden.net/Command/reference

I should have thought to look that up first.

I will ask the ConTeXt list about it. I will get back to you if this is NOT 
a ConTeXt problem.

Thank you! 

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d381d44b-a60d-4256-891a-fb9224310681%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1882 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: References error with pandoc 1.15.2 context output
       [not found]         ` <d381d44b-a60d-4256-891a-fb9224310681-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-20 20:41           ` Michael Green
       [not found]             ` <d6c3f6db-07ab-4f29-bef9-2e4232079c29-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Green @ 2015-11-20 20:41 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1455 bytes --]


On Friday, November 20, 2015 at 9:44:05 AM UTC-8, Michael Green wrote:
>
> On Thursday, November 19, 2015 at 11:27:40 PM UTC-8, John MacFarlane wrote:
>>
>> That's a link target for the bibliography as a whole. 
>> Is it problematic? 
>>
>
> It introduces a vertical space of about two lines.
>
> …
> I will ask the ConTeXt list about it. I will get back to you if this is 
> NOT a ConTeXt problem.
>
>
Update: ConTeXt does what it is supposed to in this case. So, yes, this 
link target for the bibliography as a whole does create a problem. Sorry!

Specifically, according to Hans Hagen, when pandoc adds a 
\reference[refs]{}%, it injects an (invisible) signal. He explained why 
like this: "where does the ref belong to, line 1 or line 2, so best bind it 
to a line."

http://article.gmane.org/gmane.comp.tex.context/92936

 Hope that helps.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d6c3f6db-07ab-4f29-bef9-2e4232079c29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2472 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: References error with pandoc 1.15.2 context output
       [not found]             ` <d6c3f6db-07ab-4f29-bef9-2e4232079c29-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-21 14:26               ` Pablo Rodríguez
       [not found]                 ` <56507F23.4040608-S0/GAf8tV78@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Pablo Rodríguez @ 2015-11-21 14:26 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 11/20/2015 09:41 PM, Michael Green wrote:
> [...]
> Update: ConTeXt does what it is supposed to in this case. So, yes, this
> link target for the bibliography as a whole does create a problem. Sorry!
> 
> Specifically, according to Hans Hagen, when pandoc adds a
> \reference[refs]{}%, it injects an (invisible) signal. He explained why
> like this: "where does the ref belong to, line 1 or line 2, so best bind
> it to a line."

Hi Michael,

I wonder whether \references[refs]{} makes really sense there. I mean,
there is no title in your sample.

In that case I will remove the line after (or any blank line after)
\references[refs]{} and this fixes your problem.

But I wonder what happens when references have a heading (a chapter
title), will the heading contain the reference from \reference[refs]{},
will it have a different reference from \reference[refs]{}, or will it
be provided with no reference?

BTW, when I try to parse your original sample file, I get the following
error message:

pandoc: Could not parse YAML header: did not find expected key "source"
(line 10, column 2)

Is this a bug or am I missing something?

Just in case it helps,


Pablo
-- 
http://www.ousia.tk


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: References error with pandoc 1.15.2 context output
       [not found]                 ` <56507F23.4040608-S0/GAf8tV78@public.gmane.org>
@ 2015-11-22  0:00                   ` Michael Green
       [not found]                     ` <c48ea6e3-5603-4bb1-a414-68f613197625-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Green @ 2015-11-22  0:00 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2108 bytes --]



On Saturday, November 21, 2015 at 6:26:51 AM UTC-8, ousia wrote:
>
> Hi Michael, 
>
> I wonder whether \references[refs]{} makes really sense there. I mean, 
> there is no title in your sample. 
>
>
It's really a question for someone else. I gather from what John wrote that 
the aim is to have a reference target for the bibliography as a whole, as 
opposed to the individual entries. I assume it was easier to put it in 
regardless of whether there is a heading for the bibliography or not.
 

> In that case I will remove the line after (or any blank line after) 
> \references[refs]{} and this fixes your problem. 
>
> But I wonder what happens when references have a heading (a chapter 
> title), will the heading contain the reference from \reference[refs]{}, 
> will it have a different reference from \reference[refs]{}, or will it 
> be provided with no reference? 
>

I think it gets a reference like any other heading does. In very brief 
testing on my part, the empty \reference[refs]{}% appears to be included as 
well even when the bibliography has a heading (with its own reference).

>
> BTW, when I try to parse your original sample file, I get the following 
> error message: 
>
> pandoc: Could not parse YAML header: did not find expected key "source" 
> (line 10, column 2) 
>
> Is this a bug or am I missing something? 
>
>
Sorry, I don't know. I just copied the YAML reference example from the 
manual and simplified it. It worked for me.
 

> Just in case it helps, 
>
>
> Pablo 
> -- 
> http://www.ousia.tk 
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c48ea6e3-5603-4bb1-a414-68f613197625%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 3605 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: References error with pandoc 1.15.2 context output
       [not found]                     ` <c48ea6e3-5603-4bb1-a414-68f613197625-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2015-11-22  0:52                       ` Pablo Rodríguez
  2015-11-22  4:16                       ` John MacFarlane
  1 sibling, 0 replies; 10+ messages in thread
From: Pablo Rodríguez @ 2015-11-22  0:52 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 11/22/2015 01:00 AM, Michael Green wrote:
> On Saturday, November 21, 2015 at 6:26:51 AM UTC-8, ousia wrote:
> 
>     I wonder whether \references[refs]{} makes really sense there. I mean,
>     there is no title in your sample.
> 
> It's really a question for someone else. I gather from what John wrote
> that the aim is to have a reference target for the bibliography as a
> whole, as opposed to the individual entries. I assume it was easier to
> put it in regardless of whether there is a heading for the bibliography
> or not.

I think it only makes sense when there is no title for the bibliography.
Otherwise the heading should have the identifier.

>     But I wonder what happens when references have a heading (a chapter
>     title), will the heading contain the reference from \reference[refs]{},
>     will it have a different reference from \reference[refs]{}, or will it
>     be provided with no reference?
> 
> I think it gets a reference like any other heading does. In very brief
> testing on my part, the empty \reference[refs]{}% appears to be included
> as well even when the bibliography has a heading (with its own reference).

I think that the heading should get the reference. If there is a
heading, the other reference shouldn’t be generated.

>     BTW, when I try to parse your original sample file, I get the following
>     error message:
> 
>     pandoc: Could not parse YAML header: did not find expected key "source"
>     (line 10, column 2)
> 
>     Is this a bug or am I missing something?
> 
> Sorry, I don't know. I just copied the YAML reference example from the
> manual and simplified it. It worked for me.

This was an spacing issue (and not invoking the pandoc-citeproc filter).
Now it works for me too.


Pablo
-- 
http://www.ousia.tk

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/565111E2.6030804%40web.de.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: References error with pandoc 1.15.2 context output
       [not found]                     ` <c48ea6e3-5603-4bb1-a414-68f613197625-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2015-11-22  0:52                       ` Pablo Rodríguez
@ 2015-11-22  4:16                       ` John MacFarlane
       [not found]                         ` <20151122041607.GB19469-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
  1 sibling, 1 reply; 10+ messages in thread
From: John MacFarlane @ 2015-11-22  4:16 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

To clarify:

pandoc-citeproc puts the entire bibliography in a pandoc Div
element with id 'refs'.

Different writers handle Div elements in different ways.
But in ConTeXt, when there's a Div with a non-null id,
a `\references[id]{}` command is produced.  This is to
ensure that there's a target for internal links to that id.

Anyway, that's why you have that `\references[refs]{}`.
Really I just want a link target.  If there's a better
way to achieve that in ConTeXt, let me know.

+++ Michael Green [Nov 21 15 16:00 ]:
>   On Saturday, November 21, 2015 at 6:26:51 AM UTC-8, ousia wrote:
>
>     Hi Michael,
>     I wonder whether \references[refs]{} makes really sense there. I
>     mean,
>     there is no title in your sample.
>
>   It's really a question for someone else. I gather from what John wrote
>   that the aim is to have a reference target for the bibliography as a
>   whole, as opposed to the individual entries. I assume it was easier to
>   put it in regardless of whether there is a heading for the bibliography
>   or not.
>
>     In that case I will remove the line after (or any blank line after)
>     \references[refs]{} and this fixes your problem.
>     But I wonder what happens when references have a heading (a chapter
>     title), will the heading contain the reference from
>     \reference[refs]{},
>     will it have a different reference from \reference[refs]{}, or will
>     it
>     be provided with no reference?
>
>   I think it gets a reference like any other heading does. In very brief
>   testing on my part, the empty \reference[refs]{}% appears to be
>   included as well even when the bibliography has a heading (with its own
>   reference).
>
>     BTW, when I try to parse your original sample file, I get the
>     following
>     error message:
>     pandoc: Could not parse YAML header: did not find expected key
>     "source"
>     (line 10, column 2)
>     Is this a bug or am I missing something?
>
>   Sorry, I don't know. I just copied the YAML reference example from the
>   manual and simplified it. It worked for me.
>
>     Just in case it helps,
>     Pablo
>     --
>     [1]http://www.ousia.tk
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [2]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [3]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [4]https://groups.google.com/d/msgid/pandoc-discuss/c48ea6e3-5603-4bb1-
>   a414-68f613197625%40googlegroups.com.
>   For more options, visit [5]https://groups.google.com/d/optout.
>
>References
>
>   1. http://www.ousia.tk/
>   2. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   4. https://groups.google.com/d/msgid/pandoc-discuss/c48ea6e3-5603-4bb1-a414-68f613197625-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   5. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: References error with pandoc 1.15.2 context output
       [not found]                         ` <20151122041607.GB19469-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
@ 2015-11-22 17:25                           ` Pablo Rodríguez
  2015-11-23 18:56                           ` Michael Green
  1 sibling, 0 replies; 10+ messages in thread
From: Pablo Rodríguez @ 2015-11-22 17:25 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 11/22/2015 05:16 AM, John MacFarlane wrote:
> To clarify:
> 
> pandoc-citeproc puts the entire bibliography in a pandoc Div
> element with id 'refs'.
> 
> Different writers handle Div elements in different ways.
> But in ConTeXt, when there's a Div with a non-null id,
> a `\references[id]{}` command is produced.  This is to
> ensure that there's a target for internal links to that id.
> 
> Anyway, that's why you have that `\references[refs]{}`.
> Really I just want a link target.  If there's a better
> way to achieve that in ConTeXt, let me know.

John,

the issue here is that a single blank line is irrelevant in SGML/XML,
but it inserts a new paragraph in TeX.

ConTeXt parses the blank line after `\references[id]{}` as if <p></p>
were introduced in XML.

If the ConTeXt writes gives the following output (excerpt):

    \reference[refs]{}

    \reference[ref-Frankfurt:1971fk]{}%
    Frankfurt, Harry. 1971. “Freedom of the Will and the Concept of a
    Person.” {\em Journal of Philosophy}.

I suggest removing the blank line after `\references[id]{}`.

As a general rule, any line that only contains a \reference command
should have no blank line after it. Otherwise, you will have a paragraph
in the output PDF document.

Another paragraph would be introduced if a blank line were inserted
after the second \reference command.

So, \reference commands shouldn’t have a blank line after them. Unless
we want an extra paragraph there.

I hope it is clear now,


Pablo
-- 
http://www.ousia.tk

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5651FA92.9030402%40web.de.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: References error with pandoc 1.15.2 context output
       [not found]                         ` <20151122041607.GB19469-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
  2015-11-22 17:25                           ` Pablo Rodríguez
@ 2015-11-23 18:56                           ` Michael Green
  1 sibling, 0 replies; 10+ messages in thread
From: Michael Green @ 2015-11-23 18:56 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 3110 bytes --]

It sounds as though pandoc's bibliography Div corresponds to ConTeXt's 
sectioning commands: \startsection … \stopsection.

http://wiki.contextgarden.net/Command/startsection

Suppose we define a section called "Bibliography". We can add a reference 
to it like this:

\startBibliography[reference=ref]
  bibliography entries
\stopBibliography


Is this is a *better* way of doing it? Got me.

It would let us give special styles to the bibliography, like outdented 
lines. I don't know how to do that now.

Here is an illustration. I defined a new heading ("Bibliography") based on 
a pre-defined one ("subject"). This automatically defines two more 
commands: \startBibliography and \stopBibliography.

\definehead[Bibliography][subject]
\setuphead[Bibliography][
 insidesection={\startnarrower[left]\setupindenting[-\leftskip,yes]},
 indentnext=yes,
 aftersection={\stopnarrower},
]

\starttext

\subject{Text}
Text text text (Frankfurt 1971).

\startBibliography[reference=ref,title=My Bibliography]
\reference[ref-Frankfurt:1971fk]{}%
Frankfurt, Harry. 1971. “Freedom of the Will and the Concept of a
Person.” {\em Journal of Philosophy}.
\stopBibliography

\subject{More text}
More text more text more text.

\stoptext


The bibliography section will start with a title ("My Bibliography") that 
is styled like a subject level heading.

Text inside \startBibliography … \stopBibliography will be outdented: the 
first line for each entry will be flush left and every other line in the 
entry will be indented.

Everything before and after \startBibliography … \stopBibliography will 
have the default indentation.

mjg

p.s. The keys "insidesection" and "aftersection" are not documented. They 
are in the ConTeXt file strc-sec.mkiv. I can't follow the code. I am just 
saying that this works. A real ConTeXt person could say why.



On Saturday, November 21, 2015 at 8:16:24 PM UTC-8, John MacFarlane wrote:
>
> To clarify: 
>
> pandoc-citeproc puts the entire bibliography in a pandoc Div 
> element with id 'refs'. 
>
> Different writers handle Div elements in different ways. 
> But in ConTeXt, when there's a Div with a non-null id, 
> a `\references[id]{}` command is produced.  This is to 
> ensure that there's a target for internal links to that id. 
>
> Anyway, that's why you have that `\references[refs]{}`. 
> Really I just want a link target.  If there's a better 
> way to achieve that in ConTeXt, let me know. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d638c04e-e83e-44e4-80bb-7950e02bfc6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 6074 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-11-23 18:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-20  6:51 References error with pandoc 1.15.2 context output Michael Green
     [not found] ` <a4bdbcf5-5d29-4474-aac3-ef39bd8f9f3e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-20  7:27   ` John MACFARLANE
     [not found]     ` <20151120072722.GA19633-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
2015-11-20 17:44       ` Michael Green
     [not found]         ` <d381d44b-a60d-4256-891a-fb9224310681-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-20 20:41           ` Michael Green
     [not found]             ` <d6c3f6db-07ab-4f29-bef9-2e4232079c29-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-21 14:26               ` Pablo Rodríguez
     [not found]                 ` <56507F23.4040608-S0/GAf8tV78@public.gmane.org>
2015-11-22  0:00                   ` Michael Green
     [not found]                     ` <c48ea6e3-5603-4bb1-a414-68f613197625-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-11-22  0:52                       ` Pablo Rodríguez
2015-11-22  4:16                       ` John MacFarlane
     [not found]                         ` <20151122041607.GB19469-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
2015-11-22 17:25                           ` Pablo Rodríguez
2015-11-23 18:56                           ` Michael Green

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).