8

How to do proper line breaking (continuation) for commands, i.e. their options and/or their arguments? For example, in order to transform this:

\usepackage[top=1.0cm, bottom=1.0cm, left=1.0cm, right=1.0cm, includehead, includefoot]{geometry}

Into this:

\usepackage[top=1.0cm, 
            bottom=1.0cm,
            left=1.0cm,
            right=1.0cm,
            includehead,
            includefoot]{geometry}
1
  • Welcome to TeX.sx! The form of the input is mostly your responsibility. Remember that an end of line count as a space, but a blank line counts as and end of paragraph command.
    – egreg
    Feb 7, 2013 at 22:10

2 Answers 2

8

I don't know if I understood your question. Do you want to break lines automatically? You can just type RETURN. Also, insert a comment command at the end of line.

\usepackage[top=1.0cm,%
            bottom=1.0cm,%
            left=1.0cm,%
            right=1.0cm,%
            includehead,%
            includefoot]{geometry}
3
  • 1
    Do I really need % at the end? Just tested - it seems to compile without it. Feb 7, 2013 at 22:08
  • 5
    For option lists the % at the end of lines is not necessary. However it is in many other situations, particularly in definitions of commands.
    – egreg
    Feb 7, 2013 at 22:08
  • 1
    Alright, thank you for the quick turn guys. Best regards. Feb 7, 2013 at 22:10
6

keyval (and I think most key/value parsing packages following it) trims all white space around the , and the =. So

[a=b,c=d]

is the same as

[ a
=
b , , , ,
c
=
d
]
3
  • That's good news. Basically, I asked this question because I was afraid that LaTeX is being very precise on how one types commands. But, now it seems that parser does a great job on grabbing those tokens. Thanks for the tip. Feb 7, 2013 at 22:18
  • @Haroogan, yes. This is a good property. We don't need to format our texts and remove all the extra empty spaces between the words (as we have in MS Word).
    – Sigur
    Feb 7, 2013 at 22:22
  • Just a very kind author of that package, takes care of user input. Feb 7, 2013 at 22:22

You must log in to answer this question.

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