diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,5 @@
-Copyright (c) 2013, Andrea Rossato, John MacFarlane
+Copyright (c) 2008-2013, Andrea Rossato
+Copyright (c) 2013-2015, John MacFarlane
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification,
diff --git a/changelog b/changelog
--- a/changelog
+++ b/changelog
@@ -1,3 +1,18 @@
+pandoc-citeproc (0.7.1)
+
+  * Improvements to numerical styles:
+    + Space is now inserted after the reference number in the
+      bibliography when `second-field-align` is `margin` or `flush`.
+    + Author-in-text citations are now treated just like other citations
+      in numerical styles.  So, brackets are used, and the term
+      "Reference" is not added: instead of `Reference 1 says...`
+      we have `[1] says...`.  This seems to accord better with e.g.
+      IEEE practice.
+    + Improved citation collapsing.  Now both the new and the old versions
+      of `ieee.csl` work properly.  Previously brackets were dropped with
+      the new version (#55).
+    + Use new `ieee.csl` for testing.
+
 pandoc-citeproc (0.7.0.2)
 
   * Bump version bound for xml-conduit.
diff --git a/pandoc-citeproc.cabal b/pandoc-citeproc.cabal
--- a/pandoc-citeproc.cabal
+++ b/pandoc-citeproc.cabal
@@ -1,5 +1,5 @@
 name:               pandoc-citeproc
-version:            0.7.0.2
+version:            0.7.1
 cabal-version:      >= 1.12
 synopsis:           Supports using pandoc with citeproc
 
diff --git a/src/Text/CSL/Proc.hs b/src/Text/CSL/Proc.hs
--- a/src/Text/CSL/Proc.hs
+++ b/src/Text/CSL/Proc.hs
@@ -22,7 +22,7 @@
 import Data.Ord  ( comparing )
 import Data.Maybe ( mapMaybe )
 import Text.CSL.Eval
-import Text.CSL.Util ( capitalize, proc, proc', query, uncamelize, tr' )
+import Text.CSL.Util ( proc, proc', query, uncamelize, tr' )
 import Text.CSL.Proc.Collapse
 import Text.CSL.Proc.Disamb
 import Text.CSL.Reference
@@ -100,11 +100,11 @@
                                proc (updateYearSuffixes yearS) . map addYearSuffix) $
                           procBiblio (bibOpts ops) s biblioRefs
                      else map formatOutputList $
+                          tr' "citeproc:after procBiblio" $
                           procBiblio (bibOpts ops) s biblioRefs
-      citsAndRefs  = tr' "citeproc:citsAndRefs" $ processCites biblioRefs cs
+      citsAndRefs  = processCites biblioRefs cs
       (yearS,citG) = disambCitations s biblioRefs cs $ map (procGroup s) citsAndRefs
-      citsOutput   = tr' "citeproc:after formatCitLayout" .
-                     map (formatCitLayout s) .
+      citsOutput   = map (formatCitLayout s) .
                      tr' "citeproc:collapsed" .
                      collapseCitGroups s .
                      (if styleClass s == "in-text" then proc addLink else id) .
@@ -151,8 +151,19 @@
 procBiblio :: BibOpts -> Style -> [Reference] -> [[Output]]
 procBiblio bos (Style {biblio = mb, csMacros = ms , styleLocale = l,
                        styleAbbrevs = as, csOptions = opts}) rs
-    = maybe [] process mb
+    = map addSpaceAfterCitNum $ maybe [] process mb
     where
+      -- handle second-field-align (sort of)
+      addSpaceAfterCitNum [Output (OCitNum n f : xs) f']
+        | secondFieldAlign == Just "flush"  =
+            [Output (OCitNum n f : OSpace : xs) f']
+        | secondFieldAlign == Just "margin" =
+            [Output (OCitNum n f : OSpace : xs) f']
+        | otherwise = [Output (OCitNum n f : xs) f']
+      addSpaceAfterCitNum xs = xs
+
+      secondFieldAlign = lookup "second-field-align" $ maybe [] bibOptions mb
+
       process :: Bibliography -> [[Output]]
       process b   = map (formatBiblioLayout (layFormat $ bibLayout b) (layDelim $ bibLayout b)) $ render b
 
@@ -399,8 +410,7 @@
 contribOnly :: Style -> Output -> Output
 contribOnly s o
     | isNumStyle [o]
-    , OCitNum  {} <- o = Output [ OStr (query getRefTerm s) emptyFormatting
-                                , OSpace, o] emptyFormatting
+    , OCitNum  {} <- o = o
     | OContrib _ "author"
             _ _ _ <- o = o
     | OContrib _ "authorsub"
@@ -410,8 +420,3 @@
     , "ibid" <- filter (/= '.')
        (map toLower x) = o
     | otherwise        = ONull
-    where
-      getRefTerm :: CslTerm -> String
-      getRefTerm t
-          | CT "reference" Long _ _ x _ _ <- t = capitalize x
-          | otherwise                          = []
diff --git a/src/Text/CSL/Proc/Collapse.hs b/src/Text/CSL/Proc/Collapse.hs
--- a/src/Text/CSL/Proc/Collapse.hs
+++ b/src/Text/CSL/Proc/Collapse.hs
@@ -16,10 +16,11 @@
 
 module Text.CSL.Proc.Collapse where
 
+import Data.Ord (comparing)
 import Data.Monoid (mempty, Any(..))
 import Control.Arrow ( (&&&), (>>>), second )
 import Data.Char
-import Data.List ( groupBy, sort )
+import Data.List ( groupBy, sortBy )
 import Text.CSL.Util ( query, proc, proc', betterThan )
 import Text.CSL.Eval
 import Text.CSL.Proc.Disamb
@@ -44,27 +45,29 @@
     = map snd . filter ((==) "collapse" . fst) . citOptions . citation
 
 collapseNumber :: CitationGroup -> CitationGroup
-collapseNumber cg
-    | CG [a] f d os <- cg = mapCitationGroup process . CG [a] f d $ drop 1 os
-    | otherwise           = mapCitationGroup process cg
+collapseNumber (CG _ f d os) = mapCitationGroup process $ CG [] f d os
+-- note:  for numerical styles, we treat author-in-text citations just
+-- like any others.
     where
       hasLocator = or . query hasLocator'
       hasLocator' o
           | OLoc _ _ <- o = [True]
           | otherwise     = [False]
-      citNum o
-          | OCitNum i f <- o = [(i,f)]
-          | otherwise        = []
-      numOf  = foldr (\x _ -> x) (0,emptyFormatting) . query citNum
-      newNum = map numOf >>> (map fst >>> groupConsec) &&& map snd >>> uncurry zip
-      process xs = if  hasLocator xs then xs else
-                   flip concatMap (newNum xs) $
-                   \(x,f) -> if length x > 2
-                             then return $ Output [ OCitNum (head x) f
-                                                  , OPan [Str "\x2013"]
-                                                  , OCitNum (last x) f
-                                                  ] emptyFormatting
-                             else map (flip OCitNum f) x
+      citNums (OCitNum i _) = [i]
+      citNums (Output xs _) = concatMap citNums xs
+      citNums _             = []
+      numOf  = foldr (\x _ -> x) 0 . citNums
+      process xs = if hasLocator xs
+                      then xs
+                      else let ys = concat (groupConsecWith numOf xs)
+                           in if length ys > 2
+                                 then [ Output [
+                                            head ys
+                                          , OPan [Str "\x2013"]
+                                          , last ys
+                                          ] emptyFormatting
+                                      ]
+                                 else ys
 
 groupCites :: [(Cite, Output)] -> [(Cite, Output)]
 groupCites []     = []
@@ -215,10 +218,12 @@
 --
 -- > groupConsec [1,2,3,5,6,8,9] == [[1,2,3],[5,6],[8,9]]
 groupConsec :: [Int] -> [[Int]]
-groupConsec = foldr go [] . sort
-  where go :: Int -> [[Int]] -> [[Int]]
-        go x []     = [[x]]
-        go x ((y:ys):gs) = if x + 1 == y
-                         then ((x:y:ys):gs)
-                         else ([x]:(y:ys):gs)
+groupConsec = groupConsecWith id
+
+groupConsecWith ::  (a -> Int) -> [a] -> [[a]]
+groupConsecWith f = foldr go [] . sortBy (comparing f)
+  where go x []     = [[x]]
+        go x ((y:ys):gs) = if (f x + 1) == (f y)
+                              then ((x:y:ys):gs)
+                              else ([x]:(y:ys):gs)
         go _ ([]:_) = error "groupConsec: head of list is empty"
diff --git a/tests/ieee.csl b/tests/ieee.csl
--- a/tests/ieee.csl
+++ b/tests/ieee.csl
@@ -4,6 +4,8 @@
     <title>IEEE</title>
     <id>http://www.zotero.org/styles/ieee</id>
     <link href="http://www.zotero.org/styles/ieee" rel="self"/>
+    <link href="http://www.ieee.org/documents/style_manual.pdf" rel="documentation"/>
+    <link href="http://www.ieee.org/documents/auinfo07.pdf" rel="documentation"/>
     <author>
       <name>Michael Berkowitz</name>
       <email>mberkowi@gmu.edu</email>
@@ -23,170 +25,200 @@
     <contributor>
       <name>Sebastian Karcher</name>
     </contributor>
+    <category citation-format="numeric"/>
     <category field="engineering"/>
     <category field="generic-base"/>
-    <category citation-format="numeric"/>
-    <updated>2011-09-15T07:01:02+00:00</updated>
-    <rights>
-      This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License:
-      http://creativecommons.org/licenses/by-sa/3.0/
-    </rights>
-    <link href="http://www.ieee.org/portal/cms_docs_iportals/iportals/publications/authors/transjnl/stylemanual.pdf" rel="documentation"/>
-    <link href="http://www.ieee.org/documents/auinfo07.pdf" rel="documentation"/>
+    <updated>2013-12-17T18:04:02+00:00</updated>
+    <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
   </info>
+  <locale xml:lang="en">
+    <terms>
+      <term name="chapter" form="short">ch.</term>
+      <term name="presented at">presented at the</term>
+      <term name="available at">available</term>
+    </terms>
+  </locale>
   <!-- Macros -->
   <macro name="edition">
     <choose>
-      <if type="bill book graphic legal_case motion_picture report song chapter paper-conference" match="any">
-	<choose>
-	  <if is-numeric="edition">
-	    <group delimiter=" ">
-	      <number variable="edition" form="ordinal"/>
-	      <text term="edition" form="short" suffix="." strip-periods="true"/>
-	    </group>
-	  </if>
-	  <else>
-	    <text variable="edition" text-case="capitalize-first" suffix="."/>
-	  </else>
-	</choose>
+      <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
+        <choose>
+          <if is-numeric="edition">
+            <group delimiter=" ">
+              <number variable="edition" form="ordinal"/>
+              <text term="edition" form="short"/>
+            </group>
+          </if>
+          <else>
+            <text variable="edition" text-case="capitalize-first" suffix="."/>
+          </else>
+        </choose>
       </if>
     </choose>
   </macro>
   <macro name="issued">
     <choose>
       <if type="article-journal report" match="any">
-	<date variable="issued">
-	  <date-part name="month" form="short" suffix=" "/>
-	  <date-part name="year" form="long"/>
-	</date>
+        <date variable="issued">
+          <date-part name="month" form="short" suffix=" "/>
+          <date-part name="year" form="long"/>
+        </date>
       </if>
-      <else-if type="bill book graphic legal_case motion_picture  song thesis chapter paper-conference" match="any">
-	<date variable="issued">
-	  <date-part name="year" form="long"/>
-	</date>
+      <else-if type=" bill book chapter graphic legal_case legislation motion_picture paper-conference song thesis" match="any">
+        <date variable="issued">
+          <date-part name="year" form="long"/>
+        </date>
       </else-if>
       <else>
-	<date variable="issued">
-	  <date-part name="day" form="numeric-leading-zeros" suffix="-"/>
-	  <date-part name="month" form="short" suffix="-" strip-periods="true"/>
-	  <date-part name="year" form="long"/>
-	</date>
+        <date variable="issued">
+          <date-part name="day" form="numeric-leading-zeros" suffix="-"/>
+          <date-part name="month" form="short" suffix="-" strip-periods="true"/>
+          <date-part name="year" form="long"/>
+        </date>
       </else>
     </choose>
   </macro>
   <macro name="author">
     <names variable="author">
       <name initialize-with=". " delimiter=", " and="text"/>
-      <label form="short" prefix=", " text-case="capitalize-first" suffix="." strip-periods="true"/>
+      <label form="short" prefix=", " text-case="capitalize-first"/>
       <substitute>
-	<names variable="editor"/>
-	<names variable="translator"/>
+        <names variable="editor"/>
+        <names variable="translator"/>
       </substitute>
     </names>
   </macro>
   <macro name="editor">
     <names variable="editor">
       <name initialize-with=". " delimiter=", " and="text"/>
-      <label form="short" prefix=", " text-case="capitalize-first" suffix="." strip-periods="true"/>
+      <label form="short" prefix=", " text-case="capitalize-first"/>
     </names>
   </macro>
   <macro name="locators">
     <group delimiter=", ">
       <text macro="edition"/>
       <group delimiter=" ">
-	<text term="volume" form="short" suffix="." strip-periods="true"/>
-	<number variable="volume" form="numeric"/>
+        <text term="volume" form="short"/>
+        <number variable="volume" form="numeric"/>
       </group>
       <group delimiter=" ">
-	<number variable="number-of-volumes" form="numeric"/>
-	<text term="volume" form="short" suffix="." plural="true" strip-periods="true"/>
+        <number variable="number-of-volumes" form="numeric"/>
+        <text term="volume" form="short" plural="true"/>
       </group>
       <group delimiter=" ">
-	<text term="issue" form="short" suffix="." strip-periods="true"/>
-	<number variable="issue" form="numeric"/>
+        <text term="issue" form="short"/>
+        <number variable="issue" form="numeric"/>
       </group>
     </group>
   </macro>
   <macro name="title">
     <choose>
-      <if type="bill book graphic legal_case motion_picture song" match="any">
-	<text variable="title" font-style="italic"/>
+      <if type="bill book graphic legal_case legislation motion_picture song" match="any">
+        <text variable="title" font-style="italic"/>
       </if>
       <else>
-	<text variable="title" quotes="true"/>
+        <text variable="title" quotes="true"/>
       </else>
     </choose>
   </macro>
   <macro name="publisher">
     <choose>
-      <if type="bill book graphic legal_case motion_picture  song chapter paper-conference" match="any">
-	<text variable="publisher-place" suffix=": "/>
-	<text variable="publisher"/>
+      <if type=" bill book chapter graphic legal_case legislation motion_picture paper-conference song" match="any">
+        <group delimiter=": ">
+          <text variable="publisher-place"/>
+          <text variable="publisher"/>
+        </group>
       </if>
       <else>
-	<group delimiter=", ">
-	  <text variable="publisher"/>
-	  <text variable="publisher-place"/>
-	</group>
+        <group delimiter=", ">
+          <text variable="publisher"/>
+          <text variable="publisher-place"/>
+        </group>
       </else>
     </choose>
   </macro>
   <macro name="event">
     <choose>
-      <if type="paper-conference">
-	<choose>
-	  <!-- Published Conference Paper -->
-	  <if variable="container-title">
-	    <group delimiter=", ">
-	      <text variable="container-title" prefix="in " font-style="italic"/>
-	      <text variable="event-place"/>
-	    </group>
-	  </if>
-	  <!-- Unpublished Conference Paper -->
-	  <else>
-	    <group delimiter=", ">
-	      <text variable="event" prefix="presented at the "/>
-	      <text variable="event-place"/>
-	    </group>
-	  </else>
-	</choose>
+      <if type="paper-conference speech" match="any">
+        <choose>
+          <!-- Published Conference Paper -->
+          <if variable="container-title">
+            <group delimiter=", ">
+              <group delimiter=" ">
+                <text term="in"/>
+                <text variable="container-title" font-style="italic"/>
+              </group>
+              <text variable="event-place"/>
+            </group>
+          </if>
+          <!-- Unpublished Conference Paper -->
+          <else>
+            <group delimiter=", ">
+              <group delimiter=" ">
+                <text term="presented at"/>
+                <text variable="event"/>
+              </group>
+              <text variable="event-place"/>
+            </group>
+          </else>
+        </choose>
       </if>
     </choose>
   </macro>
   <macro name="access">
     <choose>
       <if type="webpage">
-	<choose>
-	  <if variable="URL">
-	    <group delimiter=". ">
-	      <text value="[Online]"/>
-	      <text variable="URL" prefix="Available: "/>
-	      <group prefix="[" suffix="]">
-		<date variable="accessed" prefix="Accessed: ">
-		  <date-part name="day" form="numeric-leading-zeros" suffix="-"/>
-		  <date-part name="month" form="short" suffix="-" strip-periods="true"/>
-		  <date-part name="year" form="long"/>
-		</date>
-	      </group>
-	    </group>
-	  </if>
-	</choose>
+        <choose>
+          <if variable="URL">
+            <group delimiter=". ">
+              <text term="online" prefix="[" suffix="]" text-case="capitalize-first"/>
+              <group delimiter=": ">
+                <text term="available at" text-case="capitalize-first"/>
+                <text variable="URL"/>
+              </group>
+              <group prefix="[" suffix="]" delimiter=": ">
+                <text term="accessed" text-case="capitalize-first"/>
+                <date variable="accessed">
+                  <date-part name="day" form="numeric-leading-zeros" suffix="-"/>
+                  <date-part name="month" form="short" suffix="-" strip-periods="true"/>
+                  <date-part name="year" form="long"/>
+                </date>
+              </group>
+            </group>
+          </if>
+        </choose>
       </if>
     </choose>
   </macro>
   <macro name="page">
     <group>
-      <label variable="page" form="short" suffix=". " strip-periods="true"/>
+      <label variable="page" form="short" suffix=" "/>
       <text variable="page"/>
     </group>
   </macro>
+  <macro name="citation-locator">
+    <group delimiter=" ">
+      <choose>
+        <if locator="page">
+          <label variable="locator" form="short"/>
+        </if>
+        <else>
+          <label variable="locator" form="short" text-case="capitalize-first"/>
+        </else>
+      </choose>
+      <text variable="locator"/>
+    </group>
+  </macro>
   <!-- Citation -->
-  <citation  collapse="citation-number">
+  <citation collapse="citation-number">
     <sort>
       <key variable="citation-number"/>
     </sort>
-    <layout prefix="[" suffix="]" delimiter="], [">
-      <text variable="citation-number"/>
+    <layout delimiter=", ">
+      <group prefix="[" suffix="]" delimiter=", ">
+        <text variable="citation-number"/>
+        <text macro="citation-locator"/>
+      </group>
     </layout>
   </citation>
   <!-- Bibliography -->
@@ -195,107 +227,112 @@
       <!-- Citation Number -->
       <text variable="citation-number" prefix="[" suffix="]"/>
       <!-- Author(s) -->
-      <text macro="author" prefix=" " suffix=", "/>
+      <text macro="author" suffix=", "/>
       <!-- Rest of Citation -->
       <choose>
-	<!-- Specific Formats -->
-	<if type="article-journal">
-	  <group delimiter=", ">
-	    <text macro="title"/>
-	    <text variable="container-title" font-style="italic" form="short"/>
-	    <text macro="locators"/>
-	    <text macro="page"/>
-	    <text macro="issued"/>
-	  </group>
-	</if>
-	<else-if type="paper-conference">
-	  <group delimiter=", ">
-	    <text macro="title"/>
-	    <text macro="event"/>
-	    <text macro="issued"/>
-	    <text macro="locators"/>
-	    <text macro="page"/>
-	  </group>
-	</else-if>
-	<else-if type="report">
-	  <group delimiter=", "> 
-	    <text macro="title"/>
-	    <text macro="publisher"/>
-	    <group delimiter=" ">
-	      <text variable="genre"/>
-	      <text variable="number"/>
-	    </group>
-	    <text macro="issued"/>
-	  </group>
-	</else-if>
-	<else-if type="thesis">
-	  <group delimiter=", ">
-	    <text macro="title"/>
-	    <text variable="genre"/>
-	    <text macro="publisher"/>
-	    <text macro="issued"/>
-	  </group>
-	</else-if>
-	<else-if type="webpage">
-	  <group delimiter=", " suffix=". ">
-	    <text macro="title"/>
-	    <text variable="container-title" font-style="italic"/>
-	    <text macro="issued"/>
-	  </group>
-	  <text macro="access"/>
-	</else-if>
-	<else-if type="patent">
-	  <text macro="title" suffix=", "/>
-	  <text variable="number" prefix="U.S. Patent "/>
-	  <text macro="issued"/>
-	</else-if>
-	<!-- Generic/Fallback Formats -->
-	<else-if type="bill book graphic legal_case motion_picture report song" match="any">
-	  <group delimiter=", " suffix=". ">
-	    <text macro="title"/>
-	    <text macro="locators"/>
-	  </group>
-	  <group delimiter=", ">
-	    <text macro="publisher"/>
-	    <text macro="issued"/>
-	    <text macro="page"/>
-	  </group>
-	</else-if>
-	<else-if type="article-magazine article-newspaper broadcast interview manuscript map patent personal_communication song speech thesis webpage" match="any">
-	  <group delimiter=", ">
-	    <text macro="title"/>
-	    <text variable="container-title" font-style="italic"/>
-	    <text macro="locators"/>
-	    <text macro="publisher"/>
-	    <text macro="page"/>
-	    <text macro="issued"/>
-	  </group>
-	</else-if>
-	<else-if type="chapter paper-conference" match="any">
-	  <group delimiter=", " suffix=", ">
-	    <text macro="title"/>
-	    <text variable="container-title" prefix="in " font-style="italic"/>
-	    <text macro="locators"/>
-	  </group>
-	  <text macro="editor" suffix=" "/>
-	  <group delimiter=", ">
-	    <text macro="publisher"/>
-	    <text macro="issued"/>
-	    <text macro="page"/>
-	  </group>
-	</else-if>
-	<else>
-	  <group delimiter=", " suffix=". ">
-	    <text macro="title"/>
-	    <text variable="container-title" font-style="italic"/>
-	    <text macro="locators"/>
-	  </group>
-	  <group delimiter=", ">
-	    <text macro="publisher"/>
-	    <text macro="page"/>
-	    <text macro="issued"/>
-	  </group>
-	</else>
+        <!-- Specific Formats -->
+        <if type="article-journal">
+          <group delimiter=", ">
+            <text macro="title"/>
+            <text variable="container-title" font-style="italic" form="short"/>
+            <text macro="locators"/>
+            <text macro="page"/>
+            <text macro="issued"/>
+          </group>
+        </if>
+        <else-if type="paper-conference speech" match="any">
+          <group delimiter=", ">
+            <text macro="title"/>
+            <text macro="event"/>
+            <text macro="issued"/>
+            <text macro="locators"/>
+            <text macro="page"/>
+          </group>
+        </else-if>
+        <else-if type="report">
+          <group delimiter=", ">
+            <text macro="title"/>
+            <text macro="publisher"/>
+            <group delimiter=" ">
+              <text variable="genre"/>
+              <text variable="number"/>
+            </group>
+            <text macro="issued"/>
+          </group>
+        </else-if>
+        <else-if type="thesis">
+          <group delimiter=", ">
+            <text macro="title"/>
+            <text variable="genre"/>
+            <text macro="publisher"/>
+            <text macro="issued"/>
+          </group>
+        </else-if>
+        <else-if type="webpage post-weblog" match="any">
+          <group delimiter=", " suffix=". ">
+            <text macro="title"/>
+            <text variable="container-title" font-style="italic"/>
+            <text macro="issued"/>
+          </group>
+          <text macro="access"/>
+        </else-if>
+        <else-if type="patent">
+          <group delimiter=", ">
+            <text macro="title"/>
+            <text variable="number"/>
+            <text macro="issued"/>
+          </group>
+        </else-if>
+        <!-- Generic/Fallback Formats -->
+        <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
+          <group delimiter=", " suffix=". ">
+            <text macro="title"/>
+            <text macro="locators"/>
+          </group>
+          <group delimiter=", ">
+            <text macro="publisher"/>
+            <text macro="issued"/>
+            <text macro="page"/>
+          </group>
+        </else-if>
+        <else-if type="article-magazine article-newspaper broadcast interview manuscript map patent personal_communication song speech thesis webpage" match="any">
+          <group delimiter=", ">
+            <text macro="title"/>
+            <text variable="container-title" font-style="italic"/>
+            <text macro="locators"/>
+            <text macro="publisher"/>
+            <text macro="page"/>
+            <text macro="issued"/>
+          </group>
+        </else-if>
+        <else-if type="chapter paper-conference" match="any">
+          <group delimiter=", " suffix=", ">
+            <text macro="title"/>
+            <group delimiter=" ">
+              <text term="in"/>
+              <text variable="container-title" font-style="italic"/>
+            </group>
+            <text macro="locators"/>
+          </group>
+          <text macro="editor" suffix=" "/>
+          <group delimiter=", ">
+            <text macro="publisher"/>
+            <text macro="issued"/>
+            <text macro="page"/>
+          </group>
+        </else-if>
+        <else>
+          <group delimiter=", " suffix=". ">
+            <text macro="title"/>
+            <text variable="container-title" font-style="italic"/>
+            <text macro="locators"/>
+          </group>
+          <group delimiter=", ">
+            <text macro="publisher"/>
+            <text macro="page"/>
+            <text macro="issued"/>
+          </group>
+        </else>
       </choose>
     </layout>
   </bibliography>
diff --git a/tests/ieee.expected.native b/tests/ieee.expected.native
--- a/tests/ieee.expected.native
+++ b/tests/ieee.expected.native
@@ -1,17 +1,17 @@
 Pandoc (Meta {unMeta = fromList [("bibliography",MetaInlines [Str "tests/biblio.bib"]),("csl",MetaInlines [Str "tests/ieee.csl"])]})
 [Header 1 ("pandoc-with-citeproc-hs",[],[]) [Str "Pandoc",Space,Str "with",Space,Str "citeproc-hs"]
-,Para [Cite [Citation {citationId = "nonexistent", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 1}] [Str "[",Strong [Str "???"],Str "]"]]
+,Para [Cite [Citation {citationId = "nonexistent", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 1}] [Span ("",["citeproc-no-output"],[]) [Strong [Str "???"]]]]
 ,Para [Strong [Str "???"]]
-,Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 3}] [Str "Reference",Space,Link [Str "1"] ("#ref-item1","")],Space,Str "says",Space,Str "blah."]
-,Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Str "p.",Space,Str "30"], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 4}] [Str "Reference",Space,Link [Str "1"] ("#ref-item1","")],Space,Str "says",Space,Str "blah."]
-,Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Str "p.",Space,Str "30,",Space,Str "with",Space,Str "suffix"], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 5}] [Str "Reference",Space,Link [Str "1"] ("#ref-item1","")],Space,Str "says",Space,Str "blah."]
-,Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 6},Citation {citationId = "item2", citationPrefix = [], citationSuffix = [Space,Str "p.",Space,Str "30"], citationMode = SuppressAuthor, citationNoteNum = 0, citationHash = 7},Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [Str "see",Space,Str "also"], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 8}] [Str "Reference",Space,Link [Str "1"] ("#ref-item1",""),Space,Str "[",Link [Str "3"] ("#ref-item2",""),Str "]"],Space,Str "says",Space,Str "blah."]
-,Para [Str "In",Space,Str "a",Space,Str "note.",Note [Para [Cite [Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [], citationSuffix = [Str "p.",Space,Str "12"], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 9}] [Str "Reference",Space,Link [Str "3"] ("#ref-\1087\1091\1085\1082\1090\&3","")],Space,Str "and",Space,Str "a",Space,Str "citation",Space,Str "without",Space,Str "locators",Space,Cite [Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 10}] [Str "[",Link [Str "3"] ("#ref-\1087\1091\1085\1082\1090\&3",""),Str "]"],Str "."]]]
-,Para [Str "A",Space,Str "citation",Space,Str "group",Space,Cite [Citation {citationId = "item1", citationPrefix = [Str "see"], citationSuffix = [Space,Str "chap.",Space,Str "3"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 11},Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [Str "also"], citationSuffix = [Space,Str "p.",Space,Str "34-35"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 12}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "],",Space,Str "[",Link [Str "3"] ("#ref-\1087\1091\1085\1082\1090\&3",""),Str "]"],Str "."]
-,Para [Str "Another",Space,Str "one",Space,Cite [Citation {citationId = "item1", citationPrefix = [Str "see"], citationSuffix = [Space,Str "p.",Space,Str "34-35"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 13}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "]"],Str "."]
-,Para [Str "And",Space,Str "another",Space,Str "one",Space,Str "in",Space,Str "a",Space,Str "note.",Note [Para [Str "Some",Space,Str "citations",Space,Cite [Citation {citationId = "item1", citationPrefix = [Str "see"], citationSuffix = [Space,Str "chap.",Space,Str "3"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 14},Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 15},Citation {citationId = "item2", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 16}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "\8211",Link [Str "3"] ("#ref-item1",""),Str "]"],Str "."]]]
-,Para [Str "Citation",Space,Str "with",Space,Str "a",Space,Str "suffix",Space,Str "and",Space,Str "locator",Space,Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Space,Str "pp.",Space,Str "33,",Space,Str "35-37,",Space,Str "and",Space,Str "nowhere",Space,Str "else"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 17}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "]"],Str "."]
+,Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 3}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "]"],Space,Str "says",Space,Str "blah."]
+,Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Str "p.",Space,Str "30"], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 4}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "]"],Space,Str "says",Space,Str "blah."]
+,Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Str "p.",Space,Str "30,",Space,Str "with",Space,Str "suffix"], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 5}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "]"],Space,Str "says",Space,Str "blah."]
+,Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 6},Citation {citationId = "item2", citationPrefix = [], citationSuffix = [Space,Str "p.",Space,Str "30"], citationMode = SuppressAuthor, citationNoteNum = 0, citationHash = 7},Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [Str "see",Space,Str "also"], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 8}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "]",Str ",",Space,Str "[",Link [Str "2"] ("#ref-item2",""),Str ",",Space,Str "p.",Space,Str "30",Str "]",Str ",",Space,Str "[",Link [Str "3"] ("#ref-\1087\1091\1085\1082\1090\&3",""),Str "]"],Space,Str "says",Space,Str "blah."]
+,Para [Str "In",Space,Str "a",Space,Str "note.",Note [Para [Cite [Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [], citationSuffix = [Str "p.",Space,Str "12"], citationMode = AuthorInText, citationNoteNum = 0, citationHash = 9}] [Str "[",Link [Str "3"] ("#ref-\1087\1091\1085\1082\1090\&3",""),Str "]"],Space,Str "and",Space,Str "a",Space,Str "citation",Space,Str "without",Space,Str "locators",Space,Cite [Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 10}] [Str "[",Link [Str "3"] ("#ref-\1087\1091\1085\1082\1090\&3",""),Str "]"],Str "."]]]
+,Para [Str "A",Space,Str "citation",Space,Str "group",Space,Cite [Citation {citationId = "item1", citationPrefix = [Str "see"], citationSuffix = [Space,Str "chap.",Space,Str "3"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 11},Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [Str "also"], citationSuffix = [Space,Str "p.",Space,Str "34-35"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 12}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "]",Str ",",Space,Str "[",Link [Str "3"] ("#ref-\1087\1091\1085\1082\1090\&3",""),Str ",",Space,Str "pp.",Space,Str "34\8211\&35",Str "]"],Str "."]
+,Para [Str "Another",Space,Str "one",Space,Cite [Citation {citationId = "item1", citationPrefix = [Str "see"], citationSuffix = [Space,Str "p.",Space,Str "34-35"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 13}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str ",",Space,Str "pp.",Space,Str "34\8211\&35",Str "]"],Str "."]
+,Para [Str "And",Space,Str "another",Space,Str "one",Space,Str "in",Space,Str "a",Space,Str "note.",Note [Para [Str "Some",Space,Str "citations",Space,Cite [Citation {citationId = "item1", citationPrefix = [Str "see"], citationSuffix = [Space,Str "chap.",Space,Str "3"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 14},Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 15},Citation {citationId = "item2", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 16}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "]",Str "\8211",Str "[",Link [Str "3"] ("#ref-\1087\1091\1085\1082\1090\&3",""),Str "]"],Str "."]]]
+,Para [Str "Citation",Space,Str "with",Space,Str "a",Space,Str "suffix",Space,Str "and",Space,Str "locator",Space,Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Space,Str "pp.",Space,Str "33,",Space,Str "35-37,",Space,Str "and",Space,Str "nowhere",Space,Str "else"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 17}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str ",",Space,Str "pp.",Space,Str "33,",Space,Str "35\8211\&37",Str "]"],Str "."]
 ,Para [Str "Citation",Space,Str "with",Space,Str "suffix",Space,Str "only",Space,Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Space,Str "and",Space,Str "nowhere",Space,Str "else"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 18}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "]"],Str "."]
-,Para [Str "Now",Space,Str "some",Space,Str "modifiers.",Note [Para [Str "Like",Space,Str "a",Space,Str "citation",Space,Str "without",Space,Str "author:",Space,Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [], citationMode = SuppressAuthor, citationNoteNum = 0, citationHash = 19}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "]"],Str ",",Space,Str "and",Space,Str "now",Space,Str "Doe",Space,Str "with",Space,Str "a",Space,Str "locator",Space,Cite [Citation {citationId = "item2", citationPrefix = [], citationSuffix = [Space,Str "p.",Space,Str "44"], citationMode = SuppressAuthor, citationNoteNum = 0, citationHash = 20}] [Str "[",Link [Str "2"] ("#ref-item2",""),Str "]"],Str "."]]]
-,Para [Str "With",Space,Str "some",Space,Str "markup",Space,Cite [Citation {citationId = "item1", citationPrefix = [Emph [Str "see"]], citationSuffix = [Space,Str "p.",Space,Strong [Str "32"]], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 21}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "]"],Str "."]
-,Div ("",["references"],[]) [Header 1 ("references",["unnumbered"],[]) [Str "References"],Div ("ref-item1",[],[]) [Para [Str "[1]",Space,Str "J.",Space,Str "Doe,",Space,Emph [Str "First",Space,Str "book"],Str ".",Space,Str "Cambridge:",Space,Str "Cambridge",Space,Str "University",Space,Str "Press,",Space,Str "2005."]],Div ("ref-item2",[],[]) [Para [Str "[2]",Space,Str "J.",Space,Str "Doe,",Space,Str "\8220Article,\8221",Space,Emph [Str "Journal",Space,Str "of",Space,Str "Generic",Space,Str "Studies"],Str ",",Space,Str "vol.",Space,Str "6,",Space,Str "pp.",Space,Str "33\8211\&34,",Space,Str "2006."]],Div ("ref-\1087\1091\1085\1082\1090\&3",[],[]) [Para [Str "[3]",Space,Str "J.",Space,Str "Doe",Space,Str "and",Space,Str "J.",Space,Str "Roe,",Space,Str "\8220Why",Space,Str "water",Space,Str "is",Space,Str "wet,\8221",Space,Str "in",Space,Emph [Str "Third",Space,Str "book"],Str ",",Space,Str "S.",Space,Str "Smith,",Space,Str "Ed.",Space,Str "Oxford:",Space,Str "Oxford",Space,Str "University",Space,Str "Press,",Space,Str "2007."]]]]
+,Para [Str "Now",Space,Str "some",Space,Str "modifiers.",Note [Para [Str "Like",Space,Str "a",Space,Str "citation",Space,Str "without",Space,Str "author:",Space,Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [], citationMode = SuppressAuthor, citationNoteNum = 0, citationHash = 19}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str "]"],Str ",",Space,Str "and",Space,Str "now",Space,Str "Doe",Space,Str "with",Space,Str "a",Space,Str "locator",Space,Cite [Citation {citationId = "item2", citationPrefix = [], citationSuffix = [Space,Str "p.",Space,Str "44"], citationMode = SuppressAuthor, citationNoteNum = 0, citationHash = 20}] [Str "[",Link [Str "2"] ("#ref-item2",""),Str ",",Space,Str "p.",Space,Str "44",Str "]"],Str "."]]]
+,Para [Str "With",Space,Str "some",Space,Str "markup",Space,Cite [Citation {citationId = "item1", citationPrefix = [Emph [Str "see"]], citationSuffix = [Space,Str "p.",Space,Strong [Str "32"]], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 21}] [Str "[",Link [Str "1"] ("#ref-item1",""),Str ",",Space,Str "p.",Space,Str "32",Str "]"],Str "."]
+,Div ("",["references"],[]) [Header 1 ("references",["unnumbered"],[]) [Str "References"],Div ("ref-item1",[],[]) [Para [Str "[",Str "1",Str "]",Space,Str "J",Str ".",Space,Str "Doe",Str ",",Space,Emph [Str "First",Space,Str "book"],Str ".",Space,Str "Cambridge",Str ":",Space,Str "Cambridge",Space,Str "University",Space,Str "Press",Str ",",Space,Str "2005",Str "."]],Div ("ref-item2",[],[]) [Para [Str "[",Str "2",Str "]",Space,Str "J",Str ".",Space,Str "Doe",Str ",",Space,Str "\8220",Str "Article",Str ",",Str "\8221",Space,Emph [Str "Journal",Space,Str "of",Space,Str "Generic",Space,Str "Studies"],Str ",",Space,Str "vol.",Space,Str "6",Str ",",Space,Str "pp.",Space,Str "33\8211\&34",Str ",",Space,Str "2006",Str "."]],Div ("ref-\1087\1091\1085\1082\1090\&3",[],[]) [Para [Str "[",Str "3",Str "]",Space,Str "J",Str ".",Space,Str "Doe",Space,Str "and",Space,Str "J",Str ".",Space,Str "Roe",Str ",",Space,Str "\8220",Str "Why",Space,Str "water",Space,Str "is",Space,Str "wet",Str ",",Str "\8221",Space,Str "in",Space,Emph [Str "Third",Space,Str "book"],Str ",",Space,Str "S",Str ".",Space,Str "Smith",Str ",",Space,Str "Ed.",Space,Str "Oxford",Str ":",Space,Str "Oxford",Space,Str "University",Space,Str "Press",Str ",",Space,Str "2007",Str "."]]]]
