typing em dash (---)

15 messages
Open this post in threaded view
|

typing em dash (---)

 Hi, I am running TexShop 3.11 on 10.8.4, as well as on a possibly earlier version, installed on 10.7.x. In the more recent version of the OS (it is my guess that  the OS is the responsible party, rather than TS, although it does not show up in this — Ooutlook —email, where it is two dashes that are replaced with a long dash), whenever I type ---' to get an em dash it ends up being replaced with a long dash (roughly like this: —) in the tex file, which results in a blank space in the pdf output. If I go back and change to the three dashes again, then type elsewhere, it's OK, but obviously wastes time and requires paying attention. My question is how I can ensure I get the long dash in the output. The simplest, for me, would be if I could change some setting so that the editor leaves the three - alone. I know that I can use the tex command \textemdash, which I can presumably bind to some key, but do I need to do that? Thank you. Nicolae ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: typing em dash (---)

 On 16/09/2013, at 3:53 PM, Nicolae Garleanu <[hidden email]> wrote: > > My question is how I can ensure I get the long dash in the output. The simplest, for me, would be if I could change some setting so that the editor leaves the three - alone. I know that I can use the tex command \textemdash, which I can presumably bind to some key, but do I need to do that? Here are two of the places that could be mucking this up: 1. In System Prefs --> Language & Text --> Text, there is a check box (Use symbol and text substitution) with some replacements in a table below it. The --- to — change isn't there for me, but try turning that off. 2. There's key bindings in TeXShop. Have a look at the file (Source --> Key Bindings --> Edit Key Bindings File...) and see if the --- to — change is there (the reverse is for me). To turn them all off, click the Toggle On/Off item in the same menu (a tick next to it means that it's on). Michael ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: typing em dash (---)

 In reply to this post by Nicolae Garleanu Hello Nicolae,On 16/09/2013, at 13:53, Nicolae Garleanu <[hidden email]> wrote: Hi, I am running TexShop 3.11 on 10.8.4, as well as on a possibly earlier version, installed on 10.7.x. In the more recent version of the OS (it is my guess that  the OS is the responsible party, rather than TS, although it does not show up in this — Ooutlook —email, where it is two dashes that are replaced with a long dash), whenever I type ---' to get an em dash it ends up being replaced with a long dash (roughly like this: —) in the tex file, which results in a blank space in the pdf output. If I go back and change to the three dashes again, then type elsewhere, it's OK, but obviously wastes time and requires paying attention.Using  --  for an endash, and  ---  for an emdash, is the traditionally correct way to do this.But it does depend upon the font that you're using, and whether you have loaded the packages appropriate for that font.Hence for anyone on this list to attempt find the correct answer to your question,you need to provide a complete example that is failing for you.We need to see both the output PDF as well as the coding that produces it. My question is how I can ensure I get the long dash in the output. The simplest, for me, would be if I could change some setting so that the editor leaves the three - alone. I know that I can use the tex command \textemdash, which I can presumably bind to some key, but do I need to do that? Thank you. NicolaeHope this helps,     Ross----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: typing em dash (---)

 In reply to this post by Nicolae Garleanu Am 16.09.2013 um 05:53 schrieb Nicolae Garleanu: > My question is how I can ensure I get the long dash in the output. Are you using an \usepackage[…]{inputenc}? Which one? Is TeXShop using the same encoding? Are you also using an \usepackage[…]{fontenc}? Which one? A minimal example could be fine… to explain why the emdash vanishes. I think since Snow Leopard the System Preferences allow to set up substitutions from --- to — or … to … etc. I think this can be switched off in TeXShop:         Edit -> Substitutions -> Show Substitutions -- Greetings   Pete And always remember the last words of my grandfather, who said: “A truck!”                                 — Emo Phillips ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: typing em dash (---)

 On Sep 16, 2013, at 4:40 AM, Peter Dyballa <[hidden email]> wrote: > > Am 16.09.2013 um 05:53 schrieb Nicolae Garleanu: > >> My question is how I can ensure I get the long dash in the output. > > Are you using an \usepackage[…]{inputenc}? Which one? Is TeXShop using the same encoding? Are you also using an \usepackage[…]{fontenc}? Which one? > > A minimal example could be fine… to explain why the emdash vanishes. I think since Snow Leopard the System Preferences allow to set up substitutions from --- to — or … to … etc. I think this can be switched off in TeXShop: > > Edit -> Substitutions -> Show Substitutions > > -- > Greetings > >  Pete > Howdy, Is Smart Dashes' checked when you click on Edit->Substitutions? If so, uncheck it? Good Luck, Herb Schulz (herbs at wideopenwest dot com) ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: typing em dash (---)

 In reply to this post by Peter Dyballa Thanks On 16/09/13 9:40 PM, Peter Dyballa wrote: > > > Edit -> Substitutions -> Show Substitutions > > Hmm. Is this a document level change or does making that change affect all subsequent documents, plus those that have previously been opened with different settings? I would normally expect to see that control in preferences if it were to be global. Alan -- -- Dr Alan Litchfield AlphaByte PO Box 1941 Auckland, New Zealand 1140 ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: typing em dash (---)

 On Sep 16, 2013, at 3:12 PM, Alan Litchfield <[hidden email]> wrote: > Thanks > > On 16/09/13 9:40 PM, Peter Dyballa wrote: >> >> >> Edit -> Substitutions -> Show Substitutions >> >> > > Hmm. Is this a document level change or does making that change affect all subsequent documents, plus those that have previously been opened with different settings? > > I would normally expect to see that control in preferences if it were to be global. > > Alan > > Howdy, It will be set for the current document and all documents subsequently opened and carry over to the next session. I must admit I never have any of those items checked. Good Luck, Herb Schulz (herbs at wideopenwest dot com) ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: typing em dash (---)

 Am 16.09.2013 um 22:28 schrieb Herbert Schulz: > It will be set for the current document and all documents subsequently opened and carry over to the next session. In which part of the TeX source file is this information saved? Doesn't the substitution take place during input when some space character is typed afterwards? -- Greetings   Pete We are usually convinced more easily by reasons we have found ourselves than by those which have occurred to others.                                 – Blaise Pascal ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: typing em dash (---)

 On Sep 16, 2013, at 3:40 PM, Peter Dyballa <[hidden email]> wrote: > > Am 16.09.2013 um 22:28 schrieb Herbert Schulz: > >> It will be set for the current document and all documents subsequently opened and carry over to the next session. > > In which part of the TeX source file is this information saved? Doesn't the substitution take place during input when some space character is typed afterwards? > > -- > Greetings > >  Pete Howdy, It isn't saved in the document at all but as part of TeXShop's preferences AFAIK. If it's set the -- and or are transformed into long dashes (most fonts don't seem to differentiate between em- and en-dashes though) in the file. I.e., if I start with Smart Dashes' unchecked and write --- with a space afterward and then check Smart Dashes' and do it again ONLY the second --- is transformed to –. Saving the file, closing TeXShop, and then re-opening it it still shows --- –; i.e., it doesn't re-transform the document. Good Luck, Herb Schulz (herbs at wideopenwest dot com) ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: typing em dash (---)

 In reply to this post by Peter Dyballa Thanks to all who replied. While I had one particular question I mind, there were actually two in my posting, as follows. 1) How not to have --- be replaced with an em-dash in the source? This was solved by unchecking smart dashes in         Edit -> Substitutions -> Show Substitutions The solution is gratefully acknowledged. 2) Supposing one does have an em-dash in the source, can that translate into an em-dash in the output? Not in my set-up. For instance, a minimal example would be as attached (if possible), and pasted below. Output as expected given my original posting, i.e., first dash becomes a blank space. I am just running pdflatex in the standard installation. \documentclass[12pt]{article} \begin{document} ad ‹ asdas --- as asd \end{document} Nicolae On 9/16/13 2:40 AM, "Peter Dyballa" <[hidden email]> wrote: > >Am 16.09.2013 um 05:53 schrieb Nicolae Garleanu: > >> My question is how I can ensure I get the long dash in the output. > >Are you using an \usepackage[Š]{inputenc}? Which one? Is TeXShop using >the same encoding? Are you also using an \usepackage[Š]{fontenc}? Which >one? > >A minimal example could be fineŠ to explain why the emdash vanishes. I >think since Snow Leopard the System Preferences allow to set up >substitutions from --- to ‹ or Š to Š etc. I think this can be switched >off in TeXShop: > > Edit -> Substitutions -> Show Substitutions > >-- >Greetings > >  Pete > >And always remember the last words of my grandfather, who said: ³A truck!² > ‹ Emo Phillips > > >----------- Please Consult the Following Before Posting ----------- >TeX FAQ: http://www.tex.ac.uk/faq>List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/>List Archive: http://tug.org/pipermail/macostex-archives/>TeX on Mac OS X Website: http://mactex-wiki.tug.org/>List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex Untitled.pdf (12K) Download Attachment Untitled.tex (120 bytes) Download Attachment
Open this post in threaded view
|

Re: typing em dash (---)

 Hello Nicolae, On 17/09/2013, at 8:33 AM, Nicolae Garleanu wrote: > Thanks to all who replied. While I had one particular question I mind, > there were actually two in my posting, as follows. > > 1) How not to have --- be replaced with an em-dash in the source? This was > solved by unchecking smart dashes in > > Edit -> Substitutions -> Show Substitutions > > > The solution is gratefully acknowledged. Glad that works. In the TeX world you do *not* want such substitutions happening behind your back. See my comment further down concerning collaboration. > > 2) Supposing one does have an em-dash in the source, can that translate > into an em-dash in the output? Not in my set-up. For instance, a minimal > example would be as attached (if possible), and pasted below. Output as > expected given my original posting, i.e., first dash becomes a blank > space. I am just running pdflatex in the standard installation. You would need to either:   1.  specify the input encoding or   2.  have the endash character automatically converted to '--' or   3.  pre-filter your input to become pure ascii,       including conversions to --- or -- for the dashes,       and to ...' for single quotes and  ...'' for double quotes. Option 3. is the most reliable, especially as you will undoubtedly sometime be in a position where you send (La)TeX source to a colleague. That colleague should not be put in a position of having to deal with your choice to use 1. or 2. Just to indicate the problem more clearly, look at your email as I see it, in Apple's Mail program. The character that you have inserted as an endash does not necessarily appear that way. (This is *not* a TeX-only issue.) You can see the problem also in the quoted portion immediately below. > \documentclass[12pt]{article} > \begin{document} > ad ‹ asdas --- as asd > \end{document} > > Nicolae Hope this help,         Ross ------------------------------------------------------------------------ Ross Moore                                       [hidden email] Mathematics Department                           office: E7A-206       Macquarie University                             tel: +61 (0)2 9850 8955 Sydney, Australia  2109                          fax: +61 (0)2 9850 8114 ------------------------------------------------------------------------ ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex Screen shot 2013-09-17 at 8.56.06 AM.png (212K) Download Attachment logo.png (7K) Download Attachment
Open this post in threaded view
|

Re: typing em dash (---)

 Thank you, Ross. I definitely take your point concerning collaboration, it would have hit me pretty soon of its own. Initially I had not even considered not leaving the three dashes unchanged in the source, but some of the reactions to the original question made me think along these lines. As Herb wrote, better leave all these substitution boxes unchecked. I have lived 15+ years very happily with three (or two, depending on the case) dashes, will continue to do so. I guess that at some point I checked the smart dashes box (to see what it does?) and completely forgot about it.. Nicolae From: Ross Moore <[hidden email]> Reply-To: TeX on Mac OS X Mailing List <[hidden email]> Date: Monday, September 16, 2013 4:07 PM To: TeX on Mac OS X Mailing List <[hidden email]> Subject: Re: [OS X TeX] typing em dash (---) Hello Nicolae, On 17/09/2013, at 8:33 AM, Nicolae Garleanu wrote: > Thanks to all who replied. While I had one particular question I mind, > there were actually two in my posting, as follows. > > 1) How not to have --- be replaced with an em-dash in the source? This was > solved by unchecking smart dashes in > >        Edit -> Substitutions -> Show Substitutions > > > The solution is gratefully acknowledged. Glad that works. In the TeX world you do *not* want such substitutions happening behind your back. See my comment further down concerning collaboration. > > 2) Supposing one does have an em-dash in the source, can that translate > into an em-dash in the output? Not in my set-up. For instance, a minimal > example would be as attached (if possible), and pasted below. Output as > expected given my original posting, i.e., first dash becomes a blank > space. I am just running pdflatex in the standard installation. You would need to either:   1.  specify the input encoding or   2.  have the endash character automatically converted to '--' or   3.  pre-filter your input to become pure ascii,       including conversions to --- or -- for the dashes,       and to ...' for single quotes and  ...'' for double quotes. Option 3. is the most reliable, especially as you will undoubtedly sometime be in a position where you send (La)TeX source to a colleague. That colleague should not be put in a position of having to deal with your choice to use 1. or 2. Just to indicate the problem more clearly, look at your email as I see it, in Apple's Mail program. The character that you have inserted as an endash does not necessarily appear that way. (This is *not* a TeX-only issue.) You can see the problem also in the quoted portion immediately below. > \documentclass[12pt]{article} > \begin{document} > ad ‹ asdas --- as asd > \end{document} > > Nicolae Hope this help,         Ross ------------------------------------------------------------------------ Ross Moore                                       [hidden email] Mathematics Department                           office: E7A-206      Macquarie University                             tel: +61 (0)2 9850 8955 Sydney, Australia  2109                          fax: +61 (0)2 9850 8114 ------------------------------------------------------------------------ ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faq List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/ List Archive: http://tug.org/pipermail/macostex-archives/ TeX on Mac OS X Website: http://mactex-wiki.tug.org/ List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Open this post in threaded view
|

Re: typing em dash (---)

 In reply to this post by Nicolae Garleanu On Sep 16, 2013, at 5:33 PM, Nicolae Garleanu <[hidden email]> wrote: > ... > 2) Supposing one does have an em-dash in the source, can that translate > into an em-dash in the output? Not in my set-up. For instance, a minimal > example would be as attached (if possible), and pasted below. Output as > expected given my original posting, i.e., first dash becomes a blank > space. I am just running pdflatex in the standard installation. > > \documentclass[12pt]{article} > \begin{document} > ad ‹ asdas --- as asd > \end{document} > > Nicolae Huh? What you sent has --- rather than an em-dash. This is automatically translated to an em-dash in the output. If you wish to actually insert an em-dash, – (actually this is an en-dash since the font doesn't have an em-dash), into the source document itself you'll have to save the document in something other than pure ASCII and then let LaTeX know'' what encoding you are using; e.g. saving as UTF-8 Unicode in TeXShop: %%!TEX TS-program = pdflatex %%!TEX encoding = UTF-8 Unicode \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \begin{document} ad ‹ asdas --- as asd and then — . \end{document} The files are attached: Good Luck, Herb Schulz (herbs at wideopenwest dot com) ----------- Please Consult the Following Before Posting ----------- TeX FAQ: http://www.tex.ac.uk/faqList Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/List Archive: http://tug.org/pipermail/macostex-archives/TeX on Mac OS X Website: http://mactex-wiki.tug.org/List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex test.tex (294 bytes) Download Attachment test.pdf (15K) Download Attachment