public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Citations in HTML output
@ 2013-03-14 10:04 Greg
       [not found] ` <9b64588d-e855-4a67-a066-4a40e7a53c3e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Greg @ 2013-03-14 10:04 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2662 bytes --]

Hello everybody,

I've discovered Pandoc and Markdown a few month ago, and I really like it, 
especially when I look at LaTeX source files :)

Here is the problem I have: I need to cite some external documents. Here is 
the syntax used:

Please refer to [@easy-script] for more information.


 Now, here my bib file:

@Manual{easy-script,
title = {{Easy Scripting using Python}},
address = {Milano, Italy},
organization = {SomeCorporation Ltd},
year = {2014},
month = {December},
edition{16}
}



The default output doesn't really fits in the rendered document:

Please refer to (Anon. 2010) for more information.

 

(blah blah blah)

 

# References

List of full bibliographic references

 

-----


*Document footnotes* 



The output I'm looking for mentions the title and eventually the authors if 
present, with a link to the full citation:

Please refer to *[Easy Scripting using Python, 1]* for more information.

 

(blah blah blah)

 

# References
[1]: Full bibliographic data


-----


*Document footnotes* 

 

It do not need to be exactly like that (as I don't really know the best 
practices), but something close would be great. I have tried to find some 
CSL declarations, but depending of the CSL file, either I have a plain-text 
inline reference, either I only have a link to a footnote containing the 
inline text I want. Here is the output when there is a link:

Please refer to^[1] for more information.

 

(blah blah blah)


# References

List of full bibliographic references

 

-----

 

1. Easy Scripting using Python

*Other document footnotes*


It doesn't really fits, because the inline text is not inline, it makes a 
jump to footnote which then need to jump manually to the references.

Here is one of the CSL file I've 
tried: http://www.zotero.org/styles/chicago-note-bibliography

I'm not sure if it's (easily?) possible to have the title inline, with a 
link to the correct entry in the # References paragraph, without mixing 
with the footnotes. Or maybe I'm totally missing the point on "How to do 
proper citations".

Do you have any ideas or suggestions?


Thanks for reading!
 
 

-- 
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/msg/pandoc-discuss/-/_PW0pY6CDZkJ.
For more options, visit https://groups.google.com/groups/opt_out.



[-- Attachment #2: Type: text/html, Size: 6323 bytes --]

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

* Re: Citations in HTML output
       [not found] ` <9b64588d-e855-4a67-a066-4a40e7a53c3e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2013-03-16  8:53   ` andrea rossato
       [not found]     ` <87zjy3iv3t.fsf-46C4ZU908FJ9y4XLxYaG4V6hYfS7NtTn@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: andrea rossato @ 2013-03-16  8:53 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Greg <ewalavir-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> The default output doesn't really fits in the rendered document:
>
>     Please refer to (Anon. 2010) for more information.
>
>     (blah blah blah)
>
>     # References
>
>     List of full bibliographic references
>
>     -----
>
>     Document footnotes 
>
> The output I'm looking for mentions the title and eventually the authors if present, with a link to the full citation:
>
>     Please refer to [Easy Scripting using Python, 1] for more information.
>
>     (blah blah blah)
>
>     # References
>     [1]: Full bibliographic data
>

...

> It doesn't really fits, because the inline text is not inline, it
> makes a jump to footnote which then need to jump manually to the
> references.
>
> Here is one of the CSL file I've tried:
> http://www.zotero.org/styles/chicago-note-bibliography
>
> I'm not sure if it's (easily?) possible to have the title inline, with
> a link to the correct entry in the # References paragraph, without
> mixing with the footnotes. Or maybe I'm totally missing the point on
> "How to do proper citations".
>
> Do you have any ideas or suggestions?

you should choose a csl style that does what you want, or you may edit
the default style used by pandoc (default.csl, which is a
chicago-author-date style):

find the macro "contributors-short":

   <macro name="contributors-short">
      <names variable="author">
         <name form="short" and="text" delimiter=", " initialize-with=". "/>
         <substitute>                                                       
            <names variable="editor"/>
            <names variable="translator"/>
            <text macro="anon"/>
         </substitute>              
      </names>
   </macro>

and changed it like this:

    <macro name="contributors-short">
      <names variable="author">
         <name form="short" and="text" delimiter=", " initialize-with=". "/>
         <substitute>                                                       
            <names variable="editor"/>
            <names variable="translator"/>
            <text variable="title"/> <!-- see here the title -->
         </substitute>              
      </names>
   </macro>
 
now you should get what you want.

Hope this helps.

Andrea


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

* Re: Citations in HTML output
       [not found]     ` <87zjy3iv3t.fsf-46C4ZU908FJ9y4XLxYaG4V6hYfS7NtTn@public.gmane.org>
@ 2013-03-18 10:26       ` Greg
       [not found]         ` <cf934184-c5e7-4a0a-bc45-24e677fe72d5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Greg @ 2013-03-18 10:26 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 3251 bytes --]

Indeed, it helps.

There is still not a link from the citation to the bibliography, but it's 
not a deal breaker.

Thanks a lot!

On Saturday, March 16, 2013 9:53:26 AM UTC+1, arossato wrote:
>
> Greg <ewal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> writes: 
>
> > The default output doesn't really fits in the rendered document: 
> > 
> >     Please refer to (Anon. 2010) for more information. 
> > 
> >     (blah blah blah) 
> > 
> >     # References 
> > 
> >     List of full bibliographic references 
> > 
> >     ----- 
> > 
> >     Document footnotes 
> > 
> > The output I'm looking for mentions the title and eventually the authors 
> if present, with a link to the full citation: 
> > 
> >     Please refer to [Easy Scripting using Python, 1] for more 
> information. 
> > 
> >     (blah blah blah) 
> > 
> >     # References 
> >     [1]: Full bibliographic data 
> > 
>
> ... 
>
> > It doesn't really fits, because the inline text is not inline, it 
> > makes a jump to footnote which then need to jump manually to the 
> > references. 
> > 
> > Here is one of the CSL file I've tried: 
> > http://www.zotero.org/styles/chicago-note-bibliography 
> > 
> > I'm not sure if it's (easily?) possible to have the title inline, with 
> > a link to the correct entry in the # References paragraph, without 
> > mixing with the footnotes. Or maybe I'm totally missing the point on 
> > "How to do proper citations". 
> > 
> > Do you have any ideas or suggestions? 
>
> you should choose a csl style that does what you want, or you may edit 
> the default style used by pandoc (default.csl, which is a 
> chicago-author-date style): 
>
> find the macro "contributors-short": 
>
>    <macro name="contributors-short"> 
>       <names variable="author"> 
>          <name form="short" and="text" delimiter=", " initialize-with=". 
> "/> 
>          <substitute>                                                     
>   
>             <names variable="editor"/> 
>             <names variable="translator"/> 
>             <text macro="anon"/> 
>          </substitute>               
>       </names> 
>    </macro> 
>
> and changed it like this: 
>
>     <macro name="contributors-short"> 
>       <names variable="author"> 
>          <name form="short" and="text" delimiter=", " initialize-with=". 
> "/> 
>          <substitute>                                                     
>   
>             <names variable="editor"/> 
>             <names variable="translator"/> 
>             <text variable="title"/> <!-- see here the title --> 
>          </substitute>               
>       </names> 
>    </macro> 
>   
> now you should get what you want. 
>
> Hope this helps. 
>
> Andrea 
>

-- 
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/msg/pandoc-discuss/-/2990Czue8b4J.
For more options, visit https://groups.google.com/groups/opt_out.



[-- Attachment #2: Type: text/html, Size: 5080 bytes --]

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

* Re: Citations in HTML output
       [not found]         ` <cf934184-c5e7-4a0a-bc45-24e677fe72d5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2013-03-19  9:38           ` andrea rossato
       [not found]             ` <871ubbg269.fsf-46C4ZU908FJ9y4XLxYaG4V6hYfS7NtTn@public.gmane.org>
  2013-03-19 11:47           ` Joseph Reagle
  1 sibling, 1 reply; 24+ messages in thread
From: andrea rossato @ 2013-03-19  9:38 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Greg <ewalavir-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Indeed, it helps.
>
> There is still not a link from the citation to the bibliography, but it's not a deal breaker.

no, indeed. we had some discussion about adding this feature but it
would probably require some support by the Pandoc data structure which
is presently missing.

Best,
Andrea

>
> Thanks a lot!
>
> On Saturday, March 16, 2013 9:53:26 AM UTC+1, arossato wrote:
>
>     Greg <ewal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>    
>     > The default output doesn't really fits in the rendered document:
>     >
>     >     Please refer to (Anon. 2010) for more information.
>     >
>     >     (blah blah blah)
>     >
>     >     # References
>     >
>     >     List of full bibliographic references
>     >
>     >     -----
>     >
>     >     Document footnotes
>     >
>     > The output I'm looking for mentions the title and eventually the authors if present, with a link to the full citation:
>     >
>     >     Please refer to [Easy Scripting using Python, 1] for more information.
>     >
>     >     (blah blah blah)
>     >
>     >     # References
>     >     [1]: Full bibliographic data
>     >
>    
>     ...
>    
>     > It doesn't really fits, because the inline text is not inline, it
>     > makes a jump to footnote which then need to jump manually to the
>     > references.
>     >
>     > Here is one of the CSL file I've tried:
>     > http://www.zotero.org/styles/chicago-note-bibliography
>     >
>     > I'm not sure if it's (easily?) possible to have the title inline, with
>     > a link to the correct entry in the # References paragraph, without
>     > mixing with the footnotes. Or maybe I'm totally missing the point on
>     > "How to do proper citations".
>     >
>     > Do you have any ideas or suggestions?
>    
>     you should choose a csl style that does what you want, or you may edit
>     the default style used by pandoc (default.csl, which is a
>     chicago-author-date style):
>    
>     find the macro "contributors-short":
>    
>        <macro name="contributors-short">
>           <names variable="author">
>              <name form="short" and="text" delimiter=", " initialize-with=". "/>
>              <substitute>                                                      
>                 <names variable="editor"/>
>                 <names variable="translator"/>
>                 <text macro="anon"/>
>              </substitute>              
>           </names>
>        </macro>
>    
>     and changed it like this:
>    
>         <macro name="contributors-short">
>           <names variable="author">
>              <name form="short" and="text" delimiter=", " initialize-with=". "/>
>              <substitute>                                                      
>                 <names variable="editor"/>
>                 <names variable="translator"/>
>                 <text variable="title"/> <!-- see here the title -->
>              </substitute>              
>           </names>
>        </macro>
>      
>     now you should get what you want.
>    
>     Hope this helps.
>    
>     Andrea
>
> --
> 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/msg/pandoc-discuss/-/2990Czue8b4J.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
andrea


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

* Re: Citations in HTML output
       [not found]         ` <cf934184-c5e7-4a0a-bc45-24e677fe72d5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2013-03-19  9:38           ` andrea rossato
@ 2013-03-19 11:47           ` Joseph Reagle
       [not found]             ` <5148504F.20308-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
  1 sibling, 1 reply; 24+ messages in thread
From: Joseph Reagle @ 2013-03-19 11:47 UTC (permalink / raw)
  To: Greg; +Cc: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 03/18/2013 06:26 AM, Greg wrote:
> There is still not a link from the citation to the bibliography, but
> it's not a deal breaker.

This has been an issue [9] for a couple of years and seemingly would 
require a significant chunk of work with pandoc and citeproc-hs. 
However, if you really need it you could convert to latex and then HTML 
-- as I did in my book.

[9]: https://code.google.com/p/citeproc-hs/issues/detail?id=9
[book]: http://reagle.org/joseph/2010/gfc/chapter-1.html


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

* Re: Citations in HTML output
       [not found]             ` <871ubbg269.fsf-46C4ZU908FJ9y4XLxYaG4V6hYfS7NtTn@public.gmane.org>
@ 2013-03-19 14:07               ` John MacFarlane
       [not found]                 ` <20130319140732.GC61188-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: John MacFarlane @ 2013-03-19 14:07 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ andrea rossato [Mar 19 13 10:38 ]:
> Greg <ewalavir-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> 
> > Indeed, it helps.
> >
> > There is still not a link from the citation to the bibliography, but it's not a deal breaker.
> 
> no, indeed. we had some discussion about adding this feature but it
> would probably require some support by the Pandoc data structure which
> is presently missing.

What would be required in pandoc to make this possible?


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

* Re: Citations in HTML output
       [not found]             ` <5148504F.20308-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
@ 2013-03-19 16:00               ` Chris Lott
       [not found]                 ` <CAHJRaA4h9ef+A48G9H8hFAQqkaq0fhAuAPjEbb4M6txeTyDJmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Chris Lott @ 2013-03-19 16:00 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On Tue, Mar 19, 2013 at 3:47 AM, Joseph Reagle <joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> wrote:
> On 03/18/2013 06:26 AM, Greg wrote:
>
> [book]: http://reagle.org/joseph/2010/gfc/chapter-1.html

I love the way you produce this. Are you generating the print version
from the same source or did your publisher do that separately?

Would love to see some notes on the process you used.

c
--
Chris Lott <chris-qMDBG1KJBpwBXFe83j6qeQ@public.gmane.org>


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

* Re: Citations in HTML output
       [not found]                 ` <CAHJRaA4h9ef+A48G9H8hFAQqkaq0fhAuAPjEbb4M6txeTyDJmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-03-19 18:38                   ` Joseph Reagle
       [not found]                     ` <5148B097.3050307-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Joseph Reagle @ 2013-03-19 18:38 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 03/19/2013 12:00 PM, Chris Lott wrote:
> Would love to see some notes on the process you used.

I describe it generally in the preface to the Web edition [1]. I used 
markdown in version control. When it finally came to copy editing, I had 
to use the cruddy MS Word process my publisher used. I backported the 
edits, and then produced the Web version using this script [2] -- which 
I haven't used in a while.


[1]: http://reagle.org/joseph/2010/gfc/preface-web.html

 > I wrote this book in the concise and elegant markdown format. John 
MacFarlane’s useful pandoc tool was used to convert the source text to 
LaTeX. Bibliographic functionality was provided by Philipp Lehman’s 
powerful biblatex package along with David Fussner’s comprehensive 
Chicago style. The final HTML was then produced via the late Eitan 
Gurari’s TeX4ht system. Each one of these folks personally answered my 
many questions along the way. Thank you.


[2]: https://github.com/reagle/pandoc-wrappers/blob/master/bd.py

-- 
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
For more options, visit https://groups.google.com/groups/opt_out.




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

* Re: Citations in HTML output
       [not found]                 ` <20130319140732.GC61188-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
@ 2013-03-20 20:01                   ` andrea rossato
       [not found]                     ` <87k3p1dena.fsf-46C4ZU908FJ9y4XLxYaG4V6hYfS7NtTn@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: andrea rossato @ 2013-03-20 20:01 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> +++ andrea rossato [Mar 19 13 10:38 ]:
>> Greg <ewalavir-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>> 
>> > Indeed, it helps.
>> >
>> > There is still not a link from the citation to the bibliography, but it's not a deal breaker.
>> 
>> no, indeed. we had some discussion about adding this feature but it
>> would probably require some support by the Pandoc data structure which
>> is presently missing.
>
> What would be required in pandoc to make this possible?

while I can generate a link with a citation, it is not possible to
create an anchor in the related reference in the bibliography.

(there are also issues related to citation collapsing, obviously: we
should decide how to deal with them)

Andrea


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

* Re: Citations in HTML output
       [not found]                     ` <87k3p1dena.fsf-46C4ZU908FJ9y4XLxYaG4V6hYfS7NtTn@public.gmane.org>
@ 2013-04-01  9:30                       ` Mark Reid
       [not found]                         ` <79d1d93d-c165-4508-86b1-c3e2342ea0fb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Mark Reid @ 2013-04-01  9:30 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 3134 bytes --]

Hi,

I'd like to add my voice to the chorus asking for some more flexibility in 
the way pandoc renders citations.

The use case I have in mind involves taking the following Markdown text:

As shown in [@Smith:2013] ...

## References

with the following BibTeX file:

@article{Smith:2013,
    Author = {Smith, J.},
    Title = {An Example},
    Year = {2013},
    Url = {http://example.org}
}

and turning it into something like this:

<p>As shown in <a href="#cite-smith-2013">(Smith, 2013)</a> ...</p>

<h2>References</h2>
<div id="references">
<p class="reference">Smith, J., <em><a href="http://example.org">An 
Example</a></em>, 2013</p>
</div>

The things to note here are:

1. There are links to navigate from a reference to the associated citation.

2. The title of the article is a link to the value of the Url field in the 
BibTeX.

3. The citations all have a "reference" class and are surrounded in a div 
with a "references" id.

I've only looked into using pandoc's citation capabilities briefly so maybe 
I am using the wrong tool for this job but I'd really like a system that 
uses pandoc's citation markup in markdown that generates more HTML-friendly 
bibliographies. 

From what I currently understand of CSL it appears that it is not possible 
to do what I am after by defining a new CSL style so I guess support for 
the above would have to be implemented through pandoc itself. If any one 
has any pointers one where to start looking in the pandoc codebase to do 
this sort of thing it would be much appreciated. Alternatively, if you know 
of any other workarounds or approaches I'd love to hear them

Thanks,

Mark.
 


On Thursday, March 21, 2013 7:01:29 AM UTC+11, arossato wrote:
>
> John MacFarlane <fiddlo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> writes: 
>
> > +++ andrea rossato [Mar 19 13 10:38 ]: 
> >> Greg <ewal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> writes: 
> >> 
> >> > Indeed, it helps. 
> >> > 
> >> > There is still not a link from the citation to the bibliography, but 
> it's not a deal breaker. 
> >> 
> >> no, indeed. we had some discussion about adding this feature but it 
> >> would probably require some support by the Pandoc data structure which 
> >> is presently missing. 
> > 
> > What would be required in pandoc to make this possible? 
>
> while I can generate a link with a citation, it is not possible to 
> create an anchor in the related reference in the bibliography. 
>
> (there are also issues related to citation collapsing, obviously: we 
> should decide how to deal with them) 
>
> Andrea 
>
>

-- 
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/msg/pandoc-discuss/-/UXa87xdey34J.
For more options, visit https://groups.google.com/groups/opt_out.



[-- Attachment #2: Type: text/html, Size: 4397 bytes --]

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

* Re: Citations in HTML output
       [not found]                     ` <5148B097.3050307-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
@ 2013-04-01 15:54                       ` Aditya Mahajan
       [not found]                         ` <033968F3-1569-402C-A803-3387FDB3BDF1-63aXycvo3TyHXe+LvDLADg@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Aditya Mahajan @ 2013-04-01 15:54 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


On 2013-03-19, at 2:38 PM, Joseph Reagle <joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> wrote:

> > I wrote this book in the concise and elegant markdown format. John MacFarlane’s useful pandoc tool was used to convert the source text to LaTeX. Bibliographic functionality was provided by Philipp Lehman’s powerful biblatex package along with David Fussner’s comprehensive Chicago style. The final HTML was then produced via the late Eitan Gurari’s TeX4ht system. Each one of these folks personally answered my many questions along the way. Thank you.

Why did you use tex4ht rather than pandoc to generate HTML? Was it because bib latex is more powerful than citeproc-hs?

Aditya

-- 
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
For more options, visit https://groups.google.com/groups/opt_out.




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

* Re: Citations in HTML output
       [not found]                         ` <033968F3-1569-402C-A803-3387FDB3BDF1-63aXycvo3TyHXe+LvDLADg@public.gmane.org>
@ 2013-04-01 16:13                           ` Joseph Reagle
  0 siblings, 0 replies; 24+ messages in thread
From: Joseph Reagle @ 2013-04-01 16:13 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw; +Cc: Aditya Mahajan

On 04/01/2013 11:54 AM, Aditya Mahajan wrote:
> Why did you use tex4ht rather than pandoc to generate HTML? Was it
> because bib latex is more powerful than citeproc-hs?

Yes. I needed the power of latex/biblatex at the time. (It's citation 
and quotation abilities are excellent.) But pandoc has progressed and 
for my current work, I hope to avoid the latex step where possible. 
However, the fact that author-year citations aren't hypertext does 
impede that aspiration.


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

* Re: Citations in HTML output
       [not found]                         ` <79d1d93d-c165-4508-86b1-c3e2342ea0fb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2013-04-01 16:47                           ` John MacFarlane
       [not found]                             ` <20130401164720.GA15068-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: John MacFarlane @ 2013-04-01 16:47 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

To get links from citations to bibliography entries, changes
would be needed in both pandoc and citeproc-hs.  Pandoc would have
to provide an Anchor inline element, and citeproc-hs could then insert
anchors into the bibliography and render all citations as links to
the corresponding anchors.

This is not a small change, because it involves a change to one
of Pandoc's fundamental types, and hence changes to all the writers.
But it could be done.

Here are some things that give me pause.  Remember, pandoc/citeproc-hs
works in all output formats -- citeproc-hs renders citations and
bibliography entries not directly to HTML but to an intermediate
Pandoc format that can be converted to anything.  This is a big
advantage over something like bibtex, which only directly targets
one format.

What this means, though, is that if citeproc-hs were to render each
citation as a link to the corresponding bibliography entry, it would
be rendered as a link in every output format (not just HTML).  I
think that would be undesirable in some output formats, e.g. man pages,
where links are rendered as parenthesized URLs.

Ideally, it should be specifiable in the CSL style whether links are
to be treated as hyperlinks.  But this would requiring bringing
citeproc people into the discussion.

As for your suggestion that the title be a link to the URL, if a URL
is provided:  I don't think it would be good to do this by default, as
some might not want it.  It again seems to me to be something a CSL
style should be capable of specifying.

My suggestion, then, is to see what Bruce D'Arcus and other citeproc
developers think about adding options to CSL for hyperlinks (both to
the bibliography and to an external URL if one is provided).  If it
is just not going to happen with CSL, we could explore adding something
in pandoc, though I have reservations as suggested above.  But it would
make far more sense to put this feature into citeproc.

John

+++ Mark Reid [Apr 01 13 02:30 ]:
>    Hi,
> 
>    I'd like to add my voice to the chorus asking for some more flexibility
>    in the way pandoc renders citations.
> 
>    The use case I have in mind involves taking the following Markdown
>    text:
> 
>    As shown in [@Smith:2013] ...
> 
>    ## References
> 
>    with the following BibTeX file:
> 
>    @article{Smith:2013,
> 
>        Author = {Smith, J.},
> 
>        Title = {An Example},
> 
>        Year = {2013},
> 
>        Url = {http://example.org}
> 
>    }
> 
>    and turning it into something like this:
> 
>    <p>As shown in <a href="#cite-smith-2013">(Smith, 2013)</a> ...</p>
> 
>    <h2>References</h2>
> 
>    <div id="references">
> 
>    <p class="reference">Smith, J., <em><a href="http://example.org">An
>    Example</a></em>, 2013</p>
> 
>    </div>
> 
>    The things to note here are:
> 
>    1. There are links to navigate from a reference to the associated
>    citation.
> 
>    2. The title of the article is a link to the value of the Url field in
>    the BibTeX.
> 
>    3. The citations all have a "reference" class and are surrounded in a
>    div with a "references" id.
> 
>    I've only looked into using pandoc's citation capabilities briefly so
>    maybe I am using the wrong tool for this job but I'd really like a
>    system that uses pandoc's citation markup in markdown that generates
>    more HTML-friendly bibliographies.
> 
>    From what I currently understand of CSL it appears that it is not
>    possible to do what I am after by defining a new CSL style so I guess
>    support for the above would have to be implemented through pandoc
>    itself. If any one has any pointers one where to start looking in the
>    pandoc codebase to do this sort of thing it would be much appreciated.
>    Alternatively, if you know of any other workarounds or approaches I'd
>    love to hear them
> 
>    Thanks,
> 
>    Mark.
> 
> 
> 
>    On Thursday, March 21, 2013 7:01:29 AM UTC+11, arossato wrote:
> 
>      John MacFarlane <[1]fiddlo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>      > +++ andrea rossato [Mar 19 13 10:38 ]:
>      >> Greg <[2]ewal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>      >>
>      >> > Indeed, it helps.
>      >> >
>      >> > There is still not a link from the citation to the
>      bibliography, but it's not a deal breaker.
>      >>
>      >> no, indeed. we had some discussion about adding this feature but
>      it
>      >> would probably require some support by the Pandoc data structure
>      which
>      >> is presently missing.
>      >
>      > What would be required in pandoc to make this possible?
>      while I can generate a link with a citation, it is not possible to
>      create an anchor in the related reference in the bibliography.
>      (there are also issues related to citation collapsing, obviously: we
>      should decide how to deal with them)
>      Andrea
> 
>    --
>    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
>    [3]https://groups.google.com/d/msg/pandoc-discuss/-/UXa87xdey34J.
>    For more options, visit [4]https://groups.google.com/groups/opt_out.
> 
> References
> 
>    1. javascript:/
>    2. javascript:/
>    3. https://groups.google.com/d/msg/pandoc-discuss/-/UXa87xdey34J
>    4. https://groups.google.com/groups/opt_out


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

* Re: Citations in HTML output
       [not found]                             ` <20130401164720.GA15068-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
@ 2013-04-05  0:19                               ` Mark Reid
       [not found]                                 ` <29e5f88e-ccf7-4760-b810-58c64a41e607-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2013-04-06 18:03                               ` Bruce D'Arcus
  1 sibling, 1 reply; 24+ messages in thread
From: Mark Reid @ 2013-04-05  0:19 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 6992 bytes --]

Hi John,

I will see whether there is any simpler, less general way to achieve to 
result I am after. If I can't I'll try to become more familiar with 
citeproc-hs and CSL before asking those groups about a possible extension 
along the lines of what you suggested.

Thanks for your help.

Regards,

Mark

On Tuesday, April 2, 2013 3:47:20 AM UTC+11, fiddlosopher wrote:
>
> To get links from citations to bibliography entries, changes 
> would be needed in both pandoc and citeproc-hs.  Pandoc would have 
> to provide an Anchor inline element, and citeproc-hs could then insert 
> anchors into the bibliography and render all citations as links to 
> the corresponding anchors. 
>
> This is not a small change, because it involves a change to one 
> of Pandoc's fundamental types, and hence changes to all the writers. 
> But it could be done. 
>
> Here are some things that give me pause.  Remember, pandoc/citeproc-hs 
> works in all output formats -- citeproc-hs renders citations and 
> bibliography entries not directly to HTML but to an intermediate 
> Pandoc format that can be converted to anything.  This is a big 
> advantage over something like bibtex, which only directly targets 
> one format. 
>
> What this means, though, is that if citeproc-hs were to render each 
> citation as a link to the corresponding bibliography entry, it would 
> be rendered as a link in every output format (not just HTML).  I 
> think that would be undesirable in some output formats, e.g. man pages, 
> where links are rendered as parenthesized URLs. 
>
> Ideally, it should be specifiable in the CSL style whether links are 
> to be treated as hyperlinks.  But this would requiring bringing 
> citeproc people into the discussion. 
>
> As for your suggestion that the title be a link to the URL, if a URL 
> is provided:  I don't think it would be good to do this by default, as 
> some might not want it.  It again seems to me to be something a CSL 
> style should be capable of specifying. 
>
> My suggestion, then, is to see what Bruce D'Arcus and other citeproc 
> developers think about adding options to CSL for hyperlinks (both to 
> the bibliography and to an external URL if one is provided).  If it 
> is just not going to happen with CSL, we could explore adding something 
> in pandoc, though I have reservations as suggested above.  But it would 
> make far more sense to put this feature into citeproc. 
>
> John 
>
> +++ Mark Reid [Apr 01 13 02:30 ]: 
> >    Hi, 
> > 
> >    I'd like to add my voice to the chorus asking for some more 
> flexibility 
> >    in the way pandoc renders citations. 
> > 
> >    The use case I have in mind involves taking the following Markdown 
> >    text: 
> > 
> >    As shown in [@Smith:2013] ... 
> > 
> >    ## References 
> > 
> >    with the following BibTeX file: 
> > 
> >    @article{Smith:2013, 
> > 
> >        Author = {Smith, J.}, 
> > 
> >        Title = {An Example}, 
> > 
> >        Year = {2013}, 
> > 
> >        Url = {http://example.org} 
> > 
> >    } 
> > 
> >    and turning it into something like this: 
> > 
> >    <p>As shown in <a href="#cite-smith-2013">(Smith, 2013)</a> ...</p> 
> > 
> >    <h2>References</h2> 
> > 
> >    <div id="references"> 
> > 
> >    <p class="reference">Smith, J., <em><a href="http://example.org">An 
> >    Example</a></em>, 2013</p> 
> > 
> >    </div> 
> > 
> >    The things to note here are: 
> > 
> >    1. There are links to navigate from a reference to the associated 
> >    citation. 
> > 
> >    2. The title of the article is a link to the value of the Url field 
> in 
> >    the BibTeX. 
> > 
> >    3. The citations all have a "reference" class and are surrounded in a 
> >    div with a "references" id. 
> > 
> >    I've only looked into using pandoc's citation capabilities briefly so 
> >    maybe I am using the wrong tool for this job but I'd really like a 
> >    system that uses pandoc's citation markup in markdown that generates 
> >    more HTML-friendly bibliographies. 
> > 
> >    From what I currently understand of CSL it appears that it is not 
> >    possible to do what I am after by defining a new CSL style so I guess 
> >    support for the above would have to be implemented through pandoc 
> >    itself. If any one has any pointers one where to start looking in the 
> >    pandoc codebase to do this sort of thing it would be much 
> appreciated. 
> >    Alternatively, if you know of any other workarounds or approaches I'd 
> >    love to hear them 
> > 
> >    Thanks, 
> > 
> >    Mark. 
> > 
> > 
> > 
> >    On Thursday, March 21, 2013 7:01:29 AM UTC+11, arossato wrote: 
> > 
> >      John MacFarlane <[1]fiddlo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: 
> >      > +++ andrea rossato [Mar 19 13 10:38 ]: 
> >      >> Greg <[2]ewal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: 
> >      >> 
> >      >> > Indeed, it helps. 
> >      >> > 
> >      >> > There is still not a link from the citation to the 
> >      bibliography, but it's not a deal breaker. 
> >      >> 
> >      >> no, indeed. we had some discussion about adding this feature but 
> >      it 
> >      >> would probably require some support by the Pandoc data structure 
> >      which 
> >      >> is presently missing. 
> >      > 
> >      > What would be required in pandoc to make this possible? 
> >      while I can generate a link with a citation, it is not possible to 
> >      create an anchor in the related reference in the bibliography. 
> >      (there are also issues related to citation collapsing, obviously: 
> we 
> >      should decide how to deal with them) 
> >      Andrea 
> > 
> >    -- 
> >    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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >    To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<javascript:>. 
>
> >    To view this discussion on the web visit 
> >    [3]https://groups.google.com/d/msg/pandoc-discuss/-/UXa87xdey34J. 
> >    For more options, visit [4]https://groups.google.com/groups/opt_out. 
> > 
> > References 
> > 
> >    1. javascript:/ 
> >    2. javascript:/ 
> >    3. https://groups.google.com/d/msg/pandoc-discuss/-/UXa87xdey34J 
> >    4. https://groups.google.com/groups/opt_out 
>

-- 
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/msg/pandoc-discuss/-/ySRRVpeGy8wJ.
For more options, visit https://groups.google.com/groups/opt_out.



[-- Attachment #2: Type: text/html, Size: 9784 bytes --]

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

* Re: Citations in HTML output
       [not found]                             ` <20130401164720.GA15068-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
  2013-04-05  0:19                               ` Mark Reid
@ 2013-04-06 18:03                               ` Bruce D'Arcus
  1 sibling, 0 replies; 24+ messages in thread
From: Bruce D'Arcus @ 2013-04-06 18:03 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 7860 bytes --]



On Monday, April 1, 2013 12:47:20 PM UTC-4, fiddlosopher wrote:
>
> To get links from citations to bibliography entries, changes 
> would be needed in both pandoc and citeproc-hs.  Pandoc would have 
> to provide an Anchor inline element, and citeproc-hs could then insert 
> anchors into the bibliography and render all citations as links to 
> the corresponding anchors. 
>
> This is not a small change, because it involves a change to one 
> of Pandoc's fundamental types, and hence changes to all the writers. 
> But it could be done. 
>
> Here are some things that give me pause.  Remember, pandoc/citeproc-hs 
> works in all output formats -- citeproc-hs renders citations and 
> bibliography entries not directly to HTML but to an intermediate 
> Pandoc format that can be converted to anything.  This is a big 
> advantage over something like bibtex, which only directly targets 
> one format. 
>
> What this means, though, is that if citeproc-hs were to render each 
> citation as a link to the corresponding bibliography entry, it would 
> be rendered as a link in every output format (not just HTML).  I 
> think that would be undesirable in some output formats, e.g. man pages, 
> where links are rendered as parenthesized URLs. 
>
> Ideally, it should be specifiable in the CSL style whether links are 
> to be treated as hyperlinks.  But this would requiring bringing 
> citeproc people into the discussion. 
>
> As for your suggestion that the title be a link to the URL, if a URL 
> is provided:  I don't think it would be good to do this by default, as 
> some might not want it.  It again seems to me to be something a CSL 
> style should be capable of specifying. 
>
> My suggestion, then, is to see what Bruce D'Arcus and other citeproc 
> developers think about adding options to CSL for hyperlinks (both to 
> the bibliography and to an external URL if one is provided).  If it 
> is just not going to happen with CSL, we could explore adding something 
> in pandoc, though I have reservations as suggested above.  But it would 
> make far more sense to put this feature into citeproc. 
>

From a CSL perspective, we have considered these questions out of scope for 
the spec; or at least we've wanted to get some implementation experience 
before reconsidering them.

I will just focus on HTML here.

I think you need to consider two primary use cases, and an ascending level 
of implementation complexity:

1) the most basic is just navigation and/or enhanced display. If I have a 
citation marker in a document, it can be nice to be able to click (or, with 
JS, hover over) a citation link and to access the full citation information 
for the source, and then from there to be able to navigate to electronic 
copies (with, say, doi or URL links). The simple HTML additions needed to 
support this would also have other benefit (like providing anchors for 
enhanced CSS styling). Right now, the output of citeproc-hs can't support 
this.

2) the more complex case is what you see in RDFa and microdata: where you 
mark up your output in such a structured way that it can be trivially 
extracted as structured data. This is probably hard to do (depending on how 
citeproc-hs is coded), and not worth the effort at the moment, given other 
priorities.

Bruce
 

> John 
>
> +++ Mark Reid [Apr 01 13 02:30 ]: 
> >    Hi, 
> > 
> >    I'd like to add my voice to the chorus asking for some more 
> flexibility 
> >    in the way pandoc renders citations. 
> > 
> >    The use case I have in mind involves taking the following Markdown 
> >    text: 
> > 
> >    As shown in [@Smith:2013] ... 
> > 
> >    ## References 
> > 
> >    with the following BibTeX file: 
> > 
> >    @article{Smith:2013, 
> > 
> >        Author = {Smith, J.}, 
> > 
> >        Title = {An Example}, 
> > 
> >        Year = {2013}, 
> > 
> >        Url = {http://example.org} 
> > 
> >    } 
> > 
> >    and turning it into something like this: 
> > 
> >    <p>As shown in <a href="#cite-smith-2013">(Smith, 2013)</a> ...</p> 
> > 
> >    <h2>References</h2> 
> > 
> >    <div id="references"> 
> > 
> >    <p class="reference">Smith, J., <em><a href="http://example.org">An 
> >    Example</a></em>, 2013</p> 
> > 
> >    </div> 
> > 
> >    The things to note here are: 
> > 
> >    1. There are links to navigate from a reference to the associated 
> >    citation. 
> > 
> >    2. The title of the article is a link to the value of the Url field 
> in 
> >    the BibTeX. 
> > 
> >    3. The citations all have a "reference" class and are surrounded in a 
> >    div with a "references" id. 
> > 
> >    I've only looked into using pandoc's citation capabilities briefly so 
> >    maybe I am using the wrong tool for this job but I'd really like a 
> >    system that uses pandoc's citation markup in markdown that generates 
> >    more HTML-friendly bibliographies. 
> > 
> >    From what I currently understand of CSL it appears that it is not 
> >    possible to do what I am after by defining a new CSL style so I guess 
> >    support for the above would have to be implemented through pandoc 
> >    itself. If any one has any pointers one where to start looking in the 
> >    pandoc codebase to do this sort of thing it would be much 
> appreciated. 
> >    Alternatively, if you know of any other workarounds or approaches I'd 
> >    love to hear them 
> > 
> >    Thanks, 
> > 
> >    Mark. 
> > 
> > 
> > 
> >    On Thursday, March 21, 2013 7:01:29 AM UTC+11, arossato wrote: 
> > 
> >      John MacFarlane <[1]fiddlo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: 
> >      > +++ andrea rossato [Mar 19 13 10:38 ]: 
> >      >> Greg <[2]ewal...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: 
> >      >> 
> >      >> > Indeed, it helps. 
> >      >> > 
> >      >> > There is still not a link from the citation to the 
> >      bibliography, but it's not a deal breaker. 
> >      >> 
> >      >> no, indeed. we had some discussion about adding this feature but 
> >      it 
> >      >> would probably require some support by the Pandoc data structure 
> >      which 
> >      >> is presently missing. 
> >      > 
> >      > What would be required in pandoc to make this possible? 
> >      while I can generate a link with a citation, it is not possible to 
> >      create an anchor in the related reference in the bibliography. 
> >      (there are also issues related to citation collapsing, obviously: 
> we 
> >      should decide how to deal with them) 
> >      Andrea 
> > 
> >    -- 
> >    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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >    To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<javascript:>. 
>
> >    To view this discussion on the web visit 
> >    [3]https://groups.google.com/d/msg/pandoc-discuss/-/UXa87xdey34J. 
> >    For more options, visit [4]https://groups.google.com/groups/opt_out. 
> > 
> > References 
> > 
> >    1. javascript:/ 
> >    2. javascript:/ 
> >    3. https://groups.google.com/d/msg/pandoc-discuss/-/UXa87xdey34J 
> >    4. https://groups.google.com/groups/opt_out 
>

-- 
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/msg/pandoc-discuss/-/n9NTnDXNckMJ.
For more options, visit https://groups.google.com/groups/opt_out.



[-- Attachment #2: Type: text/html, Size: 10836 bytes --]

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

* Re: Citations in HTML output
       [not found]                                 ` <29e5f88e-ccf7-4760-b810-58c64a41e607-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2013-06-03 20:06                                   ` Makaken Affe
       [not found]                                     ` <3861e392-a02f-4a48-aeca-5c3f9219392d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Makaken Affe @ 2013-06-03 20:06 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1734 bytes --]

Mark Reid wrote:

I will see whether there is any simpler, less general way to achieve to 
> result I am after. If I can't I'll try to become more familiar with 
> citeproc-hs and CSL before asking those groups about a possible extension 
> along the lines of what you suggested.
>

This feature has been asked before and before, so one should at least 
provide guidelines for hacks. The HTML5 output format at least contains the 
citation ID in the `data-cites` attribute, which can be converted to a link 
with some JavaScript or HTML postprocessing (easy for single citations, 
more complex if multiple documents are cited together). The references 
list, however does not contain this identifiers, so one must use heuristics 
to get the right link target.

How about this dirty hack:

1. Create primary HTML5 output
2. Parse citation-ids from data-cites attributes
3. For each citation-id, e.g. @Foo2013 
3.1. create a temporary markdown document that only contains [@Foo2013]
3.2. convert to HTML5 to get the reference
3.3. look for the same reference in the primary output
3.4. add a link target in this line, e.g. id="ref-Foo2013"

Jakob

-- 
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/3861e392-a02f-4a48-aeca-5c3f9219392d%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.



[-- Attachment #2: Type: text/html, Size: 2190 bytes --]

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

* Re: Citations in HTML output
       [not found]                                     ` <3861e392-a02f-4a48-aeca-5c3f9219392d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-09-15 15:49                                       ` mb21
       [not found]                                         ` <e620c845-f47b-4431-a44a-be15055566ac-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: mb21 @ 2014-09-15 15:49 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2325 bytes --]

Is it at least feasible for citeproc-hs to include the citation-id so that 
pandoc-citeproc could use that (with a prefix to avoid conflicts) as an id 
in the rendered bibliography? If we could get that, I think the need for a 
generic solution would be greatly reduces since it would be relatively 
straight-forward to run some JavaScript to convert the `data-cites` 
attributes to proper links—at least for the simpler use case of one 
citation.

On Monday, June 3, 2013 10:06:36 PM UTC+2, Makaken Affe wrote:
>
> Mark Reid wrote:
>
> I will see whether there is any simpler, less general way to achieve to 
>> result I am after. If I can't I'll try to become more familiar with 
>> citeproc-hs and CSL before asking those groups about a possible extension 
>> along the lines of what you suggested.
>>
>
> This feature has been asked before and before, so one should at least 
> provide guidelines for hacks. The HTML5 output format at least contains the 
> citation ID in the `data-cites` attribute, which can be converted to a link 
> with some JavaScript or HTML postprocessing (easy for single citations, 
> more complex if multiple documents are cited together). The references 
> list, however does not contain this identifiers, so one must use heuristics 
> to get the right link target.
>
> How about this dirty hack:
>
> 1. Create primary HTML5 output
> 2. Parse citation-ids from data-cites attributes
> 3. For each citation-id, e.g. @Foo2013 
> 3.1. create a temporary markdown document that only contains [@Foo2013]
> 3.2. convert to HTML5 to get the reference
> 3.3. look for the same reference in the primary output
> 3.4. add a link target in this line, e.g. id="ref-Foo2013"
>
> Jakob
>

-- 
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/e620c845-f47b-4431-a44a-be15055566ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 3005 bytes --]

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

* Re: Citations in HTML output
       [not found]                                         ` <e620c845-f47b-4431-a44a-be15055566ac-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-09-15 17:40                                           ` John MacFarlane
       [not found]                                             ` <20140915174046.GA44459-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: John MacFarlane @ 2014-09-15 17:40 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

This feature is already there, for HTML5 output:

% pandoc -F pandoc-citeproc --biblio src/pandoc-citeproc/tests/biblio.bib -t html5   
@item1
<p><span class="citation" data-cites="item1">Doe (2005)</span></p>
<div class="references">
<p>Doe, John. 2005. <em>First Book</em>. Cambridge: Cambridge University Press.</p>
</div>


+++ mb21 [Sep 15 14 08:49 ]:
>   Is it at least feasible for citeproc-hs to include the citation-id so
>   that pandoc-citeproc could use that (with a prefix to avoid conflicts)
>   as an id in the rendered bibliography? If we could get that, I think
>   the need for a generic solution would be greatly reduces since it would
>   be relatively straight-forward to run some JavaScript to convert the
>   `data-cites` attributes to proper links—at least for the simpler use
>   case of one citation.
>   On Monday, June 3, 2013 10:06:36 PM UTC+2, Makaken Affe wrote:
>
>     Mark Reid wrote:
>
>   I will see whether there is any simpler, less general way to achieve to
>   result I am after. If I can't I'll try to become more familiar with
>   citeproc-hs and CSL before asking those groups about a possible
>   extension along the lines of what you suggested.
>
>   This feature has been asked before and before, so one should at least
>   provide guidelines for hacks. The HTML5 output format at least contains
>   the citation ID in the `data-cites` attribute, which can be converted
>   to a link with some JavaScript or HTML postprocessing (easy for single
>   citations, more complex if multiple documents are cited together). The
>   references list, however does not contain this identifiers, so one must
>   use heuristics to get the right link target.
>   How about this dirty hack:
>   1. Create primary HTML5 output
>   2. Parse citation-ids from data-cites attributes
>   3. For each citation-id, e.g. @Foo2013
>   3.1. create a temporary markdown document that only contains [@Foo2013]
>   3.2. convert to HTML5 to get the reference
>   3.3. look for the same reference in the primary output
>   3.4. add a link target in this line, e.g. id="ref-Foo2013"
>   Jakob
>
>   --
>   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/e620c845-f47b-4431-
>   a44a-be15055566ac%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/e620c845-f47b-4431-a44a-be15055566ac-/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/20140915174046.GA44459%40localhost.hsd1.ca.comcast.net.
For more options, visit https://groups.google.com/d/optout.


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

* Re: Citations in HTML output
       [not found]                                             ` <20140915174046.GA44459-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
@ 2014-09-15 17:47                                               ` mb21
       [not found]                                                 ` <53b48228-ea74-410f-af27-0dae2bc85f79-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: mb21 @ 2014-09-15 17:47 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 4285 bytes --]

Yes, it's already in the `<span class="citation" data-cites="item1">`, but 
not in the `<p>Doe, John. 2005. ...`

So if I were to write some JavaScript to create a link, I've got no easy 
target for the link.

On Monday, September 15, 2014 7:41:01 PM UTC+2, John MacFarlane wrote:
>
> This feature is already there, for HTML5 output: 
>
> % pandoc -F pandoc-citeproc --biblio src/pandoc-citeproc/tests/biblio.bib 
> -t html5   
> @item1 
> <p><span class="citation" data-cites="item1">Doe (2005)</span></p> 
> <div class="references"> 
> <p>Doe, John. 2005. <em>First Book</em>. Cambridge: Cambridge University 
> Press.</p> 
> </div> 
>
>
> +++ mb21 [Sep 15 14 08:49 ]: 
> >   Is it at least feasible for citeproc-hs to include the citation-id so 
> >   that pandoc-citeproc could use that (with a prefix to avoid conflicts) 
> >   as an id in the rendered bibliography? If we could get that, I think 
> >   the need for a generic solution would be greatly reduces since it 
> would 
> >   be relatively straight-forward to run some JavaScript to convert the 
> >   `data-cites` attributes to proper links—at least for the simpler use 
> >   case of one citation. 
> >   On Monday, June 3, 2013 10:06:36 PM UTC+2, Makaken Affe wrote: 
> > 
> >     Mark Reid wrote: 
> > 
> >   I will see whether there is any simpler, less general way to achieve 
> to 
> >   result I am after. If I can't I'll try to become more familiar with 
> >   citeproc-hs and CSL before asking those groups about a possible 
> >   extension along the lines of what you suggested. 
> > 
> >   This feature has been asked before and before, so one should at least 
> >   provide guidelines for hacks. The HTML5 output format at least 
> contains 
> >   the citation ID in the `data-cites` attribute, which can be converted 
> >   to a link with some JavaScript or HTML postprocessing (easy for single 
> >   citations, more complex if multiple documents are cited together). The 
> >   references list, however does not contain this identifiers, so one 
> must 
> >   use heuristics to get the right link target. 
> >   How about this dirty hack: 
> >   1. Create primary HTML5 output 
> >   2. Parse citation-ids from data-cites attributes 
> >   3. For each citation-id, e.g. @Foo2013 
> >   3.1. create a temporary markdown document that only contains 
> [@Foo2013] 
> >   3.2. convert to HTML5 to get the reference 
> >   3.3. look for the same reference in the primary output 
> >   3.4. add a link target in this line, e.g. id="ref-Foo2013" 
> >   Jakob 
> > 
> >   -- 
> >   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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >   To post to this group, send email to 
> >   [2]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >   To view this discussion on the web visit 
> >   [3]
> https://groups.google.com/d/msgid/pandoc-discuss/e620c845-f47b-4431- 
> >   a44a-be15055566ac%40googlegroups.com. 
> >   For more options, visit [4]https://groups.google.com/d/optout. 
> > 
> >References 
> > 
> >   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >   2. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >   3. 
> https://groups.google.com/d/msgid/pandoc-discuss/e620c845-f47b-4431-a44a-be15055566ac-/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/53b48228-ea74-410f-af27-0dae2bc85f79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 7670 bytes --]

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

* Re: Citations in HTML output
       [not found]                                                 ` <53b48228-ea74-410f-af27-0dae2bc85f79-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-09-15 21:48                                                   ` John MacFarlane
       [not found]                                                     ` <20140915214837.GC53488-0VdLhd/A9Pm0ooXD8Eul3Qm2TlMLinAZTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: John MacFarlane @ 2014-09-15 21:48 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I see.  This would require changes in pandoc-citeproc as well.

+++ mb21 [Sep 15 14 10:47 ]:
>Yes, it's already in the `<span class="citation" data-cites="item1">`, but
>not in the `<p>Doe, John. 2005. ...`
>
>So if I were to write some JavaScript to create a link, I've got no easy
>target for the link.
>
>On Monday, September 15, 2014 7:41:01 PM UTC+2, John MacFarlane wrote:
>>
>> This feature is already there, for HTML5 output:
>>
>> % pandoc -F pandoc-citeproc --biblio src/pandoc-citeproc/tests/biblio.bib
>> -t html5
>> @item1
>> <p><span class="citation" data-cites="item1">Doe (2005)</span></p>
>> <div class="references">
>> <p>Doe, John. 2005. <em>First Book</em>. Cambridge: Cambridge University
>> Press.</p>
>> </div>
>>
>>
>> +++ mb21 [Sep 15 14 08:49 ]:
>> >   Is it at least feasible for citeproc-hs to include the citation-id so
>> >   that pandoc-citeproc could use that (with a prefix to avoid conflicts)
>> >   as an id in the rendered bibliography? If we could get that, I think
>> >   the need for a generic solution would be greatly reduces since it
>> would
>> >   be relatively straight-forward to run some JavaScript to convert the
>> >   `data-cites` attributes to proper links—at least for the simpler use
>> >   case of one citation.
>> >   On Monday, June 3, 2013 10:06:36 PM UTC+2, Makaken Affe wrote:
>> >
>> >     Mark Reid wrote:
>> >
>> >   I will see whether there is any simpler, less general way to achieve
>> to
>> >   result I am after. If I can't I'll try to become more familiar with
>> >   citeproc-hs and CSL before asking those groups about a possible
>> >   extension along the lines of what you suggested.
>> >
>> >   This feature has been asked before and before, so one should at least
>> >   provide guidelines for hacks. The HTML5 output format at least
>> contains
>> >   the citation ID in the `data-cites` attribute, which can be converted
>> >   to a link with some JavaScript or HTML postprocessing (easy for single
>> >   citations, more complex if multiple documents are cited together). The
>> >   references list, however does not contain this identifiers, so one
>> must
>> >   use heuristics to get the right link target.
>> >   How about this dirty hack:
>> >   1. Create primary HTML5 output
>> >   2. Parse citation-ids from data-cites attributes
>> >   3. For each citation-id, e.g. @Foo2013
>> >   3.1. create a temporary markdown document that only contains
>> [@Foo2013]
>> >   3.2. convert to HTML5 to get the reference
>> >   3.3. look for the same reference in the primary output
>> >   3.4. add a link target in this line, e.g. id="ref-Foo2013"
>> >   Jakob
>> >
>> >   --
>> >   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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>> >   To post to this group, send email to
>> >   [2]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>> >   To view this discussion on the web visit
>> >   [3]
>> https://groups.google.com/d/msgid/pandoc-discuss/e620c845-f47b-4431-
>> >   a44a-be15055566ac%40googlegroups.com.
>> >   For more options, visit [4]https://groups.google.com/d/optout.
>> >
>> >References
>> >
>> >   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>
>> >   2. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>
>> >   3.
>> https://groups.google.com/d/msgid/pandoc-discuss/e620c845-f47b-4431-a44a-be15055566ac-/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/53b48228-ea74-410f-af27-0dae2bc85f79%40googlegroups.com.
>For more options, visit 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/20140915214837.GC53488%40dhcp-128-32-252-51.lips.berkeley.edu.
For more options, visit https://groups.google.com/d/optout.


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

* Re: Citations in HTML output
       [not found]                                                     ` <20140915214837.GC53488-0VdLhd/A9Pm0ooXD8Eul3Qm2TlMLinAZTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
@ 2014-09-16 12:24                                                       ` mb21
       [not found]                                                         ` <8fa35efa-7be2-4af6-b5ef-c2998d467741-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: mb21 @ 2014-09-16 12:24 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 5482 bytes --]

Yes, would it be hard to do? Maybe I could take a look at it...

On Monday, September 15, 2014 11:48:23 PM UTC+2, John MacFarlane wrote:
>
> I see.  This would require changes in pandoc-citeproc as well. 
>
> +++ mb21 [Sep 15 14 10:47 ]: 
> >Yes, it's already in the `<span class="citation" data-cites="item1">`, 
> but 
> >not in the `<p>Doe, John. 2005. ...` 
> > 
> >So if I were to write some JavaScript to create a link, I've got no easy 
> >target for the link. 
> > 
> >On Monday, September 15, 2014 7:41:01 PM UTC+2, John MacFarlane wrote: 
> >> 
> >> This feature is already there, for HTML5 output: 
> >> 
> >> % pandoc -F pandoc-citeproc --biblio 
> src/pandoc-citeproc/tests/biblio.bib 
> >> -t html5 
> >> @item1 
> >> <p><span class="citation" data-cites="item1">Doe (2005)</span></p> 
> >> <div class="references"> 
> >> <p>Doe, John. 2005. <em>First Book</em>. Cambridge: Cambridge 
> University 
> >> Press.</p> 
> >> </div> 
> >> 
> >> 
> >> +++ mb21 [Sep 15 14 08:49 ]: 
> >> >   Is it at least feasible for citeproc-hs to include the citation-id 
> so 
> >> >   that pandoc-citeproc could use that (with a prefix to avoid 
> conflicts) 
> >> >   as an id in the rendered bibliography? If we could get that, I 
> think 
> >> >   the need for a generic solution would be greatly reduces since it 
> >> would 
> >> >   be relatively straight-forward to run some JavaScript to convert 
> the 
> >> >   `data-cites` attributes to proper links—at least for the simpler 
> use 
> >> >   case of one citation. 
> >> >   On Monday, June 3, 2013 10:06:36 PM UTC+2, Makaken Affe wrote: 
> >> > 
> >> >     Mark Reid wrote: 
> >> > 
> >> >   I will see whether there is any simpler, less general way to 
> achieve 
> >> to 
> >> >   result I am after. If I can't I'll try to become more familiar with 
> >> >   citeproc-hs and CSL before asking those groups about a possible 
> >> >   extension along the lines of what you suggested. 
> >> > 
> >> >   This feature has been asked before and before, so one should at 
> least 
> >> >   provide guidelines for hacks. The HTML5 output format at least 
> >> contains 
> >> >   the citation ID in the `data-cites` attribute, which can be 
> converted 
> >> >   to a link with some JavaScript or HTML postprocessing (easy for 
> single 
> >> >   citations, more complex if multiple documents are cited together). 
> The 
> >> >   references list, however does not contain this identifiers, so one 
> >> must 
> >> >   use heuristics to get the right link target. 
> >> >   How about this dirty hack: 
> >> >   1. Create primary HTML5 output 
> >> >   2. Parse citation-ids from data-cites attributes 
> >> >   3. For each citation-id, e.g. @Foo2013 
> >> >   3.1. create a temporary markdown document that only contains 
> >> [@Foo2013] 
> >> >   3.2. convert to HTML5 to get the reference 
> >> >   3.3. look for the same reference in the primary output 
> >> >   3.4. add a link target in this line, e.g. id="ref-Foo2013" 
> >> >   Jakob 
> >> > 
> >> >   -- 
> >> >   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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >> >   To post to this group, send email to 
> >> >   [2]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >> >   To view this discussion on the web visit 
> >> >   [3] 
> >> https://groups.google.com/d/msgid/pandoc-discuss/e620c845-f47b-4431- 
> >> >   a44a-be15055566ac%40googlegroups.com. 
> >> >   For more options, visit [4]https://groups.google.com/d/optout. 
> >> > 
> >> >References 
> >> > 
> >> >   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> <javascript:> 
> >> >   2. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >> >   3. 
> >> 
> https://groups.google.com/d/msgid/pandoc-discuss/e620c845-f47b-4431-a44a-be15055566ac-/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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <javascript:>. 
> >To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/53b48228-ea74-410f-af27-0dae2bc85f79%40googlegroups.com. 
>
> >For more options, visit 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/8fa35efa-7be2-4af6-b5ef-c2998d467741%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 9818 bytes --]

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

* Re: Citations in HTML output
       [not found]                                                         ` <8fa35efa-7be2-4af6-b5ef-c2998d467741-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-09-16 17:30                                                           ` John MacFarlane
       [not found]                                                             ` <20140916173039.GB24079-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: John MacFarlane @ 2014-09-16 17:30 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

One possibility would be to have pandoc-citeproc wrap each
bibliography entry in a pandoc Div element with the
relevant attribute (and perhaps also an id attribute).
I'd have to look at the code to see how hard this would be.

Having these Divs might also allow us to support things like
hanging indents, which are specified in the styles but
currently unsupported.



+++ mb21 [Sep 16 14 05:24 ]:
>   Yes, would it be hard to do? Maybe I could take a look at it...
>   On Monday, September 15, 2014 11:48:23 PM UTC+2, John MacFarlane wrote:
>
>     I see.  This would require changes in pandoc-citeproc as well.
>     +++ mb21 [Sep 15 14 10:47 ]:
>     >Yes, it's already in the `<span class="citation"
>     data-cites="item1">`, but
>     >not in the `<p>Doe, John. 2005. ...`
>     >
>     >So if I were to write some JavaScript to create a link, I've got no
>     easy
>     >target for the link.
>     >
>     >On Monday, September 15, 2014 7:41:01 PM UTC+2, John MacFarlane
>     wrote:
>     >>
>     >> This feature is already there, for HTML5 output:
>     >>
>     >> % pandoc -F pandoc-citeproc --biblio src/pandoc-citeproc/tests/
>     biblio.bib
>     >> -t html5
>     >> @item1
>     >> <p><span class="citation" data-cites="item1">Doe
>     (2005)</span></p>
>     >> <div class="references">
>     >> <p>Doe, John. 2005. <em>First Book</em>. Cambridge: Cambridge
>     University
>     >> Press.</p>
>     >> </div>
>     >>
>     >>
>     >> +++ mb21 [Sep 15 14 08:49 ]:
>     >> >   Is it at least feasible for citeproc-hs to include the
>     citation-id so
>     >> >   that pandoc-citeproc could use that (with a prefix to avoid
>     conflicts)
>     >> >   as an id in the rendered bibliography? If we could get that,
>     I think
>     >> >   the need for a generic solution would be greatly reduces
>     since it
>     >> would
>     >> >   be relatively straight-forward to run some JavaScript to
>     convert the
>     >> >   `data-cites` attributes to proper links—at least for the
>     simpler use
>     >> >   case of one citation.
>     >> >   On Monday, June 3, 2013 10:06:36 PM UTC+2, Makaken Affe
>     wrote:
>     >> >
>     >> >     Mark Reid wrote:
>     >> >
>     >> >   I will see whether there is any simpler, less general way to
>     achieve
>     >> to
>     >> >   result I am after. If I can't I'll try to become more
>     familiar with
>     >> >   citeproc-hs and CSL before asking those groups about a
>     possible
>     >> >   extension along the lines of what you suggested.
>     >> >
>     >> >   This feature has been asked before and before, so one should
>     at least
>     >> >   provide guidelines for hacks. The HTML5 output format at
>     least
>     >> contains
>     >> >   the citation ID in the `data-cites` attribute, which can be
>     converted
>     >> >   to a link with some JavaScript or HTML postprocessing (easy
>     for single
>     >> >   citations, more complex if multiple documents are cited
>     together). The
>     >> >   references list, however does not contain this identifiers,
>     so one
>     >> must
>     >> >   use heuristics to get the right link target.
>     >> >   How about this dirty hack:
>     >> >   1. Create primary HTML5 output
>     >> >   2. Parse citation-ids from data-cites attributes
>     >> >   3. For each citation-id, e.g. @Foo2013
>     >> >   3.1. create a temporary markdown document that only contains
>     >> [@Foo2013]
>     >> >   3.2. convert to HTML5 to get the reference
>     >> >   3.3. look for the same reference in the primary output
>     >> >   3.4. add a link target in this line, e.g. id="ref-Foo2013"
>     >> >   Jakob
>     >> >
>     >> >   --
>     >> >   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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     <javascript:>.
>     >> >   To post to this group, send email to
>     >> >   [2]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>     >> >   To view this discussion on the web visit
>     >> >   [3]
>     >> [1]https://groups.google.com/d/msgid/pandoc-discuss/e620c845-
>     f47b-4431-
>     >> >   a44a-be15055566ac%[2]40googlegroups.com.
>     >> >   For more options, visit [4][3]https://groups.google.com/
>     d/optout.
>     >> >
>     >> >References
>     >> >
>     >> >   1. mailto:[4]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     <javascript:>
>     >> >   2. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>
>     >> >   3.
>     >> [5]https://groups.google.com/d/msgid/pandoc-discuss/e620c845-
>     f47b-4431-a44a-be15055566ac-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=
>     email&utm_source=footer
>     >> >   4. [6]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 [7]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     >To post to this group, send email to [8]pandoc-...@googlegroups.
>     com.
>     >To view this discussion on the web visit
>     [9]https://groups.google.com/d/msgid/pandoc-discuss/53b48228-
>     ea74-410f-af27-0dae2bc85f79%40googlegroups.com.
>     >For more options, visit [10]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 [11]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [12]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [13]https://groups.google.com/d/msgid/pandoc-discuss/8fa35efa-7be2-4af6
>   -b5ef-c2998d467741%40googlegroups.com.
>   For more options, visit [14]https://groups.google.com/d/optout.
>
>References
>
>   1. https://groups.google.com/d/msgid/pandoc-discuss/e620c845-f47b-4431-
>   2. http://40googlegroups.com/
>   3. https://groups.google.com/d/optout
>   4. javascript:/
>   5. https://groups.google.com/d/msgid/pandoc-discuss/e620c845-f47b-4431-a44a-be15055566ac-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   6. https://groups.google.com/d/optout
>   7. javascript:/
>   8. javascript:/
>   9. https://groups.google.com/d/msgid/pandoc-discuss/53b48228-ea74-410f-af27-0dae2bc85f79%40googlegroups.com
>  10. https://groups.google.com/d/optout
>  11. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>  12. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>  13. https://groups.google.com/d/msgid/pandoc-discuss/8fa35efa-7be2-4af6-b5ef-c2998d467741%40googlegroups.com?utm_medium=email&utm_source=footer
>  14. 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/20140916173039.GB24079%40berkeley.edu.
For more options, visit https://groups.google.com/d/optout.


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

* Re: Citations in HTML output
       [not found]                                                             ` <20140916173039.GB24079-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
@ 2014-09-19 13:21                                                               ` mb21
       [not found]                                                                 ` <c6c61954-3f12-4697-8795-b7897b2b3338-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: mb21 @ 2014-09-19 13:21 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 8621 bytes --]

okay, I got it working: https://github.com/jgm/pandoc-citeproc/pull/83

On Tuesday, September 16, 2014 7:30:53 PM UTC+2, John MacFarlane wrote:
>
> One possibility would be to have pandoc-citeproc wrap each 
> bibliography entry in a pandoc Div element with the 
> relevant attribute (and perhaps also an id attribute). 
> I'd have to look at the code to see how hard this would be. 
>
> Having these Divs might also allow us to support things like 
> hanging indents, which are specified in the styles but 
> currently unsupported. 
>
>
>
> +++ mb21 [Sep 16 14 05:24 ]: 
> >   Yes, would it be hard to do? Maybe I could take a look at it... 
> >   On Monday, September 15, 2014 11:48:23 PM UTC+2, John MacFarlane 
> wrote: 
> > 
> >     I see.  This would require changes in pandoc-citeproc as well. 
> >     +++ mb21 [Sep 15 14 10:47 ]: 
> >     >Yes, it's already in the `<span class="citation" 
> >     data-cites="item1">`, but 
> >     >not in the `<p>Doe, John. 2005. ...` 
> >     > 
> >     >So if I were to write some JavaScript to create a link, I've got no 
> >     easy 
> >     >target for the link. 
> >     > 
> >     >On Monday, September 15, 2014 7:41:01 PM UTC+2, John MacFarlane 
> >     wrote: 
> >     >> 
> >     >> This feature is already there, for HTML5 output: 
> >     >> 
> >     >> % pandoc -F pandoc-citeproc --biblio src/pandoc-citeproc/tests/ 
> >     biblio.bib 
> >     >> -t html5 
> >     >> @item1 
> >     >> <p><span class="citation" data-cites="item1">Doe 
> >     (2005)</span></p> 
> >     >> <div class="references"> 
> >     >> <p>Doe, John. 2005. <em>First Book</em>. Cambridge: Cambridge 
> >     University 
> >     >> Press.</p> 
> >     >> </div> 
> >     >> 
> >     >> 
> >     >> +++ mb21 [Sep 15 14 08:49 ]: 
> >     >> >   Is it at least feasible for citeproc-hs to include the 
> >     citation-id so 
> >     >> >   that pandoc-citeproc could use that (with a prefix to avoid 
> >     conflicts) 
> >     >> >   as an id in the rendered bibliography? If we could get that, 
> >     I think 
> >     >> >   the need for a generic solution would be greatly reduces 
> >     since it 
> >     >> would 
> >     >> >   be relatively straight-forward to run some JavaScript to 
> >     convert the 
> >     >> >   `data-cites` attributes to proper links—at least for the 
> >     simpler use 
> >     >> >   case of one citation. 
> >     >> >   On Monday, June 3, 2013 10:06:36 PM UTC+2, Makaken Affe 
> >     wrote: 
> >     >> > 
> >     >> >     Mark Reid wrote: 
> >     >> > 
> >     >> >   I will see whether there is any simpler, less general way to 
> >     achieve 
> >     >> to 
> >     >> >   result I am after. If I can't I'll try to become more 
> >     familiar with 
> >     >> >   citeproc-hs and CSL before asking those groups about a 
> >     possible 
> >     >> >   extension along the lines of what you suggested. 
> >     >> > 
> >     >> >   This feature has been asked before and before, so one should 
> >     at least 
> >     >> >   provide guidelines for hacks. The HTML5 output format at 
> >     least 
> >     >> contains 
> >     >> >   the citation ID in the `data-cites` attribute, which can be 
> >     converted 
> >     >> >   to a link with some JavaScript or HTML postprocessing (easy 
> >     for single 
> >     >> >   citations, more complex if multiple documents are cited 
> >     together). The 
> >     >> >   references list, however does not contain this identifiers, 
> >     so one 
> >     >> must 
> >     >> >   use heuristics to get the right link target. 
> >     >> >   How about this dirty hack: 
> >     >> >   1. Create primary HTML5 output 
> >     >> >   2. Parse citation-ids from data-cites attributes 
> >     >> >   3. For each citation-id, e.g. @Foo2013 
> >     >> >   3.1. create a temporary markdown document that only contains 
> >     >> [@Foo2013] 
> >     >> >   3.2. convert to HTML5 to get the reference 
> >     >> >   3.3. look for the same reference in the primary output 
> >     >> >   3.4. add a link target in this line, e.g. id="ref-Foo2013" 
> >     >> >   Jakob 
> >     >> > 
> >     >> >   -- 
> >     >> >   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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> >     <javascript:>. 
> >     >> >   To post to this group, send email to 
> >     >> >   [2]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >     >> >   To view this discussion on the web visit 
> >     >> >   [3] 
> >     >> [1]https://groups.google.com/d/msgid/pandoc-discuss/e620c845- 
> >     f47b-4431- 
> >     >> >   a44a-be15055566ac%[2]40googlegroups.com. 
> >     >> >   For more options, visit [4][3]https://groups.google.com/ 
> >     d/optout. 
> >     >> > 
> >     >> >References 
> >     >> > 
> >     >> >   1. mailto:[4]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <javascript:> 
> >     <javascript:> 
> >     >> >   2. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >     >> >   3. 
> >     >> [5]https://groups.google.com/d/msgid/pandoc-discuss/e620c845- 
> >     f47b-4431-a44a-be15055566ac-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium= 
> >     email&utm_source=footer 
> >     >> >   4. [6]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 [7]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
> >     >To post to this group, send email to [8]pandoc-...@googlegroups. 
> >     com. 
> >     >To view this discussion on the web visit 
> >     [9]https://groups.google.com/d/msgid/pandoc-discuss/53b48228- 
> >     ea74-410f-af27-0dae2bc85f79%40googlegroups.com. 
> >     >For more options, visit [10]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 [11]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <javascript:>. 
> >   To post to this group, send email to 
> >   [12]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >   To view this discussion on the web visit 
> >   [13]
> https://groups.google.com/d/msgid/pandoc-discuss/8fa35efa-7be2-4af6 
> >   -b5ef-c2998d467741%40googlegroups.com. 
> >   For more options, visit [14]https://groups.google.com/d/optout. 
> > 
> >References 
> > 
> >   1. 
> https://groups.google.com/d/msgid/pandoc-discuss/e620c845-f47b-4431- 
> >   2. http://40googlegroups.com/ 
> >   3. https://groups.google.com/d/optout 
> >   4. javascript:/ 
> >   5. 
> https://groups.google.com/d/msgid/pandoc-discuss/e620c845-f47b-4431-a44a-be15055566ac-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer 
> >   6. https://groups.google.com/d/optout 
> >   7. javascript:/ 
> >   8. javascript:/ 
> >   9. 
> https://groups.google.com/d/msgid/pandoc-discuss/53b48228-ea74-410f-af27-0dae2bc85f79%40googlegroups.com 
> >  10. https://groups.google.com/d/optout 
> >  11. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >  12. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >  13. 
> https://groups.google.com/d/msgid/pandoc-discuss/8fa35efa-7be2-4af6-b5ef-c2998d467741%40googlegroups.com?utm_medium=email&utm_source=footer 
> >  14. 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/c6c61954-3f12-4697-8795-b7897b2b3338%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 19563 bytes --]

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

* Re: Citations in HTML output
       [not found]                                                                 ` <c6c61954-3f12-4697-8795-b7897b2b3338-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2014-09-20 11:36                                                                   ` mb21
  0 siblings, 0 replies; 24+ messages in thread
From: mb21 @ 2014-09-20 11:36 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 10037 bytes --]

I also tried to go further with this on the `bibliography-span-links` 
branches where I have pandoc-citeproc convert `OContrib` to a span with 
class ref-contributor 
(https://github.com/mb21/pandoc-citeproc/commit/841e596549447e2822ff68f045e362d6e1b0577d). 
This is then picked up by Pandoc's HTML Writer and converted to links to 
the bibliography 
(https://github.com/mb21/pandoc/commit/d5ad703054fda3ad4ed3cd6370c2d28ffb1f8cae) 
– and most other writers ignore spans anyway.

It works quite well, except in the case of multiple entries per citation 
where at least one of them doesn't contain an author. In that case there is 
no OContrib for pandoc-citeproc to pick up for that entry that doesn't have 
an author. It seems that citeproc discards the information on what part of 
the citation string belongs to which entry quite early, so I don't really 
see this issue being thoroughly resolved without major changes in citeproc.

That's why I propose to implement my changes, but putting the HTML Writer 
changes behind a flag which would be disabled by default. That way, it 
works for most use-cases, but people are aware of the limitations when they 
enable the flag.

Cheers


On Friday, September 19, 2014 3:21:43 PM UTC+2, mb21 wrote:
>
> okay, I got it working: https://github.com/jgm/pandoc-citeproc/pull/83
>
> On Tuesday, September 16, 2014 7:30:53 PM UTC+2, John MacFarlane wrote:
>>
>> One possibility would be to have pandoc-citeproc wrap each 
>> bibliography entry in a pandoc Div element with the 
>> relevant attribute (and perhaps also an id attribute). 
>> I'd have to look at the code to see how hard this would be. 
>>
>> Having these Divs might also allow us to support things like 
>> hanging indents, which are specified in the styles but 
>> currently unsupported. 
>>
>>
>>
>> +++ mb21 [Sep 16 14 05:24 ]: 
>> >   Yes, would it be hard to do? Maybe I could take a look at it... 
>> >   On Monday, September 15, 2014 11:48:23 PM UTC+2, John MacFarlane 
>> wrote: 
>> > 
>> >     I see.  This would require changes in pandoc-citeproc as well. 
>> >     +++ mb21 [Sep 15 14 10:47 ]: 
>> >     >Yes, it's already in the `<span class="citation" 
>> >     data-cites="item1">`, but 
>> >     >not in the `<p>Doe, John. 2005. ...` 
>> >     > 
>> >     >So if I were to write some JavaScript to create a link, I've got 
>> no 
>> >     easy 
>> >     >target for the link. 
>> >     > 
>> >     >On Monday, September 15, 2014 7:41:01 PM UTC+2, John MacFarlane 
>> >     wrote: 
>> >     >> 
>> >     >> This feature is already there, for HTML5 output: 
>> >     >> 
>> >     >> % pandoc -F pandoc-citeproc --biblio src/pandoc-citeproc/tests/ 
>> >     biblio.bib 
>> >     >> -t html5 
>> >     >> @item1 
>> >     >> <p><span class="citation" data-cites="item1">Doe 
>> >     (2005)</span></p> 
>> >     >> <div class="references"> 
>> >     >> <p>Doe, John. 2005. <em>First Book</em>. Cambridge: Cambridge 
>> >     University 
>> >     >> Press.</p> 
>> >     >> </div> 
>> >     >> 
>> >     >> 
>> >     >> +++ mb21 [Sep 15 14 08:49 ]: 
>> >     >> >   Is it at least feasible for citeproc-hs to include the 
>> >     citation-id so 
>> >     >> >   that pandoc-citeproc could use that (with a prefix to avoid 
>> >     conflicts) 
>> >     >> >   as an id in the rendered bibliography? If we could get that, 
>> >     I think 
>> >     >> >   the need for a generic solution would be greatly reduces 
>> >     since it 
>> >     >> would 
>> >     >> >   be relatively straight-forward to run some JavaScript to 
>> >     convert the 
>> >     >> >   `data-cites` attributes to proper links—at least for the 
>> >     simpler use 
>> >     >> >   case of one citation. 
>> >     >> >   On Monday, June 3, 2013 10:06:36 PM UTC+2, Makaken Affe 
>> >     wrote: 
>> >     >> > 
>> >     >> >     Mark Reid wrote: 
>> >     >> > 
>> >     >> >   I will see whether there is any simpler, less general way to 
>> >     achieve 
>> >     >> to 
>> >     >> >   result I am after. If I can't I'll try to become more 
>> >     familiar with 
>> >     >> >   citeproc-hs and CSL before asking those groups about a 
>> >     possible 
>> >     >> >   extension along the lines of what you suggested. 
>> >     >> > 
>> >     >> >   This feature has been asked before and before, so one should 
>> >     at least 
>> >     >> >   provide guidelines for hacks. The HTML5 output format at 
>> >     least 
>> >     >> contains 
>> >     >> >   the citation ID in the `data-cites` attribute, which can be 
>> >     converted 
>> >     >> >   to a link with some JavaScript or HTML postprocessing (easy 
>> >     for single 
>> >     >> >   citations, more complex if multiple documents are cited 
>> >     together). The 
>> >     >> >   references list, however does not contain this identifiers, 
>> >     so one 
>> >     >> must 
>> >     >> >   use heuristics to get the right link target. 
>> >     >> >   How about this dirty hack: 
>> >     >> >   1. Create primary HTML5 output 
>> >     >> >   2. Parse citation-ids from data-cites attributes 
>> >     >> >   3. For each citation-id, e.g. @Foo2013 
>> >     >> >   3.1. create a temporary markdown document that only contains 
>> >     >> [@Foo2013] 
>> >     >> >   3.2. convert to HTML5 to get the reference 
>> >     >> >   3.3. look for the same reference in the primary output 
>> >     >> >   3.4. add a link target in this line, e.g. id="ref-Foo2013" 
>> >     >> >   Jakob 
>> >     >> > 
>> >     >> >   -- 
>> >     >> >   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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
>> >     <javascript:>. 
>> >     >> >   To post to this group, send email to 
>> >     >> >   [2]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
>> >     >> >   To view this discussion on the web visit 
>> >     >> >   [3] 
>> >     >> [1]https://groups.google.com/d/msgid/pandoc-discuss/e620c845- 
>> >     f47b-4431- 
>> >     >> >   a44a-be15055566ac%[2]40googlegroups.com. 
>> >     >> >   For more options, visit [4][3]https://groups.google.com/ 
>> >     d/optout. 
>> >     >> > 
>> >     >> >References 
>> >     >> > 
>> >     >> >   1. mailto:[4]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
>> >     <javascript:> 
>> >     >> >   2. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
>> >     >> >   3. 
>> >     >> [5]https://groups.google.com/d/msgid/pandoc-discuss/e620c845- 
>> >     f47b-4431-a44a-be15055566ac-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium= 
>> >     email&utm_source=footer 
>> >     >> >   4. [6]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 [7]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
>> >     >To post to this group, send email to [8]pandoc-...@googlegroups. 
>> >     com. 
>> >     >To view this discussion on the web visit 
>> >     [9]https://groups.google.com/d/msgid/pandoc-discuss/53b48228- 
>> >     ea74-410f-af27-0dae2bc85f79%40googlegroups.com. 
>> >     >For more options, visit [10]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 [11]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
>> >   To post to this group, send email to 
>> >   [12]pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
>> >   To view this discussion on the web visit 
>> >   [13]
>> https://groups.google.com/d/msgid/pandoc-discuss/8fa35efa-7be2-4af6 
>> >   -b5ef-c2998d467741%40googlegroups.com. 
>> >   For more options, visit [14]https://groups.google.com/d/optout. 
>> > 
>> >References 
>> > 
>> >   1. 
>> https://groups.google.com/d/msgid/pandoc-discuss/e620c845-f47b-4431- 
>> >   2. http://40googlegroups.com/ 
>> >   3. https://groups.google.com/d/optout 
>> >   4. javascript:/ 
>> >   5. 
>> https://groups.google.com/d/msgid/pandoc-discuss/e620c845-f47b-4431-a44a-be15055566ac-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer 
>> >   6. https://groups.google.com/d/optout 
>> >   7. javascript:/ 
>> >   8. javascript:/ 
>> >   9. 
>> https://groups.google.com/d/msgid/pandoc-discuss/53b48228-ea74-410f-af27-0dae2bc85f79%40googlegroups.com 
>> >  10. https://groups.google.com/d/optout 
>> >  11. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
>> >  12. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
>> >  13. 
>> https://groups.google.com/d/msgid/pandoc-discuss/8fa35efa-7be2-4af6-b5ef-c2998d467741%40googlegroups.com?utm_medium=email&utm_source=footer 
>> >  14. 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/84c662f3-6de3-43eb-b8b1-5e1eee2dd56e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 20551 bytes --]

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

end of thread, other threads:[~2014-09-20 11:36 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-14 10:04 Citations in HTML output Greg
     [not found] ` <9b64588d-e855-4a67-a066-4a40e7a53c3e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2013-03-16  8:53   ` andrea rossato
     [not found]     ` <87zjy3iv3t.fsf-46C4ZU908FJ9y4XLxYaG4V6hYfS7NtTn@public.gmane.org>
2013-03-18 10:26       ` Greg
     [not found]         ` <cf934184-c5e7-4a0a-bc45-24e677fe72d5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2013-03-19  9:38           ` andrea rossato
     [not found]             ` <871ubbg269.fsf-46C4ZU908FJ9y4XLxYaG4V6hYfS7NtTn@public.gmane.org>
2013-03-19 14:07               ` John MacFarlane
     [not found]                 ` <20130319140732.GC61188-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2013-03-20 20:01                   ` andrea rossato
     [not found]                     ` <87k3p1dena.fsf-46C4ZU908FJ9y4XLxYaG4V6hYfS7NtTn@public.gmane.org>
2013-04-01  9:30                       ` Mark Reid
     [not found]                         ` <79d1d93d-c165-4508-86b1-c3e2342ea0fb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2013-04-01 16:47                           ` John MacFarlane
     [not found]                             ` <20130401164720.GA15068-nFAEphtLEs+AA6luYCgp0U1S2cYJDpTV9nwVQlTi/Pw@public.gmane.org>
2013-04-05  0:19                               ` Mark Reid
     [not found]                                 ` <29e5f88e-ccf7-4760-b810-58c64a41e607-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2013-06-03 20:06                                   ` Makaken Affe
     [not found]                                     ` <3861e392-a02f-4a48-aeca-5c3f9219392d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-09-15 15:49                                       ` mb21
     [not found]                                         ` <e620c845-f47b-4431-a44a-be15055566ac-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-09-15 17:40                                           ` John MacFarlane
     [not found]                                             ` <20140915174046.GA44459-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
2014-09-15 17:47                                               ` mb21
     [not found]                                                 ` <53b48228-ea74-410f-af27-0dae2bc85f79-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-09-15 21:48                                                   ` John MacFarlane
     [not found]                                                     ` <20140915214837.GC53488-0VdLhd/A9Pm0ooXD8Eul3Qm2TlMLinAZTVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
2014-09-16 12:24                                                       ` mb21
     [not found]                                                         ` <8fa35efa-7be2-4af6-b5ef-c2998d467741-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-09-16 17:30                                                           ` John MacFarlane
     [not found]                                                             ` <20140916173039.GB24079-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
2014-09-19 13:21                                                               ` mb21
     [not found]                                                                 ` <c6c61954-3f12-4697-8795-b7897b2b3338-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-09-20 11:36                                                                   ` mb21
2013-04-06 18:03                               ` Bruce D'Arcus
2013-03-19 11:47           ` Joseph Reagle
     [not found]             ` <5148504F.20308-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2013-03-19 16:00               ` Chris Lott
     [not found]                 ` <CAHJRaA4h9ef+A48G9H8hFAQqkaq0fhAuAPjEbb4M6txeTyDJmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-19 18:38                   ` Joseph Reagle
     [not found]                     ` <5148B097.3050307-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2013-04-01 15:54                       ` Aditya Mahajan
     [not found]                         ` <033968F3-1569-402C-A803-3387FDB3BDF1-63aXycvo3TyHXe+LvDLADg@public.gmane.org>
2013-04-01 16:13                           ` Joseph Reagle

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).