It seems to me that every single LaTeX code I have read has to load some packages.

Since starting learning LaTeX (I am a new user), I have been able to create documents just fine without loading any packages. Therefore, I am a bit confused about the core functions of LaTeX.

Thus, my question is: What are the basic tasks that LaTeX can do without any packages? Additionally, could you give me an example of a task that LaTeX cannot do unless a package is loaded?

## closed as too broad by Werner, Mico, Stefan Pinnow, TeXnician, user31729 Feb 17 '18 at 13:29

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Welcome to TeX.SE! Latex can do a lot without loading packages. And in principle there is nothing that it cannot do without, you could just paste the relevant contents of the package(s) into the document preamble, but I'm sure you don't want to do that. – marmot Feb 16 '18 at 5:08
• Sure. Drawing a figure with some opacity qualifies for that, I believe. Note that there are more basic things that cannot be achieved either. Before listing them, it would be good to know what you want to use LaTeX for. – marmot Feb 16 '18 at 5:18
• Packages make doing complex things (and some simple things) simpler. The LaTeX kernel has no provisions for, e.g. hyperlinks, so you need to load the hyperref package to do that. But there are hundreds of specialized uses for which packages are extremely helpful: in my field, I use packages for drawing trees, aligning words with their translations, formatting linguistic examples etc. – Alan Munn Feb 16 '18 at 5:21
• Packages, as well as giving you abilities, give you tools. For example there are packages which make customising things like appearance of lists, chapter and section headings, tables of contents and so on easy. It would be quite difficult to do some of these things with the basic commands and possibly impossible without basically re-implementing something the package does – Au101 Feb 16 '18 at 5:23
• If you read Leslie Lamport's LaTeX: A Document Preparation System, the book is almost entirely about features that come with LaTeX, not those that come in packages. – ShreevatsaR Feb 16 '18 at 7:38

As mentioned in the comments you don't need to load the code of a package with \usepackage. You can copy it to your preamble:

\documentclass{article}
\makeatletter
... lots of code lines from various packages
\maketother
\begin{document}


But imho this doesn't really answer your question. You probably want to know if you really need this additional code lines.

The LaTeX kernel is a kernel, it is like the operating system on your PC. So it doesn't contain code for everything. Due to historical reasons quite a number of things that should be in the kernel are currently in external packages e.g. color support, graphics, language support, support for input encodings, amsmath code, keyval, basic drawing commands -- hopefully they will wander in the kernel in future version.

But for special things you always will have to load external code (and the class you are loading with \documentclass is already such an external code), e.g. if you want to draw a duck sitting on chessboard:

\documentclass{article}%
\usepackage{tikzducks}
\usepackage{xskak}

\begin{document}

\begin{tikzpicture}
\newchessgame
\node at (1,1) {\chessboard[showmover=false]};
\duck
\end{tikzpicture}
\end{document}


Here some examples:

\documentclass{book}

\begin{document}
\tableofcontents
\listoftables
\listoffigures

\chapter{What we can do without packages}
Taking advantange only of what is defined in a \texttt{documentclass}, for
and a list of figures.

\section{We can write formulae}
But with \texttt{amsmath} or \texttt{mathtool} it is easy to make them
beautiful.
$E = mc^{2}$

\section{We can list something}
We can create bullet list:
\begin{itemize}
\end{itemize}
Enumerated list:
\begin{enumerate}
\end{enumerate}
Descriptive list:
\begin{description}
\item [Ducks] very funny birds
\item [Lions] very funny animals, too!
\end{description}
But with \texttt{enumitem} you can easily customize them.

\section{We can create tables}
We can create Table~\ref{tab:mytab}, but with \texttt{booktabs} it'd look
more beautiful and  professional, and with \texttt{caption} we can easily
costomize its caption and improve its position.
\begin{table}
\centering
\caption{A table\label{tab:mytab}}
\begin{tabular}{cc}
\hline
Ducks & Lions \\
\hline
Lions & Ducks \\
\hline
\end{tabular}
\end{table}

\section{We can draw images}
We can draw a duck, see Figure~\ref{fig:duck}, but with Ti\emph{k}Z or
\texttt{pstricks} it is easier.
\begin{figure}
\centering
\begin{picture}(100,100)
\put(50,50){\oval(50,20){}}
\put(70,65){\circle{20}}
\put(35,50){\line(1,0){30}}
\put(70,65){\circle*{2}}
\put(75,67){\line(6,-1){10}}
\put(75,63){\line(6,1){10}}
\end{picture}
\caption{Duck by David Carlisle\label{fig:duck}}
\end{figure}

\chapter{What we cannot do without packages}
Virtually, you can do everything without packages,

But why do you want to redo what others have already done for you?
\end{document}


(Aside: there is a slight exception to this, in the existence of packages like glossaries which also include an external tool which must be run as well as LaTeX but I would argue that the external part of these tools is not itself a LaTeX package since it must be separately invoked).