\textnumero and font encoding [closed] - latex

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.
Improve this question
I currently use the \textnumero sign in my LaTeX document. Therefore, I need to include the 'textcomp' package. When doing so I get a compiler error stating:
! Package textcomp Error: Symbol \texnumero not provided by
(textcomp) font family ptm in TS1 encoding.
(textcomp) Default family used instead.
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{ucs}
\usepackage[latin1]{inputenc}
\usepackage[textcomp]
%... somewhere in the document
\textnumero ...
How can I get rid of this message? Can I set some other font or encoding for the number sign only?
Many Thanks,
Ovanes

If you want to avoid the bother of changing fonts (for example, you want to keep times), try this:
\usepackage{txfonts}
\usepackage{times}
\newcommand{\ftextnumero}{{\fontfamily{txr}\selectfont \textnumero}}
...
\ftextnumero 1
...

Ok, I got it. Changing to font which has this sign solved the issue.
\usepackage{savesym}
\usepackage{amsmath, amsfonts, amsthm, amssymb}
\savesymbol{iint}
\usepackage{txfonts} % this is the font
\restoresymbol{TXF}{iint}
\usepackage{ucs}
\usepackage[ansinew]{inputenc}
\usepackage{textcomp}
Note! savesym package is now needed to avoid errors, that iint is already defined.
Regards,
Ovanes

this worked for me:
\usepackage[warn]{textcomp}
(taken from here)

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.

\begin{figure}[H] works, but \begin{figure}[htbp] doesn't [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 want to insert png files into my document.
basically, like this, it works (after invoking 'float'),
\begin{figure}[H]
\begin{center}
\includegraphics{myfigure}
\caption{short caption}{VERY LONG FIGURE LEGEND}
\label{fig:myfigure}
\end{center}
\end{figure}
but like that, it doesn't,
\begin{figure}[htbp!]
\begin{center}
\includegraphics{myfigure}
\caption{short caption}{VERY LONG FIGURE LEGEND}
\label{fig:myfigure}
\end{center}
\end{figure}
which is weird to me; obviously I invoke \usepackage{graphicx} as well since without that it wouldn't work in the first place. Any suggestions what the problem could be?
UPDATED: found the solution:
I had defined the \textsuperscript macro as in http://anthony.liekens.net/index.php/LaTeX/SubscriptAndSuperscriptInTextMode
a fix is sketched in Figures occurring after ^ and _ macros (was: LaTeX limitation?), and it seems to work for me
cheers!!
I can't test it here, but I think the combination htbp and ! is not allowed. The ! defines that LaTeX should listen to the given placement specifier and place the figure how you specify it. You say with htbp! to LaTeX something like
Place my image here, at the top, at the bottom or on a special page. And do it all!
You should choose either htbp or h!, t!, b! or p!, I think.
found the solution:
I had defined the \textsuperscript macro as in http://anthony.liekens.net/index.php/LaTeX/SubscriptAndSuperscriptInTextMode
a fix is sketched in Figures occurring after ^ and _ macros (was: LaTeX limitation?) and it seems to work for me

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}.

How to write URLs 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 programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
How do you write a URL in Latex?
The subscripts and everything else make the font look very strange when it compiles.
You can use \url
\usepackage{hyperref}
\url{http://stackoverflow.com/}
You just need to escape characters that have special meaning: # $ % & ~ _ ^ \ { }
So
http://stack_overflow.com/~foo%20bar#link
would be
http://stack\_overflow.com/\~foo\%20bar\#link
Here is all the information you need in order to format clickable hyperlinks in LaTeX:
http://en.wikibooks.org/wiki/LaTeX/Hyperlinks
Essentially, you use the hyperref package and use the \url or \href tag depending on what you're trying to achieve.
A minimalist implementation of the \url macro that uses only Tex primitives:
\def\url#1{\expandafter\string\csname #1\endcsname}
This url absolutely won't break over lines, though; the hypperef package is better for that.

Resources