@@ -1,4 +1,5 @@
11{-# LANGUAGE OverloadedStrings #-}
2+{-# LANGUAGE LambdaCase #-}
23{-# LANGUAGE TupleSections #-}
34{-# LANGUAGE PatternGuards #-}
45{-# LANGUAGE ScopedTypeVariables #-}
@@ -145,6 +146,11 @@ pandocToLaTeX options (Pandoc meta blocks) = do
145146
146147 let dirs = query (extract "dir") blocks
147148
149+ let nociteIds = query (\case
150+ Cite cs _ -> map citationId cs
151+ _ -> [])
152+ $ lookupMetaInlines "nocite" meta
153+
148154 let context = defField "toc" (writerTableOfContents options) $
149155 defField "toc-depth" (tshow
150156 (writerTOCDepth options -
@@ -177,9 +183,11 @@ pandocToLaTeX options (Pandoc meta blocks) = do
177183 else id) $
178184 (case writerCiteMethod options of
179185 Natbib -> defField "biblio-title" biblioTitle .
180− defField "natbib" True
186+ defField "natbib" True .
187+ defField "nocite-ids" nociteIds
181188 Biblatex -> defField "biblio-title" biblioTitle .
182− defField "biblatex" True
189+ defField "biblatex" True .
190+ defField "nocite-ids" nociteIds
183191 _ -> id) $
184192 defField "colorlinks" (any hasStringValue
185193 ["citecolor", "urlcolor", "linkcolor", "toccolor",