Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I often have a long bibliography and then later I find that I should have a notice like this buying-list in a project (not that important so not wanting them to the bibtex). I find it overkill to explain a trivia like a buying-list-notice next to more important things in Bibtex, I need just SO-style references. How can I add the references nicely to the bottom of the page instead of the back with author/howpublished/title-bibtex-clutter? I am not against Bibtex but I am looking for more casual referencing besides Bibtex.

\begin{itemize}
\item 4pcs [1] (24USD)  % Here [1] and [2] are references to 
\item 2pcs [2] (25USD)  % the below thing with the urls.
\item ...
\end{itemize}

<<echo=FALSE>>   % I am not sure about the parameters here but they 
                 % but they could be things like fonts etc.
                 %
                 % I want here a Sweave-like -tool
                 % for easy mark-up references that will
                 % automatically appear at the bottom of the page.
                 % Then just latexmk to handle compiling?
[1]: http://www.something.com/buyThis/XYZmoment
[2]: http://www.hello.com/notImportantButForTheFuture/GoodToKnowWhereToBuy
%
share|improve this question
    
This is not clear at all, since both answers below provide something in terms of your first edit. After your edit you want a sweave-like tool? Moreover, please elaborate on what is meant by "SO-style references". –  Werner Jan 28 '12 at 5:30
    
@Werner: SO = StackOverflow (actually valid on this site for referencing), I am trying to reuse the references on this site to my latex document without needing to reinvent the wheel by always changing from one markup into another. –  hhh Jan 28 '12 at 5:40
add comment

2 Answers

up vote 3 down vote accepted

I think footnotes would work, but I'm not sure if I'm missing something:

enter image description here

\documentclass[a5paper,12pt]{article} % paper and font chosen to make screenshot smaller
\usepackage{hyperref}
\begin{document}
\begin{itemize}
\item 4pcs \footnote{\url{http://www.something.com/buyThis/XYZmoment}} (24USD)
\item 2pcs \footnote{\url{http://www.hello.com/notImportantButForTheFuture/GoodToKnowWhereToBuy}} (25USD)
\end{itemize}
\end{document}
share|improve this answer
    
I like this because it is succint +1. It would be cool if I could somehow hide those "\footnote{\url{...}} with simply [1] for referencing and [1]: www.something.com for the target so I could use the same SO-style referencing as on this site, possible? Perhaps some macro (I used the term Sweave -style in trying to clarify this, hopefully not distracted, trying to point out the different environment for parsing). Small usability thing to help writing like in SO. –  hhh Jan 28 '12 at 5:37
    
I wonder if you might be better off using MarkDown or MultiMarkDown for the document, inserting LaTeX as needed for equations as such. I can't look at the syntax at the moment, but that may solve the problem. –  Mike Renfro Jan 28 '12 at 13:46
add comment

Here is an implementation that uses its own counter shorturl to typeset these per-page references as part of the footnotes on the page:

enter image description here

\documentclass{article}
\usepackage[paperheight=200pt]{geometry}% http://ctan.org/pkg/geometry
  % The above paperheight configuration is just for this example
\usepackage{url}% http://ctan.org/pkg/url
\usepackage{perpage}% http://ctan.org/pkg/perpage
\MakePerPage{shorturl}% shorturl counter will reset every page
\newcounter{shorturl}\renewcommand{\theshorturl}{\arabic{shorturl}}%
\makeatletter
\newcommand{\shorturl}[1]{%
  \refstepcounter{shorturl}%
  \hbox{\normalfont[\theshorturl]}%
  \insert\footins{%
    \reset@font\footnotesize
    \interlinepenalty\interfootnotelinepenalty
    \splittopskip\footnotesep
    \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
    \hsize\columnwidth \@parboxrestore
    \protected@edef\@currentlabel{%
       \csname p@shorturl\endcsname\theshorturl
    }%
    \color@begingroup
      \par\makebox[1.8em][r]{[\theshorturl]:\ }%
        \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox%
    \color@endgroup}%
}
\makeatother

\begin{document}
\begin{itemize}
  \item Some information\footnote{Here is a footnote.}
  \item 4pcs \shorturl{\url{http://www.something.com/buyThis/XYZmoment}} (24USD)
  \item 2pcs \shorturl{\url{http://www.hello.com/notImportantButForTheFuture/GoodToKnowWhereToBuy}} (24USD)
  \item Something else\footnote{This is another footnote.}
\end{itemize}
\end{document}

Loading perpage makes the \shorturl references restart every page. Remove this if it is of no concern. It would be possible to modify the layout of the URL in the footnote. At the moment, the \shorturl mark within the footnote is right-aligned in a 1.8em box (similar to that of the regular \footnote).

geometry was just loaded to make the text and footnote be visible/close together.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.