Coder Social home page Coder Social logo

ireports's Introduction

RMarkdown Template for Business Reports

This R package provides a LaTeX and RMarkdown template suitable for business reports. The design and layout is loosly oriented at MS Word defaults. In the YAML header of the RMarkdown template, you can easily customize the colors, logos and cover page:

---
title: Document Title
author: INWTlab 
date: \today
params:
  logo: logo.png
  cover: cover.png
  iblue: 2b4894
  igray: d4dbde
documentclass: article
fontsize: 10
papersize: a4paper
...
---

Installation

Install the package latex-report-template from GitHub.

# install.packages("devtools")
devtools::install_github("INWTlab/ireports")

Preview

preview cover preview page

ireports's People

Contributors

sarahwagner avatar wahani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ireports's Issues

ZIP install

This report template is exactly what I'm looking for, but thanks to my company firewall, I can't install packages from github at work. Would you provide a ZIP version for download and install via RStudio?

Can't use rmarkdown::render with ggplot2 graph

I am having an issue with the report when I try run it using rmarkdown::render it is giving the following error.

Screen Shot 2019-03-13 at 16 16 21

This problem only arrises when I included a ggplot2 graph which I want to use for visualisation.

The file knits perfectly when I click "knit" from rmarkdown document with the ggplot 2 graph

Images in Reports

Hi,
just including images also produces an error:

![Plot](C:/Users/xyz/Documents/Plot.png)

results in this error:

! Missing $ inserted.

$
l.64 ...ments//Plot.png}

! xelatex.exe: Windows API error 5: Zugriff verweigert

thank you for your help!

Is there a way to set the template to two column format?

Hi @SarahWagner . Thanks for making this template available, I'm really a fan of the design. I was wondering, is there a way to set the template to alternate between one column format and two column format? So for example, to have the paragraphs in two columns and then perhaps be able to switch to one column for some of the charts/tables in the document?

I'm trying to get my document to look something like this https://ibb.co/Dz2mX7d

Thanks!

Bibliographical references

I am new to all these so, please forgive the naivete. How do you add bibliographical citation to your template? I tried but it wouldn't compile. Your help would be appreciated.

Include Preview Rmd file

Would it be possible to include the Rmd file used to generate the document in the README Preview as a reproducible example? I'm having problems getting this package to work.

Header and footer with no margins in template

Hi everyone!
First, i want to thank you for the post "R Markdown Template for Business Reports", it's really helping me with my reports.
Now, i have a question that maybe you can help me. I been trying to put header and footers with no margins in my reports, but with no success. I'm currently using your template (defs.tex) and Rmd code and playing with both of them. I'm adding the PDF i generate and the header i'm trying to use.
Untitled.pdf
logo
Thanks a lot! :)

report a bug

Thank you very much for making such a nice and neat RMD template.
I feel there is a bug. Your firm logo gets generated every time after I render the document.
Any advice. Cheers.

Text alignment

Hello good afternoon.

If I want to "justify" the written text, how do I change the script or the .TEX file?

Thank you.

How to get figures to appear and hold in position when using a multicolumn format?

Hi @SarahWagner. I'm having a bit of trouble getting figures to appear in your template as soon as I try to use a multicolumn format. I've added the following packages to your defs.tex file in order get my document to be landscape as well as two columns

\usepackage{multicol}
\usepackage[landscape]{geometry}

When I start to add text to my Rmd, that works perfectly. But as soon as I add a simple figure in a code chunk like this

```{r fig1, fig.align='center', fig.cap="First Plot \\label{Figure1}", fig.height=2.4, fig.width=2}

library(ggplot2)

mtcars$cyl <- as.factor(mtcars$cyl)

ggplot(mtcars, aes(x=hp, y=mpg, color=cyl, shape=cyl)) +
  geom_point(size=3)

```

The figure just doesn't appear in my document. I had a look and I think it's because figures can't float within a multicolumn environment (see https://tex.stackexchange.com/a/458533/199349). Is there any way to replicate the *figure trick that this LaTeX user did in an Rmarkdown file? Or any other ways to get figures to appear in the exact position they're in within my Rmd file?

Thanks so much!

Custom layout items

Hi, thanks so much for the template. It works perfectly. I'm comfortable in R but new to latex so I have some questions about how best to modify default layout items:

  • tweak ToC so no subheadings are shown
  • change size and color of headings throughout document
  • remove paragraph indentations
  • add author field to page footer

Sorry if this isn't the right place - I didn't know where else to contact you.
Thanks!

fully justified text

Dear INWTlab,
the template is great. I just started using it. Right now I'm trying to format the text such that it is fully justified, i.e. spreads equally across the lines. I tried various things in the YAML and intext and will continue to search.
Do you maybe know right away how to do this?

Links in IReports

Hi,
when I try to add links into a RMarkdown file using the IReports package by using the RMarkdown code:
[link](www.google.com)

I get following error, when knitting the report:

! Undefined control sequence.
l.45 \href
{www.google.com}{link}

! xelatex.exe: Windows API error 5: Zugriff verweigert

could you help me?
Best
Felix

Soft coding of `Page`

Based on @canholyavkin feedback concerning changes to the Content and Page labels (#6) , we should make the Page label to be set dynamically via the YAML header.

This can be done by changing defs.tex:

% definition of pagename
\newcommand\pagename{Page}

% changes to line 102:
\rfoot{\pagename~\thepage \hspace{1pt} / \pageref{LastPage}}

Once this changes are made, the name can be set via the YAML header of the Rmd file:

---
title: Document Title
author: INWTlab 
date: \today
lang: ngerman
params:
  logo: logo.png
  cover: cover.png
  iblue: 2b4894
  igray: d4dbde
documentclass: article
fontsize: 10
papersize: a4paper
output: 
  IReports::businessReport:
    keep_tex: TRUE
    latex_engine: xelatex
    resetStyleFiles: FALSE
header-includes: 
  - \newcommand{\logo}{`r gsub("_", "\\_", params$logo)`}
  - \newcommand{\cover}{`r gsub("_", "\\_", params$cover)`}
  - \newcommand{\iblue}{`r params$iblue`}
  - \newcommand{\igray}{`r params$igray`}
include-before:
  - \renewcommand{\contentsname}{Inhaltsverzeichnis}
  - \renewcommand{\pagename}{Seite}
---

@SarahWagner Could you please take over? Thx.

*.sty pacakge not found

Hi, awesome reports! I wish to use your package, however it seems that tiny_tex is failing. I was hoping you might be able to help me? I get the following error when I try to knit:

` from https://mirror.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb: cryptographic signature verification of
C:\Users\Nicky\AppData\Local\Temp\mRZJkUgwzS\jGlIYqEVGN
against
https://mirror.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
failed. Output was:
gpg: Signature made Mon Mar 14 03:30:47 2022
gpg: using RSA key 4CE1877E19438C70
gpg: BAD signature from "TeX Live Distribution [email protected]" [ultimate]

Please try from a different mirror and/or wait a few minutes
and try again; usually this is because of transient updates.
If problems persist, feel free to report to [email protected].

! LaTeX Error: File `titlesec.sty' not found.

! Emergency stop.
<read *>

Error: LaTeX failed to compile Wind_Example_Report.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Wind_Example_Report.log for more info.
In addition: Warning message:
In .alignStringToVector(value) : Nonstandard alignments in align string
Execution halted`

Error message when knitting

Hi!

When I try to knit the business report I get the following message:

error: LaTeX failed to compile businessreporttemplate.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
Additional: Warning messages:
1: In .alignStringToVector(value) : Nonstandard alignments in align string
2: In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'"xelatex"' not found
Execution stopped

Can anyone give me any advice on what to do?

Thanks a lot.

Best
Mandy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.