There is no direct way to get it, but you can get 1) the input
filename via knitr::current_input(), and 2) the output format via
knitr::opts_knit$get('rmarkdown.pandoc.to'). You may be able to figure
out the output filename based on these two pieces of information.

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Web: http://yihui.name


On Mon, Jul 6, 2015 at 7:24 AM, AURORA GONZALEZ VIDAL
<aurora.gonzal...@um.es> wrote:
> Hello.
> I have a question for Rmarkdown users.
>
> Is there any way to give a name to the output document inside the Rmd?
>
> For example, my rmd's name is "bb.Rmd" but when I knitr to pdf I want it to
> name the pdf differently than "bb.pdf", for example, "doc1.pdf". Is there
> any way to do this?
>
> Thank you very much
>
>
> ------
> Aurora González Vidal
>
> Sección Apoyo Estadístico.
> Servicio de Apoyo a la Investigación (SAI).
> Vicerrectorado de Investigación.
> Universidad de Murcia
> Edif. SACE . Campus de Espinardo.
> 30100 Murcia
>
> @. aurora.gonzal...@um.es
> T. 868 88 7315
> F. 868 88 7302
> www.um.es/sai
> www.um.es/ae

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to