5

I added \setupbackend[export=yes] to my file to test the html export capabilities. All works excellent except the bibliography which is either split (in -div version) or comes as one paragraph (in -tag or -raw versions. Obviously there is just one line that needs to be added so that each bibliography entry was considered as a paragraph.

\setuplanguage[en]
\setupbackend[export=yes]
\mainlanguage[english]

\startbuffer[bib]

@Book{Declercq:2000,
  author      = {Declercq, Georges},
  title       = {Anno Domini: The origins of the Christian era},
  address     = {Turnhout},
  publisher   = {Brill},
  year        = {2000},
  shorttitle = {Anno Domini},
  shorthand = {Declercq},
  language    = {english},
  hyphenation = {english},
  pagetotal   = {206},
}

@Book{Rupke:2011,
author = {Jörg Rupke},
title = {The Roman Calendar from Numa to Constantine: Time, History, and the Fasti},
address = {Chichester, West Sussex, U.K.},
publisher = {Wiley-Blackwell},
year = {2011},
shorttitle = {The Roman Calendar},
shorthand = {The Roman calendar},
language = {english},
hyphenation = {english},
}

\stopbuffer

\usebtxdataset[default][bib.buffer]
\loadbtxdefinitionfile[apa]
\usebtxdefinitions[apa]
\setupbtx[dataset=default]
\definebtxrendering[default][apa][specification=chicago,sorttype=authoryear,numbering=no]
\setupindenting[big,yes]
\usetypescript[palatino]
\setupbodyfont[palatino,12pt]

\starttext

\startbodymatter

Test.\cite[Rupke:2011] Another test.\cite[Declercq:2000]

\stopbodymatter

\startbackmatter
\startchapter[title=Bibliography]
\placelistofpublications[criterium=all]
\stopchapter
\stopbackmatter

\stoptext 
0

1 Answer 1

5

If you run context <file>.tex with the option \setupbackend[export=yes], you will get the following structure:

<file>-export
├── <file>-div.html
├── <file>-pub.lua
├── <file>-raw.xml
├── <file>-tag.xhtml
├── images
└── styles
    ├── <file>-defaults.css
    ├── <file>-images.css
    ├── <file>-styles.css
    └── <file>-templates.css

You can add space between the bibliography entries, by setting the margin with the following snippet:

listitem[detail=btx-apa],
div.listitem.btx-apa {
    display: block ;
    margin : 2ex ;
}

There are two ways how to do that:

  1. After running context <file>.tex you can add the snippet to <file>-style.css file in the styles.

  2. You can create a new css-file, <cssfile>.css, which contains your own settings (like the snippet above) and specify it with \setupexport[cssfile=<cssfile>.css] in your document, and run context <file>.tex afterwards.

Both ways will result in separated paragraphs:

enter image description here

The second way has the advantage, that you can collect all your css stylings in one place and (re)use them for different documents.

2
  • Just to clarify: \setupexport[cssfile=PaperName.css] is what you mean? Or \setupexport[cssfile=PaperName-style.css]? Commented Feb 24, 2019 at 15:19
  • @DmitryStarostin See my edit
    – DG'
    Commented Feb 24, 2019 at 22:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .