0

I successfully implemented these three solutions:

tufte-latex: biblatex citations in captions

Is it possible to fine-tune the citation positions in Tufte-BibLaTeX combination?

Biblatex citecounter not counting reference in figure caption

Now, I am facing a related challenge. Basically, I need to make a vertical adjustment to the sidenote that is located within a caption. In the MWE below I need to move it down in the margin. I have attempted to do this, but it is not working for some reason. Any help on how to overcome this issue would be greatly appreciated!

(two other unrelated issues are that 1. the figure scaling option is not working. and, 2. there is no period after the urldate field (or the year field) under the listed "Internet Sources" (@online entry) in the bibliography which is causing the subsequent word "cited" not to be capitalized.) Regarding the period issue, I created a new question here: tufte-latex: missing periods in biblatex entry

\RequirePackage[l2tabu, orthodox]{nag}
\RequirePackage[hyphens]{url}
\documentclass[a4paper,twoside,nobib]{tufte-book} 
\hypersetup{colorlinks,citecolor=blue}
\usepackage{hyphenat}
\usepackage{xpatch}
\usepackage[
style=verbose,
autocite=footnote,
sorting=nty,
citecounter=true,
citetracker=true,
backref=true,
backend=biber
]{biblatex}
\setlength\bibitemsep{0.5\baselineskip}
\addbibresource{HSFSS-BIBLATEX.bib}
\renewbibmacro*{doi+eprint+url}{%
  \iftoggle{bbx:doi}
    {\printfield{doi}}
    {}%
  \newunit\newblock
  \iftoggle{bbx:eprint}
    {\usebibmacro{eprint}}
    {}%
  \setunit{\addspace}\newblock
  \iftoggle{bbx:url}
    {\usebibmacro{url+urldate}}
    {}}
\usepackage{xparse}
\makeatletter
\xpatchcmd{\@footnotetext}%
{\color@begingroup}
{\color@begingroup\toggletrue{blx@footnote}}
{}
{}
\makeatother
%
\DeclareCiteCommand{\sidecitehelper}[\bibfootnotewrapper]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
    \usebibmacro{cite}}
{\multicitedelim}
{\usebibmacro{cite:postnote}}
%
\ExplSyntaxOn
\NewDocumentCommand\sidecite{D<>{}O{}om}{%
    \iftoggle{blx@footnote}
    {\cs_set_protected_nopar:Npn \__sct_wrapper:nn ##1 ##2 {\mkbibparens{##2}}}
    {\cs_set_protected_nopar:Npn \__sct_wrapper:nn ##1 ##2 {\sidenote[][##1]{##2}}}
    {\IfNoValueTF{#3}
        {\__sct_wrapper:nn{#1}{\sidecitehelper[#2]{#4}}}
        {\__sct_wrapper:nn{#1}{\sidecitehelper[#2][#3]{#4}}}}
}
\ExplSyntaxOff
%
\makeatletter
\long\def\@caption#1[#2]#3{%
    \expandafter\ifx\csname if@capstart\expandafter\endcsname
    \csname iftrue\endcsname
    \global\let\@currentHref\hc@currentHref
    \else
    \hyper@makecurrent{\@captype}%
    \fi
    \@ifundefined{NR@gettitle}{%
        \def\@currentlabelname{#2}%
    }{%
        \NR@gettitle{#2}%
    }%
    \par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
        \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
    }%
    \begingroup
    \toggletrue{blx@footnote}%
    \@parboxrestore
    \if@minipage
    \@setminipage
    \fi
    \@tufte@caption@font\@tufte@caption@justification%
    \expandafter\ifx\csname if@capstart\expandafter\endcsname
    \csname iftrue\endcsname
    \global\@capstartfalse
    %\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
    \noindent\csname fnum@#1\endcsname: \ignorespaces#3%
    \else
    %\@makecaption{\csname fnum@#1\endcsname}{%
    \noindent\csname fnum@#1\endcsname:
    \ignorespaces
    \ifHy@nesting
    \expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}%
    \else
    \Hy@raisedlink{%
        \expandafter\hyper@@anchor\expandafter{%
            \@currentHref
        }{\relax}%
    }%
    #3%
    \fi
    %}%
    \fi
    \par
    \endgroup
}
%
\renewcommand\@footnotetext[2][0pt]{%
    \marginpar{%
        \hbox{}\vspace*{#1}%
        \def\baselinestretch {\setspace@singlespace}%
        \reset@font\footnotesize%
        \@tufte@margin@par% use parindent and parskip settings for marginal text
        \vspace*{-1\baselineskip}\noindent%
        \protected@edef\@currentlabel{%
            \csname p@footnote\endcsname\@thefnmark%
        }%
        \color@begingroup%
        \toggletrue{blx@footnote}%
        \@makefntext{%
            \ignorespaces#2%
        }%
        \color@endgroup%
    }%
}%
\makeatother
%
\makeatletter
\AtBeginDocument{%
    \patchcmd\@floatboxreset
    {\boolfalse{citetracker}%
        \boolfalse{pagetracker}}
    {}
    {}
    {\blx@err@patch{float}}}
\makeatother
%
\renewbibmacro*{pageref}
{%
    \iflistundef{pageref}
    {\printtext{(\autocap{n}o citation in the text.)}}
    {
        \printtext{\autocap{c}ited \arabic{citecounter} time\ifnumgreater{\value{citecounter}}{1}{s}{}}%
        \setunit{\addspace}
        \ifnumgreater{\value{pageref}}{1}
        {\bibstring{backrefpages}\ppspace}
        {\bibstring{backrefpage}\ppspace}%
        \printlist[pageref][-\value{listtotal}]{pageref}
    }
}
\DefineBibliographyStrings{english}{
    backrefpage  = {on page},
    backrefpages = {on pages},
}
\usepackage[T5,T1]{fontenc}
\usepackage[english]{babel}
\usepackage{ebgaramond}
\usepackage{textcase}
\usepackage{mfirstuc}
\usepackage{expl3}
\usepackage[stretch=10]{microtype}
\usepackage{ragged2e}
\makeatletter\usepackage{microtype}\g@addto@macro\@verbatim{\microtypesetup{activate=false}}\makeatother
\usepackage[svgnames]{xcolor}
\usepackage{amssymb,amsmath,amsthm}
\usepackage{mathtools}
\usepackage{todonotes}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepackage[toc,page]{appendix}
\usepackage{makeidx}
\makeindex
\usepackage{multicol}
\usepackage{enumitem}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{array}
\usepackage{tabularx}
\usepackage{float}
\usepackage[autostyle=true]{csquotes}
\usepackage{graphicx}
\setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
\graphicspath{{graphics/}}
\usepackage{fancyvrb}
\fvset{fontsize=\normalsize}
\usepackage{units}
\usepackage{xspace}
\newcommand{\openepigraph}[3]{
    \begin{fullwidth}
        \sffamily\small
        \begin{doublespace}
            \noindent\allcaps{#1}\\% epigraph
            \noindent\allcaps{#2}#3% author & autocite
        \end{doublespace}%
    \end{fullwidth}
}
\usepackage[toc]{glossaries}
\makeglossaries
\newglossaryentry{hybridization}{name=hybridization,description={The genetic cross of two species or subspecies either naturally or artificially resulting in a new species referred to as a hybrid. Some common examples include mules, ligers, bananas and maize. For further study see:\\ \url{https://en.wikipedia.org/wiki/List_of_plant_hybrids}\\ \url{https://youtu.be/JarGdMEQElo}\\ \url{https://en.wikipedia.org/wiki/Hybrid_(biology)}\\ \url{https://en.wikipedia.org/wiki/List_of_genetic_hybrids}\index{hybridization}}}
%
\begin{document}
\openepigraph{%
Here, the intersection of the timeless moment\\\noindent
Is England and nowhere. Never and always.
}{—T.S. Eliot}{\sidecite<-0.2in>[][lines 41-55]{tseliot}}
\vfill
\openepigraph{%
The unexamined life is not worth living.
}{—Socrates}{\sidecite<-0.3in>{Socrates}}
\openepigraph{%
And in the end, the love you take is equal to\\\noindent
the love you make.
}{—The Beatles}{\sidecite<-1cm>{Beatles}}
Hybrid\index{hybrid} life forms are interesting. This is due to the fact of \textbf{\gls{hybridization}}\index{hybrid!hybridization}. Hybridization can be either natural or artificial. One could view hybridization as a cross of parents.\sidecite<-0.45in>{Hybridization}
In this scenario the potato acts like a pesticide, killing the Colorado potato beetle.\sidecite<0.7in>{BtPotato}
\begin{figure}
    \includegraphics[scale=0.5]{helix.pdf}
    \caption[The Helix Compass][6pt]{\emph{Used with permission.}\xspace\sidecite<1.5in>{tseliot}}\index{helix}\index{Helix Compass|emph}
    \label{fig:helix compass}
\end{figure}
 Furthermore, the same eventually leads to stereotypes, racism, poor public policy decisions and limited diagnoses and services.\sidecite<-1in>{Autism}
\openepigraph{%
To believe is to know you believe,\\\noindent
and to know you believe is not to believe.}{—Jean-Paul Sartre}{\sidecite<>[][34]{jpsarte}}\index{belief}
Your key to all of this is \textbf{Love\index{Love}}.
\openepigraph{%
    The first problem for all of us, men and women,\\\noindent
 is not to learn, but to unlearn.
}{—Gloria Steinem}{\autocite{GSteinem}}\index{Steinem, Gloria}
\openepigraph{Love is Love.}{—President Barak Obama}{\autocite{Obama}}\index{Love}\index{Obama, Barak}
\openepigraph{%
Into the crowned knot of fire\\\noindent
And the fire and the rose are one.
}{—T.S. Eliot}{\sidecite<>[][lines 241-263]{tseliot}}
\printglossaries
\printbibheading
\printbibliography[type=book,heading=subbibliography,title={Book Sources}]
\printbibliography[type=online,heading=subbibliography,title={Internet Sources}]
\printbibliography[nottype=book,nottype=online,heading=subbibliography,title={Other Sources}]
\printindex
\end{document}

.bib file

@MISC{Autism,
    author = {Garcia, Eric},
    title = {{"Eric Garcia’s ‘We’re Not Broken’ Aims to Change the Conversation About Autism." Interview with April Dembosky. Produced by KQED Inc.}\textit{ Forum}},
    date = {},
    addendum = {Oct. 8, 2021. Podcast audio, 53:12. [Acc. 3 Sep. 2022].},
    howpublished = {\url{https://www.kqed.org/forum/2010101885895/eric-garcias-were-not-broken-aims-to-change-the-conversation-about-autism}}
 }
 
@online{BtPotato,
    author = {contributors SourceWatch},
    title = {{"Colorado Potato Beetle Resistant Bt Potato"}\textit{ SourceWatch}},
    year = {2012},
    url = {https://www.sourcewatch.org/index.php?title=Colorado_Potato_Beetle_Resistant_Bt_Potato&oldid=583413},
    urldate = {2022-08-22}
}

@MISC{Hybridization,
    author = {Colston-Nepali, Lila M.  
     and Leigh, Deborah M.},
    title = {{"Ligers and Tigons and Grolars, Oh My! Hybridization, and How It Affects Biodiversity"} \textit{Frontiers for Young Minds} | 7:113. doi: 10.3389/frym.2019.00113},
    date = {},
    addendum = {Sep. 12, 2019. [Acc. 21 Aug. 2022].},
    howpublished = {\url{https://kids.frontiersin.org/articles/10.3389/frym.2019.00113}}
}

@MISC{GSteinem,
    author = {Steinem, Gloria},
    title = {{"A New Egalitarian Life Style"} \textit{New York Times}},
    date = {},
    addendum = {Aug. 26, 1971. [Acc. 12 Feb. 2022].},
    howpublished = {\url{https://www.nytimes.com/1971/08/26/archives/a-new-egalitarian-life-style.html}}
}

@MISC{Obama,
    author = {Obama, Barak},
    title = {{"President Obama lauds high court decision on gay marriage"}},
    date = {},
    addendum = {White House Rose Garden, filmed Jun. 26, 2015. Video of lecture, 9:07. [Acc. 1 Feb. 2022].},
    howpublished = {\url{https://youtu.be/toAVEgQUhxo}}
}

@MISC{Beatles,
    author = {Lennon, John and McCartney, Paul},
    title = {\textit{The End} {(line 8) | Abbey Road No. 10 | The Beatles}},
    date = {},
    addendum = {Apple, 1969. [Acc. 28 Jan. 2022].},
    howpublished = {\url{https://thebeatles.com/end}}
}

@MISC{Socrates,
    author = {Plato},
    title = {\textit{The Socratic Dialogues} {| The Apology of Socrates, Part II (Translated by W. D. Woodhead, 1953)}},
    date = {},
    addendum = {Mar. 2008. [Acc. 28 Jan. 2022].},
    howpublished = {\url{http://davidgorman.com/socrates.htm}}
}

@MISC{tseliot,
    author = {Eltiot, T. S.},
    title = {\textit{Four Quartets}{ | Quartet No. 4: Little Gidding}},
    date = {},
    addendum = {Dec. 2013. [Acc. 27 Jan. 2022].},
    howpublished = {\url{http://davidgorman.com/4quartets/4-gidding.htm}}
}

@MISC{pkg-geometry,
    author = {Hideo Umeki},
    title = {The \texttt{geometry} package},
    date = {},
    addendum = {Dec. 2008.},
    howpublished = {\url{http://ctan.org/pkg/geometry}},
}
%
% NOTE: If using the MISC entry, the title must be in %
% double brackets {{ title }} %
% in order to avoid a capitalization issue. %
%

@BOOK{jpsarte,
    author = {Jean-Paul Sartre},
    title = {Being and Nothingness},
    year = {2003},
    edition = {2},
    publisher = {Routledge},
    location = {London, England},
    isbn = {9780415278485.}
}

@BOOK{Carse,
    author = {James P. Carse},
    title = {FINITE \textsc{and} INFINITE GAMES},
    subtitle = {A Visioin of Life as Play and Possibility},
    year = {1986},
    publisher = {The Free Press, A Division of Macmillan, {Inc.}, Simonandschuster.com},
    location = {New York, New York},
    addendum = {ISBN-0-02-905980-1; eISBN-13:978-1-45165-729-6 Kindle.}
}

@BOOK{Tufte2006,
    author = {Edward R. Tufte},
    title = {Beautiful Evidence},
    year = {2006},
    publisher = {Graphics Press, {LLC}},
    month = {5},
    edition = {First},
    location = {Cheshire, Connecticut},
    isbn = {0-9613921-7-7.}
}

@BOOK{Tufte2001,
    author = {Edward R. Tufte},
    title = {The Visual Display of Quantitative Information},
    publisher = {Graphics Press},
    year = {2001},
    location = {Cheshire, Connecticut},
    isbn = {0-9613921-4-2.}
}

@BOOK{Tufte1990,
    author = {Edward R. Tufte},
    title = {Envisioning Information},
    publisher = {Graphics Press},
    year = {1990},
    location = {Cheshire, Connecticut},
    isbn = {0-9613921-1-8.}
}

@BOOK{Tufte1997,
    author = {Edward R. Tufte},
    title = {Visual Explanations},
    publisher = {Graphics Press},
    year = {1997},
    location = {Cheshire, Connecticut},
    isbn = {0-9613921-2-6.}
}

@BOOK{Bringhurst2005,
    author = {Robert Bringhurst},
    title = {The Elements of Typography},
    publisher = {Hartley \& Marks},
    year = {2005},
    edition = {3.1},
    isbn = {0-88179-205-5.}
}

@BOOK{Mittelbach2004,
    author = {Frank Mittelbach and Michel Goossens},
    title = {The \LaTeX\ Companion},
    publisher = {Addison--Wesley},
    year = {2004},
    edition = {Second},
    isbn = {0-201-36299-6.}
}
3
  • 1
    Always ask separate questions about separate issues. Create suitable minimal example documents for each issue that can be copied-and-pasted directly from the question and do not need to be fetched from external providers such as Overleaf (where you need an account).
    – moewe
    Sep 18, 2022 at 7:28
  • 1
    My hunch is that the period issue is largely unrelated to all the code you have posted so far, but at the moment I don't feel like going through this all of the code just figure that problem out.
    – moewe
    Sep 18, 2022 at 7:32
  • @moewe I have created a new MWE here: tex.stackexchange.com/questions/659525/…
    – Steven
    Sep 25, 2022 at 23:50

1 Answer 1

0

I was able to utilize a workaround to my issue since I learned that the tufte-latex class has customized a vertical offset for captions in the form:

\caption[short caption][<offset>]{long caption}

(I am still seeking any feedback, guidance, solutions etc. to the other two parenthetical issues I mentioned in my question. Regarding the period issue, I created a new question here: tufte-latex: missing periods in biblatex entry )

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .