0

Dealing with some slight problems on my LaTeX project.

Below I have two very simple paragraphs and one is giving me an error and the other is simply being annoying. In the first paragraph I get an error saying "Underfull \hbox (badness 10000) in paragraph. How can I remedy this error? It doesn't seem to be affecting anything.

Secondly, my second paragraph will not indent despite my putting in of \hspace, so it looks just like the paragraph without the indent. How can I fix it?

Here's the code:

\documentclass{article}
\usepackage{pgfplots}
\usepackage{tikz}
\pgfplotsset{compat=1.9}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[margin=1in]{geometry}
\usepackage{wrapfig}

\usepackage{lipsum}
\usepackage{xcolor}


\begin{document}



\begin{titlepage}
\hspace{0pt}
\vfill
\begin{center}
\Huge{UNSPCFA Presents}\\
\vspace{1.25mm}
\normalsize{United Nations Special Phenomenon\\ Center for Attribution}\\
\footnotesize{Centre de Ph\`{e}nom\'{e}ne Sp\'{e}cial des\\ Nations Unies pour Paternit\'{e}}\\
\vspace{1.25mm}
\tiny{Copyright \copyright\hspace{1mm}2017 by UNSPCFA\\ All rights reserved for Illuminati corporation,\\ Austin, Texas}\\
\vspace{10mm}
\huge{A Study on Cyclomethylic Molecules\\ and Compounds}\\
\vspace{5mm}
\normalsize{Logan Morales}\\
\normalsize{Alex Kachkine}
\end{center}
\vfill
\hspace{0pt}
\end{titlepage}


\begin{abstract}
When one explores the world and discovers the true nature of organic chemistry and its implications, they must eventually come to terms with the idea that there is no such thing as cyclomethylic or cycloethylic molecules. Now, of course cycloethanes don't exist, because that doesn't make any sense, but traditional organic chemistry classes incorrectly posit that there is no such thing as cyclomethanes. The reality is that there are many cyclomethane molecules, and they participate in activities such as fishing, cow milking, spreading ebola, and many more family-fun activities. Cyclomethanes make up a large number of important compounds that you've probably never heard of, and are essential in many different reactions that you've also probably never heard of. According to Sauerkraut's rule, any conceivable molecule that contains one carbon atom must exist. His logic for years was taken as tomfoolery, and Sauerkraut was shunned away from the scientific community. He had to move to the east side of town instead. Eventually however and purely by coincidence, a UNSPCFA (United Nations Special Phenomenon Center for Attribution) officer dropped a sample of 3,3-diethylpentane into a bucket of whiskey, and an {\textquotedblleft}Achievement Unlocked" message appeared above his head titled {\textquotedblleft}Cyclomethane". The officer preferred to keep his name anonymous in this study in order to keep his name anonymous in this study, but he allowed the incident's data to be obtained by a source preferring to keep their name anonymous in this study. Wikileaks requested to obtain the data, but the source felt it better to allow the information to be revealed on the wiki Wikihow. After copious nights staying up past midnight assessing information from numerous Wikihow pictures, all data were obtained and recorded. In the UNSPCFA, the dedicated scientists who investigate these elusive molecules are members of an elite squad known as the Special Cyclomethyl Unit. This is their study.
\end{abstract}

\tableofcontents
\newpage

\section{Sauerkraut's Rule}
\subsection{Summary}
\hspace{5mm}In organic chemistry, Sauerkraut's rule (also known as Sourcrowt's rool) describes the existence of certain methylic molecules. In organic chemistry, a methylic molecule is a molecule containing a minimum of one carbon, and a maximum of one carbon. Typically methylic molecules contain two to four hydrogens, but they may also contain other elements like bromine, chlorine, and even iodine. Sauerkraut's full hypothesis is {\textquotedblleft}for any molecule containing one carbon that a person of average brain capacity might consider to be possible under exact conditions of the known universe, there must exist that conceived molecule in nature in some form." In modern science, most laymen and scientists alike discussing Sauerkraut's rule (especially in general conversation) abbreviate the hypothesis to {\textquotedblleft}any conceivable molecule that contains one carbon atom must exist, no matter what, even if it's a Monday".\\
\hspace{5mm}Sauerkraut's rule is easily proven by the "Sauerkraut formula" which was developed not by Sauerkraut, but his mother who wrote it on a sticky note on Sauerkraut's lunch bag before work. The formula is as follows:\\

\vspace{2.5mm}
\Large{$\lim_{x\rightarrow\kappa\pi}\int_{x-\delta}^{x (\Delta$T$\lambda^{ex})\frac{\mathrm{d} }{\mathrm{d} x}$}\\
\vspace{2.5mm}


\subsection{Context and Implications}
The rule was formulated by German chemist Wilhelm Borschtheimer Sauerkraut Jr. in 1865.
\end{document}

Thanks!

EDIT: All code before original code is now here.

  • As for the second question, replace \hspace{5mm by \hspace*{5mm. –  Dec 17 '17 at 04:06
  • 2
    Your code does not include two paragraphs. You should leave an empty (or 'blank') line between paragraphs, and you should rarely (i.e., almost never) use \\ to break a line outside of special environments like tables. (Note: \\ does not end a paragraph.) You also shouldn't need to write \hspace{5mm} to indent your paragraphs (but why this might seem necessary to you cannot be answered from the incomplete file you've provided). – jon Dec 17 '17 at 04:18
  • Alrighty, all code from before original post code is now here. @Cragfelt – The_Poseidolon Dec 17 '17 at 04:39
  • 1
    There are a lot of things that should be fixed. The most important are (i) that font sizing commands (such as \footnotesize and \huge and so forth) do not take arguments, and (ii) you are using \\ where a blank line is most appropriate. (I don't deal in maths, so I cannot offer any advice there.) There are other things I would change, but those are at the top of my list. – jon Dec 17 '17 at 04:50
  • 1
    Another thing is to load \usepackage[utf8x]{inputenc} to avoid codes like \'{e} for special French accents. – Cragfelt Dec 17 '17 at 05:36
  • 3
    Please read an introduction to LaTeX before you move on. Your code is wrong in many places. – Johannes_B Dec 17 '17 at 08:34
  • 1
    Concerning your title, have a look at https://en.wikibooks.org/wiki/LaTeX/Title_Creation and http://tex.stackexchange.com/questions/209993/how-to-customize-my-titlepage/210280#210280 – Johannes_B Dec 17 '17 at 08:35
  • @Cragfelt utf8 is completely sufficient. The OP could just write é but apparently did not know that. utf8x is not needed in 99.2 % of all cases. – Johannes_B Dec 17 '17 at 08:43

1 Answers1

3

I have made the following improvements:

  • Removed manual indentation with \hbox. LaTeX automatically indents the first line of each paragraph (except for the first line of the first paragraph of a section). If you truly want the first line of each first paragraph to be indented as well, configure it that way with the titlesec package. use the indentfirst package (as suggested by Johannes_B). The length \parindent specifies how far the first line of a paragraph is indented.

  • Replaced \\ (which is in normal text a \newline) by an empty line (which is a paragraph break). The length \parskip specifies how much vertical space is inserted between two paragraphs. By default 0.0pt plus 1.0pt (\showthe\parskip prints the current value to the log file).

  • \usepackage[T1]{fontenc} so that special symbols like è can be copied from the resulting pdf and so that words containing characters like those can be hyphenated.

    \usepackage{lmodern} to neutralize the negative effects of the T1 fontenc (pixelated font and the disability to copy ligatures from the resulting pdf). According to David Carlisle the pixelated font when I use T1 fontenc is caused by that I probably don't have the type1 cm fonts. So maybe you would not need this package.

  • Used display math (in this case the equation environment but there are many more like gather or align).

  • Quoted text with the \enquote command defined by the csquotes package.

  • Emphasized a word using \emph instead of the quotes by which it was surrounded.

  • Commands like \Huge and \Large do not take an argument. They change the font size for the rest of the group. Please note that the \\ should be inside of the group, as pointed out by egreg.

\documentclass{article}
\usepackage{pgfplots}
\usepackage{tikz}
\pgfplotsset{compat=1.9}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage[margin=1in]{geometry}
\usepackage{wrapfig}

\usepackage{lipsum}
\usepackage{xcolor}
\usepackage{csquotes}
\usepackage{amsmath}

\usepackage{indentfirst}


\begin{document}

\begin{titlepage}
\hspace{0pt}
\vfill
\begin{center}
{\Huge UNSPCFA Presents\\}
\vspace{1.25mm}
United Nations Special Phenomenon\\ Center for Attribution\\
{\footnotesize Centre de Ph\'{e}nom\`{e}ne Sp\'{e}cial des\\ Nations Unies pour Paternit\'{e}\\}
\vspace{1.25mm}
{\tiny Copyright \copyright\hspace{1mm}2017 by UNSPCFA\\ All rights reserved for Illuminati corporation,\\ Austin, Texas\\}
\vspace{10mm}
{\huge A Study on Cyclomethylic Molecules\\ and Compounds\\}
\vspace{5mm}
Logan Morales\\
Alex Kachkine
\end{center}
\vfill
\hspace{0pt}
\end{titlepage}


\begin{abstract}
When one explores the world and discovers the true nature of organic chemistry and its implications, they must eventually come to terms with the idea that there is no such thing as cyclomethylic or cycloethylic molecules. Now, of course cycloethanes don't exist, because that doesn't make any sense, but traditional organic chemistry classes incorrectly posit that there is no such thing as cyclomethanes. The reality is that there are many cyclomethane molecules, and they participate in activities such as fishing, cow milking, spreading ebola, and many more family-fun activities. Cyclomethanes make up a large number of important compounds that you've probably never heard of, and are essential in many different reactions that you've also probably never heard of. According to Sauerkraut's rule, any conceivable molecule that contains one carbon atom must exist. His logic for years was taken as tomfoolery, and Sauerkraut was shunned away from the scientific community. He had to move to the east side of town instead. Eventually however and purely by coincidence, a UNSPCFA (United Nations Special Phenomenon Center for Attribution) officer dropped a sample of 3,3-diethylpentane into a bucket of whiskey, and an \enquote{Achievement Unlocked} message appeared above his head titled \enquote{Cyclomethane}. The officer preferred to keep his name anonymous in this study in order to keep his name anonymous in this study, but he allowed the incident's data to be obtained by a source preferring to keep their name anonymous in this study. Wikileaks requested to obtain the data, but the source felt it better to allow the information to be revealed on the wiki Wikihow. After copious nights staying up past midnight assessing information from numerous Wikihow pictures, all data were obtained and recorded. In the UNSPCFA, the dedicated scientists who investigate these elusive molecules are members of an elite squad known as the Special Cyclomethyl Unit. This is their study.
\end{abstract}

\tableofcontents
\newpage

\section{Sauerkraut's Rule}
\subsection{Summary}
In organic chemistry, Sauerkraut's rule (also known as Sourcrowt's rool) describes the existence of certain methylic molecules. In organic chemistry, a methylic molecule is a molecule containing a minimum of one carbon, and a maximum of one carbon. Typically methylic molecules contain two to four hydrogens, but they may also contain other elements like bromine, chlorine, and even iodine. Sauerkraut's full hypothesis is \enquote{for any molecule containing one carbon that a person of average brain capacity might consider to be possible under exact conditions of the known universe, there must exist that conceived molecule in nature in some form.} In modern science, most laymen and scientists alike discussing Sauerkraut's rule (especially in general conversation) abbreviate the hypothesis to \enquote{any conceivable molecule that contains one carbon atom must exist, no matter what, even if it's a Monday}.

Sauerkraut's rule is easily proven by the \emph{Sauerkraut formula} which was developed not by Sauerkraut, but his mother who wrote it on a sticky note on Sauerkraut's lunch bag before work. The formula is as follows:

\begin{equation}
\lim_{x\rightarrow\kappa\pi} \int_{x-\delta}^{x (\Delta\text{T}\lambda^{ex})\frac{\mathrm{d} }{\mathrm{d} x}}
\end{equation}


\subsection{Context and Implications}
The rule was formulated by German chemist Wilhelm Borschtheimer Sauerkraut Jr. in 1865.
\end{document}
jakun
  • 5,981
  • 1
    Wouldn't the indentfirst package be a simpler thing than using titlesec? – Johannes_B Dec 17 '17 at 08:37
  • All those \huge{Text} are still wrong. Those switches don't take an argument and line spacing is competely messed up. – Johannes_B Dec 17 '17 at 08:38
  • @Johannes_B yes, sounds that way. I didn't know the indentfirst package. Thank you. – jakun Dec 17 '17 at 08:40
  • @Johannes_B yes, I missed those, thank you. I will edit my answer. – jakun Dec 17 '17 at 08:41
  • It should also be Ph\'{e}nom\`{e}ne (it's wrong also in the question). More importantly, it should be {\footnotesize ...\\} or the baseline skip would be wrong. – egreg Dec 17 '17 at 10:53
  • if you get pixilated fonts from T1 computer modern you are missing the type1 cm fonts (you could still choose to use lmodern, but it should not be necessary) – David Carlisle Dec 17 '17 at 11:09