I often use an editor like OpenOffice Writer to build documentation. My documentation is usually technical, and it often includes commands for the terminal.  When I format a command, I will indent the command by 1/2 inch and I will change the font to Times Roman or Times New Roman.  The editors replace a hyphen with a dash (I think its called an em-dash). So a command like:  ls -al   will fail when copy/pasted into a terminal due to the errant character.  The problem comes to light after performing a "Save as PDF". No matter what I do, the PDF always ends up with the wrong dash or hyphen (even if the OO document seems correct).  How do I distinguish text that include a hyphen so that the dash is unchanged?
121088
I am working in Open Office Writer 3.3.0 and I have come across something a bit odd. When I write a semi-mathematical formula my "-" gets replaced by a "–", a slightly longer dash, and I cannot seem to turn it off in the autocorrect. I am not sure how to. the dash "-" does not appear in the autocorrect table of any language, whereas double-dash "--" does.  Any ideas how to disable this?
95711
I'm trying to use a # character inside a verbatim that's inside a note :   \begin{frame}[fragile]  \note{\begin{verbatim}  # \end{verbatim} }  \end{frame}   This produces the following errror :   >   ! Illegal parameter number in definition of \beamer@todo. >    to be read again>  >                     >   l.5 }   How can I write the # character in a way that doesn't break the latex compilation ?  Thanks in advanced,  PS : This is related to the following problem in pandoc :
121350
I'm using XeLaTeX to compile my document. If I write in my document --- I don't get —, but --- in my PDF document. Same for – (--) character. I'm sure that font which I'm using have this character (Myriad Pro). Are there other ways to get this characters working?If copy&amp;paste this character, it works then. But never when using -- or --- shortcuts.
17639
Take the following script:  #!/bin/sh sed 's/(127\.0\.1\.1)\s/\1/' [some file]   If I try to run this in sh (dash here), it'll fail because of the parentheses, which need to be escaped. But I don't need to escape the backslashes themselves (between the octets, or in the \s or \1). What's the rule here? What about when I need to use {...} or [...]? Is there a list of what I do and don't need to escape?
121704
I have a listing to be used in verbatim (acutally Verbatim) that uses unicode characters such as ∀, ∃, →, ∨. Using  \DeclareUnicodeCharacter{2203}{\ensuremath\exists}   they do appear in the listing, but obviously in the wrong font.  For → I got the desired result using  \usepackage{textcomp} \DeclareUnicodeCharacter{2192}{\ifmmode\to\else\textrightarrow\fi}   but I do not see how to do it for ∃, ∀ and ∨.  MWE:  \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{textcomp} \DeclareUnicodeCharacter{2192}{\ifmmode\to\else\textrightarrow\fi} \DeclareUnicodeCharacter{2203}{\ensuremath\exists} \begin{document} \begin{verbatim} Make this → ∃ look nice! \end{verbatim} \end{document}   I’d like to stick to latex (i.e. not xetex). I would prefer to stick to the default type writer font (Computer Modern Typewriter), but if it only works with a different font (such as DejaVu Sans Mono), then that would be ok as well.
1688
How do you remove a file whose filename begins with a dash (hyphen or minus) -?  I'm ssh'd into a remote OSX server and I have this file in my directory:  tohru:~ $ ls -l total 8 -rw-r--r--    1 me  staff  1352 Aug 18 14:33 --help ...   How in the world can I delete --help from a CLI?  This issue is something that I come across in different forms on occasion, these files are easy to create, but hard to get rid of.  I have tried using backslash  rm \-\-help   I have tried quotes  rm "--help"   How do I prevent the minus (dash or hyphen) character to be interpreted as an option?
102711
How can I prevent LaTeX from putting line-breaks into a phrase?  I could replace dashes with  and spaces with non-breaking spaces, but I'm looking for a more general solution in case I need other characters in such phrases.
1713
Where did the convention of using single dashes for letters and doubles dashes for words come from and why is continued to be used?  For example if I type in ls --help, you see:    -a, --all                  do not ignore entries starting with .   -A, --almost-all           do not list implied . and ..       --author               with -l, print the author of each file   -b, --escape               print octal escapes for nongraphic characters       --block-size=SIZE      use SIZE-byte blocks   -B, --ignore-backups       do not list implied entries ending with ~ ...   I tried googling - and -- convention even with quotes with little success.
7609
Further to Tim Stone's response to my  regarding what turned out to be an en dash in an URL: Would it be reasonable for markdown mini to replace en dashes with normal hyphens? Or is that Wikipedia article's URL just a fluke?
2231
I assume this is really basic question, I'm new to LaTeX, I read a first step tutorial to get ready to write some documents but I couldn't answer my own question at this time and I really don't know where to search.  When I try to write é and compile my document, this character is not shown. I know the sequence is \'e to make it happen in the document but that is really disturbing to write.  Is there someway to write a paragraph "normally" and convert all the special chars into the LaTeX syntax? Or is there a way to allow é, à, ... writing so the compilation includes them into the document?
114151
In my document, I have two chapter titles with \em commands and --- dashes, which get correctly converted to italics and em-dash in the text. But the PDF bookmarks are not created properly:   \em: if I use syntax \em{text}, bookmark is created with only text (as expected). If I use {\em text}, this entire string is used as-is in PDF bookmark. ---: conversion to em-dash never occurs.   How can I get \em and --- properly in PDF bookmarks? I don't need the bookmark gets styled. Below a code sample and screenshot (in SumatraPDF):  \setupinteraction[state=start] \placebookmarks[chapter, section][chapter, section] \setupinteractionscreen[option=bookmark] \setuptagging[state=start] \starttext \chapter[title={{\em Chapter} --- a note}]  Some paragraph.  \section{{\em A year from monday} --- from John Cage}  Some paragraph.  \chapter[title={\em{Chapter} --- another note}]  Some paragraph.  \section{\em{Silence} --- from John Cage}  Some paragraph.  \stoptext   Screenshot (note bookmarks with --- and \em appearing):
72059
Within a custom command, I'm doing the following to write to a file:  \newcommand\mycommand[1]{   \newwrite\file   \immediate\openout\file=foobar.tex   \immediate\write\file{     foo     bar     #1     blarg   }   \immediate\closeout\file }   Of course when I invoke it as \mycommand{baz}, I get the following contents in foobar.tex:  foo bar baz blarg   with all new lines turned into spaces by LaTeX. My question is, is there a way to output these lines into the file "as expected", i.e. with real new lines at the end of each line instead of a space? I'm thinking some \catcode wizardry should do the trick, but I'm not sure which character I need to redefine and to what category code.  Update  The solution in  works perfectly. The only problem is when #1 contains embedded newlines. I can of course send it to mycommand with its own slew of ^^J, I was wondering if there is a way to avoid this.
80942
When I try to use one of the more "hacky" methods of getting a literal "special character" (such as backslash or a brace) then I get a different character: backslash seems to be an open quote, left brace a dash, and right brace a close quote.  What happened to my special characters?  \documentclass{minimal}  \begin{document}  \char`\\ \char`\{ \char`\}  \end{document}   produces: "-" (only the two "s are different).
47574
I often find myself adding a lot of \textsl{} around inside \emph{} or \textit{} blocks because I find italicized digits to look too "showoffy" and "baroque" and to hinder legibility (I'm using $$ when the number has a mathematical sense, but this situation occurs in less technical texts like CVs, and such.).  Could someone help me write a renewcommand to automate this, or better, a single low level command that makes \emph, \itshape, \textit and friends choose slanted over italic for numbers? I'm not too familiar with the low level latex font selection system nor with a way to detect digits from regular letters.  Edit: MWE of what I need and what I want to avoid  \documentclass{article} \begin{document} He thought: '\emph{Why 1234567890 apples?}' then he realized '\emph{ah yes, he has \textsl{1234567890} childs}' \end{document}   gives:   I find the italicized version (first one) of 2,3,4 and 7 to look especially bad.
23597
I am producing LaTeX output with org mode.  My code snippets wind up being indented with tabs, because of my c-mode settings.  Changing these would be inconvenient.  Although the snippet I am posting could be compiled with latex, I need to be able to compile Unicode documents, so I am using xelatex -shell-escape to compile the automatically generated latex source. The generated source looks like this: Which produces LaTeX like the following (some irrelevant stuff removed, this reproduces the problem):  \documentclass[11pt]{article}  \tolerance=1000  \usepackage{fontspec}  \usepackage{minted}  \author{Glen Stark}  \date{\today}  \title{sample}  \begin{document}   \section{Foo}   \begin{minted}[]{c++}  void foo()  {      void bar = fb();      std::cout &lt;&lt; &quot;fbar&quot; &lt;&lt; &quot;\n&quot;  }  \end{minted}  \end{document}  Compiling this with xelatex -shell-escape results in output like:  void foo() ^^Ivoid bar = fb(); ^^Istd::cout //etc.  The whitespace in the minted block is a tab.  Obviously xelatex is inserting something funny in place of the tabs.  I have a workaround where I force generation of spaces instead of tabs, but this is inconvenient. Anyone know what the fix/problem is?
41583
I accidentally, discovered that using | in text mode produces an em dash. I did a quick search, but I could not find a reference where this is noted. I wonder if there is any difference between this and ---? Otherwise, it seems easier to just type one character instead of three.
36794
Is it possible to tell (La)TeX to adjust the kerning of a specific character combination?  For example, suppose I want !! to be typeset as !\kern 1.2pt!, just like ff is automatically turned into a ligature, or -- is converted to an en-dash.  I know I could create a command for this combination&mdash;I am asking for a way to just type !! and have it use my desired kerning.