Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. documentclass[12pt, a4paper]{article}
  2.  
  3. usepackage[utf8]{inputenc}
  4. usepackage{hyperref}
  5. hypersetup{
  6. colorlinks = true, %Colours links instead of ugly boxes
  7. urlcolor = blue, %Colour for external hyperlinks
  8. linkcolor = blue, %Colour of internal links
  9. citecolor = blue %Colour of citations
  10. }
  11. usepackage{caption}
  12. captionsetup[figure]{labelfont=bf, labelsep=period}
  13. captionsetup[table]{labelfont=bf, labelsep=period}
  14. setlength{parindent}{0pt}
  15.  
  16.  
  17. title{My very first LaTeX/knitr document!}
  18. date{April 2019}
  19.  
  20.  
  21.  
  22. begin{document}
  23.  
  24. maketitle
  25.  
  26. begingroup
  27. hypersetup{linkcolor=black} % force independent link colours in table of contents
  28. tableofcontents
  29. endgroup
  30.  
  31. newpage
  32.  
  33. section{Basics}
  34.  
  35. subsection{Using no options}
  36. First, let's try and a show a chunk of code along with a plot and print() message.
  37.  
  38. <<first-chunk>>=
  39. # Make a simple dataframe:
  40. setwd("/home/user/Documents/testing-area/knitr/")
  41. df <- data.frame(A = c(1,2,3), B = c("A", "B", "C"))
  42. plot(df$A,df$B)
  43. print("hello")
  44. @
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement