I'm trying to use \texttt{...}, but I want to change the color it uses to gray. How would I do this?
You can use {\color{gray}\texttt{text}} to get gray typewriter font.
However if you want to use this to show some kind of code, it would be better to have a look at the listings package. This allows you to globally change the colour:
\documentclass{article}
\usepackage{xcolor}
\usepackage{listings}
\lstset{
basicstyle=\color{gray}\ttfamily
}
\begin{document}
{\color{gray}\texttt{text}}
\lstinline|text|
\end{document}
Related
Hello I am new at beamer (overleaf), so I have learned very much, so I would like to change the design of the numeration in table of contents. I mean with that (see picture attached):
I would like to change to a square, or simply the number. Anyone knows others styles? I am using the \usetheme{CambridgeUS}.
You can set the sections/subsections in toc template to change to e.g. a square or plain numbered sections:
\documentclass{beamer}
\usetheme{CambridgeUS}
\setbeamertemplate{sections/subsections in toc}[square]
%\setbeamertemplate{sections/subsections in toc}[sections numbered]
\begin{document}
\section{title}
\begin{frame}
\tableofcontents
\end{frame}
\end{document}
I like to make a question on the hyperref package of Latex. I write reports with the company's logo and I would like to add an implicit link to the official company's website, so as that if someone click on this logo can open the official web page. The problem is that this generates a bad pale blue box that is particularly ugly, therefore I would like to remove it.
I was able to remove all the box on the external link by changing the color on the specification (and setting white, perhaps there is also a way to remove) but I am trying to change only on this specific link and not all the others present other parts of the document.
Below the portion of latex code:
\documentclass[11pt]{article}
\usepackage[italian]{babel}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\begin{document}
\begin{figure}[h!]
\vspace{-1 cm}
\flushleft\hspace{-1.5 cm}
\href{https://www.link.com/}{\includegraphics[height=1.5cm, keepaspectratio]{LOGO1.jpg}}
%\caption{Caption}\label{fig:logo}
\end{figure}
\end{document}
Do somebody knows a special tricks for doing this? Thank you in advance for any help.
You can change the hyperref setup locally:
\documentclass[11pt]{article}
\usepackage[italian]{babel}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\begin{document}
\begin{figure}[h!]
\vspace{-1 cm}
\flushleft\hspace{-1.5 cm}
{\hypersetup{hidelinks}\href{https://www.link.com/}{\includegraphics[height=1.5cm, keepaspectratio]{example-image-duck}}}
%\caption{Caption}\label{fig:logo}
\end{figure}
\end{document}
For my work I shall make it possible to change the color of the footnote index optionally.
I found a way to change the color, but it is not flexible.
\RequirePackage{xcolor}
\definecolor{red}{RGB}{165,30,55}
\renewcommand{\thefootnote}{\textcolor{red}{\arabic{footnote}}}
\begin{document}
a footnote\footnote{lalala}
\end{document}
this works. But this does not:
\renewcommand{\thefootnote}[1]{\textcolor{#1}{\arabic{footnote}}}
\begin{document}
a footnote\footnote[red]{lalala}
\end{document}
I think it is because \footnote already has one optional parameter for the index number.
Is there a way to change it?
With a new command, one could do something like this:
\documentclass{article}
\RequirePackage{xcolor}
\newcommand{\cfootnote}[2][black]{%
{\color{#1}\footnote{#2}}%
}
\begin{document}
a footnote\cfootnote{lalala}
a footnote\cfootnote[red]{lalala}
\end{document}
Another approach with redefining the footnote:
\documentclass{scrartcl}
\usepackage{scrletter}
\usepackage{xcolor}
\let\oldfootnote\footnote
\usepackage{xparse}
\usepackage{etoolbox}
\RenewDocumentCommand{\footnote}{ O{} m O{black}}{%
\deffootnotemark{\color{#3}\textsuperscript{\thefootnotemark}}%
\ifstrempty{#1}{%
\oldfootnote{#2}%
}{%
\oldfootnote[#1]{#2}%
}
}
\begin{document}
test\footnote{text}[red]
test\footnote{text}
test\footnote[42]{text}
test\footnote[42]{text}[blue]
\end{document}
I am using Inkscape to convert images to Latex, so the text scales nicely. Using SaveAs pdf, with generate Latex ticked.
This creates a .pdf_tex file that contains something like this:
\begingroup%
\begin{picture}(1,1.18884212)%
\put(0,0){\includegraphics[width=\unitlength,page=1]{Scapula.pdf}}%
\put(0.6981335,0.82053681){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{Infraspinous fossa}}}%
\end{picture}%
\endgroup%
I would like to change the font size and possible also the font, so the text in all images is different from the body text. I think this is possible by e.g. redefining \smash within "picture", but I don't know how. Is this the correct approach? If so, any tips on how to do it?
With the etoolbox you could add the fontsize change to the picture environment:
\documentclass{article}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{etoolbox}
\AtBeginEnvironment{picture}{\huge}
\begin{document}
\begingroup%
\begin{picture}(1,1.18884212)%
\put(0,0){\includegraphics[width=\unitlength,page=1]{example-image.pdf}}%
\put(0.6981335,0.82053681){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{Infraspinous fossa}}}%
\end{picture}%
\endgroup%
\end{document}
I'm currently working on a presentation using the beamer layout of AnnArbor theme, but changed its color to Seahorse by saying
\usetheme{AnnArbor}
\usecolortheme{seahorse}
It now looks like this:
I would like to change the yellow part into another color. How do I do that?
As explained in this answer from TeX.SX, line 4 of the following should fit for you:
\documentclass{beamer}
\usetheme{AnnArbor}
\usecolortheme{seahorse}
\setbeamercolor{frametitle}{fg=blue,bg=orange}
\begin{document}
\begin{frame}
\frametitle{Agenda}
\end{frame}
\end{document}
Please comment otherwise! :)