How to break the email-address in behind the @-symbol (scrlttr2)
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I like to write a letter in latex, it all works fine so far, i just find that the sender information on the top rightis kind of "ugly". This results from the long email-address pushing the entire block to the left:
Firstname Lastname
Street 001
9999 Cityname
Telefon: +43 9999 999 2
Email: first.lastname@alumni.university.edu
Is it possible to force a line break after the @-symbol aligning the adress with the rest of the information so it looks like below?
Firstname Lastname
Street 001
9999 Cityname
Telefon: +43 9999 999 2
Email: first.lastname@
alumni.university.edu
Here is the MME:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
makeatlettersetkomavarfirsthead%
hspace*fillfootnotesize
begintabularl@
usekomavarfromname\
usekomavarfromaddress
if@phone\
usekomavar*fromphoneusekomavarfromphonefi
if@fax\
usekomavar*fromfaxusekomavarfromfaxfi
if@email\
usekomavar*fromemailusekomavarfromemailfi
if@www\
usekomavar*fromurlusekomavarfromurlfi
endtabular%
makeatother
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edufirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
Thank you in advance :)
edit: included the information from the "Absender"-Option
line-breaking scrlttr2 email
add a comment |Â
up vote
3
down vote
favorite
I like to write a letter in latex, it all works fine so far, i just find that the sender information on the top rightis kind of "ugly". This results from the long email-address pushing the entire block to the left:
Firstname Lastname
Street 001
9999 Cityname
Telefon: +43 9999 999 2
Email: first.lastname@alumni.university.edu
Is it possible to force a line break after the @-symbol aligning the adress with the rest of the information so it looks like below?
Firstname Lastname
Street 001
9999 Cityname
Telefon: +43 9999 999 2
Email: first.lastname@
alumni.university.edu
Here is the MME:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
makeatlettersetkomavarfirsthead%
hspace*fillfootnotesize
begintabularl@
usekomavarfromname\
usekomavarfromaddress
if@phone\
usekomavar*fromphoneusekomavarfromphonefi
if@fax\
usekomavar*fromfaxusekomavarfromfaxfi
if@email\
usekomavar*fromemailusekomavarfromemailfi
if@www\
usekomavar*fromurlusekomavarfromurlfi
endtabular%
makeatother
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edufirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
Thank you in advance :)
edit: included the information from the "Absender"-Option
line-breaking scrlttr2 email
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I like to write a letter in latex, it all works fine so far, i just find that the sender information on the top rightis kind of "ugly". This results from the long email-address pushing the entire block to the left:
Firstname Lastname
Street 001
9999 Cityname
Telefon: +43 9999 999 2
Email: first.lastname@alumni.university.edu
Is it possible to force a line break after the @-symbol aligning the adress with the rest of the information so it looks like below?
Firstname Lastname
Street 001
9999 Cityname
Telefon: +43 9999 999 2
Email: first.lastname@
alumni.university.edu
Here is the MME:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
makeatlettersetkomavarfirsthead%
hspace*fillfootnotesize
begintabularl@
usekomavarfromname\
usekomavarfromaddress
if@phone\
usekomavar*fromphoneusekomavarfromphonefi
if@fax\
usekomavar*fromfaxusekomavarfromfaxfi
if@email\
usekomavar*fromemailusekomavarfromemailfi
if@www\
usekomavar*fromurlusekomavarfromurlfi
endtabular%
makeatother
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edufirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
Thank you in advance :)
edit: included the information from the "Absender"-Option
line-breaking scrlttr2 email
I like to write a letter in latex, it all works fine so far, i just find that the sender information on the top rightis kind of "ugly". This results from the long email-address pushing the entire block to the left:
Firstname Lastname
Street 001
9999 Cityname
Telefon: +43 9999 999 2
Email: first.lastname@alumni.university.edu
Is it possible to force a line break after the @-symbol aligning the adress with the rest of the information so it looks like below?
Firstname Lastname
Street 001
9999 Cityname
Telefon: +43 9999 999 2
Email: first.lastname@
alumni.university.edu
Here is the MME:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
makeatlettersetkomavarfirsthead%
hspace*fillfootnotesize
begintabularl@
usekomavarfromname\
usekomavarfromaddress
if@phone\
usekomavar*fromphoneusekomavarfromphonefi
if@fax\
usekomavar*fromfaxusekomavarfromfaxfi
if@email\
usekomavar*fromemailusekomavarfromemailfi
if@www\
usekomavar*fromurlusekomavarfromurlfi
endtabular%
makeatother
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edufirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
Thank you in advance :)
edit: included the information from the "Absender"-Option
line-breaking scrlttr2 email
line-breaking scrlttr2 email
edited 1 hour ago
asked 2 hours ago
celi
206
206
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
Try this:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
%LoadLetterOptionAbsender
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
newsaveboxmybox
newcommandmyBrokenEmail[2]saveboxmyboxhboxE-Mail:space#1\hspace*wdmybox#2
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edumyBrokenEmailfirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
Output:
EDIT:
A second way if really a tabular is used:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
%LoadLetterOptionAbsender
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
% Here is the command to be used:
newcommandmyBrokenEmail[2]begintabular[t]@l@#1\#2endtabularvspace8pt
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edumyBrokenEmailfirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
is there any way that it works with theLoadLetterOptionAbsender
option or to get this information back at the right side?
â celi
1 hour ago
@celi. Did you tried the code with your option there? I had to remove it but I suppose that the code will still work for you.
â koleygr
1 hour ago
right, sorry for that, of course it's a file on my harddrive. sadly it doesn't work, I think it might be the problem that the email variable is used in a tabular environment?
â celi
1 hour ago
@celi... try the edited way then
â koleygr
1 hour ago
2
begintabular@l@
(no point in having the padding to the right. And âÂÂbreakedâ should be âÂÂbrokenâÂÂ.
â egreg
55 mins ago
 |Â
show 2 more comments
up vote
0
down vote
With a slightly modification of the answer of @kolegyr you can still use usekomavarfromemail
to get the email without breaks:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
%LoadLetterOptionDIN% default
usepackagehyperref
KOMAoptions
%paper=a4,% default
pagenumber=botcenter,
%fromemail,% used twice
%backaddress,% default
%foldmarks,% default
enlargefirstpage,
%foldmarks=true,% default (and used twice)
%fromrule=afteraddress,
fromphone,fromemail
hypersetup
%colorlinks=false,% not needed if hidelinks is used
hidelinks%=true,% no key-value-option
makeatlettersetkomavarfirsthead%
hspace*fillfootnotesize
begintabularl@
usekomavarfromname\
usekomavarfromaddress
if@phone\
usekomavar*fromphoneusekomavarfromphonefi
if@fax\
usekomavar*fromfaxusekomavarfromfaxfi
if@email\
usekomavar*fromemailusekomavar[letEmailFormatEmailInHeader]fromemailfi
if@www\
usekomavar*fromurlusekomavarfromurlfi
endtabular%
makeatother
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.eduEmailFormatfirst.lastname@alumni.university.edu
newcommandEmailFormat[2]#1#2
newcommandEmailInHeader[2]begintabular[t]@l@#1\#2endtabular
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
The email in a single line: usekomavarfromemail
closingCheers
endletter
enddocument
Result:
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Try this:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
%LoadLetterOptionAbsender
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
newsaveboxmybox
newcommandmyBrokenEmail[2]saveboxmyboxhboxE-Mail:space#1\hspace*wdmybox#2
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edumyBrokenEmailfirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
Output:
EDIT:
A second way if really a tabular is used:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
%LoadLetterOptionAbsender
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
% Here is the command to be used:
newcommandmyBrokenEmail[2]begintabular[t]@l@#1\#2endtabularvspace8pt
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edumyBrokenEmailfirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
is there any way that it works with theLoadLetterOptionAbsender
option or to get this information back at the right side?
â celi
1 hour ago
@celi. Did you tried the code with your option there? I had to remove it but I suppose that the code will still work for you.
â koleygr
1 hour ago
right, sorry for that, of course it's a file on my harddrive. sadly it doesn't work, I think it might be the problem that the email variable is used in a tabular environment?
â celi
1 hour ago
@celi... try the edited way then
â koleygr
1 hour ago
2
begintabular@l@
(no point in having the padding to the right. And âÂÂbreakedâ should be âÂÂbrokenâÂÂ.
â egreg
55 mins ago
 |Â
show 2 more comments
up vote
3
down vote
accepted
Try this:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
%LoadLetterOptionAbsender
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
newsaveboxmybox
newcommandmyBrokenEmail[2]saveboxmyboxhboxE-Mail:space#1\hspace*wdmybox#2
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edumyBrokenEmailfirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
Output:
EDIT:
A second way if really a tabular is used:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
%LoadLetterOptionAbsender
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
% Here is the command to be used:
newcommandmyBrokenEmail[2]begintabular[t]@l@#1\#2endtabularvspace8pt
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edumyBrokenEmailfirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
is there any way that it works with theLoadLetterOptionAbsender
option or to get this information back at the right side?
â celi
1 hour ago
@celi. Did you tried the code with your option there? I had to remove it but I suppose that the code will still work for you.
â koleygr
1 hour ago
right, sorry for that, of course it's a file on my harddrive. sadly it doesn't work, I think it might be the problem that the email variable is used in a tabular environment?
â celi
1 hour ago
@celi... try the edited way then
â koleygr
1 hour ago
2
begintabular@l@
(no point in having the padding to the right. And âÂÂbreakedâ should be âÂÂbrokenâÂÂ.
â egreg
55 mins ago
 |Â
show 2 more comments
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Try this:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
%LoadLetterOptionAbsender
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
newsaveboxmybox
newcommandmyBrokenEmail[2]saveboxmyboxhboxE-Mail:space#1\hspace*wdmybox#2
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edumyBrokenEmailfirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
Output:
EDIT:
A second way if really a tabular is used:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
%LoadLetterOptionAbsender
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
% Here is the command to be used:
newcommandmyBrokenEmail[2]begintabular[t]@l@#1\#2endtabularvspace8pt
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edumyBrokenEmailfirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
Try this:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
%LoadLetterOptionAbsender
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
newsaveboxmybox
newcommandmyBrokenEmail[2]saveboxmyboxhboxE-Mail:space#1\hspace*wdmybox#2
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edumyBrokenEmailfirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
Output:
EDIT:
A second way if really a tabular is used:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
LoadLetterOptionDIN
%LoadLetterOptionAbsender
usepackagehyperref
KOMAoptions
paper=a4,
pagenumber=botcenter,
fromemail,
backaddress,
foldmarks,
enlargefirstpage,
foldmarks=true,
fromrule=afteraddress,
fromphone,fromemail,
hypersetup
colorlinks=false,
hidelinks=true,
% Here is the command to be used:
newcommandmyBrokenEmail[2]begintabular[t]@l@#1\#2endtabularvspace8pt
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.edumyBrokenEmailfirst.lastname@alumni.university.edu
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
closingCheers
endletter
enddocument
edited 42 mins ago
answered 1 hour ago
koleygr
10.5k1836
10.5k1836
is there any way that it works with theLoadLetterOptionAbsender
option or to get this information back at the right side?
â celi
1 hour ago
@celi. Did you tried the code with your option there? I had to remove it but I suppose that the code will still work for you.
â koleygr
1 hour ago
right, sorry for that, of course it's a file on my harddrive. sadly it doesn't work, I think it might be the problem that the email variable is used in a tabular environment?
â celi
1 hour ago
@celi... try the edited way then
â koleygr
1 hour ago
2
begintabular@l@
(no point in having the padding to the right. And âÂÂbreakedâ should be âÂÂbrokenâÂÂ.
â egreg
55 mins ago
 |Â
show 2 more comments
is there any way that it works with theLoadLetterOptionAbsender
option or to get this information back at the right side?
â celi
1 hour ago
@celi. Did you tried the code with your option there? I had to remove it but I suppose that the code will still work for you.
â koleygr
1 hour ago
right, sorry for that, of course it's a file on my harddrive. sadly it doesn't work, I think it might be the problem that the email variable is used in a tabular environment?
â celi
1 hour ago
@celi... try the edited way then
â koleygr
1 hour ago
2
begintabular@l@
(no point in having the padding to the right. And âÂÂbreakedâ should be âÂÂbrokenâÂÂ.
â egreg
55 mins ago
is there any way that it works with the
LoadLetterOptionAbsender
option or to get this information back at the right side?â celi
1 hour ago
is there any way that it works with the
LoadLetterOptionAbsender
option or to get this information back at the right side?â celi
1 hour ago
@celi. Did you tried the code with your option there? I had to remove it but I suppose that the code will still work for you.
â koleygr
1 hour ago
@celi. Did you tried the code with your option there? I had to remove it but I suppose that the code will still work for you.
â koleygr
1 hour ago
right, sorry for that, of course it's a file on my harddrive. sadly it doesn't work, I think it might be the problem that the email variable is used in a tabular environment?
â celi
1 hour ago
right, sorry for that, of course it's a file on my harddrive. sadly it doesn't work, I think it might be the problem that the email variable is used in a tabular environment?
â celi
1 hour ago
@celi... try the edited way then
â koleygr
1 hour ago
@celi... try the edited way then
â koleygr
1 hour ago
2
2
begintabular@l@
(no point in having the padding to the right. And âÂÂbreakedâ should be âÂÂbrokenâÂÂ.â egreg
55 mins ago
begintabular@l@
(no point in having the padding to the right. And âÂÂbreakedâ should be âÂÂbrokenâÂÂ.â egreg
55 mins ago
 |Â
show 2 more comments
up vote
0
down vote
With a slightly modification of the answer of @kolegyr you can still use usekomavarfromemail
to get the email without breaks:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
%LoadLetterOptionDIN% default
usepackagehyperref
KOMAoptions
%paper=a4,% default
pagenumber=botcenter,
%fromemail,% used twice
%backaddress,% default
%foldmarks,% default
enlargefirstpage,
%foldmarks=true,% default (and used twice)
%fromrule=afteraddress,
fromphone,fromemail
hypersetup
%colorlinks=false,% not needed if hidelinks is used
hidelinks%=true,% no key-value-option
makeatlettersetkomavarfirsthead%
hspace*fillfootnotesize
begintabularl@
usekomavarfromname\
usekomavarfromaddress
if@phone\
usekomavar*fromphoneusekomavarfromphonefi
if@fax\
usekomavar*fromfaxusekomavarfromfaxfi
if@email\
usekomavar*fromemailusekomavar[letEmailFormatEmailInHeader]fromemailfi
if@www\
usekomavar*fromurlusekomavarfromurlfi
endtabular%
makeatother
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.eduEmailFormatfirst.lastname@alumni.university.edu
newcommandEmailFormat[2]#1#2
newcommandEmailInHeader[2]begintabular[t]@l@#1\#2endtabular
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
The email in a single line: usekomavarfromemail
closingCheers
endletter
enddocument
Result:
add a comment |Â
up vote
0
down vote
With a slightly modification of the answer of @kolegyr you can still use usekomavarfromemail
to get the email without breaks:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
%LoadLetterOptionDIN% default
usepackagehyperref
KOMAoptions
%paper=a4,% default
pagenumber=botcenter,
%fromemail,% used twice
%backaddress,% default
%foldmarks,% default
enlargefirstpage,
%foldmarks=true,% default (and used twice)
%fromrule=afteraddress,
fromphone,fromemail
hypersetup
%colorlinks=false,% not needed if hidelinks is used
hidelinks%=true,% no key-value-option
makeatlettersetkomavarfirsthead%
hspace*fillfootnotesize
begintabularl@
usekomavarfromname\
usekomavarfromaddress
if@phone\
usekomavar*fromphoneusekomavarfromphonefi
if@fax\
usekomavar*fromfaxusekomavarfromfaxfi
if@email\
usekomavar*fromemailusekomavar[letEmailFormatEmailInHeader]fromemailfi
if@www\
usekomavar*fromurlusekomavarfromurlfi
endtabular%
makeatother
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.eduEmailFormatfirst.lastname@alumni.university.edu
newcommandEmailFormat[2]#1#2
newcommandEmailInHeader[2]begintabular[t]@l@#1\#2endtabular
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
The email in a single line: usekomavarfromemail
closingCheers
endletter
enddocument
Result:
add a comment |Â
up vote
0
down vote
up vote
0
down vote
With a slightly modification of the answer of @kolegyr you can still use usekomavarfromemail
to get the email without breaks:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
%LoadLetterOptionDIN% default
usepackagehyperref
KOMAoptions
%paper=a4,% default
pagenumber=botcenter,
%fromemail,% used twice
%backaddress,% default
%foldmarks,% default
enlargefirstpage,
%foldmarks=true,% default (and used twice)
%fromrule=afteraddress,
fromphone,fromemail
hypersetup
%colorlinks=false,% not needed if hidelinks is used
hidelinks%=true,% no key-value-option
makeatlettersetkomavarfirsthead%
hspace*fillfootnotesize
begintabularl@
usekomavarfromname\
usekomavarfromaddress
if@phone\
usekomavar*fromphoneusekomavarfromphonefi
if@fax\
usekomavar*fromfaxusekomavarfromfaxfi
if@email\
usekomavar*fromemailusekomavar[letEmailFormatEmailInHeader]fromemailfi
if@www\
usekomavar*fromurlusekomavarfromurlfi
endtabular%
makeatother
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.eduEmailFormatfirst.lastname@alumni.university.edu
newcommandEmailFormat[2]#1#2
newcommandEmailInHeader[2]begintabular[t]@l@#1\#2endtabular
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
The email in a single line: usekomavarfromemail
closingCheers
endletter
enddocument
Result:
With a slightly modification of the answer of @kolegyr you can still use usekomavarfromemail
to get the email without breaks:
documentclass[version=last]scrlttr2
usepackage[ngerman]babel
usepackagegraphics
%LoadLetterOptionDIN% default
usepackagehyperref
KOMAoptions
%paper=a4,% default
pagenumber=botcenter,
%fromemail,% used twice
%backaddress,% default
%foldmarks,% default
enlargefirstpage,
%foldmarks=true,% default (and used twice)
%fromrule=afteraddress,
fromphone,fromemail
hypersetup
%colorlinks=false,% not needed if hidelinks is used
hidelinks%=true,% no key-value-option
makeatlettersetkomavarfirsthead%
hspace*fillfootnotesize
begintabularl@
usekomavarfromname\
usekomavarfromaddress
if@phone\
usekomavar*fromphoneusekomavarfromphonefi
if@fax\
usekomavar*fromfaxusekomavarfromfaxfi
if@email\
usekomavar*fromemailusekomavar[letEmailFormatEmailInHeader]fromemailfi
if@www\
usekomavar*fromurlusekomavarfromurlfi
endtabular%
makeatother
setkomavarfromnameFirstname Lastname
setkomavarfromaddressStreet 001\9999 Cityname
setkomavarfromphone+43,9999,999,2
setkomavarfromemailhrefmailto:first.lastname@alumni.university.eduEmailFormatfirst.lastname@alumni.university.edu
newcommandEmailFormat[2]#1#2
newcommandEmailInHeader[2]begintabular[t]@l@#1\#2endtabular
begindocument
beginletter%
Company\
Mainstreet 001\
1111 Cityname
setkomavarsubjectSubject
openingDear Mr. X,
This is some text.
The email in a single line: usekomavarfromemail
closingCheers
endletter
enddocument
Result:
answered 10 mins ago
esdd
56.9k34383
56.9k34383
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f457996%2fhow-to-break-the-email-address-in-behind-the-symbol-scrlttr2%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password