0

I would like to add page numbers to my references. I have tried the following things:

\cite[221\psqq]{knuth:ct:a} for page sequences

\cite[221\psq]{knuth:ct:a} for only one page following 221

Unfortunately, I'm getting the error that \psqq and \psq are undefined control sequences.

How do I make it in the proper way? And how do I correctly reference to a single page?

machinery
  • 694
  • This works fine in current biblatex. Have you remembered to load the package? – Andrew Swann Jul 16 '16 at 10:47
  • @AndrewSwann Upps, I forgot to load the biblatex package. But now I'm getting the error: \bibliographystyle invalid. I'm using \bibliographystyle{alpha}. – machinery Jul 16 '16 at 11:09
  • \bibliographystyle is for plain bibtex, not biblatex. Have a search here for basic biblatex usage. – PLK Jul 16 '16 at 11:13
  • @PLK Thanks, I have found it. I'm required to use plain bibtex. How can I do the above things (referencing to single page or sequence of pages) in plain bibtex? – machinery Jul 16 '16 at 11:16
  • Add backend=bibtex to the options of biblatex (the default is backend=biber). – Bernard Jul 16 '16 at 11:38
  • @Bernard I have used \usepackage[backend=bibtex]{biblatex} but still the same error. – machinery Jul 16 '16 at 11:42
  • Could you post a minimal (non-)working example? – Bernard Jul 16 '16 at 13:16
  • If you are required to use plain bibtex and not biblatex (with or without bibtex as the backend), then you should probably remove the biblatex tag from the question and add the bibtex tag so that the right people can help you. – PLK Jul 16 '16 at 20:22

1 Answers1

2

The commands \psq and \psqq are defined by the biblatex package. But according to the comments you are not using biblatex.

If you cannot switch over to biblatex (see What to do to switch to biblatex? and linked questions), you can have the "poor man's version" of the commands

\newcommand*{\sqspace}{\,}
\newcommand*{\psqstring}{sq.}
\newcommand*{\psqqstring}{sqq.}
\newcommand*{\psq}{\sqspace\psqstring}
\newcommand*{\psqq}{\sqspace\psqqstring}

Of course the automatic language switching biblatex offers won't work here and you have to modify \psqstring and \psqqstring manually.

Now you can use \psq and \psqq.

MWE

\documentclass{article}
\usepackage{filecontents} 
\begin{filecontents*}{\jobname.bib}
@misc{bronto,
  author  = {Anne Elk},
  title   = {Towards a Unified Theory on Brontosauruses},
  date    = {1972-11-16},
}
\end{filecontents*}

\newcommand*{\sqspace}{\,}
\newcommand*{\psqstring}{f.}
\newcommand*{\psqqstring}{ff.}
\newcommand*{\psq}{\sqspace\psqstring}
\newcommand*{\psqq}{\sqspace\psqqstring}

\begin{document}
\cite[12]{bronto} \cite[12\psq]{bronto}
\bibliographystyle{alpha}
\bibliography{\jobname}
\end{document}
moewe
  • 175,683