MyNixOS website logo
Description

Journal Abbreviations for BibTeX Documents.

Since the reference management software (such as 'Zotero', 'Mendeley') exports Bib file journal abbreviation is not detailed enough, the 'journalabbr' package only abbreviates the journal field of Bib file, and then outputs a new Bib file for generating reference format with journal abbreviation on other software (such as 'texstudio'). The abbreviation table is from 'JabRef'. At the same time, 'Shiny' application is provided to generate 'thebibliography', a reference format that can be directly used for latex paper writing based on 'Rmd' files.

journalabbr

CRANstatus r-universe downloads CRAN RStudio mirrordownloads R buildstatus Codecov testcoverage Lifecycle:stable

Function

Implementing journal abbreviation for the ‘Journal’ field in BibTex file.

Install

# CRAN
install.packages("journalabbr")

# or 
devtools::install_github("zoushucai/journalabbr")

Require

The format of the bib file is as follows:

@***{****,
  **** = {****},
  **** = "*****",
  *** = {{******}},
  **** = {*****}}

% or

@***{****,
  **** = {****},
  **** = "*****",
  *** = {{******}},
  **** = {*****}
  }
  

Except for the @character line, the rest of the field lines must have an equal sign =

Use

require(journalabbr)
#> 载入需要的程辑包:journalabbr
path0 <- system.file("extdata", "testfile_1.bib", package = "journalabbr", mustWork = TRUE)
temp <- abbr_bib(file = path0, out.file = tempfile(fileext = ".bib"))
#> Warning in read_bib2dt(file): NA value exists in Citation Key, please check the
#> bib file
#> Warning in read_bib2dt(file): 
#> ====== Duplicate key in uploaded Bib file =======:
#> Binmore2008
#> Binmore2008
#> BrandenburgerDekel1989
#> Osborne1994
#> ===============================================
#> Warning in write_dt2bib(item_dt, outfile): NA value in CKEY or ITYPE field
colnames(temp)
#>  [1] "journal_lower" "journal_abbr"  "originFile"    "fz_id"        
#>  [5] "fz_rawchar"    "fz_char"       "CKEY"          "ITYPE"        
#>  [9] "TITLE"         "AUTHOR"        "ORGANIZATION"  "ADDRESS"      
#> [13] "YEAR"          "URL"           "ABSTRACT"      "NOTE"         
#> [17] "JOURNAL"       "VOLUME"        "NUMBER"        "PAGES"        
#> [21] "MONTH"         "PUBLISHER"     "BOOKTITLE"     "CHAPTER"      
#> [25] "EDITOR"        "SHORTTITLE"    "DOI"           "EDITION"      
#> [29] "SCHOOL"        "TYPE"          "INSTITUTION"

path <- system.file("extdata", "testfile_2.bib", package = "journalabbr", mustWork = TRUE)
temptab <- abbr_bib(file = path, out.file = tempfile(fileext = ".bib"))
#> Warning in read_bib2dt(file): 
#> ====== Duplicate key in uploaded Bib file =======:
#> meenakshi2019fuzzy
#> xu2014ordinal
#> ===============================================
colnames(temptab)
#>  [1] "journal_lower" "journal_abbr"  "originFile"    "fz_id"        
#>  [5] "fz_rawchar"    "fz_char"       "CKEY"          "ITYPE"        
#>  [9] "TITLE"         "AUTHOR"        "PUBLISHER"     "YEAR"         
#> [13] "SHORTTITLE"    "VOLUME"        "PAGES"         "JOURNAL"      
#> [17] "LANGUAGE"      "NUMBER"        "MONTH"         "URL"

# add user csv
csvpath <- system.file("extdata", "myabbr.csv", package = "journalabbr", mustWork = TRUE)
temptab1 <- abbr_bib(file = path, out.file = tempfile(fileext = ".bib"), user.csv = csvpath)
#> Warning in read_bib2dt(file): 
#> ====== Duplicate key in uploaded Bib file =======:
#> meenakshi2019fuzzy
#> xu2014ordinal
#> ===============================================
colnames(temptab1)
#>  [1] "journal_lower" "journal_abbr"  "originFile"    "fz_id"        
#>  [5] "fz_rawchar"    "fz_char"       "CKEY"          "ITYPE"        
#>  [9] "TITLE"         "AUTHOR"        "PUBLISHER"     "YEAR"         
#> [13] "SHORTTITLE"    "VOLUME"        "PAGES"         "JOURNAL"      
#> [17] "LANGUAGE"      "NUMBER"        "MONTH"         "URL"

# no return value
abbr_bib_only_journal(file = path, out.file = tempfile(fileext = ".bib"), user.csv = csvpath)
#> NULL

or run shiny

journalabbr::run_example()

or run shiny online

website: https://zoushucai.shinyapps.io/shiny_cankaowenxian/

  • It needs to be manually pushed to shinyapps.io, and the implementation is also very simple. Simply click the mouse in Rstudio to operate it

Access internal data

abbrtable = journalabbr:::abbrtable_sys
colnames(abbrtable)
#> [1] "journal_lower" "journal_abbr"  "originFile"
Metadata

Version

0.4.3

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows