2017-06-30 11 views
3

LaTeX経由でPDFを生成するためにrmarkdownを使用しようとしています。私は、PDFに画像を挿入しようとしていますが、RMarkdown文書にLaTeXコマンドを使用しています。私は図を正しく挿入しているLaTeXコマンドwrapfigureを使用していますが、図のように現在のセクションに続くテキストをより細い列に強制します(here)。LaarkXでLaTeXを作成する

私のPDFは以下のようになります。私が欲しい

テキストテキストテキスト[画像]

テキストテキストテキスト

テキストテキストテキスト

テキストテキストテキスト[画像]

テキストテキストテキストテキストテキスト

テキストテキストテキストテキストテキスト

フルLaTeX文書を使用して関与している問題の解決策が、私はそのソリューションが私のために動作しませんので、私のクラスのためのRMarkdownを使用するために必要なのです。 RMarkdownを利用して、私が望む適切なフルラインフォーマットを取得する方法は?

コード例:

--- 
title: "Really Awesome Title" 
author: "Some Guy" 
date: "June 30, 2017" 
output: 
    pdf_document: default 
urlcolor: blue 
header-includes: 
    - \usepackage{wrapfig} 
--- 

\begin{wrapfigure}{R}{.25\textwidth} 
    \begin{center} 
    \includegraphics[width=.2\textwidth]{Dave_roberts.png} 
    \end{center} 
    \caption{Dave Roberts} 
\end{wrapfigure} 

## Introduction 

    Words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words. 


### Areas of Interest 

    words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words . 

### Analytic Technique 

    words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words 

### Benefits of Analysis 

    words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words 

UPDATE: 友人が私は{R}を有するラテックス・コードのセクションを終了するために必要なことを示唆しました。これにより余白のエラーは発生しなくなりましたが、「{R}」というテキストがPDFに追加されました。

コードは今のようになります。だから、

\begin{wrapfigure}{R}{.25\textwidth} 
    \begin{center} 
    \includegraphics[width=.2\textwidth]{Dave_roberts.png} 
    \end{center} 
    \caption{Dave Roberts} 
\end{wrapfigure}{R} 

、LaTeXの通話を終了して問題があるように思われます。 LaTeXコールを終了する方法を知っていますが、PDFにテキストを追加することはありませんか?

答えて

0

あなたの問題は、キャプションの後ろにある\end{center}引数の位置から来ています。また、wrapfigureはスペースを確保して利用可能なスペースに収まるので、追加の[width=.2\textwidth]は必要ではありませんが、それはあなたの問題を作成していませんでした。 enter image description here

を:ここで

は、生産作業例

--- 
title : "test title" 
author: "Some Guy" 
date: "June 30, 2017" 
output: pdf_document 
urlcolor: blue 
header-includes: 
    - \usepackage{wrapfig} 
--- 

```{r echo = FALSE} 
url <- "https://cdn.pixabay.com/photo/2017/11/15/20/27/diamonds-2952447_960_720.png" 
curl::curl_download(url, "image.png") 
``` 

## Introduction 

\begin{wrapfigure}{R}{.25\textwidth} 
\begin{center} 
    \includegraphics[width=.2\textwidth]{image.png} 
    \caption{Diamonds} 
\end{center} 
\end{wrapfigure} 

Words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words. 


### Areas of Interest 

    words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words . 

### Analytic Technique 

    words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 

### Benefits of Analysis 

    words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 
words words words words words words words words words words words words words 

です

関連する問題