Matija Šuklje wrote:
Hullo,

I'm just making my first real document in ConTeXt and although I'm thinking more and more how this was a great idea. I also decided to simultaneously write an external document/module containing all definitions to fit the
But as a newbie, of course, I stumbled upon some beginner's problems:

1. Chapter heading is not like I would expect — I would like to have the line above the chapter as long as the one below it

You need a \noindentation in the  setuphead command:

    before={\page\noindentation\hairline\blank[line]},

this is not very obvious, but the \hairline is indented just like
a normal paragraph if you don't add the \noidentation.

2. The empty page at the end of the document annoys me and doesn't want to go away.

This is a FAQ: Large documents that have front- and backmatters
are likely books, and books should have an even number of pages. On a
small document (article, letter), you would simply not use the section
block commands at all.

In any case, from the wiki page

  http://wiki.contextgarden.net/Empty_page_at_the_end

comes this solution/workaround

  \setupsectionblock[appendix][page=no]

3. The citations won't show any content, neither does the list of publications — I'm clearly doing something very wrong here. What I want is numbered citation with short references at the bottom and full references in the list of publications in the appendices.

Here you've hit a number of problems, some of which are in the bib
module, not your doing.

* the module does not currently support all types of \cite across
  section block boundaries, and that is why you do not get output
  from your \cite commands.

  Solution: none. it is not possible to combine 'short' citation
  and mainmatter/backmatter/appendices. (this problem is nasty, but
  quite hard to fix).

* the module also has a different problem; this time with your file
  name (konkurenčnaklavzula_context.tex). One of the internal
  references the bib module creates attaches the input file name to
  a reference, and if the document name is not 7-bit ascii this
  apparently fails. It is something I have never tested.

  Workaround: only use visible ASCII in your file names (for now,
  I intend to fix this).

* You have to be a bit more careful about the \startpublication
  arguments:
  - watch out for extra space characters. The only ones that are
    ignored are the ones just before a key.
  - if a value contains equals signs, square brackets, or commas,
    you have to wrap it in braces.

* The \author command inside bbl files takes three arguments:

  \author{Matija}{}{Šuklje}

* monthconversion takes a 'conversion specifier', not a macro
  name. So you need this instead:

  \setuppublications[monthconversion=Romannumerals]


Finally, if you want to have 'short' keys in the publication list,
it makes sense to add a set up like this:

  \setuppublications[numbering=short,autohang=yes]
  \setuppublicationlist[samplesize=ZOFVI]


After all those changes, fixes, and workarounds, I ended up with the
attached files.

4. If I want to include 'pf_ul.tex' and 'moja_bibliografija.bbl' into my user's local modules in Linux, where should I place the link to them? It's a bit annoying to have to place links to them in each directory where I make a new new file that uses them. And clearly, there will be many yet to come!

The normal place would be

   <texmf>/tex/context/user

in one of the <texmf> directories that is searched by context. You have
to re-run maketexlsr after adding files to that directory, and then
context should be able to find your files just like it knows where
knuth.tex etc. are.

Best wishes,
Taco
%d Tu so ConTeXt definicije oblike ipd., kot so predpisane za seminarske
%d in diplomske naloge na Pravni fakulteti Univerze v Ljubljani
%c Avtor: Matija Å uklje, [EMAIL PROTECTED], http://matija.suklje.name
%c Avtor dovoljuje (in spodbuja) uporabo vsebino tega „dela“ pod pogoji v licenci GPL.

%d This are the ConTeXt definitions of layout etc. as perscribed for writing a thesis
%d on the Law faculty, University of Ljubljana
%c Author: Matija Å uklje, [EMAIL PROTECTED], http://matija.suklje.name
%c The author permits (and encourages) the usage of this "work" under the terms of the GPL licence.

%%%
%%% splošne definicije dokumenta
%%%

% jezik, UTF-8 in velikost papirja
\mainlanguage[sl]
\enableregime[utf8]
\setuppapersize[a4][a4]

%%%
%%% za informacije v PDF, pobere podatke iz definicij glavnega dokumenta
%%%

% da dela UTF-8 tudi v PDF kazalu in informacijah o dokumentu
\input spec-tst

% pobere iz glavnega dokumenta definicije in jih zapiše v informacije v PDF
\setupinteraction
	[state=start,
	title={\naslov},
	subtitle={\tip},
	author={\avtor},
	keyword={\tip, \kljucnebesede}
	]

% ustvari kazalo v PDF
\placebookmarks[chapter,section,subsection]

%%%
%%% kazalo
%%%

\setupcombinedlist[content][alternative=c]
\setuplist[chapter][style=bold,alternative=b,width=1.5em]
\setuplist[section][margin=1.5em,width=2em]
\setuplist[subsection][margin=3.5em,width=3em]
\setuplist[subsubsection][margin=6.5em,width=4em]

%%%
%%% oblika poglavij ipd.
%%%

% zgenerira okoli naslova prvo stran na podlagi definicij iz glavnega dokumenta in datuma ob generiranju
\setuphead
	[title]
	[align=middle,
	textstyle=\sc,
	style=\bfd,
	before={\startalignment[middle] Univerza v Ljubljani \crlf Pravna fakulteta \vfill},
	after=
		{
		(\tip)		% definiraj v dokumentu — npr. \def\tip{diplomska naloga}
		\vfill
		Avtor: \avtor		% definiraj v dokumentu — npr. \def\autor{Matija Šuklje}
		\crlf
		Mentor: \mentor		% definiraj v dokumentu — npr. \def\mentor{preljubi profesor}
		\vfill
		Ljubljana, \currentdate{} \stopalignment \page
		}
	]

% poglavja
\setuphead
	[chapter]
	[header=empty,
	textstyle=\sc,
	style=\bfb,
	before={\page\noindentation\hairline\blank[line]},
	after={\nowhitespace\hairline\blank[4*line]}
	]

% oddelki
\setuphead
	[section]
	[page=yes,
	textstyle=\sc,
	style=\tfa,
	align=right,
	before={\blank[2*line]},
	after={\blank[line]}
	]

% pododdelki
\setuphead
	[subsection]
	[style=\it,
	align=right,
	before={\blank[2*line]},
	after={\blank[line]}
	]

%%%
%%% splošna oblika teksta
%%%

\setupindenting[1.5em]
\setupindenting[yes]
\setupwhitespace[medium]

%%%
%%% definicije za citiranje in bibliografijo
%%%

% da sploh dela citiranje in bibliografija in ga poišče v zunanji datoteki
\usemodule[bib]
\input moja_bibliografija.bbl

% splošne nastavitve za citiranje
%TODO — predeli ...je sam začasna oblika
\setuppublications
	[sorttype=cite,
	refcommand=short,
        numbering=short,
        autohang=yes,
	monthconversion=Romannumerals% ne dela?
	]

% splošne nastavitve za bibliografijo
%TODO — sploh ustvari!!

% zakonodaja
%TODO — predeli ...je sam začasna oblika
\setuppublicationlayout[zakon]{
	\inserttitle{\bgroup}{\egroup. }{}
	\insertjournal{\bgroup\it}{\egroup, }{}
	\insertvolume{}{ }{}
	\insertpubyear{(}{) }{}
	\insertissue{}{, }{}
	\insertday{}{. }{}
	\insertmonth{}{. }{}
	\insertpages{Str. }{.}{}
}

% \setupcite[key,author][]

\setuppublicationlayout[test]{
	\inserttitle{}{}{}
}

%TODO — prenesi vse kar se le da iz glavnega dokumenta sem

%TODO — citiranje (to bo še komplicirano!)

\setupsectionblock[appendix][page=no]

\setuppublicationlist[samplesize=ZOFVI]

\startpublication[
        k=ZOFVI,        % key, po katerem citiraš
        t=zakon,        % tip publikacije je zakon
        y=1996,
        s=ZOFVI,        % short citation
        u={http://www.uradni-list.si/1/ulonline.jsp?urlid=199612&dhid=32248}]
        \title{Zakon o organizaciji in financiranju vzgoje in izobraževanja}
        \journal{Uradni list Republike Slovenije}
        \volume{35}
        \issue{12}
        \pubyear{1996}\month{2}\day{29}
        
\biburl{http://www.uradni-list.si/1/ulonline.jsp?urlid=199612&dhid=32248}
        \pages{841-862}
\stoppublication

\startpublication[a={Matija Å uklje},
        k=neki,
        t=test,
        y=2007,
        s=Neki]
\title{Neki nekastga}
\author{Matija}{}{Å uklje}
\stoppublication
% za pravila PF UL
\input pf_ul
\def\avtor{Matija Å uklje}
\def\mentor{as. mag. Luka Tičar}
\def\tip{seminarska naloga}
\def\naslov{Konkurenčna klavzula v delovni pogodbi}
\def\kljucnebesede{delovno pravo}

% moji lastni linki
\useURL[author-email][mailto:[EMAIL PROTECTED]@rutka.net]
\useURL[homepage][http://matija.suklje.name][][matija.suklje.name]

\starttext
\startstandardmakeup
\title{\naslov}
\stopstandardmakeup

\startfrontmatter
\setuppagenumbering[left={stran },conversion=Romannumerals,location=right]
\placecontent

\section[uvod]{Uvod}

\subsection[povzetek]{Povzetek}

\input knuth

{\en		% začasno spremeni jezik v angleščino
\subsection[summary]{Summary}

\input knuth
}

\stopfrontmatter

\startbodymatter
\setuppagenumbering[left={stran },right={ od \lastpagenumber},location=right]

\chapter{Kr en poglavje}

\section[1]{Prvo poglavje}

\input tufte

\subsection[1.1]{podpoglavje}

\input knuth

tuki citiram, veš? \cite[ZOFVI] \cite[neki]



%\stopbodymatter

%\startappendices

\subject{Bibliografija}

\placepublications

\stopbodymatter

\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to