6

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}
  • 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 '13 at 22:10
7

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}
  • 1
    Do I really need % at the end? Just tested - it seems to compile without it. – Alexander Shukaev Feb 7 '13 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 '13 at 22:08
  • 1
    Alright, thank you for the quick turn guys. Best regards. – Alexander Shukaev Feb 7 '13 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
]
  • 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. – Alexander Shukaev Feb 7 '13 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 '13 at 22:22
  • Just a very kind author of that package, takes care of user input. – David Carlisle Feb 7 '13 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.