Difference between revisions of "Manual Bibliography"

From Wiki
Jump to navigation Jump to search
(Splitted from simple bibliography)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
< [[Bibliography|Bibliography MkII]] | [[Bibliography_mkiv|Bibliography MkIV]] >
 +
 +
= Short approach =
 
Here is manual approach for simple bibliographies.
 
Here is manual approach for simple bibliographies.
  
 
<texcode>
 
<texcode>
 
\definereferenceformat[cite][left={[},right={]}]
 
\definereferenceformat[cite][left={[},right={]}]
\defineitemgroup [bibliography] [levels=1]
+
\defineitemgroup [bibliography]
\setupitemgroup  [bibliography]  
+
\setupitemgroup  [bibliography][each]  
 
                 [symbol=n,
 
                 [symbol=n,
 
                   left={[},
 
                   left={[},
Line 14: Line 17:
  
 
\appendtoks
 
\appendtoks
  \let \bibitem \itemgroupitem
+
\let\bibitem             \itemgroupitem
 +
\let\startbibitem      \startitemgroupitem
 +
\let\stopbibitem        \stopitemgroupitem
 
\to \itemgroupcommands
 
\to \itemgroupcommands
 
</texcode>
 
</texcode>
Line 28: Line 33:
 
</texcode>
 
</texcode>
  
and use <code>\cite[ref1]</code> etc to refer to bibliography items.
+
and use <cmd>cite[ref1]</cmd> etc to refer to bibliography items.
 +
 
 +
[[Bibliography_mkiv#Simple_manual_bibliography|Here’s a similar approach]] using {{cmd|definedescription}}.
 +
 
 +
= Easy approach =
 +
If you need a list of publications really quickly, simply use:
 +
 
 +
<context source=yes>
 +
\define[1]\Lnk  {\[\in[#1]\]}
 +
 
 +
\setupinteraction[state=start]
 +
 
 +
\starttext
 +
  %\startbodymatter
 +
 
 +
    A reference: see \Lnk{libA} p. 1 or visit \Lnk{libB}.
 +
 
 +
  %\stopbodymatter
 +
  %\startappendices
 +
 
 +
    \startsection[title={List of Publications}] % in appendices use chapter instead of section!
 +
        {\tfx
 +
          \startitemize[n][stopper={},left={\[},right={\]},distance=1em]
 +
 
 +
            \startitem[libA]
 +
              A. Bloch, {\it Pleasuredome}, AH-A Ltd., 2018
 +
            \stopitem
 +
           
 +
            \startitem[libB]
 +
              {\blue http://wiki.contextgarden.net} (visited 31.12.2017)
 +
            \stopitem
 +
         
 +
          \stopitemize
 +
        }
 +
    \stopsection
 +
   
 +
  %\stopappendices
 +
\stoptext
 +
</context>

Revision as of 20:28, 5 September 2018

< Bibliography MkII | Bibliography MkIV >

Short approach

Here is manual approach for simple bibliographies.

\definereferenceformat[cite][left={[},right={]}]
\defineitemgroup [bibliography]
\setupitemgroup  [bibliography][each] 
                 [symbol=n,
                  left={[},
                  right={]},
                  width=1.5em,
                  stopper=,
                  itemalign=flushright,
                  inbetween={\blank[4pt]}]

\appendtoks
	\let\bibitem             \itemgroupitem
	\let\startbibitem       \startitemgroupitem
	\let\stopbibitem        \stopitemgroupitem
\to \itemgroupcommands

Now you can use

\section{References}
\startbibliography
  \bibitem[ref1] This is my first reference
  \bibitem[ref2] This is the second reference
\stopbibliography

and use \cite[ref1] etc to refer to bibliography items.

Here’s a similar approach using \definedescription.

Easy approach

If you need a list of publications really quickly, simply use:

\define[1]\Lnk  {\[\in[#1]\]}

\setupinteraction[state=start]

\starttext
  %\startbodymatter

    A reference: see \Lnk{libA} p. 1 or visit \Lnk{libB}.

  %\stopbodymatter
  %\startappendices
  
    \startsection[title={List of Publications}] % in appendices use chapter instead of section!
        {\tfx
          \startitemize[n][stopper={},left={\[},right={\]},distance=1em]

            \startitem[libA]
              A. Bloch, {\it Pleasuredome}, AH-A Ltd., 2018
            \stopitem
            
            \startitem[libB]
              {\blue http://wiki.contextgarden.net} (visited 31.12.2017)
            \stopitem
          
          \stopitemize
        }
    \stopsection
    
  %\stopappendices
\stoptext