Re: [NTG-context] t-bib: URL and '%'; spacing between number and text

2008-04-12 Thread Tobias Burnus
Taco Hoekwater wrote:
 I'll try to work out something that does not need to grab
 all of its argument, so that this hack can be removed again.
   
I have a problem with your fix. As I just found out, with that fix, not 
only the % in the bib/bbl are printed (as intended), but also the % in 
the TeX file, i.e. all the sections I commented out now appear - 
prefixed by a %.

Tobias


PS: Your fix was:

% start fix
\unprotect
\def\dousepublications#1%
  {\doonlyonce
 {#1.\f!bibextension}
 {\readfile{#1.\f!bibextension}
 {\catcode`\%=12
  \showmessage\m!bib{4}{#1.\f!bibextension}}
 {\showmessage\m!bib{2}{#1.\f!bibextension
\protect
% end fix
___
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
___


Re: [NTG-context] t-bib: URL and '%'; spacing between number and text

2008-04-04 Thread Taco Hoekwater



Tobias Burnus wrote:

Hello Taco,

Taco Hoekwater wrote:

Tobias Burnus wrote:
  
The problem is: If I do not escape the % signs, I get a TeX error. If I 
escape them with \%, both the link and the printed text show the 
backslash. What is the proper way of doing it?


Yikes. There is no 'proper way' afaik, sorry.
I am busy catching up right now, so I have no time to delve into this
for the next few days. You will probably have to remind me (end of the 
week?)
  

OK: * Ping * ;-)


Does this fix I wrote (back in September) actually work?

% start fix
\unprotect
\def\dousepublications#1%
  {\doonlyonce
 {#1.\f!bibextension}
 {\readfile{#1.\f!bibextension}
 {\catcode`\%=12
  \showmessage\m!bib{4}{#1.\f!bibextension}}
 {\showmessage\m!bib{2}{#1.\f!bibextension
\protect
% end fix

I saw in a book some quite interesting author index. It consisted of the 
references followed by the page number(s):


Lastname, A. and B. Smith, My Journal, 44, 1234 (2020).33, 47, 77

How difficult would it to get it with t-bib? The page numbers would be 
simply the pages where the reference was \cite[]ed.


Not too hard, if you don't mind editting the bib / bbl a bit;
making it truly automatic and still configurable would be hard.
Example attached.

Best wishes,
Taco



citedpages.tex
Description: TeX document
___
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
___


Re: [NTG-context] t-bib: URL and '%'; spacing between number and text

2008-04-04 Thread Taco Hoekwater
Tobias Burnus wrote:
 Taco Hoekwater wrote:
 Does this fix I wrote (back in September) actually work?

 % start fix
 \unprotect
 \def\dousepublications#1%
   {\doonlyonce
  {#1.\f!bibextension}
  {\readfile{#1.\f!bibextension}
  {\catcode`\%=12
   \showmessage\m!bib{4}{#1.\f!bibextension}}
  {\showmessage\m!bib{2}{#1.\f!bibextension
 \protect
 % end fix
 It does not seem to work here :-(

It redefines the bbl loader, so inlined \startpublication blocks
will not work. It should work if your publications are in the bbl
file. I can add a similar instruction to \startpublication, but
I want to be sure it works, first.

 The attached test case uses \% but replacing it by \% causes TeX errors. 
 (publication block as found in the bbl file.)

Using \% is wrong in any case, you should be able to write the
url with just percent signs, that is what we are aiming for.

 Not too hard, if you don't mind editting the bib / bbl a bit;
 making it truly automatic and still configurable would be hard.
 Example attached.
 It does not seem to work here. 

I am an idiot. Please add the \doglobal in this  line:

   {\doglobal\addtocommalist{cite-\jobname-\recurselevel}\pagerefs}

Best wishes,
Taco
___
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
___


Re: [NTG-context] t-bib: URL and '%'; spacing between number and text

2008-04-04 Thread Tobias Burnus

Taco Hoekwater wrote:

Does this fix I wrote (back in September) actually work?

% start fix
\unprotect
\def\dousepublications#1%
  {\doonlyonce
 {#1.\f!bibextension}
 {\readfile{#1.\f!bibextension}
 {\catcode`\%=12
  \showmessage\m!bib{4}{#1.\f!bibextension}}
 {\showmessage\m!bib{2}{#1.\f!bibextension
\protect
% end fix

It does not seem to work here :-(
  url = {{foo}}
becomes now {foo} instead of foo but the % causes still a TeX 
error and the \% is printed as \%.


The attached test case uses \% but replacing it by \% causes TeX errors. 
(publication block as found in the bbl file.)



Not too hard, if you don't mind editting the bib / bbl a bit;
making it truly automatic and still configurable would be hard.
Example attached.
It does not seem to work here. I get Is cited at .  (This is with the 
latest cont-tmf.tex and pdfetex of TeX Live 2007 as distributed by 
openSUSE.)


Do I have an too old pdfeTeX version or do I need to do something else 
than just TeXing the file?



Thanks,

Tobias


test2.tex
Description: TeX document
___
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
___


Re: [NTG-context] t-bib: URL and '%'; spacing between number and text

2008-04-04 Thread Tobias Burnus

Taco Hoekwater wrote:

It does not seem to work here :-(


It redefines the bbl loader, so inlined \startpublication blocks
will not work. It should work if your publications are in the bbl
file.
  


OK. That works for my minimal example, though I have to postprocess the 
*.bbl file as BibTeX converts longline into


long%
line

which of cause gives the wrong result here. I use perl for this, which 
seems to work just fine and has, as I believe, no side effects:


$line =~ s/%\n//sg;


However, it fails with my big file (see attachment for a reduced 
example). If I simply include the file without using \environment etc., 
it works. Any idea?




Not too hard, if you don't mind editting the bib / bbl a bit;
making it truly automatic and still configurable would be hard.
Example attached.
  

Now it works well. Thanks.


* * *

I have another tricky question related to t-bib: I want to use in the 
text references of the type [1-2], [3] and at the end of each chapter I 
do a \placepublication[criterium=chapter], however, at the very end I 
want to have a full authorlist ordered by authoryears (with the page 
numbers). Well, I failed to switch to authornames -- I always get a 
numbered list at the end.


Tobias


test2b.tex
Description: TeX document


environment.tex
Description: TeX document
___
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
___


Re: [NTG-context] t-bib: URL and '%'; spacing between number and text

2008-04-04 Thread Taco Hoekwater


Tobias Burnus wrote:
 
 OK. That works for my minimal example, though I have to postprocess the 
 *.bbl file as BibTeX converts longline into
 
 long%
 line

An afwul tool, that bibtex is. Imagine what having a long url in your
.bib file does ... tinyurl is almost a requirement.

 However, it fails with my big file (see attachment for a reduced 
 example). If I simply include the file without using \environment etc., 
 it works. Any idea?

This is because of the special processing that has to take place
within projects. The only solution for that (right now) is to
patch the definition of \dousepublications inside the bib module
itself.

I'll try to work out something that does not need to grab
all of its argument, so that this hack can be removed again.

 I have another tricky question related to t-bib: I want to use in the 
 text references of the type [1-2], [3] and at the end of each chapter I 
 do a \placepublication[criterium=chapter], however, at the very end I 
 want to have a full authorlist ordered by authoryears (with the page 
 numbers). Well, I failed to switch to authornames -- I always get a 
 numbered list at the end.

Completely switching styles with some command like

   \setuppublications[alternative=apa]

just before the final \completepublications should have succeeded
in creating a non-numbered list, but here again there could be a 
conflict with the project/product structure.

Best wishes,
Taco

___
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
___


Re: [NTG-context] t-bib: URL and '%'; spacing between number and text

2008-04-03 Thread Tobias Burnus
Hello Taco,

Taco Hoekwater wrote:
 Tobias Burnus wrote:
   
 The problem is: If I do not escape the % signs, I get a TeX error. If I 
 escape them with \%, both the link and the printed text show the 
 backslash. What is the proper way of doing it?
 
 Yikes. There is no 'proper way' afaik, sorry.
 I am busy catching up right now, so I have no time to delve into this
 for the next few days. You will probably have to remind me (end of the 
 week?)
   
OK: * Ping * ;-)

 * * *

I saw in a book some quite interesting author index. It consisted of the 
references followed by the page number(s):

Lastname, A. and B. Smith, My Journal, 44, 1234 (2020).33, 47, 77

How difficult would it to get it with t-bib? The page numbers would be 
simply the pages where the reference was \cite[]ed.

 * * *

For those, who do not yet know it and are interested: TUG is 
participating in Google Summer of Code, for which the (extended) 
application deadline is next Monday. See also 
http://www.tug.org/gsoc/ideas.html (There are some nice ConTeXt and 
LuaTeX projects listed.)   Taco of cause know more about this ;-)
(While I know more about GCC [and especially gfortran], which had a slow 
start but now 19 fair to excellent applications.)

Tobias
___
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
___


Re: [NTG-context] t-bib: URL and '%'; spacing between number and text

2008-03-31 Thread Taco Hoekwater

Hi Tobias,

Tobias Burnus wrote:
 
 The problem is: If I do not escape the % signs, I get a TeX error. If I 
 escape them with \%, both the link and the printed text show the 
 backslash. What is the proper way of doing it?

Yikes. There is no 'proper way' afaik, sorry.

I am busy catching up right now, so I have no time to delve into this
for the next few days. You will probably have to remind me (end of the 
week?)

 
 Another problem is that I have in the reference list, the space between 
 ] and the author name in
  [123]Author
 is too small (they overlap). Is there an easy possibility to make the 
 spacing automatically right or does one need to tweek it manually?

   \setuppublications[autohang=yes]

should work

Best wishes,
Taco
___
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
___