]> git.donarmstrong.com Git - don.git/blobdiff - posts/biblatex_gi_style.mdwn
try just double escaping
[don.git] / posts / biblatex_gi_style.mdwn
index 0c8c5fa88f6ee6298645efd7ee0368dd3dd213f6..8791bb46eec437c9330ebadccda8e4e69aa7b4ed 100644 (file)
@@ -6,13 +6,13 @@ Here's a biblatex format for
 
 The following code in the preamble does almost all of the hard lifting:
 
-```latex
+[[!format tex """
 \usepackage[backend=biber,hyperref=true,doi=true,url=false,isbn=false,maxbibnames=6,minbibnames=6,sorting=none,firstinits=true,terseinits=true,autocite=inline,style=numeric-comp]{biblatex}
 \renewbibmacro{in:}{%
   \ifentrytype{article}{}{%
   \printtext{\bibstring{in}\intitlepunct}}}
 % from http://tex.stackexchange.com/questions/12806/guidelines-for-customizing-biblatex-styles
-\DeclareCiteCommand{\parencite}[\mkbibbrackets]
+\\DeclareCiteCommand{\parencite}[\mkbibbrackets]
   {\usebibmacro{cite:init}%
    \usebibmacro{prenote}}
   {\usebibmacro{citeindex}%
@@ -20,15 +20,15 @@ The following code in the preamble does almost all of the hard lifting:
   {}
   {\usebibmacro{cite:dump}%
    \usebibmacro{postnote}}
-\DeclareMultiCiteCommand{\parencites}[\mkbibbrackets]{\parencite}{\multicitedelim}
-\DeclareFieldFormat
+\\DeclareMultiCiteCommand{\parencites}[\mkbibbrackets]{\parencite}{\multicitedelim}
+\\DeclareFieldFormat
   [article,inbook,incollection,inproceedings,patent,thesis,unpublished,manual]
   {title}{#1\isdot}
-\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}}
-\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}\addcolon}
-\DeclareFieldFormat{year}{#1}
-\DeclareNameAlias{default}{last-first}
-\DeclareFieldFormat{pages}{#1}
+\\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}}
+\\DeclareFieldFormat[article,periodical]{volume}{\mkbibbold{#1}\addcolon}
+\\DeclareFieldFormat{year}{#1}
+\\DeclareNameAlias{default}{last-first}
+\\DeclareFieldFormat{pages}{#1}
 % from http://tex.stackexchange.com/questions/17583/biblatex-remove-commas-between-last-and-first-names-in-bibliography
 % remove commas between authors and first inits
 \renewcommand*{\revsdnamepunct}{}
@@ -86,6 +86,6 @@ The following code in the preamble does almost all of the hard lifting:
   \printlist{publisher}%
   }%
   \newunit}
-```
+"""]]
 
 [[!tag latex tech biblatex]]