Up to now I don't understand well what \null actually is and when we need it. I have only known that it can be used to create hypothetical anchors as follows.
\documentclass{article}
\usepackage[a6paper,margin=2cm]{geometry}
\parindent=0pt
\begin{document}
\hfill xport \hfill\null\\
\null\hrulefill{} never \hrulefill\par
\hrulefill{} dies. \hrulefill\par
\hfill really? \hfill\null\par
\newpage
\null
\vfill
\hfill The End \hfill\null
\end{document}
- What is
\nulland when do we need to use it? - Why do
\hrulefilland\hfillneed starting\nullwhen they follow\\but not need\nullwhen they follow\par? - Why does
\hfillalways need ending\nullbut\hrulefillnot need it?
\nulland still tell Tex that there is empty space? (for example with tabulars with alignments) – Zelphir Kaltstahl Mar 09 '16 at 17:50\nullin the document body. If you know what you're doing, using it in the definition of an environment might be justified. Remember that it never starts or ends horizontal mode. – egreg Mar 09 '16 at 18:34\nullis useful when one needs to ensure the correct behavior of\nofrenchspacingmode, which makes spaces after each sentence longer. By default, if a sentence ends in capital letter, TeX thinks it is an initial, and does not implement longer spacing, even though it may be desirable. To ensure the longer space happens, one can insert\nullright before the ending punctuation sign. For example the sentenceIn USA we don't usually drink tea with milk, like they do in the UK\null.will produce a longer space after the period, than without `\null'. – mathreader Aug 24 '22 at 07:53\@for that, which can be used before or after punctuation; in the latter case it poses no problem for following spaces. – egreg Aug 24 '22 at 08:09