GeneralCitation issue

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
John_Nada
Posts: 5
Joined: Mon May 27, 2024 11:10 pm

Citation issue

Post by John_Nada »

Hi everyone,

This might be a stupid question but it's my first time using avoiding a WYSIWYG thing for a project. It's not a big problem actually but it is destroying my will to live.

I write this:
@article{hirsch_determinacion_2020,
title = {Determinación y tendencia del valor de la fuerza de trabajo en la crítica de la economía política},
volume = {07},
number = {6},
journal = {Red Sociales, Revista del Departamento de Ciencias Sociales},
author = {Hirsch, Mariana},
year = {2020},
pages = {32--49},
}
When I cite it in the body of the text it appears like "(M. Hirsch, 2020)". Why? It should be "(Hirsch, 2020)" right?

I'm loosing my faith with these kind of tools, should be hand writing :( jajaja jk (pls help)
Last edited by John_Nada on Mon May 27, 2024 11:25 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Citation issue

Post by Stefan Kottwitz »

Hi John,

welcome to the forum!

The appearance of the citations depends on your configuration, including packages and styles. Perhaps show a minimal document (Infominimal working example) that produces this output, and we can help to change it.

Stefan
LaTeX.org admin
John_Nada
Posts: 5
Joined: Mon May 27, 2024 11:10 pm

Citation issue

Post by John_Nada »

But it's the only citation that makes me suffer like this, the rest of them are like "(Lastname, YEAR)". Does it make any
sense?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Citation issue

Post by Stefan Kottwitz »

Sure, you just don't tell us what you are writing. So we cannot tell you the reason.

I took the time to write this. See, it's what you required:

Code: Select all

\documentclass{article}
\usepackage{natbib}
\setcitestyle{round}
\begin{filecontents}[force]{example.bib}
@article{hirsch_determinacion_2020,
title = {Determinación y tendencia del valor de la fuerza de trabajo en la crítica de la economía política},
volume = {07},
number = {6},
journal = {Red Sociales, Revista del Departamento de Ciencias Sociales},
author = {Hirsch, Mariana},
year = {2020},
pages = {32--49},
}
\end{filecontents}
\begin{document}
\section*{Recommended texts}
See \citep{hirsch_determinacion_2020}.
\bibliographystyle{plainnat}
\bibliography{example}
\end{document}
bibliography.png
bibliography.png (31.96 KiB) Viewed 7494 times
Stefan
LaTeX.org admin
John_Nada
Posts: 5
Joined: Mon May 27, 2024 11:10 pm

Citation issue

Post by John_Nada »

I'm sorry, I'm pretty green with this. My problem is that when I write you the minimal document it gives me a perfect citation.

Code: Select all

\documentclass[12pt, oneside]{article}
\usepackage[spanish]{babel} % Idioma para silabación, texto automático
\usepackage[margin=3cm]{geometry} % Márgenes
\usepackage{graphicx}
\usepackage{blindtext}
\usepackage[T1]{fontenc}
\usepackage{mathptmx} % Fuente rollito Times New Roman
\usepackage{float}
\usepackage{xcolor}
\usepackage{hyperref}
\hypersetup{
  colorlinks=true,
  linkcolor=black,
  citecolor=black,
  urlcolor=black,
  pdfborder={0 0 0},
  breaklinks=true,
} % Elimina los cuadrados rojos que señalan hipervínculos en el índice

\usepackage{setspace}
\usepackage{apacite} % citar en APA (siempre después de hyperref)


\usepackage{titlesec}
\titlespacing*{\section}{0pt}{1cm}{0.1cm} % Ajusta el espacio para las secciones
\titlespacing*{\subsection}{0pt}{0.5cm}{0cm} % Ajusta el espacio para las subsecciones

\setlength{\skip\footins}{1cm} % Distancia pie de página
\setlength{\parskip}{1.5em} % Espacio entre párrafos
\setlength{\parindent}{3em} % Márgenes de párrafos
\setlength{\headheight}{14.5pt} % Altura del encabezado
\renewcommand{\baselinestretch}{1.5} % Interlineado general


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

Blabla \cite{hirsch_determinacion_2020}


\renewcommand{\refname}{Bibliografía}
\bibliographystyle{apacite}
\bibliography{name.bib}

\end{document}

I literally copied and pasted from the original project, so... Anyway, I really appreciate your time trying this
Attachments
Sin título.png
Sin título.png (21.65 KiB) Viewed 7488 times
John_Nada
Posts: 5
Joined: Mon May 27, 2024 11:10 pm

Citation issue

Post by John_Nada »

I saw something that could be relevant, it also happens when I cite Dana Hirsch, another author with the same last name
John_Nada
Posts: 5
Joined: Mon May 27, 2024 11:10 pm

Citation issue

Post by John_Nada »

Okay... I resolved this, when you have two authors with the same last name you get the first letter of the first name to distinguish one from the other... It's solved, I don't know if I should delete this...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Citation issue

Post by Stefan Kottwitz »

Great that it's resolved!

Stefan
LaTeX.org admin
Post Reply