[R] Sweaving quotes
Murray Jorgensen
maj at waikato.ac.nz
Fri Jul 30 00:22:12 CEST 2010
I tried
\usepackage[cp1252]{inputenc}
and it works well, giving cursive directional quotes in the final
document. Thank you Brian.
I didn't find package ae on the Auckland CRAN mirror so I wonder if it
is a LaTeX package. In any case I am happy now!
Cheers, Murray
Prof Brian Ripley wrote:
> The alternative is to tell LaTeX what encoding the file is in. For
> those using UTF-8 locales this means adding the line
>
> \usepackage[utf8]{inputenc}
>
> Now Murray mentions 'Vista', and so is presumably using cp1252 (the
> Western-European-language Windows default). That is spported by
> inputenc, so try
>
> \usepackage[cp1252]{inputenc}
>
> In either case, the LaTeX font used may or may not have directional
> quotes -- since this is an issue for the R manuals, see our
> documentation for ways around this (such as package ae).
>
> On Wed, 28 Jul 2010, Marc Schwartz wrote:
>
>> On Jul 28, 2010, at 7:43 PM, Murray Jorgensen wrote:
>>
>>> The significance code line to summary() applied to an lm() fitted
>>> model object is
>>>
>>> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
>>>
>>> The corresponding line in the LaTeX source produced by Sweave is
>>>
>>> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
>>>
>>> which looks the same in my email (Thunderbird on a Vista machine),
>>> but when I look at the file in WinEdt the quotes appear rounded and
>>> cursive.
>>>
>>> On LaTeXing and dvipsing the opening and closing quotes turn into
>>> S-acute and S-circumflex respectively.
>>>
>>> Does anyone know how avoid this effect?
>>>
>>> Cheers, Murray
>>
>>
>> Murray,
>>
>> Try this:
>>
>>> summary(lm.D9)
>>
>> ...
>>
>> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
>>
>> ...
>>
>>
>> # Set to not use fancy quotes, but "TeX" style
>> # See ?options and ?sQuote
>> options(useFancyQuotes = "TeX")
>>
>>
>>
>>> summary(lm.D9)
>>
>> ...
>>
>> Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1
>>
>> ...
>>
>>
>> HTH,
>>
>> Marc Schwartz
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
--
Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waikato, Hamilton, New Zealand
Email: maj at waikato.ac.nz majorgensen at ihug.co.nz Fax 7 838 4155
Phone +64 7 838 4773 wk Home +64 7 825 0441 Mobile 021 0200 8350
More information about the R-help
mailing list