0

enter image description here

I am using Overleaf, as that is the program the school recommends and a bare-bones template just for lists.

I am going along fine with a standard itemized list when suddenly my fourth entry decided not to indent. I poked around and changed to enumerated and uploaded the correct package \usepackage{enumitem}. But the sixth entry now is changing all the text to italics without spaces after I insert a website. I am trying and searching for an answer to fix it that doesn't involve math equations and I've got nothing. The code is as follows:

\documentclass{article}
\usepackage{fullpage}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{fancyhdr}
\usepackage{enumitem}
\usepackage[utf8]{inputenc}

\section{\textbf {Information Sites and Tools}}
\begin{enumerate}
\noindent
    {\textbf {"LaTeX For Beginners Handbook"}}. Created by the Information Services Department of the University of Edinburgh:  http://www.docs.is.ed.ac.uk/skills/documents/3722/3722-2014.pdf 
    \newline
    \newline
    {\textbf {CTAN (Comprehensive TeX Archive Network)}}. A free source of packages available for download that can be used inside LaTeX documents:  https://ctan.org/pkg/aurical 
    \\
    \\
    {\textbf {TeX Stack Exchange}} A forum website for LaTeX, TeX, and other typesetting systems free for sign up and browsing. There are many veteran users here and are very helpful: https://tex.stackexchange.com/ 
    \\
    \\
    {\textbf {Tables Generator}} A free table-generating website that allows users to generate tables for LaTeX, HTML, or other sources including the source code that can be inserted into any LaTeX document. It has some basic and limited formatting options.  It was created using many pieces open-source software: https://www.tablesgenerator.com/ 
    \\
    \\
    {\textbf {"Macros".}} This document was created by Andrew Török of the University of Houston Math Department. A brief and easy to understand introduction and explanation of macros and how to create them: https://www.math.uh.edu/~torok/math_6298/latex/macros.html
    \\
    \\
    {\textbf {"LaTeX Command Glossary".}}  A list of common LaTeX commands provided by Wikibooks: 
    https://en.wikibooks.org/wiki/LaTeX/Command_Glossary

The last entry is what is all italicized without spaces between the words. Any help is greatly appreciated.

2
  • 1
    Welcome to TeX.SE! Your document example is not complete; mising are \begin{document}, \end{enumerate} and commands \item which should be present in (any) lista. Please, correct it so, that we can copy it and test in our computers as it is.
    – Zarko
    Oct 9, 2020 at 22:50
  • www.learnlatex.org might also be helpful, especially Lesson 04 - Logical Structure
    – leandriis
    Oct 10, 2020 at 8:51

2 Answers 2

4

To long for the comment:

  • Code, which you provide, is not complete and has many errors (see my comment below question). Consequently, we are not able to reproduce your problem. So, I kindly ask you to correct provided code to complete small document, which reproduce your problem. In this please consider my comment below your question.
  • Don't terminate items in list with \newline or \\ . They only make a mess in formatting lists.
  • Don't format section style inside section title.
  • For links you need to use one of the packages intended for hyper referencing: url, or its extension xurl or hyperref (˙which contain url too).
  • It is not clear, what list layout you like to have. In MWE below is used default settings. If you like to change it, the enumitem packages offer many possibilities. For example see, what happens, if you for start of your list with use of the \begin{enumerate}[leftmargin=*].

For start see, if the following MWE (Minimal Working Example), gives what you like to obtain:

\documentclass{article}
\usepackage{fullpage}
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage{xurl}

\begin{document}
\section{Information Sites and Tools}

    \begin{enumerate}
\item   \textbf{"LaTeX For Beginners Handbook"}. 
Created by the Information Services Department of the University of Edinburgh:
\url{http://www.docs.is.ed.ac.uk/skills/documents/3722/3722-2014.pdf}

\item   \textbf{CTAN (Comprehensive TeX Archive Network)}.
A free source of packages available for download that can be used inside LaTeX
documents:  \url{https://ctan.org/pkg/aurical}

\item   \textbf {TeX Stack Exchange}
A forum website for LaTeX, TeX, and other typesetting systems free
for sign up and browsing. There are many veteran users here and are very
helpful: \url{https://tex.stackexchange.com/}

\item   \textbf {Tables Generator}
A free table-generating website that allows users to generate
tables for LaTeX, HTML, or other sources including the source code that can
be inserted into any LaTeX document. It has some basic and limited formatting
options.  It was created using many pieces open-source software:
\url{https://www.tablesgenerator.com/}

\item   \textbf {"Macros".}
This document was created by Andrew Török of the University of Houston Math
Department. A brief and easy to understand introduction and explanation of
macros and how to create them:
\url{https://www.math.uh.edu/~torok/math_6298/latex/macros.html}

\item   \textbf{"LaTeX Command Glossary".}
A list of common LaTeX commands provided by Wikibooks: \url{https://en.wikibooks.org/wiki/LaTeX/Command_Glossary}
    \end{enumerate}
\end{document}

enter image description here

3

As an addendum to Zarko's answer:

If I take your code and add \begin{document} and \end{document} to it and try to compile it, I, as expected, receive multiple error messages. As soon as your compiling process results in error messages, do not look at the output, but fix them first. This is especially important, since TeX only tries to recover enough to syntax check more of the file after an error, it does not try to make sensible output after an error. So, even if you get something that on first glance resembles a pdf file, there can still be issues with it.

You can take a look at the error messages, if you click on the button with the red rectangle and a number inside of it. As long as there is a red rectangle, there are error messages.

enter image description here

Let's take a look at the error messages:

! Missing $ inserted. l.25 ...them: https://www.math.uh.edu/~torok/math_

You get this error message since the url contains a _. Since you can't use _ in normal text, latex assumes, you actually wanted to use math mode. (There, you can use _ for subscripts, as for example in $x_{y}$) Since you do not want any math in this situation, but want to display a url, load the xurl package and place the url inside of the \url command. Repeat for all other urls in your document.

Having done the above mentioned changes, latex now complains about a missing \end{enumerate}, so let's add this line right before \end{document}.

Having added this line, we still receive an error message:

 Something's wrong--perhaps a missing \item.

This is caused by latex expecting items of an enumerate list being entered in the following general format:

\begin{enumerate}
\item text that belongs to the first item
\item text that belongs to the second item
\end{enumerate}

Comparing this general scheme to your code, reveals that you never used the \item command. In order to correct the syntax in your enumerate environment, place \item before each \textbf... and remove all occurences of \\ \\ and \newline as they are not needed here.

Having done all thouse changes, we end up with a code, that finally compiles without any error messages:

\documentclass{article}
\usepackage{fullpage}
%\usepackage{graphicx} % not related to this example
%\usepackage{xcolor} % not related to this example
%\usepackage{fancyhdr} % not related to this example
%\usepackage{enumitem} % not needed for the default enumerate environment
%\usepackage[utf8]{inputenc} % default in an up to date installation

\usepackage{xurl}

\begin{document}
\section{Information Sites and Tools}

\begin{enumerate}
    \item \textbf {"LaTeX For Beginners Handbook"}. Created by the Information Services Department of the University of Edinburgh:  \url{http://www.docs.is.ed.ac.uk/skills/documents/3722/3722-2014.pdf }

    \item \textbf {CTAN (Comprehensive TeX Archive Network)}. A free source of packages available for download that can be used inside LaTeX documents:  \url{https://ctan.org/pkg/aurical} 

    \item \textbf {TeX Stack Exchange} A forum website for LaTeX, TeX, and other typesetting systems free for sign up and browsing. There are many veteran users here and are very helpful: \url{https://tex.stackexchange.com/} 

    \item \textbf {Tables Generator} A free table-generating website that allows users to generate tables for LaTeX, HTML, or other sources including the source code that can be inserted into any LaTeX document. It has some basic and limited formatting options.  It was created using many pieces open-source software: \url{https://www.tablesgenerator.com/} 

    \item \textbf {"Macros".} This document was created by Andrew Török of the University of Houston Math Department. A brief and easy to understand introduction and explanation of macros and how to create them: \url{https://www.math.uh.edu/~torok/math_6298/latex/macros.html}

    \item \textbf {"LaTeX Command Glossary".}  A list of common LaTeX commands provided by Wikibooks: 
    \url{https://en.wikibooks.org/wiki/LaTeX/Command_Glossary}
    \end{enumerate}
    \end{document}

enter image description here

Finally, let's take a look at the output. Your use of \textbf in all items and you mentioning having tried itemize in your question, makes me guess, you could, in fact, be interested in an unnumbered, description-like list. If that's the case, you could use description instead of enumerate and \item[CTAN (Comprehensive TeX Archive Network)] and the like instead of \item \textbf{CTAN (Comprehensive TeX Archive Network)}. If you also wish to change the font of the urls to match the usual text font, you can add \urlstyle{same} to the preamble:

\documentclass{article}
\usepackage{fullpage}
%\usepackage{graphicx} % not related to this example
%\usepackage{xcolor} % not related to this example
%\usepackage{fancyhdr} % not related to this example
%\usepackage{enumitem} % not needed for the default enumerate environment
%\usepackage[utf8]{inputenc} % default in an up to date installation

\usepackage{xurl}
\urlstyle{same}

\begin{document}
\section{Information Sites and Tools}

\begin{description}
    \item["LaTeX For Beginners Handbook"] Created by the Information Services Department of the University of Edinburgh:  \url{http://www.docs.is.ed.ac.uk/skills/documents/3722/3722-2014.pdf }

    \item[CTAN (Comprehensive TeX Archive Network)] A free source of packages available for download that can be used inside LaTeX documents:  \url{https://ctan.org/pkg/aurical} 

    \item[TeX Stack Exchange] A forum website for LaTeX, TeX, and other typesetting systems free for sign up and browsing. There are many veteran users here and are very helpful: \url{https://tex.stackexchange.com/} 

    \item[Tables Generator] A free table-generating website that allows users to generate tables for LaTeX, HTML, or other sources including the source code that can be inserted into any LaTeX document. It has some basic and limited formatting options.  It was created using many pieces open-source software: \url{https://www.tablesgenerator.com/} 

    \item["Macros".] This document was created by Andrew Török of the University of Houston Math Department. A brief and easy to understand introduction and explanation of macros and how to create them: \url{https://www.math.uh.edu/~torok/math_6298/latex/macros.html}

    \item["LaTeX Command Glossary".]  A list of common LaTeX commands provided by Wikibooks: 
    \url{https://en.wikibooks.org/wiki/LaTeX/Command_Glossary}
    \end{description}
    \end{document}

enter image description here

If you want linebreaks in urls to only occur at certain places such as at a . or a \, you could use the url package instead of xurl. If you want hyperlinks, use the hyperref package instead. (The before mentioned \url and \urlstyle{same} commands work with all three packages.)

If you want to further customize the look of the list, e.g. the indentation of the second and following lines of an \item, the vertical white space between adjacent items or the space between the bold and the following text, take a look at the enumitem package and its numerous options.

You must log in to answer this question.

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