Encapsulation of two-dimensional materials inside carbon nanotubes : towards an enhanced synthesis of single-layered metal halides