Re: listings package problem
On 2009-02-28, Nikos Alexandris wrote: Solution: % copy-paste from the listing package documentation upquote= true|false determines whether the left and right quote are printed ‘’ or `'. This key requires the textcomp package if true. LyX-problem(?): I get an error-message that I should load the textcomp package although I already have done this. Looking at the source code, the upquote listing-setting is before the \usepackage{textcomp}. Is this a LyX-bug? Yes. (Or an unsupported feature: missing support for the upquote listings setting.) This should at least be documented, so please file a bug report. I guess the solution is to manually put the usepackage command before the listing-settings. Or to set the upquote listings setting in the LaTeX preamble (no need to move all other settings there too). Günter
Re: listings package problem
On 2009-02-28, Nikos Alexandris wrote: Solution: % copy-paste from the listing package documentation upquote= true|false determines whether the left and right quote are printed ‘’ or `'. This key requires the textcomp package if true. LyX-problem(?): I get an error-message that I should load the textcomp package although I already have done this. Looking at the source code, the upquote listing-setting is before the \usepackage{textcomp}. Is this a LyX-bug? Yes. (Or an unsupported feature: missing support for the upquote listings setting.) This should at least be documented, so please file a bug report. I guess the solution is to manually put the usepackage command before the listing-settings. Or to set the upquote listings setting in the LaTeX preamble (no need to move all other settings there too). Günter
Re: listings package problem
On 2009-02-28, Nikos Alexandris wrote: > Solution: >> % copy-paste from the listing package documentation >> upquote= true|false >> determines whether the left and right quote are printed ‘’ or `'. This >> key requires the textcomp package if true. > LyX-problem(?): > I get an error-message that I should load the textcomp package although > I already have done this. Looking at the source code, the "upquote" > listing-setting is before the \usepackage{textcomp}. > Is this a LyX-bug? Yes. (Or an unsupported feature: missing support for the "upquote" listings setting.) This should at least be documented, so please file a bug report. > I guess the solution is to manually put the "usepackage" command before > the listing-settings. Or to set the "upquote" listings setting in the LaTeX preamble (no need to move all other settings there too). Günter
Re: listings package problem
Nikos: [ I am posting a listing-related problem here instead of starting a new thread. ] There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? I think I've found it (didn't tried it out yet though): % copy-paste from the listing package documentation upquote= true|false determines whether the left and right quote are printed ‘’ or `'. This key requires the textcomp package if true. The default setting is false (since it takes an extra-step to load the textcomp package). Kind regards, Nikos
Re: listings package problem
Problem: There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Solution: % copy-paste from the listing package documentation upquote= true|false determines whether the left and right quote are printed ‘’ or `'. This key requires the textcomp package if true. LyX-problem(?): I get an error-message that I should load the textcomp package although I already have done this. Looking at the source code, the upquote listing-setting is before the \usepackage{textcomp}. Is this a LyX-bug? I guess the solution is to manually put the usepackage command before the listing-settings. Kind regards, Nikos
Re: listings package problem
On Sat, 2009-02-28 at 17:49 +0100, Nikos Alexandris wrote: Problem: There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Solution: % copy-paste from the listing package documentation upquote= true|false determines whether the left and right quote are printed ‘’ or `'. This key requires the textcomp package if true. LyX-problem(?): I get an error-message that I should load the textcomp package although I already have done this. Looking at the source code, the upquote listing-setting is before the \usepackage{textcomp}. Is this a LyX-bug? I guess the solution is to manually put the usepackage command before the listing-settings. OK, I am confused or LyX is confusing me :-) # 1 # # The preview source within from LyX begins with: % Preview source code %% LyX 1.6.1 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. [...] \usepackage{listings} \lstset{alsoletter={*()'0123456789.}, basicstyle={\small}, breaklines=true, keywordstyle={\color{marineblue}}, prebreak={\textbackslash}, upquote=true} [...] % the textcomp package is loaded after listings \usepackage{textcomp} [...] # 2 # If I open with a text-editor the .lyx file it begins with the Preamble: #LyX 1.6.1 created this file. For more info see http://www.lyx.org/ \lyxformat 345 \begin_document \begin_header \textclass scrbook \begin_preamble [...] # In addition, I can't find anywhere the \usepackage{listings} command. Question: So, what's the deal? Where are the missing lines from the .lyx file? How can I force the textcomp packge to be loaded before the listings package? Thanks for any hint. Kind regards, Nikos
Re: listings package problem
Question: So, what's the deal? Where are the missing lines from the .lyx file? How can I force the textcomp packge to be loaded before the listings package? There are no missing lines. If there is a listing in the .lyx file, LyX adds the usepackage automatically when generating the latex code. I'm afraid you can't force this, but maybe somebody knows a work-around. see bugs: http://bugzilla.lyx.org/show_bug.cgi?id=5031 http://bugzilla.lyx.org/show_bug.cgi?id=5366 Vincent
Re: listings package problem
On Sat, 2009-02-28 at 18:20 +0100, Vincent van Ravesteijn wrote: Question: So, what's the deal? Where are the missing lines from the .lyx file? How can I force the textcomp packge to be loaded before the listings package? There are no missing lines. If there is a listing in the .lyx file, LyX adds the usepackage automatically when generating the latex code. I'm afraid you can't force this, but maybe somebody knows a work-around. see bugs: http://bugzilla.lyx.org/show_bug.cgi?id=5031 http://bugzilla.lyx.org/show_bug.cgi?id=5366 Vincent Hi Vincent! I know there are no real missing lines (this is why I used the quotes). But where is this pre-preabmle lying? Why can't I see it in my text-editor? Nonetheless, I think I've just hit a work-around :-) Move all listing-settings from the Document Settings Text layout Listing settings (right windows) into the Preabmle. So my Listing settings is empty now and my preabmle has: \usepackage{textcomp} \usepackage{listings} \lstset{alsoletter={*()'0123456789.}, basicstyle={\small}, breaklines=true, keywordstyle={\color{marineblue}}, prebreak={\textbackslash}, upquote=true} And... voila! It works :D Cheers, Nikos
Re: listings package problem
Nikos: [ I am posting a listing-related problem here instead of starting a new thread. ] There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? I think I've found it (didn't tried it out yet though): % copy-paste from the listing package documentation upquote= true|false determines whether the left and right quote are printed ‘’ or `'. This key requires the textcomp package if true. The default setting is false (since it takes an extra-step to load the textcomp package). Kind regards, Nikos
Re: listings package problem
Problem: There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Solution: % copy-paste from the listing package documentation upquote= true|false determines whether the left and right quote are printed ‘’ or `'. This key requires the textcomp package if true. LyX-problem(?): I get an error-message that I should load the textcomp package although I already have done this. Looking at the source code, the upquote listing-setting is before the \usepackage{textcomp}. Is this a LyX-bug? I guess the solution is to manually put the usepackage command before the listing-settings. Kind regards, Nikos
Re: listings package problem
On Sat, 2009-02-28 at 17:49 +0100, Nikos Alexandris wrote: Problem: There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Solution: % copy-paste from the listing package documentation upquote= true|false determines whether the left and right quote are printed ‘’ or `'. This key requires the textcomp package if true. LyX-problem(?): I get an error-message that I should load the textcomp package although I already have done this. Looking at the source code, the upquote listing-setting is before the \usepackage{textcomp}. Is this a LyX-bug? I guess the solution is to manually put the usepackage command before the listing-settings. OK, I am confused or LyX is confusing me :-) # 1 # # The preview source within from LyX begins with: % Preview source code %% LyX 1.6.1 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. [...] \usepackage{listings} \lstset{alsoletter={*()'0123456789.}, basicstyle={\small}, breaklines=true, keywordstyle={\color{marineblue}}, prebreak={\textbackslash}, upquote=true} [...] % the textcomp package is loaded after listings \usepackage{textcomp} [...] # 2 # If I open with a text-editor the .lyx file it begins with the Preamble: #LyX 1.6.1 created this file. For more info see http://www.lyx.org/ \lyxformat 345 \begin_document \begin_header \textclass scrbook \begin_preamble [...] # In addition, I can't find anywhere the \usepackage{listings} command. Question: So, what's the deal? Where are the missing lines from the .lyx file? How can I force the textcomp packge to be loaded before the listings package? Thanks for any hint. Kind regards, Nikos
Re: listings package problem
Question: So, what's the deal? Where are the missing lines from the .lyx file? How can I force the textcomp packge to be loaded before the listings package? There are no missing lines. If there is a listing in the .lyx file, LyX adds the usepackage automatically when generating the latex code. I'm afraid you can't force this, but maybe somebody knows a work-around. see bugs: http://bugzilla.lyx.org/show_bug.cgi?id=5031 http://bugzilla.lyx.org/show_bug.cgi?id=5366 Vincent
Re: listings package problem
On Sat, 2009-02-28 at 18:20 +0100, Vincent van Ravesteijn wrote: Question: So, what's the deal? Where are the missing lines from the .lyx file? How can I force the textcomp packge to be loaded before the listings package? There are no missing lines. If there is a listing in the .lyx file, LyX adds the usepackage automatically when generating the latex code. I'm afraid you can't force this, but maybe somebody knows a work-around. see bugs: http://bugzilla.lyx.org/show_bug.cgi?id=5031 http://bugzilla.lyx.org/show_bug.cgi?id=5366 Vincent Hi Vincent! I know there are no real missing lines (this is why I used the quotes). But where is this pre-preabmle lying? Why can't I see it in my text-editor? Nonetheless, I think I've just hit a work-around :-) Move all listing-settings from the Document Settings Text layout Listing settings (right windows) into the Preabmle. So my Listing settings is empty now and my preabmle has: \usepackage{textcomp} \usepackage{listings} \lstset{alsoletter={*()'0123456789.}, basicstyle={\small}, breaklines=true, keywordstyle={\color{marineblue}}, prebreak={\textbackslash}, upquote=true} And... voila! It works :D Cheers, Nikos
Re: listings package problem
Nikos: > > > [ I am posting a listing-related problem here instead of starting a new > > > thread. ] > > > There is only one *important* problem though: usually the _backticks_ > > > (used in *nix-like OSes to execute a command within, let's say, from > > > another command) appear as to have a top-left to bottom-right direction. > > > With my current setting (Typewriter font set to BeraMono and language > > > set to _bash_) the _backticks_ look very similar to the... well, the > > > _ticks_! > > > > > > I guess it's a font-specific issue. Too bad because Bera looks great. > > > > > > Any other recommendation? I think I've found it (didn't tried it out yet though): % copy-paste from the listing package documentation upquote= true|false determines whether the left and right quote are printed ‘’ or `'. This key requires the textcomp package if true. The default setting is false (since it takes an extra-step to load the textcomp package). Kind regards, Nikos
Re: listings package problem
Problem: > > > > There is only one *important* problem though: usually the _backticks_ > > > > (used in *nix-like OSes to execute a command within, let's say, from > > > > another command) appear as to have a top-left to bottom-right direction. > > > > With my current setting (Typewriter font set to BeraMono and language > > > > set to _bash_) the _backticks_ look very similar to the... well, the > > > > _ticks_! > > > > > > > > I guess it's a font-specific issue. Too bad because Bera looks great. Solution: > % copy-paste from the listing package documentation > upquote= true|false > determines whether the left and right quote are printed ‘’ or `'. This > key requires the textcomp package if true. LyX-problem(?): I get an error-message that I should load the textcomp package although I already have done this. Looking at the source code, the "upquote" listing-setting is before the \usepackage{textcomp}. Is this a LyX-bug? I guess the solution is to manually put the "usepackage" command before the listing-settings. Kind regards, Nikos
Re: listings package problem
On Sat, 2009-02-28 at 17:49 +0100, Nikos Alexandris wrote: > Problem: > > > > > There is only one *important* problem though: usually the _backticks_ > > > > > (used in *nix-like OSes to execute a command within, let's say, from > > > > > another command) appear as to have a top-left to bottom-right > > > > > direction. > > > > > With my current setting (Typewriter font set to BeraMono and language > > > > > set to _bash_) the _backticks_ look very similar to the... well, the > > > > > _ticks_! > > > > > > > > > > I guess it's a font-specific issue. Too bad because Bera looks great. > > > Solution: > > % copy-paste from the listing package documentation > > upquote= true|false > > determines whether the left and right quote are printed ‘’ or `'. This > > key requires the textcomp package if true. > > > LyX-problem(?): > I get an error-message that I should load the textcomp package although > I already have done this. Looking at the source code, the "upquote" > listing-setting is before the \usepackage{textcomp}. > > Is this a LyX-bug? I guess the solution is to manually put the > "usepackage" command before the listing-settings. OK, I am confused or LyX is confusing me :-) # 1 # # The preview source within from LyX begins with: % Preview source code %% LyX 1.6.1 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. [...] \usepackage{listings} \lstset{alsoletter={*()"'0123456789.}, basicstyle={\small}, breaklines=true, keywordstyle={\color{marineblue}}, prebreak={\textbackslash}, upquote=true} [...] % the "textcomp" package is loaded after "listings" \usepackage{textcomp} [...] # 2 # If I open with a text-editor the .lyx file it begins with the Preamble: #LyX 1.6.1 created this file. For more info see http://www.lyx.org/ \lyxformat 345 \begin_document \begin_header \textclass scrbook \begin_preamble [...] # In addition, I can't find anywhere the \usepackage{listings} command. Question: So, what's the deal? Where are the "missing" lines from the .lyx file? How can I force the "textcomp" packge to be loaded before the "listings" package? Thanks for any hint. Kind regards, Nikos
Re: listings package problem
Question: So, what's the deal? Where are the "missing" lines from the .lyx file? How can I force the "textcomp" packge to be loaded before the "listings" package? There are no missing lines. If there is a listing in the .lyx file, LyX adds the usepackage automatically when generating the latex code. I'm afraid you can't force this, but maybe somebody knows a work-around. see bugs: http://bugzilla.lyx.org/show_bug.cgi?id=5031 http://bugzilla.lyx.org/show_bug.cgi?id=5366 Vincent
Re: listings package problem
On Sat, 2009-02-28 at 18:20 +0100, Vincent van Ravesteijn wrote: > > Question: > > So, what's the deal? Where are the "missing" lines from the .lyx file? > > How can I force the "textcomp" packge to be loaded before the "listings" > > package? > > > > There are no missing lines. If there is a listing in the .lyx file, LyX > adds the usepackage automatically when generating the latex code. > > I'm afraid you can't force this, but maybe somebody knows a work-around. > > see bugs: > > http://bugzilla.lyx.org/show_bug.cgi?id=5031 > http://bugzilla.lyx.org/show_bug.cgi?id=5366 > > Vincent Hi Vincent! I know there are no real missing lines (this is why I used the quotes). But where is this pre-preabmle lying? Why can't I see it in my text-editor? Nonetheless, I think I've just hit a work-around :-) Move all listing-settings from the "Document > Settings > Text layout > Listing settings" (right windows) into the Preabmle. So my Listing settings is empty now and my preabmle has: \usepackage{textcomp} \usepackage{listings} \lstset{alsoletter={*()"'0123456789.}, basicstyle={\small}, breaklines=true, keywordstyle={\color{marineblue}}, prebreak={\textbackslash}, upquote=true} And... voila! It works :D Cheers, Nikos
Re: listings package problem
On 2009-02-23, Nikos Alexandris wrote: On Mon, 2009-02-23 at 08:12 +, Guenter Milde wrote: On 2009-02-22, Nikos Alexandris wrote: I guess it's a font-specific issue. Too bad because Bera looks great. Txtt: Set the typewriter font to Default in the GUI and write in the preamble \renewcommand{\ttdefault}{txtt} Not bad (the font in general). Yet: i. the backticks still look like ticks How do they look like in the first place? A minimal example file might help. ii. I loose the scale option which is there in the gui (I suppose I can scale all typewriter fonts through the preamble as well) Yes and No, * you can scale all fonts, if you read and understand fntguide.pdf and write the cumbersome medium-level latex code in the preamble. * you can only scale fonts with a simple option if the font package supports this (in the LyX GUI, the scale box will grey out if the package does not support scaling). Günter
Re: listings package problem
On Mon, 2009-02-23 at 11:20 +0100, Manveru wrote: 2009/2/22 Nikos Alexandris nikos.alexand...@felis.uni-freiburg.de: [ I am posting a listing-related problem here instead of starting a new thread. ] I now realise how powerful is the listing package. I used some R code and setting the fonts to BeraMono gives a very nice and highlighted code in the output. There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? Kind regards, Nikos If you use bash, there is another form of commands substitution other than `backticks`. It is $(command) form. It may solve problems with formatting and become more recognizable in your code examples. Manveru, thanks for the tip. However, I insist in using the backticks. It's easy and gives a bettwe overview in a command like... NEWNAME=MOD${YEAR}_${RESOLUTION}_`echo ${i} | cut -d':' -f5 | cut -d_ -f1,2,3 | sed 's+\_1++g' | sed 's+\_250m++g' | sed 's+\_500m++g'` Cheers, Nikos
Re: listings package problem
Nikos: I guess it's a font-specific issue. Too bad because Bera looks great. Guenter: Txtt: Set the typewriter font to Default in the GUI and write in the preamble \renewcommand{\ttdefault}{txtt} Nikos: Not bad (the font in general). Yet: i. the backticks still look like ticks Guenter: How do they look like in the first place? A minimal example file might help. Nikos: No need for an example here I think. It' simple: a backtick is _`_, a tick (or a single-quote!?) is _'_. The backtick is usually below the Esc key in most keyboards. The single wuote is well, usually in the same key where the double quote lies. They should appear in the pdf like here in this e-mail. Instead one cannot tell their difference in the output when I use Bera as a typewriter font. Courier shows them better but, again, I can't scale the font (I think...). [ Sorry if I messed-up the terms a bit (tick ~ single-quote) ] Any experiences for using long bash-like commands with LyX, KOMA-Script? Kind regards, Nikos
Re: listings package problem
On 2009-02-23, Nikos Alexandris wrote: On Mon, 2009-02-23 at 08:12 +, Guenter Milde wrote: On 2009-02-22, Nikos Alexandris wrote: I guess it's a font-specific issue. Too bad because Bera looks great. Txtt: Set the typewriter font to Default in the GUI and write in the preamble \renewcommand{\ttdefault}{txtt} Not bad (the font in general). Yet: i. the backticks still look like ticks How do they look like in the first place? A minimal example file might help. ii. I loose the scale option which is there in the gui (I suppose I can scale all typewriter fonts through the preamble as well) Yes and No, * you can scale all fonts, if you read and understand fntguide.pdf and write the cumbersome medium-level latex code in the preamble. * you can only scale fonts with a simple option if the font package supports this (in the LyX GUI, the scale box will grey out if the package does not support scaling). Günter
Re: listings package problem
On Mon, 2009-02-23 at 11:20 +0100, Manveru wrote: 2009/2/22 Nikos Alexandris nikos.alexand...@felis.uni-freiburg.de: [ I am posting a listing-related problem here instead of starting a new thread. ] I now realise how powerful is the listing package. I used some R code and setting the fonts to BeraMono gives a very nice and highlighted code in the output. There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? Kind regards, Nikos If you use bash, there is another form of commands substitution other than `backticks`. It is $(command) form. It may solve problems with formatting and become more recognizable in your code examples. Manveru, thanks for the tip. However, I insist in using the backticks. It's easy and gives a bettwe overview in a command like... NEWNAME=MOD${YEAR}_${RESOLUTION}_`echo ${i} | cut -d':' -f5 | cut -d_ -f1,2,3 | sed 's+\_1++g' | sed 's+\_250m++g' | sed 's+\_500m++g'` Cheers, Nikos
Re: listings package problem
Nikos: I guess it's a font-specific issue. Too bad because Bera looks great. Guenter: Txtt: Set the typewriter font to Default in the GUI and write in the preamble \renewcommand{\ttdefault}{txtt} Nikos: Not bad (the font in general). Yet: i. the backticks still look like ticks Guenter: How do they look like in the first place? A minimal example file might help. Nikos: No need for an example here I think. It' simple: a backtick is _`_, a tick (or a single-quote!?) is _'_. The backtick is usually below the Esc key in most keyboards. The single wuote is well, usually in the same key where the double quote lies. They should appear in the pdf like here in this e-mail. Instead one cannot tell their difference in the output when I use Bera as a typewriter font. Courier shows them better but, again, I can't scale the font (I think...). [ Sorry if I messed-up the terms a bit (tick ~ single-quote) ] Any experiences for using long bash-like commands with LyX, KOMA-Script? Kind regards, Nikos
Re: listings package problem
On 2009-02-23, Nikos Alexandris wrote: > On Mon, 2009-02-23 at 08:12 +, Guenter Milde wrote: >> On 2009-02-22, Nikos Alexandris wrote: >> > I guess it's a font-specific issue. Too bad because Bera looks great. >> Txtt: >> Set the typewriter font to Default in the GUI and write in the preamble >> \renewcommand{\ttdefault}{txtt} > Not bad (the font in general). Yet: > i. the backticks still look like ticks How do they look like in the first place? A minimal example file might help. > ii. I loose the "scale" option which is there in the gui (I suppose I > can scale all typewriter fonts through the preamble as well) Yes and No, * you can scale all fonts, if you read and understand fntguide.pdf and write the cumbersome medium-level latex code in the preamble. * you can only scale fonts with a simple option if the font package supports this (in the LyX GUI, the scale box will grey out if the package does not support scaling). Günter
Re: listings package problem
On Mon, 2009-02-23 at 11:20 +0100, Manveru wrote: > 2009/2/22 Nikos Alexandris: > > [ I am posting a listing-related problem here instead of starting a new > > thread. ] > > > > I now realise how powerful is the listing package. I used some R code > > and setting the fonts to BeraMono gives a very nice and highlighted code > > in the output. > > > > There is only one *important* problem though: usually the _backticks_ > > (used in *nix-like OSes to execute a command within, let's say, from > > another command) appear as to have a top-left to bottom-right direction. > > With my current setting (Typewriter font set to BeraMono and language > > set to _bash_) the _backticks_ look very similar to the... well, the > > _ticks_! > > > > I guess it's a font-specific issue. Too bad because Bera looks great. > > > > Any other recommendation? Kind regards, Nikos > > If you use bash, there is another form of commands substitution other > than `backticks`. It is $(command) form. It may solve problems with > formatting and become more recognizable in your code examples. > Manveru, thanks for the tip. However, I insist in using the backticks. It's easy and gives a bettwe overview in a command like... NEWNAME="MOD${YEAR}_${RESOLUTION}_`echo ${i} | cut -d':' -f5 | cut -d"_" -f1,2,3 | sed 's+\_1++g' | sed 's+\_250m++g' | sed 's+\_500m++g'`" Cheers, Nikos
Re: listings package problem
Nikos: I guess it's a font-specific issue. Too bad because Bera looks great. Guenter: > >> Txtt: > >> Set the typewriter font to Default in the GUI and write in the preamble > >> \renewcommand{\ttdefault}{txtt} Nikos: > > Not bad (the font in general). Yet: > > i. the backticks still look like ticks Guenter: > How do they look like in the first place? A minimal example file might help. Nikos: No need for an example here I think. It' simple: a backtick is _`_, a tick (or a single-quote!?) is _'_. The backtick is usually below the Esc key in most keyboards. The single wuote is well, usually in the same key where the double quote lies. They should appear in the pdf like here in this e-mail. Instead one cannot tell their difference in the output when I use Bera as a typewriter font. Courier shows them better but, again, I can't scale the font (I think...). [ Sorry if I messed-up the terms a bit (tick ~ single-quote) ] Any experiences for using long bash-like commands with LyX, KOMA-Script? Kind regards, Nikos
Re: listings package problem
On 2009-02-22, Nikos Alexandris wrote: I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? Kind regards, Nikos Txtt: Set the typewriter font to Default in the GUI and write in the preamble \renewcommand{\ttdefault}{txtt} Günter
Re: listings package problem
2009/2/22 Nikos Alexandris nikos.alexand...@felis.uni-freiburg.de: [ I am posting a listing-related problem here instead of starting a new thread. ] I now realise how powerful is the listing package. I used some R code and setting the fonts to BeraMono gives a very nice and highlighted code in the output. There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? Kind regards, Nikos If you use bash, there is another form of commands substitution other than `backticks`. It is $(command) form. It may solve problems with formatting and become more recognizable in your code examples. -- Manveru jabber: manv...@manveru.pl gg: 1624001 http://www.manveru.pl
Re: listings package problem
On Mon, 2009-02-23 at 08:12 +, Guenter Milde wrote: On 2009-02-22, Nikos Alexandris wrote: I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? Kind regards, Nikos Txtt: Set the typewriter font to Default in the GUI and write in the preamble \renewcommand{\ttdefault}{txtt} Günter Not bad (the font in general). Yet: i. the backticks still look like ticks ii. I loose the scale option which is there in the gui (I suppose I can scale all typewriter fonts through the preamble as well) Thanks, Nikos
Re: listings package problem
On 2009-02-22, Nikos Alexandris wrote: I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? Kind regards, Nikos Txtt: Set the typewriter font to Default in the GUI and write in the preamble \renewcommand{\ttdefault}{txtt} Günter
Re: listings package problem
2009/2/22 Nikos Alexandris nikos.alexand...@felis.uni-freiburg.de: [ I am posting a listing-related problem here instead of starting a new thread. ] I now realise how powerful is the listing package. I used some R code and setting the fonts to BeraMono gives a very nice and highlighted code in the output. There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? Kind regards, Nikos If you use bash, there is another form of commands substitution other than `backticks`. It is $(command) form. It may solve problems with formatting and become more recognizable in your code examples. -- Manveru jabber: manv...@manveru.pl gg: 1624001 http://www.manveru.pl
Re: listings package problem
On Mon, 2009-02-23 at 08:12 +, Guenter Milde wrote: On 2009-02-22, Nikos Alexandris wrote: I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? Kind regards, Nikos Txtt: Set the typewriter font to Default in the GUI and write in the preamble \renewcommand{\ttdefault}{txtt} Günter Not bad (the font in general). Yet: i. the backticks still look like ticks ii. I loose the scale option which is there in the gui (I suppose I can scale all typewriter fonts through the preamble as well) Thanks, Nikos
Re: listings package problem
On 2009-02-22, Nikos Alexandris wrote: > I guess it's a font-specific issue. Too bad because Bera looks great. > Any other recommendation? Kind regards, Nikos Txtt: Set the typewriter font to Default in the GUI and write in the preamble \renewcommand{\ttdefault}{txtt} Günter
Re: listings package problem
2009/2/22 Nikos Alexandris: > [ I am posting a listing-related problem here instead of starting a new > thread. ] > > I now realise how powerful is the listing package. I used some R code > and setting the fonts to BeraMono gives a very nice and highlighted code > in the output. > > There is only one *important* problem though: usually the _backticks_ > (used in *nix-like OSes to execute a command within, let's say, from > another command) appear as to have a top-left to bottom-right direction. > With my current setting (Typewriter font set to BeraMono and language > set to _bash_) the _backticks_ look very similar to the... well, the > _ticks_! > > I guess it's a font-specific issue. Too bad because Bera looks great. > > Any other recommendation? Kind regards, Nikos If you use bash, there is another form of commands substitution other than `backticks`. It is $(command) form. It may solve problems with formatting and become more recognizable in your code examples. -- Manveru jabber: manv...@manveru.pl gg: 1624001 http://www.manveru.pl
Re: listings package problem
On Mon, 2009-02-23 at 08:12 +, Guenter Milde wrote: > On 2009-02-22, Nikos Alexandris wrote: > > > I guess it's a font-specific issue. Too bad because Bera looks great. > > > Any other recommendation? Kind regards, Nikos > > Txtt: > > Set the typewriter font to Default in the GUI and write in the preamble > > \renewcommand{\ttdefault}{txtt} > > > Günter > Not bad (the font in general). Yet: i. the backticks still look like ticks ii. I loose the "scale" option which is there in the gui (I suppose I can scale all typewriter fonts through the preamble as well) Thanks, Nikos
Re: listings package problem
On Fri, 2009-02-20 at 21:19 +0100, David Weenink wrote: L.S., I have found the solution to my problem. The following listings configuration solves my space injection problem: alsoletter={*()'0123456789.} basicstyle={\footnotesize\ttfamily} extendedchars=false frame=L upquote=false (only the first line matters for this specific problem, I think) Thanks for your responses. David Thanks David, your alsoletter line helped me. Kind regards, Nikos
Re: listings package problem
[ I am posting a listing-related problem here instead of starting a new thread. ] I now realise how powerful is the listing package. I used some R code and setting the fonts to BeraMono gives a very nice and highlighted code in the output. There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? Kind regards, Nikos
Re: listings package problem
On Fri, 2009-02-20 at 21:19 +0100, David Weenink wrote: L.S., I have found the solution to my problem. The following listings configuration solves my space injection problem: alsoletter={*()'0123456789.} basicstyle={\footnotesize\ttfamily} extendedchars=false frame=L upquote=false (only the first line matters for this specific problem, I think) Thanks for your responses. David Thanks David, your alsoletter line helped me. Kind regards, Nikos
Re: listings package problem
[ I am posting a listing-related problem here instead of starting a new thread. ] I now realise how powerful is the listing package. I used some R code and setting the fonts to BeraMono gives a very nice and highlighted code in the output. There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? Kind regards, Nikos
Re: listings package problem
On Fri, 2009-02-20 at 21:19 +0100, David Weenink wrote: > L.S., > > I have found the solution to my problem. The following listings configuration > solves my space injection problem: > > alsoletter={*()"'0123456789.} > basicstyle={\footnotesize\ttfamily} > extendedchars=false > frame=L > upquote=false > > (only the first line matters for this specific problem, I think) > > Thanks for your responses. > > David > Thanks David, your "alsoletter" line helped me. Kind regards, Nikos
Re: listings package problem
[ I am posting a listing-related problem here instead of starting a new thread. ] I now realise how powerful is the listing package. I used some R code and setting the fonts to BeraMono gives a very nice and highlighted code in the output. There is only one *important* problem though: usually the _backticks_ (used in *nix-like OSes to execute a command within, let's say, from another command) appear as to have a top-left to bottom-right direction. With my current setting (Typewriter font set to BeraMono and language set to _bash_) the _backticks_ look very similar to the... well, the _ticks_! I guess it's a font-specific issue. Too bad because Bera looks great. Any other recommendation? Kind regards, Nikos
listings package problem
L.S., I'm having the following problem with the listings package. I would like to use the listings package in lyx to show code parts in pdf output. User should be able to just copy the code from the pdf and paste it in their editor and run the code without modification. However, if I put the following line in a listing: Create KlattGrid... kg 0 0.3 6 1 1 6 1 1 1 then it will show allright in the pdf but if the user copies this line from the pdf then a space is included in his copy just before the three dots. Hist copy will be: Create KlattGrid ... kg 0 0.3 6 1 1 6 1 1 1 The three dots should not be separated from the Create KlattGrid part. How can I arrange this? The parameters for listings that I use are the following alsoletter={'} basicstyle={\footnotesize\ttfamily} extendedchars=false frame=L upquote=false The alsoletter={'} is to prevent spaces being added after starting single and double quotes and before the ending quotes. It did not help to include the dot in the alsoletter list because then the number 0.3 will be split in two parts as 0 .3. I'm using Debian unstable/experimental with lyx 1.6.1. Could anyone please help me how to make listings do somewhat less formatting. David -- David Weenink Phonetic Sciences, University of Amsterdam Spuistraat 210, room 340 1012 VT Amsterdam, The Netherlands http://www.fon.hum.uva.nl/david
Re: listings package problem
On Fri, 2009-02-20 at 12:13 +0100, David Weenink wrote: L.S., I'm having the following problem with the listings package. I would like to use the listings package in lyx to show code parts in pdf output. User should be able to just copy the code from the pdf and paste it in their editor and run the code without modification. However, if I put the following line in a listing: Create KlattGrid... kg 0 0.3 6 1 1 6 1 1 1 then it will show allright in the pdf but if the user copies this line from the pdf then a space is included in his copy just before the three dots. Hist copy will be: Create KlattGrid ... kg 0 0.3 6 1 1 6 1 1 1 The three dots should not be separated from the Create KlattGrid part. How can I arrange this? The parameters for listings that I use are the following alsoletter={'} basicstyle={\footnotesize\ttfamily} extendedchars=false frame=L upquote=false The alsoletter={'} is to prevent spaces being added after starting single and double quotes and before the ending quotes. It did not help to include the dot in the alsoletter list because then the number 0.3 will be split in two parts as 0 .3. I'm using Debian unstable/experimental with lyx 1.6.1. Could anyone please help me how to make listings do somewhat less formatting. David Actually, I do need exactly what you need. Hopefully someone has already fixed this. (@Uwe: we forgot to check that). Nikos
RE: listings package problem
It did not help to include the dot in the alsoletter list because then the number 0.3 will be split in two parts as 0 .3. I don't see this. Everything works fine for me when I add the dot to alsoletter. Vincent
Re: listings package problem
L.S., I have found the solution to my problem. The following listings configuration solves my space injection problem: alsoletter={*()'0123456789.} basicstyle={\footnotesize\ttfamily} extendedchars=false frame=L upquote=false (only the first line matters for this specific problem, I think) Thanks for your responses. David -- David Weenink Phonetic Sciences, University of Amsterdam Spuistraat 210, room 340 1012 VT Amsterdam, The Netherlands http://www.fon.hum.uva.nl/david
listings package problem
L.S., I'm having the following problem with the listings package. I would like to use the listings package in lyx to show code parts in pdf output. User should be able to just copy the code from the pdf and paste it in their editor and run the code without modification. However, if I put the following line in a listing: Create KlattGrid... kg 0 0.3 6 1 1 6 1 1 1 then it will show allright in the pdf but if the user copies this line from the pdf then a space is included in his copy just before the three dots. Hist copy will be: Create KlattGrid ... kg 0 0.3 6 1 1 6 1 1 1 The three dots should not be separated from the Create KlattGrid part. How can I arrange this? The parameters for listings that I use are the following alsoletter={'} basicstyle={\footnotesize\ttfamily} extendedchars=false frame=L upquote=false The alsoletter={'} is to prevent spaces being added after starting single and double quotes and before the ending quotes. It did not help to include the dot in the alsoletter list because then the number 0.3 will be split in two parts as 0 .3. I'm using Debian unstable/experimental with lyx 1.6.1. Could anyone please help me how to make listings do somewhat less formatting. David -- David Weenink Phonetic Sciences, University of Amsterdam Spuistraat 210, room 340 1012 VT Amsterdam, The Netherlands http://www.fon.hum.uva.nl/david
Re: listings package problem
On Fri, 2009-02-20 at 12:13 +0100, David Weenink wrote: L.S., I'm having the following problem with the listings package. I would like to use the listings package in lyx to show code parts in pdf output. User should be able to just copy the code from the pdf and paste it in their editor and run the code without modification. However, if I put the following line in a listing: Create KlattGrid... kg 0 0.3 6 1 1 6 1 1 1 then it will show allright in the pdf but if the user copies this line from the pdf then a space is included in his copy just before the three dots. Hist copy will be: Create KlattGrid ... kg 0 0.3 6 1 1 6 1 1 1 The three dots should not be separated from the Create KlattGrid part. How can I arrange this? The parameters for listings that I use are the following alsoletter={'} basicstyle={\footnotesize\ttfamily} extendedchars=false frame=L upquote=false The alsoletter={'} is to prevent spaces being added after starting single and double quotes and before the ending quotes. It did not help to include the dot in the alsoletter list because then the number 0.3 will be split in two parts as 0 .3. I'm using Debian unstable/experimental with lyx 1.6.1. Could anyone please help me how to make listings do somewhat less formatting. David Actually, I do need exactly what you need. Hopefully someone has already fixed this. (@Uwe: we forgot to check that). Nikos
RE: listings package problem
It did not help to include the dot in the alsoletter list because then the number 0.3 will be split in two parts as 0 .3. I don't see this. Everything works fine for me when I add the dot to alsoletter. Vincent
Re: listings package problem
L.S., I have found the solution to my problem. The following listings configuration solves my space injection problem: alsoletter={*()'0123456789.} basicstyle={\footnotesize\ttfamily} extendedchars=false frame=L upquote=false (only the first line matters for this specific problem, I think) Thanks for your responses. David -- David Weenink Phonetic Sciences, University of Amsterdam Spuistraat 210, room 340 1012 VT Amsterdam, The Netherlands http://www.fon.hum.uva.nl/david
listings package problem
L.S., I'm having the following problem with the listings package. I would like to use the listings package in lyx to show code parts in pdf output. User should be able to just copy the code from the pdf and paste it in their editor and run the code without modification. However, if I put the following line in a listing: Create KlattGrid... kg 0 0.3 6 1 1 6 1 1 1 then it will show allright in the pdf but if the user copies this line from the pdf then a space is included in his copy just before the three dots. Hist copy will be: Create KlattGrid ... kg 0 0.3 6 1 1 6 1 1 1 The three dots should not be separated from the "Create KlattGrid" part. How can I arrange this? The parameters for listings that I use are the following alsoletter={"'} basicstyle={\footnotesize\ttfamily} extendedchars=false frame=L upquote=false The alsoletter={"'} is to prevent spaces being added after starting single and double quotes and before the ending quotes. It did not help to include the dot in the alsoletter list because then the number 0.3 will be split in two parts as 0 .3. I'm using Debian unstable/experimental with lyx 1.6.1. Could anyone please help me how to make listings do somewhat less formatting. David -- David Weenink Phonetic Sciences, University of Amsterdam Spuistraat 210, room 340 1012 VT Amsterdam, The Netherlands http://www.fon.hum.uva.nl/david
Re: listings package problem
On Fri, 2009-02-20 at 12:13 +0100, David Weenink wrote: > L.S., > > I'm having the following problem with the listings package. I would like to > use the listings package in lyx to show code parts in pdf output. User should > be able to just copy the code from the pdf and paste it in their editor and > run the code without modification. > > However, > if I put the following line in a listing: > Create KlattGrid... kg 0 0.3 6 1 1 6 1 1 1 > then it will show allright in the pdf but if the user copies this line from > the pdf then a space is included in his copy just before the three dots. > Hist copy will be: > Create KlattGrid ... kg 0 0.3 6 1 1 6 1 1 1 > The three dots should not be separated from the "Create KlattGrid" part. > How can I arrange this? > > The parameters for listings that I use are the following > > alsoletter={"'} > basicstyle={\footnotesize\ttfamily} > extendedchars=false > frame=L > upquote=false > > The alsoletter={"'} is to prevent spaces being added after starting single > and double quotes and before the ending quotes. > > It did not help to include the dot in the alsoletter list because then the > number 0.3 will be split in two parts as 0 .3. > > I'm using Debian unstable/experimental with lyx 1.6.1. > > Could anyone please help me how to make listings do somewhat less formatting. > > David > > Actually, I do need exactly what you need. Hopefully someone has already "fixed" this. (@Uwe: we forgot to check that). Nikos
RE: listings package problem
>It did not help to include the dot in the alsoletter list >because then the number 0.3 will be split in two parts as 0 .3. I don't see this. Everything works fine for me when I add the dot to alsoletter. Vincent
Re: listings package problem
L.S., I have found the solution to my problem. The following listings configuration solves my space injection problem: alsoletter={*()"'0123456789.} basicstyle={\footnotesize\ttfamily} extendedchars=false frame=L upquote=false (only the first line matters for this specific problem, I think) Thanks for your responses. David -- David Weenink Phonetic Sciences, University of Amsterdam Spuistraat 210, room 340 1012 VT Amsterdam, The Netherlands http://www.fon.hum.uva.nl/david