|
| 1 | +```{=html} |
1 | 2 | <div class="citation-container">
|
2 |
| -<h3 id="cite" class="pb-1 text-center">Turing.jl is an <a href="https://github.com/TuringLang/Turing.jl/blob/main/LICENCE" class="turing-license-link"><code>MIT</code></a> Licensed Open Source Project</h3> |
3 |
| -<p class="text-center">If you use Turing.jl in your research, please consider citing our papers.</p> |
4 |
| -<div class="citation-entry"> |
5 |
| -<p class="citation-text"> |
6 |
| -Fjelde, T. E., Xu, K., Widmann, D., Tarek, M., Pfiffer, C., Trapp, M., Axen, S. D., Sun, X., Hauru, M., Yong, P., Tebbutt, W., Ghahramani, Z., & Ge, H. (2025). <span class="citation-title">Turing.jl: a general-purpose probabilistic programming language.</span> <em>ACM Transactions on Probabilistic Machine Learning</em>. Just Accepted. |
7 |
| -</p> |
8 |
| -<div class="citation-actions"> |
9 |
| -<a href="https://doi.org/10.1145/3711897" target="_blank" rel="noopener noreferrer" class="button">View Paper</a> |
10 |
| -<button class="button button--primary" onclick="copyCitationBibtex('bibtex-jmlr-2025', this)">Copy BibTeX</button> |
11 |
| -</div> |
12 |
| -<pre id="bibtex-jmlr-2025" class="citation-bibtex-data"> |
13 |
| -@article{10.1145/3711897, |
14 |
| -author = {Fjelde, Tor Erlend and Xu, Kai and Widmann, David and Tarek, Mohamed and Pfiffer, Cameron and Trapp, Martin and Axen, Seth D. and Sun, Xianda and Hauru, Markus and Yong, Penelope and Tebbutt, Will and Ghahramani, Zoubin and Ge, Hong}, |
15 |
| -title = {Turing.jl: a general-purpose probabilistic programming language}, |
16 |
| -year = {2025}, |
17 |
| -publisher = {Association for Computing Machinery}, |
18 |
| -address = {New York, NY, USA}, |
19 |
| -url = {https://doi.org/10.1145/3711897}, |
20 |
| -doi = {10.1145/3711897}, |
21 |
| -note = {Just Accepted}, |
22 |
| -journal = {ACM Trans. Probab. Mach. Learn.}, |
23 |
| -month = feb |
| 3 | + <h3 id="cite" class="pb-1 text-center">Turing.jl is an <a href="https://github.com/TuringLang/Turing.jl/blob/main/LICENCE" class="turing-license-link"><code>MIT</code></a> Licensed Open Source Project</h3> |
| 4 | + <p class="text-center">If you use Turing.jl in your research, please consider citing our papers.</p> |
| 5 | + |
| 6 | + <ul class="citation-list"> |
| 7 | + <li class="citation-entry box"> |
| 8 | + <p class="citation-text"> |
| 9 | + Fjelde, T. E., Xu, K., Widmann, D., Tarek, M., Pfiffer, C., Trapp, M., Axen, S. D., Sun, X., Hauru, M., Yong, P., Tebbutt, W., Ghahramani, Z., & Ge, H. (2025). <span class="citation-title">Turing.jl: a general-purpose probabilistic programming language.</span> <em>ACM Transactions on Probabilistic Machine Learning</em>. Just Accepted. |
| 10 | + </p> |
| 11 | + <div class="citation-actions"> |
| 12 | + <a href="https://doi.org/10.1145/3711897" target="_blank" rel="noopener noreferrer" class="button">View Paper</a> |
| 13 | + <button class="button button--primary" onclick="copyBibtex(this)" aria-label="Copy BibTeX for the 2025 Turing.jl paper">Copy BibTeX</button> |
| 14 | + </div> |
| 15 | + <pre class="citation-bibtex-data"> |
| 16 | +@article{Fjelde2025Turing, |
| 17 | + author = {Fjelde, Tor Erlend and Xu, Kai and Widmann, David and Tarek, Mohamed and Pfiffer, Cameron and Trapp, Martin and Axen, Seth D. and Sun, Xianda and Hauru, Markus and Yong, Penelope and Tebbutt, Will and Ghahramani, Zoubin and Ge, Hong}, |
| 18 | + title = {Turing.jl: a general-purpose probabilistic programming language}, |
| 19 | + journal = {ACM Transactions on Probabilistic Machine Learning}, |
| 20 | + year = {2025}, |
| 21 | + publisher = {Association for Computing Machinery}, |
| 22 | + doi = {10.1145/3711897}, |
| 23 | + note = {Just Accepted}, |
| 24 | + url = {https://doi.org/10.1145/3711897} |
24 | 25 | }
|
25 |
| -</pre> |
26 |
| -</div> |
27 |
| -<div class="citation-entry"> |
28 |
| -<p class="citation-text"> |
29 |
| -Ge, H., Xu, K., & Ghahramani, Z. (2018). <span class="citation-title">Turing: a language for flexible probabilistic inference.</span> In <em>Proceedings of the 21st International Conference on Artificial Intelligence and Statistics (AISTATS)</em> (Vol. 84, pp. 1682-1690). PMLR. |
30 |
| -</p> |
31 |
| -<div class="citation-actions"> |
32 |
| -<a href="http://proceedings.mlr.press/v84/ge18b.html" target="_blank" rel="noopener noreferrer" class="button">View Paper</a> |
33 |
| -<button class="button button--primary" onclick="copyCitationBibtex('bibtex-aistats-2018', this)">Copy BibTeX</button> |
34 |
| -</div> |
35 |
| -<pre id="bibtex-aistats-2018" class="citation-bibtex-data"> |
36 |
| -@inproceedings{ge2018t, |
37 |
| -author = {Hong Ge and Kai Xu and Zoubin Ghahramani}, |
38 |
| -title = {Turing: a language for flexible probabilistic inference}, |
39 |
| -booktitle = {International Conference on Artificial Intelligence and Statistics, {AISTATS} 2018, 9-11 April 2018, Playa Blanca, Lanzarote, Canary Islands, Spain}, |
40 |
| -pages = {1682--1690}, |
41 |
| -year = {2018}, |
42 |
| -url = {http://proceedings.mlr.press/v84/ge18b.html}, |
43 |
| -biburl = {https://dblp.org/rec/bib/conf/aistats/GeXG18}, |
| 26 | + </pre> |
| 27 | + </li> |
| 28 | + <li class="citation-entry box"> |
| 29 | + <p class="citation-text"> |
| 30 | + Ge, H., Xu, K., & Ghahramani, Z. (2018). <span class="citation-title">Turing: a language for flexible probabilistic inference.</span> In <em>Proceedings of the 21st International Conference on Artificial Intelligence and Statistics (AISTATS)</em> (Vol. 84, pp. 1682-1690). PMLR. |
| 31 | + </p> |
| 32 | + <div class="citation-actions"> |
| 33 | + <a href="http://proceedings.mlr.press/v84/ge18b.html" target="_blank" rel="noopener noreferrer" class="button">View Paper</a> |
| 34 | + <button class="button button--primary" onclick="copyBibtex(this)" aria-label="Copy BibTeX for the 2018 Turing paper">Copy BibTeX</button> |
| 35 | + </div> |
| 36 | + <pre class="citation-bibtex-data"> |
| 37 | +@inproceedings{Ge2018Turing, |
| 38 | + author = {Ge, Hong and Xu, Kai and Ghahramani, Zoubin}, |
| 39 | + title = {Turing: a language for flexible probabilistic inference}, |
| 40 | + booktitle = {Proceedings of the 21st International Conference on Artificial Intelligence and Statistics (AISTATS)}, |
| 41 | + series = {Proceedings of Machine Learning Research}, |
| 42 | + volume = {84}, |
| 43 | + pages = {1682--1690}, |
| 44 | + year = {2018}, |
| 45 | + publisher = {PMLR}, |
| 46 | + url = {http://proceedings.mlr.press/v84/ge18b.html} |
44 | 47 | }
|
45 |
| -</pre> |
46 |
| -</div> |
| 48 | + </pre> |
| 49 | + </li> |
| 50 | + </ul> |
47 | 51 | </div>
|
| 52 | +
|
48 | 53 | <script>
|
49 |
| -function copyCitationBibtex(elementId, buttonElement) { |
50 |
| -const bibtexElement = document.getElementById(elementId); |
51 |
| -const bibtexText = bibtexElement.textContent.trim(); |
52 |
| -navigator.clipboard.writeText(bibtexText).then(() => { |
53 |
| -const originalText = buttonElement.innerHTML; |
54 |
| -buttonElement.innerHTML = '✅ Copied!'; |
55 |
| -buttonElement.classList.add('citation-copied'); |
56 |
| -buttonElement.disabled = true; |
57 |
| -setTimeout(() => { |
58 |
| -buttonElement.innerHTML = originalText; |
59 |
| -buttonElement.classList.remove('citation-copied'); |
60 |
| -buttonElement.disabled = false; |
61 |
| -}, 2000); |
62 |
| -}).catch(err => { |
63 |
| -console.error('Failed to copy BibTeX: ', err); |
64 |
| -buttonElement.innerHTML = 'Error!'; |
65 |
| -setTimeout(() => { |
66 |
| -buttonElement.innerHTML = 'Copy BibTeX'; |
67 |
| -}, 2000); |
68 |
| -}); |
| 54 | +function copyBibtex(buttonElement) { |
| 55 | + // Find the <pre> element which is the next sibling of the button's parent container |
| 56 | + const bibtexPreElement = buttonElement.parentElement.nextElementSibling; |
| 57 | + const bibtexText = bibtexPreElement.textContent.trim(); |
| 58 | +
|
| 59 | + // Robust Clipboard Copy Logic |
| 60 | + if (navigator.clipboard && window.isSecureContext) { |
| 61 | + // Modern async clipboard API |
| 62 | + navigator.clipboard.writeText(bibtexText) |
| 63 | + .then(() => showSuccess(buttonElement)) |
| 64 | + .catch(err => { |
| 65 | + console.error('Async copy failed, falling back:', err); |
| 66 | + fallbackCopy(bibtexText, buttonElement); |
| 67 | + }); |
| 68 | + } else { |
| 69 | + // Fallback for older browsers or non-secure contexts |
| 70 | + fallbackCopy(bibtexText, buttonElement); |
| 71 | + } |
| 72 | +} |
| 73 | +
|
| 74 | +function fallbackCopy(text, buttonElement) { |
| 75 | + const textArea = document.createElement('textarea'); |
| 76 | + textArea.value = text; |
| 77 | + textArea.style.position = 'absolute'; |
| 78 | + textArea.style.left = '-9999px'; |
| 79 | + document.body.appendChild(textArea); |
| 80 | + textArea.focus(); |
| 81 | + textArea.select(); |
| 82 | + try { |
| 83 | + const successful = document.execCommand('copy'); |
| 84 | + if (successful) { |
| 85 | + showSuccess(buttonElement); |
| 86 | + } else { |
| 87 | + showError(buttonElement); |
| 88 | + } |
| 89 | + } catch (err) { |
| 90 | + console.error('Fallback copy failed:', err); |
| 91 | + showError(buttonElement); |
| 92 | + } |
| 93 | + document.body.removeChild(textArea); |
| 94 | +} |
| 95 | +
|
| 96 | +function showSuccess(buttonElement) { |
| 97 | + const originalText = buttonElement.innerHTML; |
| 98 | + buttonElement.innerHTML = '✅ Copied!'; |
| 99 | + // Use your existing class for styling the copied state |
| 100 | + buttonElement.classList.add('citation-copied'); |
| 101 | + buttonElement.disabled = true; |
| 102 | +
|
| 103 | + setTimeout(() => { |
| 104 | + buttonElement.innerHTML = originalText; |
| 105 | + buttonElement.classList.remove('citation-copied'); |
| 106 | + buttonElement.disabled = false; |
| 107 | + }, 2000); |
| 108 | +} |
| 109 | +
|
| 110 | +function showError(buttonElement) { |
| 111 | + const originalText = buttonElement.innerHTML; |
| 112 | + buttonElement.innerHTML = 'Error!'; |
| 113 | + buttonElement.disabled = true; |
| 114 | + setTimeout(() => { |
| 115 | + buttonElement.innerHTML = originalText; |
| 116 | + buttonElement.disabled = false; |
| 117 | + }, 2000); |
69 | 118 | }
|
70 | 119 | </script>
|
| 120 | +``` |
0 commit comments