## LaTeX forum ⇒ Text Formatting ⇒ Multiple formats for the same information (addresses)

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Gnosos
Posts: 19
Joined: Wed Jun 29, 2011 10:52 pm

### Multiple formats for the same information (addresses)

Hi,

I'm relatively new to LaTeX, and it's hard to believe this subject hasn't been discussed before. But I've not found any such discussion. So I'm asking it now.

Take the example of a pre-publication academic paper and the author's address. For example, suppose an author of a paper is:

Dr. Peorgie Tirebiter, PhD
Department of Obfuscation
More Science University
1848 Antelope Freeway
Mystic, CT 01517
USA
e: PTirebiter@MoSciU.edu
t: (213) BU8-8252

But then, on the first page of actual text, the paper title will typically be repeated, with contact instructions in a footnote. Instead of appearing as a block, with separate lines devoted to different address elements, it will appear as normal paragraph text.

For example:
*Direct all correspondence to Dr. Porgie Tirebiter, PhD, Department of Obfuscation, More Science University, Room 1854 Mudhead Hall, 1848 Antelope Freeway, Mystic, CT 01517, USA, e: PTirebiter@MoSciU.edu, t:(213) BU8-8252.

Notice the information is identical in both examples, just the formatting changes. So I'm wondering if there's some way to input the information in the first format, with "\\" or "\par" as a line terminator. Something like:
\newcommand{CR}{\\}
\newcommand{contact} {
Dr. Peorgie Tirebiter, PhD\CR
Department of Obfuscation\CR
...
}
\contact
and then to change the terminator into something else (most likely ", ") for the first page of the document, so the contact text now appears as:
\renewcommand{CR}{, }
Direct all correspondence to \contact

Any suggestions?

Tags:

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
Welcome, i don't understand what is tripping you. You can redefine everything you want, as long as you know what you are doing and what might crash.
\documentclass{article}\author{Dr.~Peorgie Tirebiter, PhD\\	Department of Obfuscation\\	More Science University\\	Room 1854 Mudhead Hall\\	1848 Antelope Freeway\\	Mystic, CT 01517\\	USA\\	e:~PTirebiter@MoSciU.edu\\t:~(213) BU8-8252}\begin{document}\makeatletter\@author\bigbreakand later a footnote\footnote{\def\\{,}\@author}\bigbreak\noindent\parbox{\linewidth}{\def\\{~$\diamond$}\@author}\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Gnosos
Posts: 19
Joined: Wed Jun 29, 2011 10:52 pm
Johannes_B wrote:Welcome, i don't understand what is tripping you. You can redefine everything you want, as long as you know what you are doing and what might crash.
\documentclass{article}\author{Dr.~Peorgie Tirebiter, PhD\\	Department of Obfuscation\\	More Science University\\	Room 1854 Mudhead Hall\\	1848 Antelope Freeway\\	Mystic, CT 01517\\	USA\\	e:~PTirebiter@MoSciU.edu\\t:~(213) BU8-8252}\begin{document}\makeatletter\@author\bigbreakand later a footnote\footnote{\def\\{,}\@author}\bigbreak\noindent\parbox{\linewidth}{\def\\{~$\diamond$}\@author}\end{document}

Thanks.

I needed another pair of eyes on the problem and was afraid of two things. (1) Although I was assigning the address to a new command, I was mistakenly thinking LeTeX would process the line terminators into newlines and therefore they would be unavailable for redefinition in the footnote. (2) I was (and maybe still am) afraid the footnote paragraph would have both the original line terminators (\\ in \ author) as well as other line terminators that should be left alone.