To kern double em-dashes Unicorn Meta Zoo #1: Why another podcast? Announcing...

Where did Arya get these scars?

How to not starve gigantic beasts

Is it acceptable to use working hours to read general interest books?

finding a tangent line to a parabola

Why did C use the -> operator instead of reusing the . operator?

Are these square matrices always diagonalisable?

Co-worker works way more than he should

Could moose/elk survive in the Amazon forest?

What do you call the part of a novel that is not dialog?

Implementing 3DES algorithm in Java: is my code secure?

How long after the last departure shall the airport stay open for an emergency return?

Contradiction proof for inequality of P and NP?

What is the term for a person whose job is to place products on shelves in stores?

Trumpet valves, lengths, and pitch

Does Feeblemind produce an ongoing magical effect that can be dispelled?

My bank got bought out, am I now going to have to start filing tax returns in a different state?

Retract an already submitted recommendation letter (written for an undergrad student)

What's the difference between using dependency injection with a container and using a service locator?

Can I criticise the more senior developers around me for not writing clean code?

Did the Roman Empire have penal colonies?

Multiple options vs single option UI

"Rubric" as meaning "signature" or "personal mark" -- is this accepted usage?

Multiple fireplaces in an apartment building?

Reattaching fallen shelf to wall?



To kern double em-dashes



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraPorting the luatex/ConTeXt module “translate” to lualatexThree emdashes bound togetherDashes: - vs. – vs. —Should a negative kern be added after a degree symbol if followed by punctuation?Cannot “kern back” after applying kerningMakeidx, Subentries and dashesBad camelCase kernWhy are my en-dashes and em-dashes light gray?Vertical spacing using kern in a custom symbolCan I kern classes in luatex?Very long dashes in Victorian-era bookHow to kern kpfont integrals?












12















In Virginia Woolf's novels, she used double em-dashes quite often. In Latin Modern, the two dashes closely set together without gap. However, In ebgaramond there is a little gap which is quite unpleasant.



I found online this will do the trick:



newcommand{dmd}{{{---kern-1pt---}penaltyexhyphenpenalty}}


However, it doesn't do it for me, my code is the following in LyX Preamble with document class of Book KOMA-SCRIPT:



usepackage{ebgaramond} 
usepackage[T1]{fontenc}
newcommand{dmd}{{{---kern-1pt---}penaltyexhyphenpenalty}}


The text in concern:




This one, thanks to the hospitality of the host, had lasted far into
the afternoon. The beautiful October day was fading and the leaves
were falling from the trees in the avenue as I walked through it. Gate
after gate seemed to close with gentle finality behind me. Innumerable
beadles were fitting innumerable keys into well-oiled locks; the
treasure-house was being made secure for another night. After the
avenue one comes out upon a road---I forget its name---which leads
you, if you take the right turning, along to Fernham. But there was
plenty of time. Dinner was not till half-past seven. One could almost
do without dinner after such a luncheon. It is strange how a scrap of
poetry works in the mind and makes the legs move in time to it along
the road. Those words------




double-em-dashes










share|improve this question

























  • Hello! So you would like the two dashed to become one very long? Try to change -1pt to -0.4em in your code. If it helps, then you can try to find the minimal value that works.

    – yo'
    Feb 2 '13 at 13:01






  • 2





    And 2nd point: you have to input ------ as dmd{} in your code to make it work.

    – yo'
    Feb 2 '13 at 13:02













  • Related: Three emdashes bound together

    – egreg
    Feb 2 '13 at 14:11











  • @tohecz The -0.4em didn't work, whatever I modified the numbers, it doesn't seem to do anything. As regards to your second point of ------, not sure where to put it. In the script it is 6 hyphens... Can you illustrate it clearly? Thank you!

    – Shi Yuan
    Feb 4 '13 at 18:28













  • Shi Yuan, to use the solution you found, you need to replace any instance of ------ in your document with the new command dmd.

    – Kundor
    Feb 9 '13 at 15:07
















12















In Virginia Woolf's novels, she used double em-dashes quite often. In Latin Modern, the two dashes closely set together without gap. However, In ebgaramond there is a little gap which is quite unpleasant.



I found online this will do the trick:



newcommand{dmd}{{{---kern-1pt---}penaltyexhyphenpenalty}}


However, it doesn't do it for me, my code is the following in LyX Preamble with document class of Book KOMA-SCRIPT:



usepackage{ebgaramond} 
usepackage[T1]{fontenc}
newcommand{dmd}{{{---kern-1pt---}penaltyexhyphenpenalty}}


The text in concern:




This one, thanks to the hospitality of the host, had lasted far into
the afternoon. The beautiful October day was fading and the leaves
were falling from the trees in the avenue as I walked through it. Gate
after gate seemed to close with gentle finality behind me. Innumerable
beadles were fitting innumerable keys into well-oiled locks; the
treasure-house was being made secure for another night. After the
avenue one comes out upon a road---I forget its name---which leads
you, if you take the right turning, along to Fernham. But there was
plenty of time. Dinner was not till half-past seven. One could almost
do without dinner after such a luncheon. It is strange how a scrap of
poetry works in the mind and makes the legs move in time to it along
the road. Those words------




double-em-dashes










share|improve this question

























  • Hello! So you would like the two dashed to become one very long? Try to change -1pt to -0.4em in your code. If it helps, then you can try to find the minimal value that works.

    – yo'
    Feb 2 '13 at 13:01






  • 2





    And 2nd point: you have to input ------ as dmd{} in your code to make it work.

    – yo'
    Feb 2 '13 at 13:02













  • Related: Three emdashes bound together

    – egreg
    Feb 2 '13 at 14:11











  • @tohecz The -0.4em didn't work, whatever I modified the numbers, it doesn't seem to do anything. As regards to your second point of ------, not sure where to put it. In the script it is 6 hyphens... Can you illustrate it clearly? Thank you!

    – Shi Yuan
    Feb 4 '13 at 18:28













  • Shi Yuan, to use the solution you found, you need to replace any instance of ------ in your document with the new command dmd.

    – Kundor
    Feb 9 '13 at 15:07














12












12








12


2






In Virginia Woolf's novels, she used double em-dashes quite often. In Latin Modern, the two dashes closely set together without gap. However, In ebgaramond there is a little gap which is quite unpleasant.



I found online this will do the trick:



newcommand{dmd}{{{---kern-1pt---}penaltyexhyphenpenalty}}


However, it doesn't do it for me, my code is the following in LyX Preamble with document class of Book KOMA-SCRIPT:



usepackage{ebgaramond} 
usepackage[T1]{fontenc}
newcommand{dmd}{{{---kern-1pt---}penaltyexhyphenpenalty}}


The text in concern:




This one, thanks to the hospitality of the host, had lasted far into
the afternoon. The beautiful October day was fading and the leaves
were falling from the trees in the avenue as I walked through it. Gate
after gate seemed to close with gentle finality behind me. Innumerable
beadles were fitting innumerable keys into well-oiled locks; the
treasure-house was being made secure for another night. After the
avenue one comes out upon a road---I forget its name---which leads
you, if you take the right turning, along to Fernham. But there was
plenty of time. Dinner was not till half-past seven. One could almost
do without dinner after such a luncheon. It is strange how a scrap of
poetry works in the mind and makes the legs move in time to it along
the road. Those words------




double-em-dashes










share|improve this question
















In Virginia Woolf's novels, she used double em-dashes quite often. In Latin Modern, the two dashes closely set together without gap. However, In ebgaramond there is a little gap which is quite unpleasant.



I found online this will do the trick:



newcommand{dmd}{{{---kern-1pt---}penaltyexhyphenpenalty}}


However, it doesn't do it for me, my code is the following in LyX Preamble with document class of Book KOMA-SCRIPT:



usepackage{ebgaramond} 
usepackage[T1]{fontenc}
newcommand{dmd}{{{---kern-1pt---}penaltyexhyphenpenalty}}


The text in concern:




This one, thanks to the hospitality of the host, had lasted far into
the afternoon. The beautiful October day was fading and the leaves
were falling from the trees in the avenue as I walked through it. Gate
after gate seemed to close with gentle finality behind me. Innumerable
beadles were fitting innumerable keys into well-oiled locks; the
treasure-house was being made secure for another night. After the
avenue one comes out upon a road---I forget its name---which leads
you, if you take the right turning, along to Fernham. But there was
plenty of time. Dinner was not till half-past seven. One could almost
do without dinner after such a luncheon. It is strange how a scrap of
poetry works in the mind and makes the legs move in time to it along
the road. Those words------




double-em-dashes







lyx punctuation kerning






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 2 '13 at 15:55









Brent.Longborough

19.5k870122




19.5k870122










asked Feb 2 '13 at 12:20









Shi YuanShi Yuan

485414




485414













  • Hello! So you would like the two dashed to become one very long? Try to change -1pt to -0.4em in your code. If it helps, then you can try to find the minimal value that works.

    – yo'
    Feb 2 '13 at 13:01






  • 2





    And 2nd point: you have to input ------ as dmd{} in your code to make it work.

    – yo'
    Feb 2 '13 at 13:02













  • Related: Three emdashes bound together

    – egreg
    Feb 2 '13 at 14:11











  • @tohecz The -0.4em didn't work, whatever I modified the numbers, it doesn't seem to do anything. As regards to your second point of ------, not sure where to put it. In the script it is 6 hyphens... Can you illustrate it clearly? Thank you!

    – Shi Yuan
    Feb 4 '13 at 18:28













  • Shi Yuan, to use the solution you found, you need to replace any instance of ------ in your document with the new command dmd.

    – Kundor
    Feb 9 '13 at 15:07



















  • Hello! So you would like the two dashed to become one very long? Try to change -1pt to -0.4em in your code. If it helps, then you can try to find the minimal value that works.

    – yo'
    Feb 2 '13 at 13:01






  • 2





    And 2nd point: you have to input ------ as dmd{} in your code to make it work.

    – yo'
    Feb 2 '13 at 13:02













  • Related: Three emdashes bound together

    – egreg
    Feb 2 '13 at 14:11











  • @tohecz The -0.4em didn't work, whatever I modified the numbers, it doesn't seem to do anything. As regards to your second point of ------, not sure where to put it. In the script it is 6 hyphens... Can you illustrate it clearly? Thank you!

    – Shi Yuan
    Feb 4 '13 at 18:28













  • Shi Yuan, to use the solution you found, you need to replace any instance of ------ in your document with the new command dmd.

    – Kundor
    Feb 9 '13 at 15:07

















Hello! So you would like the two dashed to become one very long? Try to change -1pt to -0.4em in your code. If it helps, then you can try to find the minimal value that works.

– yo'
Feb 2 '13 at 13:01





Hello! So you would like the two dashed to become one very long? Try to change -1pt to -0.4em in your code. If it helps, then you can try to find the minimal value that works.

– yo'
Feb 2 '13 at 13:01




2




2





And 2nd point: you have to input ------ as dmd{} in your code to make it work.

– yo'
Feb 2 '13 at 13:02







And 2nd point: you have to input ------ as dmd{} in your code to make it work.

– yo'
Feb 2 '13 at 13:02















Related: Three emdashes bound together

– egreg
Feb 2 '13 at 14:11





Related: Three emdashes bound together

– egreg
Feb 2 '13 at 14:11













@tohecz The -0.4em didn't work, whatever I modified the numbers, it doesn't seem to do anything. As regards to your second point of ------, not sure where to put it. In the script it is 6 hyphens... Can you illustrate it clearly? Thank you!

– Shi Yuan
Feb 4 '13 at 18:28







@tohecz The -0.4em didn't work, whatever I modified the numbers, it doesn't seem to do anything. As regards to your second point of ------, not sure where to put it. In the script it is 6 hyphens... Can you illustrate it clearly? Thank you!

– Shi Yuan
Feb 4 '13 at 18:28















Shi Yuan, to use the solution you found, you need to replace any instance of ------ in your document with the new command dmd.

– Kundor
Feb 9 '13 at 15:07





Shi Yuan, to use the solution you found, you need to replace any instance of ------ in your document with the new command dmd.

– Kundor
Feb 9 '13 at 15:07










3 Answers
3






active

oldest

votes


















10














This is called a horizontal bar, also known as a quotation dash. It is used to introduce quoted text (sometimes). This is the standard method of printing dialogue in some languages.



There is no support in the standard TeX fonts, but one can use instead as special macro, or just use an em dash.



newcommandhemdash{hbox{---}kern-.5em---}    


You can do this:



documentclass{article}
newcommandhemdash{hbox{---}kern-.5em---}
begin{document}

This one, thanks to the hospitality of the host, had lasted
far into the afternoon. The beautiful October day was fading and
the leaves were falling from the trees in the avenue as I walked
through it. Gate after gate seemed to close with gentle finality
behind me. Innumerable beadles were fitting innumerable keys into
well-oiled locks; the treasure-house was being made secure for another
night. After the avenue one comes out upon a road---I forget its
name---which leads you, if you take the right turning, along to Fernham.
But there was plenty of time. Dinner was not till half-past seven.
One could almost do without dinner after such a luncheon. It is strange
how a scrap of poetry works in the mind and makes the legs move in
time to it along the road. Those wordshemdash


end{document}





share|improve this answer


























  • Thanks YL, it works brilliantly. However, the LyX will be passed around proof reader, it will be ideal if the manuscript is modified as little as possible. Is there any possible method to be included in the Preamble? I found this post, but couldn't figured out how it works. blog.cleverly.com/permalinks/322.html

    – Shi Yuan
    Feb 4 '13 at 18:24













  • @ShiYuan I don't use Lyx. Best post a separate question as to how to add custom macro to Lyx.

    – Yiannis Lazarides
    Feb 12 '13 at 8:24





















4














In comments, you asked for a solution which does not involve modifying the content text, but only the preamble. This is indeed possible, if you change the backend for LyX to LuaTeX. I don't use LyX, but their website says that this is an option for versions later than LyX 2.0.
Then change the preamble to this:



usepackage{ebgaramond}
usepackage{luatextra}
begin{luacode*}
local function translate(line)
return string.gsub(line, "%-%-%-%-%-%-", "{---\kern-.1em---}\penalty\exhyphenpenalty")
end
luatexbase.add_to_callback("process_input_buffer", translate, "Translate")
end{luacode*}


Note that you need to remove the usepackage[T1]{fontenc} line.
We have added a Lua function that searches each line of TeX for ------ (each - must be escaped as %- in Lua patterns), and replaces it with the double em-dash command you found.
It should look like this:



Text with gapless double em-dash



This is derived from this answer.






share|improve this answer


























  • With Xe- and LuaTeX I’d try something else. EB Garamond contains U+2015 "Horizontal Bar", U+2E3A "Two-em dash" and U+2E3B "Three-em dash". So you can input it directly. Else, in LuaTex use a feature file with a lookup containing something like sub hyphen hyphen hyphen hyphen hyphen hyphen by uni2015; In XeTeX you’d use a mapping file.

    – georgd
    Apr 14 '13 at 7:42



















-7














what am i finding got it just like cheap wordpress web hosting coupons I so glad to read your post just like always I admire your post by this post you are providing enough knowledge to all






share|improve this answer








New contributor




kasimjohn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















    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',
    autoActivateHeartbeat: false,
    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%2f96450%2fto-kern-double-em-dashes%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    10














    This is called a horizontal bar, also known as a quotation dash. It is used to introduce quoted text (sometimes). This is the standard method of printing dialogue in some languages.



    There is no support in the standard TeX fonts, but one can use instead as special macro, or just use an em dash.



    newcommandhemdash{hbox{---}kern-.5em---}    


    You can do this:



    documentclass{article}
    newcommandhemdash{hbox{---}kern-.5em---}
    begin{document}

    This one, thanks to the hospitality of the host, had lasted
    far into the afternoon. The beautiful October day was fading and
    the leaves were falling from the trees in the avenue as I walked
    through it. Gate after gate seemed to close with gentle finality
    behind me. Innumerable beadles were fitting innumerable keys into
    well-oiled locks; the treasure-house was being made secure for another
    night. After the avenue one comes out upon a road---I forget its
    name---which leads you, if you take the right turning, along to Fernham.
    But there was plenty of time. Dinner was not till half-past seven.
    One could almost do without dinner after such a luncheon. It is strange
    how a scrap of poetry works in the mind and makes the legs move in
    time to it along the road. Those wordshemdash


    end{document}





    share|improve this answer


























    • Thanks YL, it works brilliantly. However, the LyX will be passed around proof reader, it will be ideal if the manuscript is modified as little as possible. Is there any possible method to be included in the Preamble? I found this post, but couldn't figured out how it works. blog.cleverly.com/permalinks/322.html

      – Shi Yuan
      Feb 4 '13 at 18:24













    • @ShiYuan I don't use Lyx. Best post a separate question as to how to add custom macro to Lyx.

      – Yiannis Lazarides
      Feb 12 '13 at 8:24


















    10














    This is called a horizontal bar, also known as a quotation dash. It is used to introduce quoted text (sometimes). This is the standard method of printing dialogue in some languages.



    There is no support in the standard TeX fonts, but one can use instead as special macro, or just use an em dash.



    newcommandhemdash{hbox{---}kern-.5em---}    


    You can do this:



    documentclass{article}
    newcommandhemdash{hbox{---}kern-.5em---}
    begin{document}

    This one, thanks to the hospitality of the host, had lasted
    far into the afternoon. The beautiful October day was fading and
    the leaves were falling from the trees in the avenue as I walked
    through it. Gate after gate seemed to close with gentle finality
    behind me. Innumerable beadles were fitting innumerable keys into
    well-oiled locks; the treasure-house was being made secure for another
    night. After the avenue one comes out upon a road---I forget its
    name---which leads you, if you take the right turning, along to Fernham.
    But there was plenty of time. Dinner was not till half-past seven.
    One could almost do without dinner after such a luncheon. It is strange
    how a scrap of poetry works in the mind and makes the legs move in
    time to it along the road. Those wordshemdash


    end{document}





    share|improve this answer


























    • Thanks YL, it works brilliantly. However, the LyX will be passed around proof reader, it will be ideal if the manuscript is modified as little as possible. Is there any possible method to be included in the Preamble? I found this post, but couldn't figured out how it works. blog.cleverly.com/permalinks/322.html

      – Shi Yuan
      Feb 4 '13 at 18:24













    • @ShiYuan I don't use Lyx. Best post a separate question as to how to add custom macro to Lyx.

      – Yiannis Lazarides
      Feb 12 '13 at 8:24
















    10












    10








    10







    This is called a horizontal bar, also known as a quotation dash. It is used to introduce quoted text (sometimes). This is the standard method of printing dialogue in some languages.



    There is no support in the standard TeX fonts, but one can use instead as special macro, or just use an em dash.



    newcommandhemdash{hbox{---}kern-.5em---}    


    You can do this:



    documentclass{article}
    newcommandhemdash{hbox{---}kern-.5em---}
    begin{document}

    This one, thanks to the hospitality of the host, had lasted
    far into the afternoon. The beautiful October day was fading and
    the leaves were falling from the trees in the avenue as I walked
    through it. Gate after gate seemed to close with gentle finality
    behind me. Innumerable beadles were fitting innumerable keys into
    well-oiled locks; the treasure-house was being made secure for another
    night. After the avenue one comes out upon a road---I forget its
    name---which leads you, if you take the right turning, along to Fernham.
    But there was plenty of time. Dinner was not till half-past seven.
    One could almost do without dinner after such a luncheon. It is strange
    how a scrap of poetry works in the mind and makes the legs move in
    time to it along the road. Those wordshemdash


    end{document}





    share|improve this answer















    This is called a horizontal bar, also known as a quotation dash. It is used to introduce quoted text (sometimes). This is the standard method of printing dialogue in some languages.



    There is no support in the standard TeX fonts, but one can use instead as special macro, or just use an em dash.



    newcommandhemdash{hbox{---}kern-.5em---}    


    You can do this:



    documentclass{article}
    newcommandhemdash{hbox{---}kern-.5em---}
    begin{document}

    This one, thanks to the hospitality of the host, had lasted
    far into the afternoon. The beautiful October day was fading and
    the leaves were falling from the trees in the avenue as I walked
    through it. Gate after gate seemed to close with gentle finality
    behind me. Innumerable beadles were fitting innumerable keys into
    well-oiled locks; the treasure-house was being made secure for another
    night. After the avenue one comes out upon a road---I forget its
    name---which leads you, if you take the right turning, along to Fernham.
    But there was plenty of time. Dinner was not till half-past seven.
    One could almost do without dinner after such a luncheon. It is strange
    how a scrap of poetry works in the mind and makes the legs move in
    time to it along the road. Those wordshemdash


    end{document}






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Feb 2 '13 at 14:06

























    answered Feb 2 '13 at 13:36









    Yiannis LazaridesYiannis Lazarides

    93k21235516




    93k21235516













    • Thanks YL, it works brilliantly. However, the LyX will be passed around proof reader, it will be ideal if the manuscript is modified as little as possible. Is there any possible method to be included in the Preamble? I found this post, but couldn't figured out how it works. blog.cleverly.com/permalinks/322.html

      – Shi Yuan
      Feb 4 '13 at 18:24













    • @ShiYuan I don't use Lyx. Best post a separate question as to how to add custom macro to Lyx.

      – Yiannis Lazarides
      Feb 12 '13 at 8:24





















    • Thanks YL, it works brilliantly. However, the LyX will be passed around proof reader, it will be ideal if the manuscript is modified as little as possible. Is there any possible method to be included in the Preamble? I found this post, but couldn't figured out how it works. blog.cleverly.com/permalinks/322.html

      – Shi Yuan
      Feb 4 '13 at 18:24













    • @ShiYuan I don't use Lyx. Best post a separate question as to how to add custom macro to Lyx.

      – Yiannis Lazarides
      Feb 12 '13 at 8:24



















    Thanks YL, it works brilliantly. However, the LyX will be passed around proof reader, it will be ideal if the manuscript is modified as little as possible. Is there any possible method to be included in the Preamble? I found this post, but couldn't figured out how it works. blog.cleverly.com/permalinks/322.html

    – Shi Yuan
    Feb 4 '13 at 18:24







    Thanks YL, it works brilliantly. However, the LyX will be passed around proof reader, it will be ideal if the manuscript is modified as little as possible. Is there any possible method to be included in the Preamble? I found this post, but couldn't figured out how it works. blog.cleverly.com/permalinks/322.html

    – Shi Yuan
    Feb 4 '13 at 18:24















    @ShiYuan I don't use Lyx. Best post a separate question as to how to add custom macro to Lyx.

    – Yiannis Lazarides
    Feb 12 '13 at 8:24







    @ShiYuan I don't use Lyx. Best post a separate question as to how to add custom macro to Lyx.

    – Yiannis Lazarides
    Feb 12 '13 at 8:24













    4














    In comments, you asked for a solution which does not involve modifying the content text, but only the preamble. This is indeed possible, if you change the backend for LyX to LuaTeX. I don't use LyX, but their website says that this is an option for versions later than LyX 2.0.
    Then change the preamble to this:



    usepackage{ebgaramond}
    usepackage{luatextra}
    begin{luacode*}
    local function translate(line)
    return string.gsub(line, "%-%-%-%-%-%-", "{---\kern-.1em---}\penalty\exhyphenpenalty")
    end
    luatexbase.add_to_callback("process_input_buffer", translate, "Translate")
    end{luacode*}


    Note that you need to remove the usepackage[T1]{fontenc} line.
    We have added a Lua function that searches each line of TeX for ------ (each - must be escaped as %- in Lua patterns), and replaces it with the double em-dash command you found.
    It should look like this:



    Text with gapless double em-dash



    This is derived from this answer.






    share|improve this answer


























    • With Xe- and LuaTeX I’d try something else. EB Garamond contains U+2015 "Horizontal Bar", U+2E3A "Two-em dash" and U+2E3B "Three-em dash". So you can input it directly. Else, in LuaTex use a feature file with a lookup containing something like sub hyphen hyphen hyphen hyphen hyphen hyphen by uni2015; In XeTeX you’d use a mapping file.

      – georgd
      Apr 14 '13 at 7:42
















    4














    In comments, you asked for a solution which does not involve modifying the content text, but only the preamble. This is indeed possible, if you change the backend for LyX to LuaTeX. I don't use LyX, but their website says that this is an option for versions later than LyX 2.0.
    Then change the preamble to this:



    usepackage{ebgaramond}
    usepackage{luatextra}
    begin{luacode*}
    local function translate(line)
    return string.gsub(line, "%-%-%-%-%-%-", "{---\kern-.1em---}\penalty\exhyphenpenalty")
    end
    luatexbase.add_to_callback("process_input_buffer", translate, "Translate")
    end{luacode*}


    Note that you need to remove the usepackage[T1]{fontenc} line.
    We have added a Lua function that searches each line of TeX for ------ (each - must be escaped as %- in Lua patterns), and replaces it with the double em-dash command you found.
    It should look like this:



    Text with gapless double em-dash



    This is derived from this answer.






    share|improve this answer


























    • With Xe- and LuaTeX I’d try something else. EB Garamond contains U+2015 "Horizontal Bar", U+2E3A "Two-em dash" and U+2E3B "Three-em dash". So you can input it directly. Else, in LuaTex use a feature file with a lookup containing something like sub hyphen hyphen hyphen hyphen hyphen hyphen by uni2015; In XeTeX you’d use a mapping file.

      – georgd
      Apr 14 '13 at 7:42














    4












    4








    4







    In comments, you asked for a solution which does not involve modifying the content text, but only the preamble. This is indeed possible, if you change the backend for LyX to LuaTeX. I don't use LyX, but their website says that this is an option for versions later than LyX 2.0.
    Then change the preamble to this:



    usepackage{ebgaramond}
    usepackage{luatextra}
    begin{luacode*}
    local function translate(line)
    return string.gsub(line, "%-%-%-%-%-%-", "{---\kern-.1em---}\penalty\exhyphenpenalty")
    end
    luatexbase.add_to_callback("process_input_buffer", translate, "Translate")
    end{luacode*}


    Note that you need to remove the usepackage[T1]{fontenc} line.
    We have added a Lua function that searches each line of TeX for ------ (each - must be escaped as %- in Lua patterns), and replaces it with the double em-dash command you found.
    It should look like this:



    Text with gapless double em-dash



    This is derived from this answer.






    share|improve this answer















    In comments, you asked for a solution which does not involve modifying the content text, but only the preamble. This is indeed possible, if you change the backend for LyX to LuaTeX. I don't use LyX, but their website says that this is an option for versions later than LyX 2.0.
    Then change the preamble to this:



    usepackage{ebgaramond}
    usepackage{luatextra}
    begin{luacode*}
    local function translate(line)
    return string.gsub(line, "%-%-%-%-%-%-", "{---\kern-.1em---}\penalty\exhyphenpenalty")
    end
    luatexbase.add_to_callback("process_input_buffer", translate, "Translate")
    end{luacode*}


    Note that you need to remove the usepackage[T1]{fontenc} line.
    We have added a Lua function that searches each line of TeX for ------ (each - must be escaped as %- in Lua patterns), and replaces it with the double em-dash command you found.
    It should look like this:



    Text with gapless double em-dash



    This is derived from this answer.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 13 '17 at 12:35









    Community

    1




    1










    answered Mar 14 '13 at 3:19









    KundorKundor

    1,7271423




    1,7271423













    • With Xe- and LuaTeX I’d try something else. EB Garamond contains U+2015 "Horizontal Bar", U+2E3A "Two-em dash" and U+2E3B "Three-em dash". So you can input it directly. Else, in LuaTex use a feature file with a lookup containing something like sub hyphen hyphen hyphen hyphen hyphen hyphen by uni2015; In XeTeX you’d use a mapping file.

      – georgd
      Apr 14 '13 at 7:42



















    • With Xe- and LuaTeX I’d try something else. EB Garamond contains U+2015 "Horizontal Bar", U+2E3A "Two-em dash" and U+2E3B "Three-em dash". So you can input it directly. Else, in LuaTex use a feature file with a lookup containing something like sub hyphen hyphen hyphen hyphen hyphen hyphen by uni2015; In XeTeX you’d use a mapping file.

      – georgd
      Apr 14 '13 at 7:42

















    With Xe- and LuaTeX I’d try something else. EB Garamond contains U+2015 "Horizontal Bar", U+2E3A "Two-em dash" and U+2E3B "Three-em dash". So you can input it directly. Else, in LuaTex use a feature file with a lookup containing something like sub hyphen hyphen hyphen hyphen hyphen hyphen by uni2015; In XeTeX you’d use a mapping file.

    – georgd
    Apr 14 '13 at 7:42





    With Xe- and LuaTeX I’d try something else. EB Garamond contains U+2015 "Horizontal Bar", U+2E3A "Two-em dash" and U+2E3B "Three-em dash". So you can input it directly. Else, in LuaTex use a feature file with a lookup containing something like sub hyphen hyphen hyphen hyphen hyphen hyphen by uni2015; In XeTeX you’d use a mapping file.

    – georgd
    Apr 14 '13 at 7:42











    -7














    what am i finding got it just like cheap wordpress web hosting coupons I so glad to read your post just like always I admire your post by this post you are providing enough knowledge to all






    share|improve this answer








    New contributor




    kasimjohn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      -7














      what am i finding got it just like cheap wordpress web hosting coupons I so glad to read your post just like always I admire your post by this post you are providing enough knowledge to all






      share|improve this answer








      New contributor




      kasimjohn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        -7












        -7








        -7







        what am i finding got it just like cheap wordpress web hosting coupons I so glad to read your post just like always I admire your post by this post you are providing enough knowledge to all






        share|improve this answer








        New contributor




        kasimjohn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        what am i finding got it just like cheap wordpress web hosting coupons I so glad to read your post just like always I admire your post by this post you are providing enough knowledge to all







        share|improve this answer








        New contributor




        kasimjohn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        kasimjohn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 20 mins ago









        kasimjohnkasimjohn

        1




        1




        New contributor




        kasimjohn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        kasimjohn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        kasimjohn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f96450%2fto-kern-double-em-dashes%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

            Castillo d'Acher Características Menú de navegación

            Connecting two nodes from the same mother node horizontallyTikZ: What EXACTLY does the the |- notation for...