0

Is there a way to have uniform indentation via the tab button? For example, in Google Docs or Microsoft Word, if you press tab, you are not adding a fixed amount of space, but rather, your adding the variable space needed to get to the first tab marker. This ensures that even if you have words of different lengths, the tab will still indent to the first tab marker, and so the psuedo-columns are all aligned.

In Overleaf, it seems that the "&" serves as a tab button, but the space that it adds is independent of any tab-markers; it just adds a fixed amount of horizontal space. This means that when I am making a syllabus, I end up with something like:

Quizzes_______20%

Final Exam_______20% (ignore the underlines, they represent empty space)

But I want the percentages to line up. This gets annoying if I use the hspace command, since every first word that I use is a different length, and I don't want to have to guess a random length to make sure all my words line up. Is there something to set this up? I have googled this question constantly with no answers.

  • 1
    maybe have a look at the tabbing environment or use tabulars ? – Lupino Sep 25 '22 at 09:15
  • a tab is a space, a & is a table cell boudary like <td> in html, probably you want neither and use Final exam\dotfill 20% so the percentage is flush right, but hard to say with no context given. You certainly do no want \hspace – David Carlisle Sep 25 '22 at 09:21
  • @DavidCarlisle The dot fill command works in conjunction with the minipage command, but is there a way to fill it without dots, just so that it is whitespace? – mrwillparker Sep 25 '22 at 09:51
  • See about tabto, but it seems that you are not aware that tabular can use columns of fixed width as p{3cm} or p{.25\linewidth}. Run texdoc array to learn about tabular columns. – Fran Sep 25 '22 at 09:55
  • (there are also texdoc online if yo do not have a local LaTeX installation.) – Fran Sep 25 '22 at 10:05
  • If you want something like \dotfill but is just empty space, you can use \hfill. (You could put that inside a \parbox or minipage if you didn't want to use the full width.) – frabjous Sep 25 '22 at 14:09

0 Answers0