How to break the email-address in behind the @-symbol (scrlttr2)

The name of the pictureThe name of the pictureThe name of the pictureClash 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










share|improve this question



























    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










    share|improve this question

























      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










      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 1 hour ago

























      asked 2 hours ago









      celi

      206




      206




















          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:



          enter image description here



          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





          share|improve this answer






















          • 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










          • 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

















          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:



          enter image description here






          share|improve this answer




















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "85"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            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






























            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:



            enter image description here



            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





            share|improve this answer






















            • 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










            • 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














            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:



            enter image description here



            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





            share|improve this answer






















            • 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










            • 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












            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:



            enter image description here



            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





            share|improve this answer














            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:



            enter image description here



            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






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 42 mins ago

























            answered 1 hour ago









            koleygr

            10.5k1836




            10.5k1836











            • 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










            • 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










            • @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










            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:



            enter image description here






            share|improve this answer
























              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:



              enter image description here






              share|improve this answer






















                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:



                enter image description here






                share|improve this answer












                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:



                enter image description here







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 10 mins ago









                esdd

                56.9k34383




                56.9k34383



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    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













































































                    Comments

                    Popular posts from this blog

                    Long meetings (6-7 hours a day): Being “babysat” by supervisor

                    Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                    Confectionery