From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: First document — problems with bib module and layout
Date: Wed, 26 Dec 2007 12:15:09 +0100 [thread overview]
Message-ID: <477237BD.1030607@elvenkind.com> (raw)
In-Reply-To: <200712252339.12166.matija.suklje@rutka.net>
[-- Attachment #1: Type: text/plain, Size: 3851 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pf_ul.tex --]
[-- Type: text/x-tex; name="pf_ul.tex", Size: 3769 bytes --]
%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, matija.suklje@rutka.net, 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, matija.suklje@rutka.net, 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]
[-- Attachment #3: moja_bibliografija.bbl --]
[-- Type: text/plain, Size: 663 bytes --]
\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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: konkurencnaklavzula_context.tex --]
[-- Type: text/x-tex; name="konkurencnaklavzula_context.tex", Size: 1163 bytes --]
% 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:matija.suklje@rutka.net][][matija.suklje@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
[-- Attachment #5: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2007-12-26 11:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-25 22:39 Matija Šuklje
2007-12-26 11:15 ` Taco Hoekwater [this message]
2007-12-26 22:50 ` Matija Šuklje
2007-12-27 10:38 ` Matija Šuklje
2007-12-27 10:56 ` Matija Šuklje
2007-12-27 15:46 ` Taco Hoekwater
2007-12-27 18:51 ` Matija Šuklje
2007-12-28 14:27 ` Taco Hoekwater
2007-12-29 12:20 ` Matija Šuklje
2007-12-29 19:06 ` Aditya Mahajan
2007-12-29 20:06 ` Matija Šuklje
2008-04-06 18:51 ` Matija Šuklje
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=477237BD.1030607@elvenkind.com \
--to=taco@elvenkind.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).