TransWikia.com

What is the 'correct way' (from the compiler's point of view) for starting a line with a ref{}?

TeX - LaTeX Asked on March 5, 2021

I write tex in vim and have an automatic linter. I write sentences in the same paragraph on separate lines (for clarity and version control) and I often want to use a ref{} like a name to begin a line. Like this:

ref{Q5*} shows that the two problems (or two instances of the same problem) can come apart.
If the two problems are distinct, then~ref{Q5} has at least one problem which most questions do not.
Even if the problem of self-answering is a special case of the problem of pedantry (which I do not think it is) this at least shows that~ref{Q5} has two different instances of the problem.

My linter gives me a warning message if I use a ref{} in the middle of a line without a non-breaking space, so I use non-breaking spaces (second line of the block). But it gives me the same warning if I use ref{} at the beginning of a line.

What should I be using to begin lines with ref{} properly? (and why does the compiler throw warnings like this to begin with?) It seems odd to put a non-breaking space at the beginning of a line!

Thanks!

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP