if (FALSE) {
# Basic import with automatic section detection
doc <- pdf2txt_auto("paper.pdf")
# Import with superscript citation conversion
doc <- pdf2txt_auto(
"paper.pdf",
citation_type = "numeric_superscript"
)
# Import with AI-enhanced extraction
doc <- pdf2txt_auto(
"paper.pdf",
enable_ai_support = TRUE,
ai_model = "2.5-flash",
api_key = Sys.getenv("GEMINI_API_KEY")
)
# Import paper with author-year citations (no conversion)
doc <- pdf2txt_auto(
"paper.pdf",
citation_type = "author_year"
)
# Simple text extraction without sections or citation processing
text <- pdf2txt_auto(
"paper.pdf",
sections = FALSE,
citation_type = "none"
)
# Access specific sections
introduction <- doc$Introduction
methods <- doc$Methods
}
Run the code above in your browser using DataLab