I am using LaTeX in Overleaf with a template from my university. It has these coloured \ref and \cite links in the PDF viewer, which I find very annoying. Does anyone know what settings creates these colours (see image below)? I have never seen them before in any of my LaTeX documents.
These are the settings at the top of the page:
\usepackage[english]{babel}
\selectlanguage{english}
%-----------------------------------------------------------------
% Activating style packages
%-----------------------------------------------------------------
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{microtype}
%-----------------------------------------------------------------
% Settings for referencing (via Natbib)
%-----------------------------------------------------------------
\usepackage[backend=biber, style=apa]{biblatex}
\addbibresource{ThesisExample.bib}
%-----------------------------------------------------------------
% Graphicx package and hyper referencing
%-----------------------------------------------------------------
\usepackage{graphicx} % Handles import graphics
\usepackage{hyperref} % Hyper referencing
\usepackage{lscape} % Landscape positioning pages
\usepackage{url} % Include url codes
\usepackage{booktabs} % Book quality tables
%-----------------------------------------------------------------
% Font selection
%-----------------------------------------------------------------
\usepackage{palatino} % Set palatino font
\usepackage{mathpazo} % Idem, but for math environment
%-----------------------------------------------------------------
% Graphics settings
%-----------------------------------------------------------------
\DeclareGraphicsRule{.jpg}{bmp}{}{}
\graphicspath{{./}}
%-----------------------------------------------------------------
% Removing indentation, include french (non US) spacing
%-----------------------------------------------------------------
%\setlength{\parindent}{0pt}
%
\newcommand{\mySkip}{0pt}
\setlength{\parskip}{\mySkip}
\frenchspacing
%-----------------------------------------------------------------
% Activate tikz and include some specific packages
%-----------------------------------------------------------------
\usepackage{tikz}
\usetikzlibrary{snakes, calc, positioning}
%-----------------------------------------------------------------
% Latex logo (unclear what you need it for)
%-----------------------------------------------------------------
\usepackage{doc}
%-----------------------------------------------------------------
% Blank page
%-----------------------------------------------------------------
\newcommand*{\blankpage}{%
\vspace*{\fill}
\thispagestyle{empty}
\clearpage
} % end new command
%-----------------------------------------------------------------
% Hyper setup
%-----------------------------------------------------------------
\hypersetup{
pdftitle = {My thesis},
pdfauthor = {My name},
pdfsubject = {My topic},
hidelinks
}
The hyperref package has an option colorlinks that can be used as follows:
\usepackage[colorlinks=false]{hyperref}
I found a solution in an old feed: https://tex.stackexchange.com/questions/823/remove-ugly-borders-around-clickable-cross-references-and-hyperlinks
The following didn't work for me: \usepackage[hidelinks]{hyperref}
What did work was:
\hypersetup{
colorlinks,
linkcolor={black!50!black},
citecolor={blue!50!black},
urlcolor={blue!80!black}
}
Related
I'm trying to learn the basics of Monogame, and I've successfully figured out how to use the Monogame Content Pipeline to load and display images on the screen. When I try to do the same with fonts, by loading a font called galleryFont.spritefont into the Monogame Content Pipeline everything is fine.
Please note: even before I import the font into my code, I get an error.
However, the problem occurs when I run the project. I get an error that looks like this:
It states:
error : Processor 'FontDescriptionProcessor' had unexpected failure!
System.IO.FileNotFoundException: Could not find "Arial" font file
I also get an error in my build tasks, stating this:
As you can see as well, the file is loaded, but what I noticed what was strange was that the monogame content pipeline did not save the file as an .xnb file in the Content/bin folder.
Or since the error said, "Could not find Arial font file," does this mean I need to somehow download the Arial font.ttf and link it somehow in my .spritefont file? Here is the .spritefont file if anyone is interested.
<?xml version="1.0" encoding="utf-8"?>
<!--
This file contains an xml description of a font, and will be read by the XNA
Framework Content Pipeline. Follow the comments to customize the appearance
of the font in your game, and to change the characters which are available to draw
with.
-->
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">
<!--
Modify this string to change the font that will be imported.
-->
<FontName>Arial</FontName>
<Size>24</Size>
<Spacing>0</Spacing>
<UseKerning>true</UseKerning>
<Style>Regular</Style>
<!--
If you uncomment this line, the default character will be substituted if you draw
or measure text that contains characters which were not included in the font.
-->
<!-- <DefaultCharacter>*</DefaultCharacter> -->
<CharacterRegions>
<CharacterRegion>
<Start> </Start>
<End>~</End>
</CharacterRegion>
</CharacterRegions>
</Asset>
</XnaContent>
Thanks for any help.
After doing a ton of research, I found out that the font is not naturally loaded onto my computer. The tutorial I was using somehow had the Arial font already loaded, so they could just use <FontName>Arial</FontName> to load the font. However, I had to download a font, put it into my Content directory, then edit the .spritefont file to <FontName>font.ttf</FontName>. Finally, after doing this, the project would run.
It looks like you're trying to load the "Arial" font when you named your font "galleryFont". Try changing it to that in the code and see what happens. For example, here's how I load a font in one of my games:
protected override void LoadContent()
{
SpriteFont _font;
_font = Content.Load<SpriteFont>("SuperArial");
}
"SuperArial" is what I named an Arial font I packed into my mgcb file.
The Arial is specific to Windows.
A version of these fonts are available to Linux users through the following:
Ubuntu(same package as deb for debian)
sudo apt install ttf-mscorefonts-installer`
Arch:
sudo yay -S ttf-ms-fonts ttf-vista-fonts ttf-office-2007-fonts ttf-win7-fonts ttf-ms-win8 ttf-ms-win10 ttf-ms-win11`
Redhat:
sudo rpm -i https://downloads.sourceforge.net/project/mscorefonts2/rpms/msttcore-fonts-installer-2.6-1.noarch.rpm
All of these methods register the fonts, and can be used directly as specified.
I am working on a Kivy(Python) Project and I need to display approval(✓) and cross(X) symbol in different scenario. I can display cross symbol but unable to display other one. Is there any way to do this ? Thanks.
Note: I have tried, writing text:'✓' and text:u'2713' under Label in .kv file but it doesn't work.
The font supplied with Kivy doesn't include the tick mark. You need to use fonts that include those symbols. Tick is available in fonts Arial Unicode MS, Wingdings and Wingdings 2. You can download the font ttf file and have it in the same folder with your script.
Link to download the font
https://www.download-free-fonts.com/details/88978/arial-unicode-ms
Then include the font and use it in the label as follow:
Label:
font_name:'arial-unicode-ms.ttf'
text: "This is the tick ✓"
Bro I was also troubling from same problem from morning but now I figured it out actually so I would like to share it with you.I used below code:
def wrong_btn(self):
self.ids.wrong_button.text = u"⌫" self.ids.wrong_button.font_name=r"C:\Users\95532\AppData\Local\Microsoft\Windows\Fonts\Arial-Unicode-MS.ttf"
I used this to specify the folder in which the font is stored so you can also download the font you want and just specify the path and don't forget use a r i.e raw string mark or else it wont work I wasted my whole day searching for that hope this helps you bro
I am new to fvwm machine which is used by my new employers.
I am struggling in customizing gvim menu (File, Edit,etc) font size.
As you can see in the attached image, the font size are decent, but menu size is pretty small as compared to text font size.
How to solve this??
Reference Image:
gvim uses gnome gtk in the gnome version of gvim and in this case you can configure your environment using a .gtkrc file see https://unix.stackexchange.com/questions/25043/what-is-this-gtkrc-file. As another answer pointed out for Gtk 2.x programs ~/.gtkrc-2.0 is the configuration file.
To modify your font see e.g.
https://ubuntuforums.org/showthread.php?t=846348
https://bbs.archlinux.org/viewtopic.php?id=164044
https://unix.stackexchange.com/a/478303/38701
examples:
gtk-font-name = "Sans 12"
which gives you a Sans-Serif font with size 12
gtk-font-name = "DejaVu Sans 11"
which is more specific regarding the font and uses size 11
Create .gtkrc-2.0 in your home directory if it isn't present already
and add:
gtk-font-name = "bitstream bold 16"
That should solve your problem.
I installed a minimal debian and i'm trying to set everything by myself, so i'm trying to tune my default terminal Xterm by giving it some colors, after some research i found that this can be done either by editing the .Xresources file so i can give the first 16 colors in Hexa code (#numbers) or by editing the .bashrc file.
After some research seems like the second solution is more dynamic 'cause i can specify the colors of files by extensions, the problem is that all the articles on the net use a color code very weird :
.gz 01;31
.bz2 01;31
.deb 07;31
.rpm 01;31
.jar 01;31
I want to know if there's a way to use RGB code color or hexa color so i can have more flexibility with my directory and files listings.
AFAIK, there is no RGB support, terminal emulators are limited to display a limited set of colors (a palette with 64 combinations of foreground and background, if I'm not mistaken). If ease of use is what concerns you, you can always declare several variables for the predefined colors, something like:
readonly BLACK_FONT_BLACK_BACKGROUND='30;40'
readonly BLACK_FONT_RED_BACKGROUND='30;41'
readonly BLACK_FONT_GREEN_BACKGROUND='30;42'
readonly BLACK_FONT_YELLOW_BACKGROUND='30;43'
...
readonly WHITE_FONT_CYAN_BACKGROUND='37;46'
readonly WHITE_FONT_WHITE_BACKGROUND='37;47'
And use them later like:
.gz $BLACK_FONT_YELLOW_BACKGROUND
The following is a table with the color codes for foreground and background:
Color Foreground Background
-------------------------------
black 30 40
red 31 41
green 32 42
yellow 33 43
blue 34 44
magenta 35 45
cyan 36 46
white 37 47
-------------------------------
If generating all the color names variables manually is too tedious, you can use the following python script:
colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white'];
index = 0
for x in ["{0}_FONT_{1}_BACKGROUND='{2};{3}'".format(colors[i].upper(), colors[j].upper(), i + 30, j + 40) for i in xrange(0, 8) for j in xrange(0, 8)]:
print x.ljust(38) + "#" + str(index)
index += 1
I'm sorry, but you can't use the RBG color code (or HSV, or HCL). You may find the documentation with:
$ man 5 dir_colors
As noted by #Leonardo Fontenelle, the place to start reading about GNU ls coloring is the dir_colors manual page. The numbers used, such as 01;31 are the constants associated with what the manual page refers to as "ISO 6429 (ANSI) color sequences". Actually the manual page is a little more obscure than it ought to be:
the constants are parameters used in the ISO 6429 SGR (set graphic rendition) control sequence. The actual standard is very detailed (see ECMA-48).
01 happens to be the standard code for bold (the manual refers to it using the Linux-centric "brighter colors*).
as noted by #higuaro, codes 30-37 and 40-47 form a color palette; all of the colors shown on the terminal at any moment come from the current palette.
there is more than one way to update the color palette used by xterm; none of those are directly related to the ls configuration because the numbers used for referring to the palette do not contain the color information by themselves.
you can display the colors and video attributes using the ncurses tput utility, e.g., tput setaf 7.
some (relatively) recent ls configurations use additional color codes outside the 30-37 / 40-47 palette, e.g., for the aixterm 16-color feature, or the xterm 88-colors or 256-colors. The dir_colors manual page does not mention this.
I'm currently developping a java application that processes information and that info has to be saved as graphs in a pdf file. I got like 60 graphs as output, all with a different title.
What is an easy way to make a table of content from all the graphs based on their title?
Is there a command that can do this? Or do I have to use pdfmarks?
I can't find anything about this on the internet because if I use the words table of content I just get the table of content of gnuplot/ghostscript itself...
Thanks in advance
You can generate the PDF using Latex and then use the epslatex terminal in gnuplot to generate the figures. You can write a script which generates the Latex document.
The gnuplot script:
set term epslatex color size 3,2 font 6
set output "figure1.eps"
#
set title 'Title of figure1'
#
plot sin(x)
#
exit
This generates an EPS file named figure1.eps and a Latex file named figure1.tex which embeds the EPS.
The the following Latex can in turn embed figure1.tex into a document:
\documentclass{article}
\usepackage{graphicx}
\usepackage{color}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[mathcal]{euscript}
\begin{document}
\listoffigures
\begin{figure}
\centering
\include{figure1}
\caption[Description of figure1 as it appears on the list of
figures]{Caption of figure1.}
\end{figure}
\end{document}
Using the \listoffigures command a list of figures will be generated. You might need to run Latex a couple of times before the table appears. Then use dvipdf to export to PDF. The result should look like this: