Latex-natbib quote without brackets

I want in some places the command "\citep{XX} " to reference in the format [XX] and in others it appears only XX. XX is the Reference Number (1, 2, 3,....).

Package definition: \usepackage[numbers]{natbib}

Can anyone help me?

Author: user14272, 2016-01-19

1 answers

Just use the \citealp Command instead of the \cite Command (or the \citep Command, which you use). In fact, the natbib package offers numerous alternatives (as well as the \citet, more useful when the reference system is not numeric and you want to mention an author by name, for example), which you can refer to in the documentation (see the "Suppressed parentheses" section, for example).

Here is a minimal example of code that does what you requested (since you do not he offered a minimal example, the rant remains: if he had provided it, maybe he would have received an answer earlier ).

Text code file (test.tex)

\documentclass{article}

\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[numbers]{natbib}
\usepackage[hidelinks]{hyperref}

\begin{document}

\title{Teste de bibliografia}

\author{Luiz C. Vieira}

\maketitle

Este é um teste de bibliografia para o \textbf{StackOverflow em Português} e, ao mesmo tempo, uma oportunidade de mencionar dois dos mais clássicos personagens de desenhos animados. Primeiramente, tem-se Mickey Mouse, cuja primeira aparição ocorreu no desenho \textit{Steamboat Willie} \cite{Disney28} produzido no final da década de 20. Outro que vale menção é o Pica Pau, cuja primeira aparição ocorreu no desenho \textit{Knock Knock} (vide referência de número \citealp{Lantz40}), já na década de 40.

Recapitulando:

\begin{itemize}
    \item Para citar uma referência normalmente use, por exemplo, \verb+\cite{Disney28}+. Isso resulta em uma referência dessa forma: \cite{Disney28}.
    \item Para citar uma referência diretamente, sem os colchetes, use, por exemplo, \verb+\citealp{Disney28}+. Isso resulta em uma referência dessa forma: \citealp{Disney28}.
\end{itemize}

\bibliographystyle{abbrvnat}
\bibliography{teste}

\end{document}

Bibliography code file (test.bib)

@misc{Disney28,
author = {Walt Disney},
title = {Steamboat Willie},
date = {18 de Novembro de 1928},
month = {Novembro},
language = {Inglês},
year = {1928},
howpublished = {Columbia Pictures},
type = {curta de animação},
location = {EUA},
}


@misc{Lantz40,
author = {Walter Lantz and Alex Lovy},
title = {Knock Knock},
date = {25 de Novembro de 1940},
language = {Inglês},
howpublished = {Universal Pictures},
type = {curta de animação},
location = {EUA},
month = {Novembro},
year = {1940},
}

Result *

insert the description of the image here

*here it is just an image; the PDF generated by compiling the code makes the citations clickable due to the use of the hyperref package.

 4
Author: Luiz Vieira, 2016-01-28 13:40:00