BibTeX, biblatex and biberPlacing References between Sections

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
pjmiller_57
Posts: 20
Joined: Tue Nov 08, 2011 4:37 pm

Placing References between Sections

Post by pjmiller_57 »

Hello All,

Am trying to place references between section commands in a document I'm working on. Below is some LaTeX code that produces something close to what I need. The code uses a {thebibliography} environment. Thinking a better solution might use BibTeX or something similar. So included BibTeX entries below the LaTeX code in case that proves helpful.

Need to have more control over the numbering of the references. In the example, I'd like to have the R book references numbered from 1-4 and the SAS references numbered from 1-6.

Also need more control over the sections and subsections within the references. At present, these are indented. I'd like them to have indentation more like the sample section at the top of the PDF that my LaTeX code produces.

Have already looked into several possible solutions using {thebibliography}, BibTeX, biblatex, etc. but haven't managed to get anything to work. Help with this would be greatly appreciated.

Thanks,

Paul

Code: Select all

\documentclass[10pt]{article}

%%%% Reduce section font size %%%%

\usepackage{sectsty}
\sectionfont{\large}

%%%% Set depth for underlining %%%%

\usepackage{soul}
\setuldepth{a}

%%%% Set Bibliography Name to Null %%%% 

\makeatletter
\renewenvironment{thebibliography}[1]{%
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \@openbib@code
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \sloppy
      \clubpenalty4000
      \@clubpenalty \clubpenalty
      \widowpenalty4000%
      \sfcode`\.\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\makeatother

\begin{document}

\section*{A Sample Section Before the References}

Some text follwed by references.

\begin{thebibliography}{depth}

\section*{R Books}

\bibitem{Chambers2008SODA}
Chambers, J. M. (2008). \ul{Software for Data Analysis: Programming with
R.} Springer New York, NY: Springer.

\bibitem{Crawley2007Rbook}
Crawley, M. J. (2007). \ul{The R Book.} Hoboken, NJ: John Wiley and Sons
Inc.

\bibitem{Everitt2010Handbook}
Everitt, B. S. \& Hothorn, T. (2010). \ul{A Handbook of Statistical
Analyses using R, Second Edition.} Boca Raton, FL: Chapman and
Hall/CRC.

\bibitem{Fox2011Rcompanion}
Fox, J. \& Weisberg, S. (2011). \ul{An R Companion to Applied Regression,
Second Edition.} Thousand Oaks, CA: Sage Publications, Inc.

\section*{SAS Books}

\subsection*{Clinical Research}

\bibitem{dmitrienko2005Analysis}
Dmitrienko, A., Molenbergs, G., Chuang-Stein, C., \& Offen,
W. (2005). \ul{Analysis of Clinical Trials Using SAS: A Practical
Guide.} Cary, NC: SAS Institute Inc.

\bibitem{Shostak2005Programming}
Shostak, J. (2005). \ul{SAS Programming in the Pharmaceutical
Industry. Cary, NC: SAS Institute Inc.}

\bibitem{Walker2002Common}
Walker, G. A. (2002). \ul{Common Statistical Methods for Clinical Research
with SAS Examples, Second Edition.} Cary, NC: SAS Institute Inc.

\subsection*{Statistical Analyses:}

\bibitem{Cody1997Applied}
Cody, R. P. \& Smith, J. K. (1997). \ul{Applied Statistics and the SAS
Programming Language, Fourth Edition.} Upper Saddle River, New Jersey:
Prentice Hall.

\bibitem{SAS2002Longitudinal}
SAS Institute Inc. (2002). \ul{Longitudinal Data Analysis With Discrete
And Continuous Responses Course Notes.} Cary, NC: SAS Institute Inc.

\bibitem{Stokes2000Categorical}
Stokes, M. E., Davis, C. S., Koch, G. G. (2000). \ul{Categorical Data
Analysis Using the SAS System, Second Edition.} Cary, NC: SAS Institute
Inc.

\end{thebibliography}

\end{document}

Code: Select all

@book{chambers2008software,
  title={Software for data analysis: programming with R},
  author={Chambers, John},
  year={2008},
  publisher={Springer}
}

@book{crawley2007r,
  title={The R book},
  author={Crawley, Michael J},
  year={2007},
  publisher={Wiley}
}

@book{everitt2010handbook,
  title={A handbook of statistical analyses using R},
  author={Everitt, Brian S and Hothorn, Torsten},
  year={2010},
  publisher={Chapman \& Hall/CRC}
}

@article{weisberg2011r,
  title={An R companion to applied regression},
  author={WEISBERG, Sanford and FOX, John},
  year={2011}
}

@book{dmitrienko2005analysis,
  title={Analysis of clinical trials using SAS: A practical guide},
  author={Dmitrienko, Alex and Offen, Walter},
  year={2005},
  publisher={SAS Press}
}

@book{shostak2005sas,
  title={SAS programming in the pharmaceutical industry},
  author={Shostak, Jack},
  year={2005},
  publisher={Sas Inst}
}

@book{walker2002common,
  title={Common Statistical Methods for Clinical Research with SAS Examples},
  author={Walker, Glenn A},
  year={2002},
  publisher={SAS Publishing}
}

@book{cody1997applied,
  title={Applied statistics and the SAS programming language},
  author={Cody, Ronald P and Smith, Jeffrey K},
  year={1997},
  publisher={Prentice Hall (Upper Saddle River, NJ)}
}

@book{patetta2002longitudinal,
  title={Longitudinal Data Analysis with Discrete and Continuous Responses: Course Notes},
  author={Patetta, Michael and Marovich, Paul},
  year={2002},
  publisher={SAS Institute}
}

@book{stokes2000categorical,
  title={Categorical data analysis using the SAS system},
  author={Stokes, Maura Ellen and Davis, Charles Shaw and Koch, Gary Grove},
  year={2000},
  publisher={Sas Inst}
}
Last edited by localghost on Wed Feb 13, 2013 6:54 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Placing References between Sections

Post by localghost »

If I understand you right you should either take a look at bibentry or chapterbib.


Thorsten
Post Reply