LaTeX forum ⇒ Text FormattingPhoto Citations in Tufte class

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
ghuczek
Posts: 23
Joined: Sun Dec 23, 2012 8:09 pm

Photo Citations in Tufte class

Postby ghuczek » Tue Dec 02, 2014 7:38 pm

I am working on a book project that has a large number of photos and captions in the margins. I need to give proper attribution (credit) for each photo. I do not want the citations to appear in the margins. Instead I would like to include a Photo Credits section in the backmatter, along with the Bibliography, Index and Glossary sections.

I am using Bibtex to include a bibliography. How would I add the photo credits in the backmatter. The \cite command or footnoting places the photo credits on the same page as the photos. The margins are already quite full with the photos and captions, so I do not want them to appear in the margins of the main text.

Can someone suggest a way to do this?

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Dec 02, 2014 7:49 pm

This can easily be done with the modern package biblatex along with the bibtex-successor biber.

Have a look at the minimal example i once posted at the german site TeXwelt.de

The example is in german, but i guess you get the drift.

Maybe psot a complete but compilable example. I guess this can be done with the old system, but it will be much harder to achieve.
  1. \begin{filecontents}{\jobname-bib.bib}
  2. @online{texwelt,
  3. author = {Die TeXwelt Gemeinschaft},
  4. title = {Fragen und Antworten},
  5. url = {www.texwelt.de/wissen}
  6. }
  7. @online{texwelt:biblatex,
  8. author = {\texttt{biblatex}-Nutzer},
  9. title = {topic \texttt{biblatex}},
  10. url = {www.texwelt.de/wissen/topic/biblatex}
  11. }
  12. @book{knuth:ct:a,
  13. author = {Knuth, Donald E.},
  14. title = {The \TeX book},
  15. date = 1984,
  16. maintitle = {Computers \& Typesetting},
  17. volume = {A},
  18. publisher = {Addison-Wesley},
  19. langid = {english},
  20. keywords = {sekundaer},
  21. annotation = {Viel Interessantes zu den
  22. Grundlagen}
  23. }
  24. @report{norm,
  25. author = {{NA 009-00-09 AA - Beschreibung
  26. und Identifizierung von Dokumenten}},
  27. title = {Information and documentation
  28. -- Guidelines for bibliographic references and citations to information resources},
  29. institution = {Internationale Organisation für Normung},
  30. keywords = {Norm},
  31. year = {2013}
  32. }
  33. @manual{biblatex:Doku,
  34. author = {Lehman, Philipp and Kime, Philip and Boruvka, Audrey and Wright, Joseph},
  35. title = {The Biblatex Package},
  36. date = {2014-06-24},
  37. version = {2.9a}
  38. }
  39. \end{filecontents}
  40. \documentclass{article}
  41. \usepackage[ngerman]{babel}
  42. \usepackage[utf8]{inputenc}
  43. \usepackage[T1]{fontenc}
  44. \usepackage[backend=biber,defernumbers=false]{biblatex}
  45. \addbibresource{\jobname-bib.bib}
  46. \begin{document}
  47. Das Erscheinungsbild von Literaturverzeichnissen ist meist
  48. vorgegeben (beispielsweise in~\cite{norm}).
  49. Die Informationsquelle für das technische Erstellen von
  50. Literaturverzeichnissen ist die
  51. \texttt{biblatex}-Dokumentation~\cite{biblatex:Doku}. Jedoch
  52. finden sich auch im Internet Anlaufstellen für
  53. Hilfesuchende~\cite{texwelt}.
  54. \nocite{*}
  55. \printbibheading%[title=Blub]
  56. \printbibliography[heading=subbibliography,keyword=Norm, title={Normen und Standards}]
  57. \printbibliography[type=online, heading=subbibliography, title={Aus dem Netz}]
  58. \printbibliography[heading=subbibliography,keyword=sekundaer, title={Zum weiterlesen}]
  59. \printbibliography[heading=subbibliography,title={Der ganze
  60. Rest},nottype=online,notkeyword=Norm,notkeyword=sekundaer]
  61. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

ghuczek
Posts: 23
Joined: Sun Dec 23, 2012 8:09 pm

Postby ghuczek » Tue Dec 02, 2014 11:07 pm

Thank you. This is very helpful. From your code, it looks like I can sub-divide the bibliography into subbibliographies, and separate them with different keywords that I use in biblatex citation. I could use a key word for the photo citations, like keyword=photo and notkeyword=photo for all other bibliographic entries. The order of the \printbibliography entries would then be the order that these two separate bibliographies would be printed.

Does this seem like I have the right idea? If so, thanks very much. I did not know I could separate a bibliography into sections this way.

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Wed Dec 03, 2014 10:03 am

Yes, you are on the right track. That is exactly the point. :-)

package biblatex is very powerful, skimming the documentation for a few minutes will reveal some of it.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

ghuczek
Posts: 23
Joined: Sun Dec 23, 2012 8:09 pm

Postby ghuczek » Fri Dec 05, 2014 1:41 am

I am still experiencing difficulty with getting multiple bibliographies in the Tuft class. Glossaries are also causing some problems. Please have a look at the front end code to see if you could recommend any changes that would make this work properly.

I am creating my bibliographic database using BibDesk. When I try uncommenting the commented code shown that should enable me to use biblatex, I run into problems. Ant help would be appreciated.

  1. \documentclass[justified, notoc, symmetric,openany]{tufte-book}
  2. \hypersetup{colorlinks}
  3. \usepackage{microtype}
  4. \usepackage{lipsum}
  5. \usepackage{booktabs}
  6. \usepackage{graphicx}
  7. \usepackage[utf8]{inputenc}
  8. \usepackage[T1]{fontenc}
  9. %\usepackage[backend=biber, defernumbers=false]{biblatex}
  10. %\addbibresource{\bib_mybib}
  11. \graphicspath{{graphics/}}
  12. \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
  13. \usepackage{fancyvrb}
  14. \fvset{fontsize=\normalsize}
  15. \usepackage{xspace}
  16. \newcommand{\monthyear}{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi\space\number\year}
  17.  
  18. \newcommand{\openepigraph}[2]{
  19. \begin{fullwidth}
  20. \sffamily\large
  21. \begin{doublespace}
  22. \noindent\allcaps{#1}\\ %quote
  23. \noindent\allcaps{#2} %author
  24. \end{doublespace}
  25. \end{fullwidth}
  26. }
  27.  
  28. \hypersetup{colorlinks,linktocpage,urlcolor=blue}
  29. \newcommand{\blankpage}{\newpage\hbox{}\thispagestyle{empty}\newpage}
  30. \usepackage{units}
  31. \newcommand{\doccmdnoindex}[2][]{\texttt{\tuftebs#2}} % Command to print a command in texttt with a backslash of tt type without inserting the command into the index
  32.  
  33. \makeatletter
  34. \renewenvironment{theindex}
  35. {
  36. \small
  37. \ifthenelse{\equal{\@tufte@class}{book}}
  38. {\chapter{\indexname}}
  39. {\section*{\indexname}}
  40. \parskip0pt
  41. \parindent0pt
  42. \let\item\@idxitem
  43. \begin{multicols}{3}
  44. }
  45. {\end{multicols}%
  46. }
  47. \makeatother
  48.  
  49. \newcommand{\doccmddef}[2][]{\hlred{\texttt{\tuftebs#2}}\label{cmd:#2}\ifthenelse{\isempty{#1}} % Command to define a command in red and add it to the index
  50. { % If no package is specified, add the command to the index
  51. \index{#2 command@\protect\hangleft{\texttt{\tuftebs}}\texttt{#2}}% Command name
  52. }
  53. { % If a package is also specified as a second argument, add the command and package to the index
  54. \index{#2 command@\protect\hangleft{\texttt{\tuftebs}}\texttt{#2} (\texttt{#1} package)}% Command name
  55. \index{#1 package@\texttt{#1} package}\index{packages!#1@\texttt{#1}}% Package name
  56. }}
  57.  
  58. \newcommand{\doccmd}[2][]{% Command to define a command and add it to the index
  59. \texttt{\tuftebs#2}%
  60. \ifthenelse{\isempty{#1}}% If no package is specified, add the command to the index
  61. {%
  62. \index{#2 command@\protect\hangleft{\texttt{\tuftebs}}\texttt{#2}}% Command name
  63. }
  64. {%
  65. \index{#2 command@\protect\hangleft{\texttt{\tuftebs}}\texttt{#2} (\texttt{#1} package)}% Command name
  66. \index{#1 package@\texttt{#1} package}\index{packages!#1@\texttt{#1}}% Package name
  67. }}
  68.  
  69. \usepackage{makeidx}
  70. \makeindex % Generate the index
  71.  
  72.  
  73. \usepackage[toc,nonumberlist]{glossaries}
  74. \makeglossaries
  75.  
  76.  
  77. %\usepackage[utf8]{inputenc}
  78. %\usepackage[T1]{fontenc}
  79. %\usepackage[backend=biber,defernumbers=false]{biblatex}
  80. %\addbibresource{\bib_Living_Planet.bib}
  81.  
  82.  
  83. \title{Book Title}
  84. \author[my_name]{Author}
  85.  
  86. \begin{document}
  87.  
  88. \makeatletter
  89. %\renewcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
  90. %\makeatother
  91.  
  92. \frontmatter
  93.  
  94. \maketitle
  95. \thispagestyle{empty}
  96.  
  97. \newpage
  98. \begin{fullwidth}
  99. ~\vfill
  100. \thispagestyle{empty}
  101. \setlength{\parindent}{0pt}
  102. \setlength{\parskip}{\baselineskip}
  103. Copyright \copyright\ \the\year\ \thanklessauthor
  104.  
  105. \par\textit{Second printing, \monthyear}
  106. \end{fullwidth}
  107.  
  108. \setcounter{tocdepth}{3}
  109. \setcounter{secnumdepth}{3}
  110. \tableofcontents
  111. \thispagestyle{empty}
  112.  
  113. \listoffigures % Print a list of figures
  114. \thispagestyle{empty}
  115.  
  116. \cleardoublepage
  117. %\include{introduction}
  118.  
  119. \mainmatter
  120.  
  121.  
  122.  
  123. %------------------------------------------------------------------------------
  124. % CHAPTERS
  125. %------------------------------------------------------------------------------
  126. %\input{chapter_1}
  127. %\input{chapter_2_etc.}
  128.  
  129.  
  130. \backmatter
  131.  
  132. \include{glossary} %Prints twice
  133. % If I leave the above line out glossaries do not print
  134. \glsaddall
  135. \printglossaries
  136.  
  137.  
  138. %\bibliography{bib_mybib}
  139. \bibliographystyle{plainnat}
  140. %\bibliography[heading=subbibliography,notkeyword=photo, title={Books}]
  141. %\bibliography[heading=subbibliography,keyword=photo, title={Photo Credits}]
  142.  
  143.  
  144. \printindex
  145. \end{document}

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Dec 05, 2014 10:57 am

I cannot test your example, i don't have the bib file and there are no citations in the document.

Always test on a small document, later try to implement it on your working project. With biblatex, you don't need bibliographystyle anymore, worse, issuing the command will get you into trouble.

You tell LaTeX what bib-database to use by \addbibresource{nameOfYourBibFile.bib}. Be sure to give the ending as well. There was a backslash in my example. \jobname is a macro that makes testing easier, but should not be used in real documents.

Running into problems is a rather vague expression, giving the exact error message is smart. Remember, error messages are our friends.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 5 guests