1

I've been trying to create a bibliography at the end of my document, so that it's compressed. (I'm working with a page restriction including the bibliography, so I want to minimize space used up for it.) But I'm struggling to understand how to even start formatting this.

Example of what I'm talking about

Here's an example I made up in Word to show the kind of format I want. I would like to use an embedded bibliography, simply because I only have 4-5 references so I don't feel the need for a separate .bib file.

Thanks!

Wei
  • 41
  • 1
    May be this: https://tex.stackexchange.com/questions/140787/removing-line-breaks-in-bibliography-compiled-with-biblatex helps. Also you can include bib file in your preamble (see \begin{filecontents} in my answer) – koleygr Oct 10 '17 at 23:42
  • Do you \cite any of the references in your bibliography? Does "I don't feel the need for a separate .bib file" imply you are okay with formatting the bibliography manually? – Werner Oct 11 '17 at 00:07
  • @Werner I'd like to cite the information in my references, yes. Up until this point I've always had embedded bibliographies in my documents and edited them inside the .tex file itself. – Wei Oct 11 '17 at 00:44

2 Answers2

2

You can set and format the bibliography manually within your document. Below is a redefinition of the thebibliography environment to set it's list of \bibitems consecutively as a horizontal list:

enter image description here

\documentclass{article}

\usepackage[nopar]{lipsum}

\makeatletter
\renewenvironment{thebibliography}
  {\par\underline{\refname}:%
  \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%
  \setcounter{enumiv}{0}%
  \renewcommand{\theenumiv}{\arabic{enumiv}}%
  \renewcommand{\bibitem}[1]{%
    \unskip\refstepcounter{enumiv}%
    \if@filesw\immediate\write\@auxout{\string\bibcite{##1}{\theenumiv}}\fi
    \space[\theenumiv]~\ignorespaces}}
  {}
\makeatother
\renewcommand{\refname}{References}

\begin{document}

\lipsum[1] \cite{first}

\lipsum[2] \cite{second}

\lipsum[3] \cite{third}

\begin{thebibliography}
  \bibitem{first}
  Authors. \emph{Journal} \textbf{Volume}, Page (Year).
  %  
  \bibitem{second}
  Authors. \emph{Journal} \textbf{Volume}, Page (Year).
  %
  \bibitem{third}
  Authors. \emph{Journal} \textbf{Volume}, Page (Year).
  %
  \bibitem{fourth}
  Authors. \emph{Journal} \textbf{Volume}, Page (Year).
  %
  \bibitem{fifth}
  Authors. \emph{Journal} \textbf{Volume}, Page (Year).
  %
  \bibitem{sixth}
  Authors. \emph{Journal} \textbf{Volume}, Page (Year).
  %
  \bibitem{seventh}
  Authors. \emph{Journal} \textbf{Volume}, Page (Year).
\end{thebibliography}

\end{document}
Werner
  • 603,163
  • Thanks for this! Is there a method of implementing this with automatically formatted bibliography (ie: Taking the bibtex references from a journal)? I guess while I'm learning about this learning how to do it with automatic formatting would be convenient. – Wei Oct 11 '17 at 15:51
0

Just an examople from the link of my comment above. I also used this answer https://tex.stackexchange.com/a/250610/120578 for filecontents.

\documentclass[11pt]{article}
\usepackage[giveninits=true,backend=bibtex,doi=false,isbn=false,url=false]{biblatex}
\AtEveryBibitem{%
  \clearfield{pages}%
}
\renewcommand{\bibfont}{\normalfont\footnotesize}
\addbibresource{mynewbib.bib}

\defbibenvironment{bibliography}
  {\noindent}
  {\unspace}
  {\printtext[labelnumberwidth]{%
    \printfield{labelprefix}%
    \printfield{labelnumber}}
    \addspace}
\renewbibmacro*{finentry}{\finentry\addspace}

% \addbibresource{MyCollection.bib}
\addbibresource{mynewbib.bib}
\begin{filecontents}{mynewbib.bib}
@article{article1, 
author={Sell, Ralph R.}, 
title={TRANSFERRED JOBS.}, 
journal={Work and Occupations},
volume={10}, 
number={2}, 
year={1983},
pages={179-206}
}
@article{article1, 
author={Sell, Ralph R.}, 
title={TRANSFERRED JOBS.}, 
journal={Work and Occupations},
volume={10}, 
number={2}, 
year={1983},
pages={179-206}
}
@article{article2, 
author={Sell, Ralph R.}, 
title={TRANSFERRED JOBS.}, 
journal={Work and Occupations},
volume={10}, 
number={2}, 
year={1983},
pages={179-206}
}
@article{article3, 
author={Sell, Ralph R.}, 
title={TRANSFERRED JOBS.}, 
journal={Work and Occupations},
volume={10}, 
number={2}, 
year={1983},
pages={179-206}
}
@article{article4, 
author={Sell, Ralph R.}, 
title={TRANSFERRED JOBS.}, 
journal={Work and Occupations},
volume={10}, 
number={2}, 
year={1983},
pages={179-206}
}
@article{article5, 
author={Sell, Ralph R.}, 
title={TRANSFERRED JOBS.}, 
journal={Work and Occupations},
volume={10}, 
number={2}, 
year={1983},
pages={179-206}
}
\end{filecontents}

\begin{document}

\nocite{*}
\printbibliography[heading=none]
\end{document}

Output:

enter image description here

koleygr
  • 20,105
  • Thanks for this! However, when I run this code in Texmaker, it runs into an issue:

    This is BibTeX, Version 0.99d (MiKTeX 2.9) The top-level auxiliary file: test.aux The style file: biblatex.bst This database file appears more than once: mynewbib.bib ---line 3 of file test.aux : \bibdata{test-blx,mynewbib,mynewbib : } I'm skipping whatever remains of this command Database file #1: test-blx.bib Database file #2: mynewbib.bib Repeated entry---line 14 of file mynewbib.bib : @article{article1 : , I'm skipping whatever remains of this entry Biblatex version: 3.3 (There were 2 error messages)"

    – Wei Oct 11 '17 at 00:40
  • I ran out of characters in my last comment.. woops. Do you know why this error is the case? I checked around StackExchange for it but I didn't really find anything about this particular error that I understood. – Wei Oct 11 '17 at 00:42