Re: Backtick in LyX's "LyX-Code" mode
On Thu, Dec 28, 2017 at 03:40:27AM -0500, Scott Kostyshak wrote: > On Fri, Oct 06, 2017 at 01:31:49AM +, Scott Kostyshak wrote: > > On Thu, Sep 28, 2017 at 08:48:13AM +, Guenter Milde wrote: > > > On 2017-09-27, Bruce Momjian wrote: > > > > On Wed, Sep 27, 2017 at 12:41:27PM -0400, Scott Kostyshak wrote: > > > >> On Mon, Sep 25, 2017 at 10:24:47PM +, Bruce Momjian wrote: > > > >> > I am using LyX 2.1.2 on Ubuntu 14.04. > > > >> > > > > >> > If I enter this: > > > >> > > > > >> > ab'c de`f > > > >> > > > > >> > in "Standard" mode I get PDF output with proper left/right single > > > >> > quotes. However, if I switch to LyX-Code mode for that text, I get > > > >> > as > > > >> > PDF output: > > > >> > > > > >> > ab'c de'f > > > > > > >> Testing on 2.1.0 and on 2.3.0dev, I get the following as PDF output: > > > > > > >> ab’c de‘f > > > > > > >> which is different from what you get, but also not what you want. > > > > > > > Actually, that would be fine output, as long as they look different. > > > > > > >> > This is a problem for text of shell scripts. I the want backticks > > > >> > because backtick means 'execute' in the shell. > > > >> > > > > >> > What I have done instead to get literal backticks output is to use a > > > >> > TeX Code URT (Ugly Red Text) block inside the "LyX-Code mode" block > > > >> > and > > > >> > used \char18, which properly outputs the backtick. > > > >> > > > > >> > Is this expected behavior? Is that the recommended solution for > > > >> > this? > > > > > > >> I have not seen a report of this, but I haven't seen an indication that > > > >> a lot of people are using LyX-Code, so I'm not sure if is known. > > > > > > > OK, not sure what could be the cause then. I am using ps2pdf to produce > > > > the PDF. > > > > > > The view in PDF depends on the selected fonts rather than export route. I > > > get identic results with PDF (pdflatex) and PDF (ps2pdf). > > > > > > You may experiment with different fonts, as well as checking the result of > > > drag-and-drop from the PDF. Here, it is > > > ab'c de`f with PDF(pdflatex) and ab' de`f with PDF(ps2pdf). > > > > > > > What I have done as a work-around is to warn in my Makefile if a > > > > backquote is used in the LyX document. > > > > > > Did you try with listings? > > > > Hi Bruce, > > > > I just wanted to make sure that you saw Günter's message (pasted above), > > since he had a good idea, to experiment with different fonts. > > Hi Bruce (I'm CC'ing you directly now), just wanted to make sure you saw > Günter's message above. Thanks. I ended up adding this to the Makefile I use to generate the PDFs: # check for backquotes, which appear as single quotes if grep -q '`' "$FILE" thenecho 'Backquotes found, replace with TeX Code \\char18' exit 1 fi It warns me about backquotes and suggests replacement with TeX Code \\char18. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +
Re: Backtick in LyX's "LyX-Code" mode
On Fri, Oct 06, 2017 at 01:31:49AM +, Scott Kostyshak wrote: > On Thu, Sep 28, 2017 at 08:48:13AM +, Guenter Milde wrote: > > On 2017-09-27, Bruce Momjian wrote: > > > On Wed, Sep 27, 2017 at 12:41:27PM -0400, Scott Kostyshak wrote: > > >> On Mon, Sep 25, 2017 at 10:24:47PM +, Bruce Momjian wrote: > > >> > I am using LyX 2.1.2 on Ubuntu 14.04. > > >> > > > >> > If I enter this: > > >> > > > >> > ab'c de`f > > >> > > > >> > in "Standard" mode I get PDF output with proper left/right single > > >> > quotes. However, if I switch to LyX-Code mode for that text, I get as > > >> > PDF output: > > >> > > > >> >ab'c de'f > > > > >> Testing on 2.1.0 and on 2.3.0dev, I get the following as PDF output: > > > > >> ab’c de‘f > > > > >> which is different from what you get, but also not what you want. > > > > > Actually, that would be fine output, as long as they look different. > > > > >> > This is a problem for text of shell scripts. I the want backticks > > >> > because backtick means 'execute' in the shell. > > >> > > > >> > What I have done instead to get literal backticks output is to use a > > >> > TeX Code URT (Ugly Red Text) block inside the "LyX-Code mode" block and > > >> > used \char18, which properly outputs the backtick. > > >> > > > >> > Is this expected behavior? Is that the recommended solution for this? > > > > >> I have not seen a report of this, but I haven't seen an indication that > > >> a lot of people are using LyX-Code, so I'm not sure if is known. > > > > > OK, not sure what could be the cause then. I am using ps2pdf to produce > > > the PDF. > > > > The view in PDF depends on the selected fonts rather than export route. I > > get identic results with PDF (pdflatex) and PDF (ps2pdf). > > > > You may experiment with different fonts, as well as checking the result of > > drag-and-drop from the PDF. Here, it is > > ab'c de`f with PDF(pdflatex) and ab' de`f with PDF(ps2pdf). > > > > > What I have done as a work-around is to warn in my Makefile if a > > > backquote is used in the LyX document. > > > > Did you try with listings? > > Hi Bruce, > > I just wanted to make sure that you saw Günter's message (pasted above), > since he had a good idea, to experiment with different fonts. Hi Bruce (I'm CC'ing you directly now), just wanted to make sure you saw Günter's message above. Scott
Re: Backtick in LyX's "LyX-Code" mode
On Thu, Sep 28, 2017 at 08:48:13AM +, Guenter Milde wrote: > On 2017-09-27, Bruce Momjian wrote: > > On Wed, Sep 27, 2017 at 12:41:27PM -0400, Scott Kostyshak wrote: > >> On Mon, Sep 25, 2017 at 10:24:47PM +, Bruce Momjian wrote: > >> > I am using LyX 2.1.2 on Ubuntu 14.04. > >> > > >> > If I enter this: > >> > > >> > ab'c de`f > >> > > >> > in "Standard" mode I get PDF output with proper left/right single > >> > quotes. However, if I switch to LyX-Code mode for that text, I get as > >> > PDF output: > >> > > >> > ab'c de'f > > >> Testing on 2.1.0 and on 2.3.0dev, I get the following as PDF output: > > >> ab’c de‘f > > >> which is different from what you get, but also not what you want. > > > Actually, that would be fine output, as long as they look different. > > >> > This is a problem for text of shell scripts. I the want backticks > >> > because backtick means 'execute' in the shell. > >> > > >> > What I have done instead to get literal backticks output is to use a > >> > TeX Code URT (Ugly Red Text) block inside the "LyX-Code mode" block and > >> > used \char18, which properly outputs the backtick. > >> > > >> > Is this expected behavior? Is that the recommended solution for this? > > >> I have not seen a report of this, but I haven't seen an indication that > >> a lot of people are using LyX-Code, so I'm not sure if is known. > > > OK, not sure what could be the cause then. I am using ps2pdf to produce > > the PDF. > > The view in PDF depends on the selected fonts rather than export route. I > get identic results with PDF (pdflatex) and PDF (ps2pdf). > > You may experiment with different fonts, as well as checking the result of > drag-and-drop from the PDF. Here, it is > ab'c de`f with PDF(pdflatex) and ab' de`f with PDF(ps2pdf). > > > What I have done as a work-around is to warn in my Makefile if a > > backquote is used in the LyX document. > > Did you try with listings? Hi Bruce, I just wanted to make sure that you saw Günter's message (pasted above), since he had a good idea, to experiment with different fonts. Best, Scott signature.asc Description: PGP signature
Re: Backtick in LyX's "LyX-Code" mode
On 2017-09-27, Bruce Momjian wrote: > On Wed, Sep 27, 2017 at 12:41:27PM -0400, Scott Kostyshak wrote: >> On Mon, Sep 25, 2017 at 10:24:47PM +, Bruce Momjian wrote: >> > I am using LyX 2.1.2 on Ubuntu 14.04. >> > >> > If I enter this: >> > >> > ab'c de`f >> > >> > in "Standard" mode I get PDF output with proper left/right single >> > quotes. However, if I switch to LyX-Code mode for that text, I get as >> > PDF output: >> > >> >ab'c de'f >> Testing on 2.1.0 and on 2.3.0dev, I get the following as PDF output: >> ab’c de‘f >> which is different from what you get, but also not what you want. > Actually, that would be fine output, as long as they look different. >> > This is a problem for text of shell scripts. I the want backticks >> > because backtick means 'execute' in the shell. >> > >> > What I have done instead to get literal backticks output is to use a >> > TeX Code URT (Ugly Red Text) block inside the "LyX-Code mode" block and >> > used \char18, which properly outputs the backtick. >> > >> > Is this expected behavior? Is that the recommended solution for this? >> I have not seen a report of this, but I haven't seen an indication that >> a lot of people are using LyX-Code, so I'm not sure if is known. > OK, not sure what could be the cause then. I am using ps2pdf to produce > the PDF. The view in PDF depends on the selected fonts rather than export route. I get identic results with PDF (pdflatex) and PDF (ps2pdf). You may experiment with different fonts, as well as checking the result of drag-and-drop from the PDF. Here, it is ab'c de`f with PDF(pdflatex) and ab' de`f with PDF(ps2pdf). > What I have done as a work-around is to warn in my Makefile if a > backquote is used in the LyX document. Did you try with listings? Günter
Re: Backtick in LyX's "LyX-Code" mode
On Wed, Sep 27, 2017 at 12:41:27PM -0400, Scott Kostyshak wrote: > On Mon, Sep 25, 2017 at 10:24:47PM +, Bruce Momjian wrote: > > I am using LyX 2.1.2 on Ubuntu 14.04. > > > > If I enter this: > > > > ab'c de`f > > > > in "Standard" mode I get PDF output with proper left/right single > > quotes. However, if I switch to LyX-Code mode for that text, I get as > > PDF output: > > > > ab'c de'f > > Testing on 2.1.0 and on 2.3.0dev, I get the following as PDF output: > > ab’c de‘f > > which is different from what you get, but also not what you want. Actually, that would be fine output, as long as they look different. > > This is a problem for text of shell scripts. I the want backticks > > because backtick means 'execute' in the shell. > > > > What I have done instead to get literal backticks output is to use a > > TeX Code URT (Ugly Red Text) block inside the "LyX-Code mode" block and > > used \char18, which properly outputs the backtick. > > > > Is this expected behavior? Is that the recommended solution for this? > > I have not seen a report of this, but I haven't seen an indication that > a lot of people are using LyX-Code, so I'm not sure if is known. OK, not sure what could be the cause then. I am using ps2pdf to produce the PDF. What I have done as a work-around is to warn in my Makefile if a backquote is used in the LyX document. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +
Re: Backtick in LyX's "LyX-Code" mode
On Mon, Sep 25, 2017 at 10:24:47PM +, Bruce Momjian wrote: > I am using LyX 2.1.2 on Ubuntu 14.04. > > If I enter this: > >ab'c de`f > > in "Standard" mode I get PDF output with proper left/right single > quotes. However, if I switch to LyX-Code mode for that text, I get as > PDF output: > > ab'c de'f Testing on 2.1.0 and on 2.3.0dev, I get the following as PDF output: ab’c de‘f which is different from what you get, but also not what you want. > This is a problem for text of shell scripts. I the want backticks > because backtick means 'execute' in the shell. > > What I have done instead to get literal backticks output is to use a > TeX Code URT (Ugly Red Text) block inside the "LyX-Code mode" block and > used \char18, which properly outputs the backtick. > > Is this expected behavior? Is that the recommended solution for this? I have not seen a report of this, but I haven't seen an indication that a lot of people are using LyX-Code, so I'm not sure if is known. Scott signature.asc Description: PGP signature
Re: Backtick in LyX's "LyX-Code" mode
On 2017-09-25, Bruce Momjian wrote: > I am using LyX 2.1.2 on Ubuntu 14.04. > If I enter this: >ab'c de`f > in "Standard" mode I get PDF output with proper left/right single > quotes. This is a feature of LaTeX fonts: the ASCII quote and backtick are mapped to "typographical" quotes u2019 and u2018: ab’c de‘f > However, if I switch to LyX-Code mode for that text, I get as > PDF output: > ab'c de'f Here, I get the "typographical" quotes u2019 and u2018 in a teletype font: ab’c de‘f With Document>Settings>Fonts>non-TeX fonts, the PDF output is as expected: ab'c de`f > This is a problem for text of shell scripts. I the want backticks > because backtick means 'execute' in the shell. > What I have done instead to get literal backticks output is to use a > TeX Code URT (Ugly Red Text) block inside the "LyX-Code mode" block and > used \char18, which properly outputs the backtick. In case using Unicode fonts is not an option, you may also try the "listings" package (Insert>Program listing) with the options upquote=true basicstyle=\ttfamily in Document>Settings>Program listings. In a minimal document, you may need to add \usepackage{textcomp} to the LaTeX preamble. A a last ressort, you can use the macro \textasciigrave (instead of \char18) in raw LaTeX (ERT). Günter
Backtick in LyX's "LyX-Code" mode
I am using LyX 2.1.2 on Ubuntu 14.04. If I enter this: ab'c de`f in "Standard" mode I get PDF output with proper left/right single quotes. However, if I switch to LyX-Code mode for that text, I get as PDF output: ab'c de'f This is a problem for text of shell scripts. I the want backticks because backtick means 'execute' in the shell. What I have done instead to get literal backticks output is to use a TeX Code URT (Ugly Red Text) block inside the "LyX-Code mode" block and used \char18, which properly outputs the backtick. Is this expected behavior? Is that the recommended solution for this? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +