aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Biblio.hs
AgeCommit message (Collapse)AuthorFilesLines
2013-08-10Use query instead of queryWith.John MacFarlane1-2/+3
2013-08-06Biblio: Capitalize citation note only if it has a prefix.John MacFarlane1-7/+10
So, author names or titles that aren't capitalized will stay uncapitalized.
2013-08-02Biblio: Don't interfere with Notes that aren't citation notes.John MacFarlane1-2/+3
Closes #898: notes not generated from citations were being adjusted (first letter capitalized, for example, against author's intentions).
2013-08-02Biblio: Override citeproc-hs's endWithPunct.John MacFarlane1-1/+14
The new version correctly sees a sentence ending in '.)' as ending with punctuation. This fixes a bug which led such sentences to receive an extra period at the end: '.).'. Thanks to Steve Petersen for reporting.
2013-07-21Biblio: Tweaks to improve default behavior.John MacFarlane1-7/+15
* A suffix beginning with a digit gets 'p' inserted before it before passing to citeproc-hs, so that bare numbers are treated as page numbers by default. * A suffix not beginning with punctuation has a space added at the beginning (rather than a comma and space, as was done before). * This adding occurs not just in author-in-text citations, but in all citations. The result of these changes (and the last commit) is that `\citep[23]{item1}` in LaTeX will be interpreted properly, with '23' treated as a locator of type 'page'.
2013-03-17Markdown writer: New approach for citations.John MacFarlane1-1/+1
* Reverts 1.11 change that caused citations to be rendered as markdown citations, even if `--biblio` was specified, unless `citation` extension is disabled. Now, formatted citations are always printed if `--biblio` was specified. If you want to reformat markdown keeping pandoc markdown citations intact, just don't specify `--biblio`. * Reverted now unnecessary changes to Text.Pandoc.Biblio adding the raw block to mark the bibliography, and to Text.Pandoc.Writers.Markdown to remove the bibliography if `citations` not specified. * If the content of a `Cite` inline is a `RawInline "latex"`, which means that a LaTeX citation command was parsed and `--biblio` wasn't specified, then render it as a pandoc markdown citation. This means that `pandoc -f latex -t markdown`, without `--biblio`, will convert LaTeX citation commands to pandoc markdown citations.
2013-03-17Markdown writer: Omit bibliography when `citations` enabled.John MacFarlane1-1/+1
In 1.11, citations would be rendered as pandoc markdown citations, but the bibliography would still be printed. We avoid that by adding a `RawBlock "pandoc" "references"` before the references. This allows the markdown writer to find the references and strip them off when `citations` is enabled.
2013-01-08Biblio: Make sure mvPunc and deNote run on metadata too.John MacFarlane1-4/+3
This fixed a bug with notes on titles using footnote styles.
2012-10-22Fixed Biblio for extra parameter on Citation.John MacFarlane1-2/+2
2012-10-21Revert "LaTeX reader: Use new suppressParens option for footnote citations."John MacFarlane1-3/+2
This reverts commit 7499499b68934ae6f3418940328c7fc2bd9fcadd. Conflicts: src/Text/Pandoc/Readers/LaTeX.hs
2012-10-15LaTeX reader: Use new suppressParens option for footnote citations.John MacFarlane1-2/+3
Also changed Biblio, Markdown reader, and LaTeX reader tests because of new citationSuppressParens field in Citation.
2012-10-13Biblio: Make processBiblio take a Maybe Style parameter.John MacFarlane1-3/+4
If Nothing, then nothing is done.
2012-10-06Biblio: Changed type of processBiblio.John MacFarlane1-24/+19
* It is no longer in the IO monad. * setHash uses state rather than Data.Unique. * It takes a Style argument rather than parameters for CSL and abbrev filenames. * pandoc.hs now calls the functions to parse the style file and add abbrevs.
2012-09-29Biblio: csl parameter now a string rather than a filepath.John MacFarlane1-3/+3
API change.
2012-09-26Biblio: Remove workaround for toCapital.John MacFarlane1-10/+2
Now citeproc-hs is fixed upstream, so this is no longer needed. Closes #531.
2012-07-20Use Parsec directly in Biblio and Templates.John MacFarlane1-6/+6
2012-07-20Use Parser as type synonym for Parsec.John MacFarlane1-5/+5
2012-07-20Text.Pandoc.Parsing: Export all Parsec functions used in pandoc code.John MacFarlane1-1/+1
No other module directly imports Parsec. This will make it easier to change the parsing backend in the future, if we want to.
2012-07-20Use Text.Parsec instead of Text.ParserCombinators.Parsec.John MacFarlane1-6/+6
2012-06-08Fixed shadowing warning.John MacFarlane1-1/+1
2012-06-08Biblio: Workaround broken toCapital in citeproc-0.3.4.John MacFarlane1-2/+10
2012-06-05Biblio: Add comma to beginning of bare suffix, e.g. @item1 [50].John MacFarlane1-2/+10
Motivation: @item1 [50] should be as close as possible to [@item1, 50].
2012-05-23Massively simplified Text.Pandoc.Biblio.John MacFarlane1-84/+44
Fixed a bug with citations in notes and captions. We now handle note citations by inserting notes at the beginning, and removing notes within notes later.
2012-03-27Properly handle citations nested in other inline elements.John MacFarlane1-1/+1
Closes #460. Note: processBiblio is a mess. It should be rewritten for clarity and efficiency.
2011-11-11Implemented --citation-abbreviations option.John MacFarlane1-5/+10
Mostly due to Andrea Rossato.
2011-11-07Biblio: Fixed mess created by my removing procInlines.John MacFarlane1-11/+20
Now I see that procInlines was needed to prevent bottomUp from acting on sublists. This should fix the problem where '@item1, @item1' yielded "Doe (1999), Doe Doe Doe Doe (1999)".
2011-11-07Biblio - fixed author-in-text citations so they don't double.John MacFarlane1-1/+1
2011-11-07Biblio - Removed redundancy.John MacFarlane1-3/+2
2011-11-06Biblio: Put whole author-in-text citation in a Cite.John MacFarlane1-4/+4
Previously just the date and other info went in the Cite.
2011-11-06Further simplification of Biblio.John MacFarlane1-7/+8
2011-11-06Further cleanup of Biblio.John MacFarlane1-3/+3
2011-11-06Simplified Biblio, removed procInlines, use generics instead.John MacFarlane1-24/+15
2011-11-04Don't add comma+space to prefix if it ends in punctuation.John MacFarlane1-5/+1
Patch from Andrea Rossato.
2011-10-28Text.Pandoc.Biblio: Expand citations recursively inside nested inlines.John MacFarlane1-7/+5
Closes #331.
2011-10-27Biblio: Treat \160 as space when parsing locator and suffix.John MacFarlane1-2/+6
This fixes a bug with "p. 33" when `--smart` is used. Previously the whole "p. 33" would be included in the suffix, with no locator.
2011-01-01Updated copyright notices.John MacFarlane1-1/+1
2010-12-24Use functions from Text.Pandoc.Generic instead of processWith(M).John MacFarlane1-5/+6
2010-12-13Moved special handling of punctuation in suffix out of markdown reader.Nathan Gass1-2/+6
This allows different writers to handle punctuation in the suffix differently.
2010-11-28Fixed spacing bug for reference-style citations.John MacFarlane1-1/+4
2010-11-27Biblio: If locator ends with ",", add it to the suffix.John MacFarlane1-1/+9
2010-11-27Added procOpts parameter to citeproc call.John MacFarlane1-1/+2
2010-11-27Use parsec parsers to split locator.John MacFarlane1-27/+34
This is easier to read and maintain. Also, formatting is now stripped from the locator prefix, so you can write e.g. '*p.* 33'.
2010-11-26Split locator and suffix in Biblio rather than Markdown parser.John MacFarlane1-4/+34
Patch from Nathan Gass.
2010-11-20Biblio: Check for == rather than /=.John MacFarlane1-3/+3
This is more perspicuous.
2010-11-20Citation related changes.John MacFarlane1-2/+3
* Don't look for bibliography in ~/.pandoc. Reason: doing this requires a read + parse of the bibliography even when the document doesn't use citations. This is a big performance drag on regular pandoc invocations. * Only look for default.csl if the document contains references. Reason: avoids the need to read and parse csl file when the document contains no references anyway. * Removed findFirstFile from Shared.
2010-11-18If --csl not specified, read from data files or default.John MacFarlane1-5/+2
Thus --csl behaves like --reference-odt, --template, etc.
2010-11-17Biblio: Removed stringify; pass inline list to citeproc.John MacFarlane1-12/+2
2010-11-16Updated for changes in Citaiton type.John MacFarlane1-9/+20
citationPrefix now [Inline] rather than String; citationSuffix added. This change presupposes no changes in citeproc-hs. It passes a string for these values to citeproc-hs. Eventually, citeproc-hs should use an [Inline] for these as well.
2010-11-16Biblio: don't add footnote if empty.John MacFarlane1-3/+3
2010-11-11Biblio: Use a Map for the lookup table.John MacFarlane1-3/+4