One link instead of two for \citep{} in LaTeX [closed] - latex

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 11 months ago.
Improve this question
I'm writing some LaTeX for a document, and I'm using natbib for my citations, with the command \citep{ref}.
However, \citep is producing something like that (Author et al., Year), but 'Author et al.' and 'Year' are two separated links (pointing to the same reference).
I would like this to be only one link 'Author et al.,Year'.
How could I do that?
Thanks.

Found this answer here:
natbib and hyperref for (Author, Year) style produces two links
Which consists in adding to the preambule:
\makeatletter
\renewcommand\hyper#natlinkbreak[2]{#1}
\makeatother

Related

How can I capitalize the first letter while using '\cref'? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
The community reviewed whether to reopen this question last month and left it closed:
Original close reason(s) were not resolved
Improve this question
I use package cleveref to refercence a figure or table in latex.
\usepackage{hyperref}
\usepackage{cleveref}
\cref{sim_figure}
The result is some like fig. 1, table I.
However, my expected result is Fig. 1 or Table I which is required by IEEEtran. How can I capitalize the first letter?
This is clearly outlines in the cleveref documentation.
You can either use \Cref, or pass the package option capitalise:
\documentclass{ieeetran}
\usepackage{hyperref}
\usepackage[capitalise]{cleveref}
\begin{document}
See \cref{fig:myfigure} or \Cref{fig:myfigure}.
\begin{figure}
\caption{Some figure}\label{fig:myfigure}
\end{figure}
\end{document}
If you wish to customize the way \Cref prints (output Fig. rather than Figure), add
\Crefname{figure}{Fig.}{Figs.}% {<type>}{<singular>}{<plural>}

How can I highlight text in latex [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
How can i highlit text in latex.
Thank you.
As is pictured here(in red circle):
If you mean making the text bold by Highlighting you can use \textbf for making the text bold but highlighting has a different general meaning that is implemented by \hl keyword.
\documentclass{report}
\usepackage{color} % for the command \textcolor
\usepackage{soul} % for the command \hl
\begin{document}
\hl{foo}
\hl{\textbf{foo}}
{my garden }
\textbf{black}{foo}
{my good job}
\textbf{\textcolor{red}{\hl{foo}}}
\textcolor{red}{\textbf{\hl{foo}}}
\end{document}
this is the result :
As you can see the word "black" is highlighted the way you desired.
The word "foo" is highlighted in the general meaning of highlighting.
This links look useful:
Insert symbols inside verbatim mode LaTeX
Putting math inside a verbatim environment without altering the formatting
If you just wanted graph.exe I would suggest using \begin{verbatim} graph.exe \end{verbatim} or \verb+graph.exe+ .
However you want to use the <..> expression which can be created with $ \langle ... \rangle $ . The $..$ indicates inline math mode. Those two links discuss getting verbatim text in math environments.
I think tex.stackexchange.com will be more helpful rather than stack overflow.

LaTex: IEEEtran "\title{ title }" doesn't show [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I'm practicing LaTeX with IEEEtran.cls. I'm am slowly filling in the information, but I am getting stuck from the beginning.
\documentclass[12pt, journal, compsoc]{IEEEtran}
\begin{document}
\title{ This is my practice document}
\author{Yui}
\begin{abstract}
Abstract content goes here.
\end{abstract}
\end{document}
From the above simple .tex file, after compilation in the PDF, I can see the Abstract content. However, I don't see either title or author.
Any suggestions? Please and thank you.
Hawk_08 is pretty much correct, but I'll post the completed tex because you appear to have misunderstood him.
\documentclass[12pt, journal, compsoc]{IEEEtran}
\begin{document}
\title{ This is my practice document}
\author{Yui}
\maketitle
\begin{abstract}
Abstract content goes here.
\end{abstract}
\end{document}
Notice the \maketitle after the \author command
The only thing I can see you are missing is the \maketitle after further research on the IEEEtran paper I have the make title should go after the \end{abstract}. Also if you need further reference you can go here. Also I found that the pre-filled form given by IEEE were pretty good you can find them here

input a figure between title and body in twocolumn latex form [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm using a Latex to write a small paper using CVPR template.
I'd like to put a figure between my title+name and body(which consists with two columns) like many CVPR papers do, but I don't find the way to do that.
I tried,
\begin{figure*}
\begin{center}
\fbox{\rule{0pt}{2in} \rule{.9\linewidth}{0pt}}
\end{center}
\caption{some caption..}
\label{fig:short}
\end{figure*}
but it turned out figure-star only displays it's figure at the top of next page,
and when I just use figure like \begin{figure}[htb], it's only located one of those two columns.
Does anyone know how to put a long figure between my title+name and body context?
Thanks.
You don't mention anything about inserting a date in your title. So, why not use the date to store your image:
\documentclass[twocolumn]{article}
\usepackage{mwe}% http://ctan.org/pkg/mwe
\title{My Title}
\author{A.\ Uthor}
\date{\includegraphics[height=2in]{example-image}}
\begin{document}
\maketitle
\lipsum[1-4]
\end{document}
The mwe package provides the example image (via graphicx) and dummy text (via lipsum).

citep and citet not working even when using natbib package [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am writing a document in latex and I have a big .bib file and a large number of citations.
I want to have citations in the form [Author, year] format and am using the package natbib, but can't get citep or citet working, though plain cite is working fine. The error I get is:
! Undefined control sequence.
l.3 lets cite \citet{cayton05}
I am using Ubuntu texlive package and use \input{<file>} latex command to input the chapters to the main .tex file.
What's surprising is that instead of using \input{<file>} if I just have text in the main .tex file then all the cite commands are working.
Any help would be highly appreciated.
The working version is like this:
\usepackage{cite}
\usepackage[square,sort]{natbib}
%% lot of other packages and formatting %%
\begin{document}
\chapter{Testing citations}
\begin{enumerate}
\item this is the first citation \cite{belkin02}.
\item this is the second citation \citep{belkin02}.
\item this is the third citation \cite{shlens03}.
\end{enumerate}
\phantomsection\addcontentsline{toc}{chapter}{Bibliography}
\begin{spacing}{1.5}
\nocite{*}
\bibliographystyle{apalike}
\bibliography{testnb.bib}
\end{spacing}
\end{document}
In the real .tex file, I input the chapter text from another .tex file, and citep and citet won't work in that giving the aforesaid error, though plain cite will work fine.
I forgot to mention earlier I was using plain numbered bibliography style and everything was working, so there is no error in the input .tex files.
If \citep and \citet do not work, then you probably did not load natbib.
From a document I currently work on:
\usepackage[authoryear,round,longnamesfirst]{natbib}
You may want different options -- see the handy reference sheet for natbib for details.
You should only include \usepackage[square,sort]{natbib}.
It will work after deleting \usepackage{cite}.

Resources