Skip to content

Commit

Permalink
crossref fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wjschne committed Jun 19, 2024
1 parent b44f3fa commit a33450a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _extensions/apaquarto/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
title: My Document in APA Style, Seventh Edition
author: W. Joel Schneider
version: 4.3.0
version: 4.3.2
quarto-required: ">=1.4.549"
contributes:
formats:
Expand Down
7 changes: 7 additions & 0 deletions _extensions/apaquarto/apalanguage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Meta = function(m)
m.language = {}
end



-- Find word for "note"
if not m.language["figure-table-note"] then
if param("callout-note-title") then
Expand All @@ -63,6 +65,11 @@ Meta = function(m)
-- If field not assisned, assign default
if not m.language[x.field] then
m.language[x.field] = param(x.field, x.default)
if m.crossref then
if m.crossref[x.field:gsub("^crossref%-", "")] then
m.language[x.field] = pandoc.utils.stringify(m.crossref[x.field:gsub("^crossref%-", "")])
end
end
end
end

Expand Down
4 changes: 4 additions & 0 deletions changelog.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ engine: knitr
* Line numbering
* Full language option support


# Version 4.3.2 (2024-06-19)

- [#76](https://github.com/wjschne/apaquarto/issues/76) Fixed bug that failed to account for user-specified terms in `crossref`

# Version 4.3.1 (2024-05-28)

Expand Down
7 changes: 7 additions & 0 deletions docs/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ <h2 id="toc-title">On this page</h2>

<ul>
<li><a href="#future-version-wishlist" id="toc-future-version-wishlist" class="nav-link active" data-scroll-target="#future-version-wishlist">Future Version Wishlist</a></li>
<li><a href="#version-4.3.2-2024-06-19" id="toc-version-4.3.2-2024-06-19" class="nav-link" data-scroll-target="#version-4.3.2-2024-06-19">Version 4.3.2 (2024-06-19)</a></li>
<li><a href="#version-4.3.1-2024-05-28" id="toc-version-4.3.1-2024-05-28" class="nav-link" data-scroll-target="#version-4.3.1-2024-05-28">Version 4.3.1 (2024-05-28)</a></li>
<li><a href="#version-4.3.0-2024-05-22" id="toc-version-4.3.0-2024-05-22" class="nav-link" data-scroll-target="#version-4.3.0-2024-05-22">Version 4.3.0 (2024-05-22)</a></li>
<li><a href="#version-4.2.0-2024-05-16" id="toc-version-4.2.0-2024-05-16" class="nav-link" data-scroll-target="#version-4.2.0-2024-05-16">Version 4.2.0 (2024-05-16)</a></li>
Expand Down Expand Up @@ -246,6 +247,12 @@ <h1>Future Version Wishlist</h1>
</ul></li>
</ul>
</section>
<section id="version-4.3.2-2024-06-19" class="level1">
<h1>Version 4.3.2 (2024-06-19)</h1>
<ul>
<li><a href="https://github.com/wjschne/apaquarto/issues/76">#76</a> Fixed bug that failed to account for user-specified terms in <code>crossref</code></li>
</ul>
</section>
<section id="version-4.3.1-2024-05-28" class="level1">
<h1>Version 4.3.1 (2024-05-28)</h1>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ <h4 class="anchored" data-anchor-id="an-existing-file">An existing file</h4>
});
</script>
</div> <!-- /content -->
<script>var lightboxQuarto = GLightbox({"descPosition":"bottom","selector":".lightbox","closeEffect":"zoom","loop":false,"openEffect":"zoom"});
<script>var lightboxQuarto = GLightbox({"loop":false,"selector":".lightbox","openEffect":"zoom","descPosition":"bottom","closeEffect":"zoom"});
window.onload = () => {
lightboxQuarto.on('slide_before_load', (data) => {
const { slideIndex, slideNode, slideConfig, player, trigger } = data;
Expand Down
8 changes: 4 additions & 4 deletions docs/writing.html
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ <h2 data-anchor-id="importing-figures-with-markdown">Importing Figures with Mark
<span id="cb11-4"><a href="#cb11-4" aria-hidden="true" tabindex="-1"></a> fig-alt="A mediation model in which A causes B, and B causes C." </span>
<span id="cb11-5"><a href="#cb11-5" aria-hidden="true" tabindex="-1"></a> apa-note="Variable A indirectly causes Variable C."</span>
<span id="cb11-6"><a href="#cb11-6" aria-hidden="true" tabindex="-1"></a> }</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div id="fig-myimportedimage" class="quarto-float quarto-figure quarto-figure-center FigureWithNote" data-apa-note="Variable A indirectly causes Variable C." alt="A path diagram in which A causes B, and B causes C." data-custom-style="FigureWithNote">
<div id="fig-myimportedimage" class="quarto-float quarto-figure quarto-figure-center FigureWithNote" alt="A path diagram in which A causes B, and B causes C." data-apa-note="Variable A indirectly causes Variable C." data-custom-style="FigureWithNote">
<figure class="quarto-float quarto-float-fig figure">
<figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-fig" id="fig-myimportedimage-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="FigureTitle" data-custom-style="FigureTitle">
Expand Down Expand Up @@ -739,7 +739,7 @@ <h1>Tables in Code Chunks</h1>
<span id="cb12-11"><a href="#cb12-11" aria-hidden="true" tabindex="-1"></a><span class="in"> flextable() %&gt;% </span></span>
<span id="cb12-12"><a href="#cb12-12" aria-hidden="true" tabindex="-1"></a><span class="in"> theme_apa() </span></span>
<span id="cb12-13"><a href="#cb12-13" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div id="tbl-mytable" class="cell quarto-float quarto-figure quarto-figure-center" data-apa-note="A note below table" data-ft.align="left">
<div id="tbl-mytable" class="cell quarto-float quarto-figure quarto-figure-center" data-ft.align="left" data-apa-note="A note below table">
<figure class="quarto-float quarto-float-tbl figure">
<figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-mytable-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="FigureTitle" data-custom-style="FigureTitle">
Expand All @@ -751,7 +751,7 @@ <h1>Tables in Code Chunks</h1>
</figcaption>
<div aria-describedby="tbl-mytable-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="cell-output-display">
<div class="tabwid tabwid_left"><style>.cl-6be8a94c{}.cl-6be03780{font-family:'Times New Roman';font-size:11pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-6be38b1a{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-6be3a398{width:0.75in;background-color:transparent;vertical-align: middle;border-bottom: 0.75pt solid rgba(0, 0, 0, 1.00);border-top: 0.75pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-6be3a3a2{width:0.75in;background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-6be3a3ac{width:0.75in;background-color:transparent;vertical-align: middle;border-bottom: 0.75pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style><table data-quarto-disable-processing="true" class="cl-6be8a94c"><thead><tr style="overflow-wrap:break-word;"><th class="cl-6be3a398"><p class="cl-6be38b1a"><span class="cl-6be03780">Letters</span></p></th><th class="cl-6be3a398"><p class="cl-6be38b1a"><span class="cl-6be03780">Numbers</span></p></th></tr></thead><tbody><tr style="overflow-wrap:break-word;"><td class="cl-6be3a3a2"><p class="cl-6be38b1a"><span class="cl-6be03780">A</span></p></td><td class="cl-6be3a3a2"><p class="cl-6be38b1a"><span class="cl-6be03780">1</span></p></td></tr><tr style="overflow-wrap:break-word;"><td class="cl-6be3a3a2"><p class="cl-6be38b1a"><span class="cl-6be03780">B</span></p></td><td class="cl-6be3a3a2"><p class="cl-6be38b1a"><span class="cl-6be03780">2</span></p></td></tr><tr style="overflow-wrap:break-word;"><td class="cl-6be3a3ac"><p class="cl-6be38b1a"><span class="cl-6be03780">C</span></p></td><td class="cl-6be3a3ac"><p class="cl-6be38b1a"><span class="cl-6be03780">3</span></p></td></tr></tbody></table></div>
<div class="tabwid tabwid_left"><style>.cl-fcb5919a{}.cl-fcac6200{font-family:'Times New Roman';font-size:11pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-fcb0230e{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-fcb03be6{width:0.75in;background-color:transparent;vertical-align: middle;border-bottom: 0.75pt solid rgba(0, 0, 0, 1.00);border-top: 0.75pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-fcb03be7{width:0.75in;background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-fcb03bf0{width:0.75in;background-color:transparent;vertical-align: middle;border-bottom: 0.75pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style><table data-quarto-disable-processing="true" class="cl-fcb5919a"><thead><tr style="overflow-wrap:break-word;"><th class="cl-fcb03be6"><p class="cl-fcb0230e"><span class="cl-fcac6200">Letters</span></p></th><th class="cl-fcb03be6"><p class="cl-fcb0230e"><span class="cl-fcac6200">Numbers</span></p></th></tr></thead><tbody><tr style="overflow-wrap:break-word;"><td class="cl-fcb03be7"><p class="cl-fcb0230e"><span class="cl-fcac6200">A</span></p></td><td class="cl-fcb03be7"><p class="cl-fcb0230e"><span class="cl-fcac6200">1</span></p></td></tr><tr style="overflow-wrap:break-word;"><td class="cl-fcb03be7"><p class="cl-fcb0230e"><span class="cl-fcac6200">B</span></p></td><td class="cl-fcb03be7"><p class="cl-fcb0230e"><span class="cl-fcac6200">2</span></p></td></tr><tr style="overflow-wrap:break-word;"><td class="cl-fcb03bf0"><p class="cl-fcb0230e"><span class="cl-fcac6200">C</span></p></td><td class="cl-fcb03bf0"><p class="cl-fcb0230e"><span class="cl-fcac6200">3</span></p></td></tr></tbody></table></div>
</div>
</div>
</figure>
Expand Down Expand Up @@ -1392,7 +1392,7 @@ <h1>Appendices</h1>
});
</script>
</div> <!-- /content -->
<script>var lightboxQuarto = GLightbox({"closeEffect":"zoom","selector":".lightbox","openEffect":"zoom","loop":false,"descPosition":"bottom"});
<script>var lightboxQuarto = GLightbox({"selector":".lightbox","descPosition":"bottom","openEffect":"zoom","closeEffect":"zoom","loop":false});
window.onload = () => {
lightboxQuarto.on('slide_before_load', (data) => {
const { slideIndex, slideNode, slideConfig, player, trigger } = data;
Expand Down

0 comments on commit a33450a

Please sign in to comment.