3

I am writing a paper using a template provided by the professor and I am getting the "something's wrong---perhaps a missing \item error" at three places and I can't figure out what is causing them. The errors occur at the first \item in the enumerate section, on the Results and Discussion section call, and the Results subsection call. It is causing the Results and Discussion header to start in the same line as the last sentence in the previous section not on its own line like it should be. The code I am using is the following:

\documentclass[11pt]{article}
\usepackage{graphicx, epstopdf}
\usepackage[font=small,labelfont=bf,textfont=bf]{caption}
\usepackage{subcaption}
\usepackage{color}
\usepackage{url}
\usepackage{mathtools}
\usepackage{multirow}
\usepackage{cancel}
\usepackage{abstract}
\usepackage{csquotes}
\addtolength{\textwidth}{1in}
\addtolength{\textheight}{1in}
\addtolength{\evensidemargin}{0.5in}
\addtolength{\oddsidemargin}{-0.5in}
\addtolength{\topmargin}{-0.5in}

\usepackage{tocloft}
\usepackage[nottoc,notlot,notlof]{tocbibind}

\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\setcounter{secnumdepth}{0}

\newcommand{\HRule}{\rule{\linewidth}{0.35mm}}

\begin{document}

% this points to a separate .tex file for your title
% note: title.tex is formatted to include a blank page for double-sided printing
\input{./title.tex}

% this points to a separate .tex file for your abstract
% note: abstract.tex is formatted to include a blank page for double-sided printing
\input{./abstract.tex}


\tableofcontents
\listoffigures
\listoftables
\pagenumbering{arabic}
\thispagestyle{empty}
\clearpage 

\section{Introduction and Theory}
This experiment is expected to demonstrate what role pulse shaping plays in the nuclear detection process. The objective of this experiment was to become familiar with assembling a basic nuclear pulse processing system. As part of this process we needed to observe and describe the different pulses created at each step of the system. It was also necessary to measure pulse shape parameters, explain why each step in the system is necessary, and describe the effect of the system component settings on the pulse shape.
\bigbreak
The need for pulse shaping in nuclear detection is explored. Pulse shaping refers to a series of operations that are performed on a raw pulse from a detector that make it easier to extract the desired information. The raw pulse (or anode pulse) that is created by the detector and Photo-Multiplier Tube (PMT) carries information about the charge collected and the time it took to collect that charge. It is generally easier to work with amplitudes of pulses rather than the areas under them so this anode pulse is passed through a preamplifier (preamp) which integrates the pulse. Then the height of the preamp pulse (which is now given in voltage) is proportional to the energy (charge collected) and the charge collection time is determined by the rise time of this pulse. The rise time of a preamp pulse is very fast in a charge sensitive (fast) preamp so it is necessary to take the derivative of this pulse to obtain a pulse with a wider rise time. An amplifier does this derivation which leads to a signal that has a better shape to determine the timing of the pulse while preserving the energy (charge) information. After these steps the pulse can be used by a multichannel analyzer (MCA) to determine an energy spectrum or by a single channel analyzer (SCA) which turns the pulse into a logic pulse for counting purposes.

\section{Procedure and Methods}
A pulse processing system was assembled according to the block diagram in Figure \ref{fig:sysblock}.

\begin{figure}[h]
    \centering
    \includegraphics[width=\textwidth]{BlockDiagram.PNG}
    \caption{Block Diagram of System Setup}
    \label{fig:sysblock}
    \flushleft
\end{figure}

\hspace{-30pt} A list of the equipment used is provided below.
\bigskip
\begin{enumerate}
\item Cs-137 source
\item 2-inch-diameter by 2-inch-long sodium iodide scintillator (2x2 NaI) coupled to a 2-inch-diameter 20-stage PMT
\item 14-pin PMT base with integrated preamp
\item nuclear instrument module (NIM) bin
\item high voltage (HV) power supply
\item amplifier
\item SCA
\item counter/timer
\item MCA
\item oscilloscope (scope)
\end{enumerate}
\bigskip
The final setup is shown in Figure \ref{fig:sysrealrot}. The experiment was carried out by connecting the scope to each component and viewing the pulse that was output at each step. The pulses viewed were from the anode of the PMT, preamp, amp (both unipolar and bipolar), and the SCA. The 10\%-90\% rise and 90\%-10\% fall times for these pulses were visually determined from the scope output as well as measured by the scope. The effects of amplifier gain and shaping time-constant, as well as voltage input to the PMT on the pulse shapes were determined. The setting for the components at each of these steps are detailed below. The counting rate was also determined by the counter/timer and three different pulse height spectra (PHS) were obtained with the MCA.

\begin{figure}[h]
    \centering
    \includegraphics[width=\textwidth]{sysrealrot.jpg}
    \caption{Photograph of Pulse Processing System Setup}
    \label{fig:sysrealrot}
    \flushleft
\end{figure}

When initially setting up the system the source was put near the detector so the count rate was under $5,000 \frac{counts}{s}$. The HV power supply was set to $700 V$, the amplifier gain was set to $20$, the shaping time was set to $30 \mu s$, The SCA lower level division (LLD) was set to $0.2 V$ and the upper level division (ULD) was set to $10V$. The high voltage was adjusted to $600 V$ so the pulses coming from the amplifier had a peak value around $5 V$. The scope was autoset so we could see the pulses coming from the system.

The initial settings are unchanged in the following descriptions unless otherwise noted. When viewing the anode pulses the oscilloscope was initially set with a horizontal scale of $1 \mu s$ per division and a vertical scale of $50 mV$ per division. When viewing the preamp pulses the oscilloscope was initially set with a horizontal scale of $50 \mu s$ per division and a vertical scale of $100 mV$ per division. When viewing the amplifier unipolar pulses the oscilloscope was initially set with a horizontal scale of $5 \mu s$ per division and a vertical scale of $2 mV$ per division. The gain was then increased to 50 and decreased to 10 to observe the changes to the pulse due to amplifier gain. The shaping time was increased to $10 \mu s$ and decreased to $1 \mu s$ to observe the changes in the pulse due to shaping time. When viewing the amplifier bipolar pulses the oscilloscope was initially set with a horizontal scale of $5 \mu s$ per division and a vertical scale of $2 mV$ per division. When viewing the SCA pulses the LLD was initially set to $5 V$. Then the LLD was changed to $0.2 V$ and the ULD was set to $5 V$ to observe how this changed the pulses. To measure the counting rate the signal from the source was measured 10 times for $10 s$ and 10 more times for $40 s$. The source was then removed and the same counts were measured for the background. The background was then subtracted from the source to obtain an average pulse rate. The inital run of the MCA was done with the inital settings of for the experiment. The second spectrum was obtained with the amplifier gain set to 10. The third spectrum was obtained with the amplifier gain set to 20 and the HV supply set to $570 V$.
\bigskip

\section{Results and Discussion}
\bigskip
See the lab report guide for recommendations for your results and discussion section(s).

There are many ways to write and reference equations. One way is shown in Equation~\ref{eq:power}.

\begin{equation}
  P = I V = I^2 R
  \label{eq:power}
\end{equation}

And another way is shown in Equation~\ref{eq:multi}.
\begin{eqnarray}
  P & = & I V \nonumber \\
    & = & I^2 R
\label{eq:multi}
\end{eqnarray}

\subsection{Results}
\bigskip
The subsection is how you can break up a section. Note that the sections are listed in the table of contents and the subsections have a slightly different format (regular text, slightly indented).

\begin{figure}[h]
        \centering
        \begin{subfigure}{1.0in}
                \includegraphics[width=\textwidth]{picture}
                \caption{Dish 1}
                \label{fig:dish1}
        \end{subfigure}
        \begin{subfigure}{1.0in}
                \includegraphics[width=\textwidth]{picture.jpg}
                \caption{Dish 2}
                \label{fig:dish2}
        \end{subfigure}
        \begin{subfigure}{1.0in}
                \includegraphics[width=\textwidth]{picture.jpg}
                \caption{Dish 3}
                \label{fig:dish3}
        \end{subfigure}
    \flushleft
       \caption{Multi-figure figure}{This is an example of placing multiple figures together. You can reference sub-figures just like a single figure. As an example, Figure~\ref{fig:dish2} is a reference to the middle figure.}
       \label{fig:multi_biscuits}
\end{figure}

\subsection{Discussion}
Placeholder for discussion subsection with an example of a citation. \cite{refMattingly}

\section{Conclusions}
See the lab report for recommendations for your conclusions. 

% there are many ways to do references; this is a simple way if you only have a couple
\bibliographystyle{plain}
\begin{thebibliography}{9}

\bibitem{refMattingly}
John Mattingly and Dean J. Mitchell,
\enquote{A framework for the solution of inverse radiation transport problems,}
\emph{Trans. Nucl. Sci}, {\bf 75}(6), November 2010, pp. 3734-3743.

\end{thebibliography}

\end{document}

The title.tex file:

\begin{titlepage}
\flushleft
{\LARGE\bf Lab 1: Nuclear Pulse Processing Instrumentation}

\noindent\textcolor{red}\HRule \\[0.50cm]

Name: Robert Valdillez \\
Partners: Innocent Tsorxe\\[0.50cm]

Date performed: 10/3/2019 \\
Date due: 10/10/2019\\[0.50cm]

Instructor: Dr. John Mattingly  \\
Teaching assistant: Zheng Zhang \\

\clearpage\mbox{}\thispagestyle{empty}\clearpage
\end{titlepage}

And the abstract.tex file:

\flushleft
\section{Abstract}

See the lab report guide for recommendations for your abstract.

\thispagestyle{empty}
\clearpage
\mbox{}
\thispagestyle{empty}
\clearpage
3
  • 1
    Welcome to TeX.SE...Hope the problem lies in either title.tex or abstract.tex, if I comment those inputs, then there are nothing error, please check these files else provide the content of those files...
    – MadyYuvi
    Oct 5, 2019 at 2:07
  • I didn't even think about those files because it complied without the errors previously using those same files but it looks like you must be right because it is all fixed when I comment those out as well. So here are those files:
    – Robert V
    Oct 5, 2019 at 3:51
  • \flushleft should never be used in the document body. I mean it. You don't need to cancel the effect of \centering, because \end{figure} takes care of that automatically. Also \caption works independently on \centering or whatever is stated in the figure environment.
    – egreg
    Oct 5, 2019 at 10:03

1 Answer 1

2

The \flushleft at the end of each of the three figure environments are creating issues. Commenting those makes everything OK.

I don't think you need those, since the \centering ceases effect beyond the figure environment.

\documentclass[11pt]{article}
\usepackage{graphicx, epstopdf}
\usepackage[font=small,labelfont=bf,textfont=bf]{caption}
\usepackage{subcaption}
\usepackage{color}
\usepackage{url}
\usepackage{mathtools}
\usepackage{multirow}
\usepackage{cancel}
\usepackage{abstract}
\usepackage{csquotes}
\addtolength{\textwidth}{1in}
\addtolength{\textheight}{1in}
\addtolength{\evensidemargin}{0.5in}
\addtolength{\oddsidemargin}{-0.5in}
\addtolength{\topmargin}{-0.5in}

\usepackage{tocloft}
\usepackage[nottoc,notlot,notlof]{tocbibind}

\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\setcounter{secnumdepth}{0}

\newcommand{\HRule}{\rule{\linewidth}{0.35mm}}

\begin{document}

% this points to a separate .tex file for your title
% note: title.tex is formatted to include a blank page for double-sided printing
\input{./title.tex}

% this points to a separate .tex file for your abstract
% note: abstract.tex is formatted to include a blank page for double-sided printing
\input{./abstract.tex}


\tableofcontents
\listoffigures
\listoftables
\pagenumbering{arabic}
\thispagestyle{empty}
\clearpage 

\section{Introduction and Theory}
This experiment is expected to demonstrate what role pulse shaping plays in the nuclear detection process. The objective of this experiment was to become familiar with assembling a basic nuclear pulse processing system. As part of this process we needed to observe and describe the different pulses created at each step of the system. It was also necessary to measure pulse shape parameters, explain why each step in the system is necessary, and describe the effect of the system component settings on the pulse shape.
\bigbreak
The need for pulse shaping in nuclear detection is explored. Pulse shaping refers to a series of operations that are performed on a raw pulse from a detector that make it easier to extract the desired information. The raw pulse (or anode pulse) that is created by the detector and Photo-Multiplier Tube (PMT) carries information about the charge collected and the time it took to collect that charge. It is generally easier to work with amplitudes of pulses rather than the areas under them so this anode pulse is passed through a preamplifier (preamp) which integrates the pulse. Then the height of the preamp pulse (which is now given in voltage) is proportional to the energy (charge collected) and the charge collection time is determined by the rise time of this pulse. The rise time of a preamp pulse is very fast in a charge sensitive (fast) preamp so it is necessary to take the derivative of this pulse to obtain a pulse with a wider rise time. An amplifier does this derivation which leads to a signal that has a better shape to determine the timing of the pulse while preserving the energy (charge) information. After these steps the pulse can be used by a multichannel analyzer (MCA) to determine an energy spectrum or by a single channel analyzer (SCA) which turns the pulse into a logic pulse for counting purposes.

\section{Procedure and Methods}
A pulse processing system was assembled according to the block diagram in Figure \ref{fig:sysblock}.

\begin{figure}[h]
    \centering
    \includegraphics[width=\textwidth]{example-image-a}
    \caption{Block Diagram of System Setup}
    \label{fig:sysblock}
   % \flushleft
\end{figure}

\hspace{-30pt} A list of the equipment used is provided below.
\bigskip
\begin{enumerate}
\item Cs-137 source
\item 2-inch-diameter by 2-inch-long sodium iodide scintillator (2x2 NaI) coupled to a 2-inch-diameter 20-stage PMT
\item 14-pin PMT base with integrated preamp
\item nuclear instrument module (NIM) bin
\item high voltage (HV) power supply
\item amplifier
\item SCA
\item counter/timer
\item MCA
\item oscilloscope (scope)
\end{enumerate}
\bigskip
The final setup is shown in Figure \ref{fig:sysrealrot}. The experiment was carried out by connecting the scope to each component and viewing the pulse that was output at each step. The pulses viewed were from the anode of the PMT, preamp, amp (both unipolar and bipolar), and the SCA. The 10\%-90\% rise and 90\%-10\% fall times for these pulses were visually determined from the scope output as well as measured by the scope. The effects of amplifier gain and shaping time-constant, as well as voltage input to the PMT on the pulse shapes were determined. The setting for the components at each of these steps are detailed below. The counting rate was also determined by the counter/timer and three different pulse height spectra (PHS) were obtained with the MCA.

\begin{figure}[h]
    \centering
    \includegraphics[width=\textwidth]{example-image-a}
    \caption{Photograph of Pulse Processing System Setup}
    \label{fig:sysrealrot}
    % \flushleft
\end{figure}

When initially setting up the system the source was put near the detector so the count rate was under $5,000 \frac{counts}{s}$. The HV power supply was set to $700 V$, the amplifier gain was set to $20$, the shaping time was set to $30 \mu s$, The SCA lower level division (LLD) was set to $0.2 V$ and the upper level division (ULD) was set to $10V$. The high voltage was adjusted to $600 V$ so the pulses coming from the amplifier had a peak value around $5 V$. The scope was autoset so we could see the pulses coming from the system.

The initial settings are unchanged in the following descriptions unless otherwise noted. When viewing the anode pulses the oscilloscope was initially set with a horizontal scale of $1 \mu s$ per division and a vertical scale of $50 mV$ per division. When viewing the preamp pulses the oscilloscope was initially set with a horizontal scale of $50 \mu s$ per division and a vertical scale of $100 mV$ per division. When viewing the amplifier unipolar pulses the oscilloscope was initially set with a horizontal scale of $5 \mu s$ per division and a vertical scale of $2 mV$ per division. The gain was then increased to 50 and decreased to 10 to observe the changes to the pulse due to amplifier gain. The shaping time was increased to $10 \mu s$ and decreased to $1 \mu s$ to observe the changes in the pulse due to shaping time. When viewing the amplifier bipolar pulses the oscilloscope was initially set with a horizontal scale of $5 \mu s$ per division and a vertical scale of $2 mV$ per division. When viewing the SCA pulses the LLD was initially set to $5 V$. Then the LLD was changed to $0.2 V$ and the ULD was set to $5 V$ to observe how this changed the pulses. To measure the counting rate the signal from the source was measured 10 times for $10 s$ and 10 more times for $40 s$. The source was then removed and the same counts were measured for the background. The background was then subtracted from the source to obtain an average pulse rate. The inital run of the MCA was done with the inital settings of for the experiment. The second spectrum was obtained with the amplifier gain set to 10. The third spectrum was obtained with the amplifier gain set to 20 and the HV supply set to $570 V$.
\bigskip

\section{Results and Discussion}
\bigskip
See the lab report guide for recommendations for your results and discussion section(s).

There are many ways to write and reference equations. One way is shown in Equation~\ref{eq:power}.

\begin{equation}
  P = I V = I^2 R
  \label{eq:power}
\end{equation}

And another way is shown in Equation~\ref{eq:multi}.
\begin{eqnarray}
  P & = & I V \nonumber \\
    & = & I^2 R
\label{eq:multi}
\end{eqnarray}

\subsection{Results}
\bigskip
The subsection is how you can break up a section. Note that the sections are listed in the table of contents and the subsections have a slightly different format (regular text, slightly indented).

\begin{figure}[h]
        \centering
        \begin{subfigure}{1.0in}
                \includegraphics[width=\textwidth]{example-image-a}
                \caption{Dish 1}
                \label{fig:dish1}
        \end{subfigure}
        \begin{subfigure}{1.0in}
                \includegraphics[width=\textwidth]{example-image-b}
                \caption{Dish 2}
                \label{fig:dish2}
        \end{subfigure}
        \begin{subfigure}{1.0in}
                \includegraphics[width=\textwidth]{example-image-c}
                \caption{Dish 3}
                \label{fig:dish3}
        \end{subfigure}
    % \flushleft
       \caption{Multi-figure figure}{This is an example of placing multiple figures together. You can reference sub-figures just like a single figure. As an example, Figure~\ref{fig:dish2} is a reference to the middle figure.}
       \label{fig:multi_biscuits}
\end{figure}

\subsection{Discussion}
Placeholder for discussion subsection with an example of a citation. \cite{refMattingly}

\section{Conclusions}
See the lab report for recommendations for your conclusions. 

% there are many ways to do references; this is a simple way if you only have a couple
\bibliographystyle{plain}
\begin{thebibliography}{9}

\bibitem{refMattingly}
John Mattingly and Dean J. Mitchell,
\enquote{A framework for the solution of inverse radiation transport problems,}
\emph{Trans. Nucl. Sci}, {\bf 75}(6), November 2010, pp. 3734-3743.

\end{thebibliography}

\end{document}

BTW: I have changed the figure names to example-images (since I don't have the figure files).

Additional Advice

Would also ask: is there any need of the numerous \bigskips (particularly before/after the \section{...}, \subsection{...} or \begin{enumerate}'s ?

I think those are built-in the class file. You can see if your document looks any worse without that !

And this is one big reason why we prefer LaTeX over any WYSIWYG applications like Microsoft Word (where you need to specify every spacing and formatting... whereas it's already done in the LaTeX class files) !!

7
  • It's not that \flushleft is unneeded: it is wrong!
    – egreg
    Oct 5, 2019 at 10:04
  • I'm delighted to know that, and happy to learn. But, to reinforce my learning, could you explain (i) in a little more specific terms, and (ii) to a bit more depth ? E.g., w.r.t. your comment "\flushleft should never be used in the document body" ...do you want to include \raggedright or the environment \begin{flushleft} in the same category too ? If, I assume you are correct, then why does this command still exist in LaTeX ? Further, what's the problem that triggers if I use that ? To be honest my answer was from trial-and-error-- and I'd appreciate a cause-effect explanation.
    – Partha D.
    Oct 5, 2019 at 10:41
  • 1
    @ParthaD. Using the flushleft environment in the document is OK. Using \raggedright is OK. Using \flushleft is wrong.
    – egreg
    Oct 5, 2019 at 12:01
  • 1
    @ParthaD. The command \flushleft exists only because of implementation details; it can be used in definitions of environments, provided it is balanced by \endflushleft; not in the document body.
    – egreg
    Oct 5, 2019 at 12:22
  • 1
    Thank you it did fix everything when I deleted the \flushleft. In regards to the \bigskip I had to put some of those in to make the document look like I wanted it to. Some of them were there trying to fix the issue I was having. The one after the enumerate is needed to make the space I want as well as the one between paragraphs. The ones around the \section and \subsection were me trying to fix my problem and are unneeded.
    – Robert V
    Oct 5, 2019 at 17:14

You must log in to answer this question.

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