Issue with font color in LaTex - url

I'm having an issue with LaTex where I can't make two links blue. These are the two lines in question:
Github:// \href{https://github.com/johnsmith}{\bf johnsmith} \\
LinkedIn:// \href{https://linkedin.com/in/john-smith}{\bf john-smith} \\
I've tried using code along the lines of:
Github:// \href{https://github.com/johnsmith}{\color{blue} \bf {johnsmith}} \\
LinkedIn:// \href{https://linkedin.com/in/john-smith}{\bf {\color{blue}{john-smith}}} \\
I haven't gotten anything to work here. Weirdly enough, when I used {\color{blue}} twice earlier in the code it worked as intended. Here's the code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[]{deedy-resume-openfont}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% TITLE NAME
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace*{5pt}
\namesection{}{John Smith}{
\vspace{\topsep} % Hacky fix for awkward extra vertical space
\urlstyle{same}\href{http://johnsmith.com}{\color{blue}{johnsmith.com}} |
\href{mailto:johnsmith#gmail.com}{\color{blue}{johnsmith#gmail.com}}
\vspace*{2pt}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% COLUMN ONE
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{minipage}[t]{0.33\textwidth}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% EDUCATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace{\topsep} % Hacky fix for awkward extra vertical space
\section{Education}
\sectionsep
\subsection{Normal College}
\descript{BS Computer Science}
\location{May 2024 | New York, NY}
\sectionsep
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Links
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Links}
\sectionsep
Github:// \href{https://github.com/johnsmith}{\bf johnsmith} \\
LinkedIn:// \href{https://linkedin.com/in/john-smith}{\bf john-smith} \\
\sectionsep
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COURSEWORK
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Any input is greatly appreciated, thanks!

Related

Overfull \hbox (1.38991pt too wide) in paragraph at lines, Latex warning even though PDF is getting generated

This below latex code has warning saying Overfull \hbox (1.38991pt too wide) in paragraph at lines; pdf is getting generated without any issue, I am trying to find out where exactly I am making a mistake to see that warning.
Latex code1:
\begin{document}
\setbeamertemplate{caption}[numbered]
\begin{frame}
\titlepage
\end{frame}
Latex code2:
%\section{Literature Review}%
\begin{frame}{OBJECTIVE}
\begin{table}[h!]
\centering
\begin{tabular}{ p{3cm}|p{7cm}}
\hline
\vspace{1pt}
Title & “CompaRob:The shopping cart assistance robot" \textit{’ Int. J. Distrib. Sensor Netw., vol. 12,no. 2, Feb. 2016, Art. no. 4781280.} \\
\hline
\vspace{6mm}
Methodology &
\begin{itemize}
\item Radio and ultrasound signals
\item Provide freedom of movements for elderly people
\end{itemize}\\
\hline
\vspace{1pt}
Demerit &
\begin{itemize}
\item Not able to show how to find a product
\end{itemize}\\
\hline
\end{tabular}
\end{table}
\end{frame}
There is not enough space to fit 10 cm worth of columns and the default padding before and after the columns. Either remove the padding by using #{}p{2.9cm}|p{7cm}#{} or make the columns a bit smaller:
\documentclass{beamer}
\begin{document}
\setbeamertemplate{caption}[numbered]
\begin{frame}
\titlepage
\end{frame}
%\section{Literature Review}%
\begin{frame}{OBJECTIVE}
\begin{table}[h!]
\centering
\begin{tabular}{ p{2.9cm}|p{7cm}}
\hline
\vspace{1pt}
Title & “CompaRob:The shopping cart assistance robot" \textit{’ Int. J. Distrib. Sensor Netw., vol. 12,no. 2, Feb. 2016, Art. no. 4781280.} \\
\hline
\vspace{6mm}
Methodology &
\begin{itemize}
\item Radio and ultrasound signals
\item Provide freedom of movements for elderly people
\end{itemize}\\
\hline
\vspace{1pt}
Demerit &
\begin{itemize}
\item Not able to show how to find a product
\end{itemize}\\
\hline
\end{tabular}
\end{table}
\end{frame}
\end{document}

LuaLaTeX: horitontal alignment of verbatim-environments inside a tabularx-environment

First, I'm fully aware that my code is probably not the ideal way to realize what I want to do. However I'm not a professional LaTeX User and this is the way I figured out.
I made a minimal example that hopefully works when compiled(compiler: LuaLaTeX) to display my problem.
I'm trying to make a beamer-frame with a tabularx-table, which contains in-line verbatim-environments on the one hand and equation-environments on the other. The "Y" column-type is a modified form of the "X" environment of tabularx, which I found on another Stackoverflow-thread.
The precise problem now is the following: I'd like the verbatim-expressions to be aligned with the equation-expressions or at least to be vertically centered in each cell.
As mentioned, I'm far from being an expert and I've exhausted all of my Ideas, so I'm very thankful for any form of ideas and suggestions. :)
\documentclass[c, 10pt]{beamer}
\usepackage{polyglossia}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}
\usepackage{tabularx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}
\usepackage{placeins}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{verbatim}
\usepackage{fancyvrb}
\usepackage{nicefrac}
\usepackage{array}
\setdefaultlanguage{english}
\usetheme{JuanLesPins}
\usecolortheme{seahorse}
\newcolumntype{Y}{>{\centering\arraybackslash} X}
\begin{document}
\begin{frame}[fragile, allowframebreaks]{Symbols and Commands}
\begin{block}{\centering \large{Division}}
\begin{table}[h]
\centering
\renewcommand\baselinestretch{0.01}\selectfont
\begin{tabularx}{\textwidth}{Y Y Y}
\toprule
\multicolumn{1}{m{.3\textwidth}}{\centering Code} & \multicolumn{2}{m{.6\textwidth}}{\centering Examples}\\
\midrule
\verb|\dfrac{a}{b}| &
{\begin{equation*}
\dfrac{a}{b}
\end{equation*}} &
{\begin{equation*}
\mathrm{e}^{\dfrac{1}{k_BT}}
\end{equation*}} \\
\verb|\frac{a}{b}| &
{\begin{equation*}
\frac{a}{b}
\end{equation*}} &
{\begin{equation*}
\mathrm{e}^{\frac{1}{k_BT}}
\end{equation*}} \\
\verb|\nicefrac{a}{b}| &
{\begin{equation*}
\nicefrac{a}{b}
\end{equation*}} &
{\begin{equation*}
\mathrm{e}^{\nicefrac{1}{k_BT}}
\end{equation*}} \\
\bottomrule
\end{tabularx}
\end{table}
\end{block}
\end{frame}
\end{document}
To place unnumbered equations in a table, I would rather use inline math instead of equation environments. To get the same rendering of fractions as in equations, add \displaystyle.
Off-topic:
don't load packages multiple times
don't use fragile, allowframebreaks unless they are really necessary for the frame
floating specifier like [H] don't make sense in a document class without floating mechanism
you don't need \centering in beamer tables, they are centred by default
the syntax \large{...} is wrong, \large is a switch and does not take an argument, so it should be \large Division. Anyway it would be better to not put formatting instructions inside an macro argument, but to set the appropriate beamer template that controls the font of the block title
\documentclass[c, 10pt]{beamer}
%\usepackage{polyglossia}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}
\usepackage{tabularx}
%\usepackage{amsmath}
%\usepackage{amssymb}
%\usepackage{siunitx}
%\usepackage{placeins}
\usepackage{multirow}
\usepackage{booktabs}
%\usepackage{verbatim}
%\usepackage{fancyvrb}
\usepackage{nicefrac}
\usepackage{array}
%\setdefaultlanguage{english}
\usetheme{JuanLesPins}
\usecolortheme{seahorse}
\newcolumntype{Y}{>{\centering\arraybackslash} X}
\setbeamerfont{block title}{size=\large}
\begin{document}
\begin{frame}
\frametitle{Symbols and Commands}
\begin{block}{\centering Division}
\begin{table}
% \centering
% \renewcommand\baselinestretch{0.01}\selectfont
\begin{tabularx}{\textwidth}{Y Y Y}
\toprule
Code & \multicolumn{2}{c}{Examples}\\
\midrule
\verb|\dfrac{a}{b}| &
$\displaystyle\dfrac{a}{b}$ &
$\displaystyle\mathrm{e}^{\dfrac{1}{k_BT}}$ \\\addlinespace
\verb|\frac{a}{b}| &
$\displaystyle\frac{a}{b}$ &
$\displaystyle\mathrm{e}^{\frac{1}{k_BT}}$ \\\addlinespace
\verb|\nicefrac{a}{b}| &
$\displaystyle\nicefrac{a}{b}$ &
$\displaystyle\mathrm{e}^{\nicefrac{1}{k_BT}}$ \\
\bottomrule
\end{tabularx}
\end{table}
\end{block}
\end{frame}
\end{document}

How to put an object to the upper middle in the resume

I used TexShop and Mac to create my resume.
The code I used was referring to the GitHub as below:
enter link description here
My question is now I would like to add "Objective: ____ Internship"
in the upper middle position and the font is about the same big as my name. It should be between my name and the "Email" section but on the same level as my name is.
My text code is as below:
\documentclass[letterpaper,11pt]{article}
\usepackage{latexsym}
\usepackage[empty]{fullpage}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage[usenames,dvipsnames]{color}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage[hidelinks]{hyperref}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Adjust margins
\addtolength{\oddsidemargin}{-0.5in}
\addtolength{\evensidemargin}{-0.5in}
\addtolength{\textwidth}{1in}
\addtolength{\topmargin}{-.5in}
\addtolength{\textheight}{1.0in}
\urlstyle{same}
\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}
% Sections formatting
\titleformat{\section}{
\vspace{-4pt}\scshape\raggedright\large
}{}{0em}{}[\color{black}\titlerule \vspace{-5pt}]
%-------------------------
% Custom commands
\newcommand{\resumeItem}[2]{
\item\small{
\textbf{#1}{: #2 \vspace{-2pt}}
}
}
\newcommand{\resumeSubheading}[4]{
\vspace{-1pt}\item
\begin{tabular*}{0.97\textwidth}[t]{l#{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{\small#3} & \textit{\small #4} \\
\end{tabular*}\vspace{-5pt}
}
\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}\vspace{-4pt}}
\renewcommand{\labelitemii}{$\circ$}
\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=*]}
\newcommand{\resumeSubHeadingListEnd}{\end{itemize}}
\newcommand{\resumeItemListStart}{\begin{itemize}}
\newcommand{\resumeItemListEnd}{\end{itemize}\vspace{-5pt}}
%-------------------------------------------
%%%%%% CV STARTS HERE %%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%----------HEADING-----------------
\begin{tabular*}{\textwidth}{l#{\extracolsep{\fill}}r}
\textbf{\href{https://github.com/jenli810006995}
{\Large Jen-Li Chen}}
\hfill
\textbf{Objective: Internship}& Email : \href{mailto:jc3992#rit.edu}{jc3992#rit.edu} \\
The outfit looked like the picture below:
Any suggestions for me to put the " Internship" to the middle top in the resume? Now the " " is not there because I cropped it.
Thank you all in advance!!
If I understand well, you want to obtain something like that:
For this you can add a third column to the table like this:
\begin{tabular*}{\textwidth}{#{\extracolsep{\fill}}llr}
{\Large\textbf{\href{https://github.com/jenli810006995}{Jen-Li Chen}}} \textbf{Objective:} & {\Large\textbf{Internship}} & Email : \href{mailto:jc3992#rit.edu}{jc3992#rit.edu} \\
\href{https://www.linkedin.com/in/jenlichen}{https://www.linkedin.com/in/jenlichen} &&\\
\href{https://github.com/jenli810006995}{https://github.com/jenli810006995} &&\\
\end{tabular*}
Or, if you want "Intership" to be at the exact center of the page like this:
Then I don't know how to do it with the table, but you can use the following trick: write "Intership" at the center of a line and then write the table over the line:
\centering{\Large\textbf{Internship}}\vspace*{-\baselineskip}
\begin{tabular*}{\textwidth}{l#{\extracolsep{\fill}}r}
\textbf{\href{https://github.com/jenli810006995}{\Large Jen-Li Chen}} \textbf{Objective:}& Email : \href{mailto:jc3992#rit.edu}{jc3992#rit.edu} \\
\href{https://www.linkedin.com/in/jenlichen}{https://www.linkedin.com/in/jenlichen} &\\
\href{https://github.com/jenli810006995}{https://github.com/jenli810006995} &\\
\end{tabular*}

Vertical align in table on Latex

I want to make a table and print the text in the middle of all cases. I use the array package and I wrote:
\begin{table}[H]
\begin{center}
\begin{tabular}{|m{3cm}|m{2.5cm}|m{2.5cm}|m{2.5cm}|m{6cm}|}
But then Latex says that I missed one '$' or one '{' in my table... but there is only text, so I don't understand. When I switched to :
\begin{table}[H]
\begin{center}
\begin{tabular}{|m{3cm}|C{2.5cm}|C{2.5cm}|C{2.5cm}|C{6cm}|}
all is ok and works... but it's ugly. I read a lot of stuff about that on the site already but never fixed my obvious-like problem :/
Here is a minimal example of the layout I use for tables.
Different combinations of sizing and formatting are shown.
I am not sure if this is what you asked for. Please reformulate your question, if it is not.
\documentclass{scrartcl}
\usepackage{booktabs} % \cmidrule in tables
% \usepackage{caption} % Nice Captions
% \usepackage{longtable} % Tables larger than one page
% \usepackage{multirow} % Mergings Cells
% \usepackage{multicol} % Merging Cells
\usepackage{tabularx}
\begin{document}
\begin{table}
\caption{Some caption, for tables always above}
\label{some label}
\begin{tabularx}{0.99\textwidth}{>{\centering}X>{\raggedleft}X>{\raggedleft}X>{\raggedleft}p{0.5cm}>{\raggedleft}p{3cm}>{\raggedright}X>{\raggedleft\arraybackslash}X}
\toprule
\textsc{Foobar} & $a$ & $b$ & $c$ & $d$ & $e$ & $f$ \\
\cmidrule(r){1-1} \cmidrule(lr){2-2} \cmidrule(lr){3-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5} \cmidrule(lr){6-6} \cmidrule(l){7-7}
1 & 2 & 2 & 2 & 2 & 2 & 2 \\
2 & 4 & 5 & 4 & 4 & 4 & 4 \\
3 & 4 & 3 & 4 & 3 & 3 & 3 \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}

Aligning column in tabularx

I want to align the last column properly. There is extra space towards the end. Please let me know how to do that. Thanks.
\documentclass[11pt]{article}
\usepackage{setspace} %double spacing and spacing in tables
\usepackage{amsmath} %equations etc. in latex
\usepackage[capposition=top]{floatrow} %so that the caption for figures appear at the top
\usepackage[tablename=TABLE,figurename = FIGURE,labelsep=newline,aboveskip=0pt,font=bf,justification=centering]{caption} %so that caption looks cool
\usepackage{booktabs} %midrule etc. which adds space around lines. Make tables look good.
\usepackage{tabularx} %use tabularx environment for creating one page tables
\usepackage[margin=1in]{geometry} %defining the margin for the page
\usepackage[autostyle]{csquotes} %for quotes. alternative would be " and "
\usepackage[table]{xcolor} %rowcolor, cellcolor, color for references
\usepackage{pdflscape} %landscape and keep the pages straight
\usepackage{everypage} %For AddEveryHookPage
\usepackage{hanging} %For references
\usepackage{longtable} %For multiple pages
\usepackage{multirow} %Valuable package as can be seen from table 5,8, and 10
\usepackage{graphicx} %created line using this package
\usepackage{bm} %bold and italics in the math enviornment at the same time
\usepackage{dcolumn} % a package actually used in this example
\def\hang{\par\noindent\makebox[1.5em][l]{ }\hangindent1.5em} %hanging indent
\makeatletter
\setlength{\#fptop}{0pt} %to make tables and figures start at the top of the page
\makeatother
\newcommand{\Lpagenumber}{\ifdim\textwidth=\linewidth\else\bgroup %to correct the page numbering for landscape pages
\dimendef\margin=0
\ifodd\value{page}\margin=\oddsidemargin
\else\margin=\evensidemargin
\fi
\raisebox{\dimexpr -\topmargin-\headheight-\headsep-0.5\linewidth}[0pt][0pt]{%
\rlap{\hspace{\dimexpr \margin+\textheight+\footskip}%
stabu \llap{\rotatebox{90}{\thepage}}}}%
\egroup\fi}
\AddEverypageHook{\Lpagenumber}% %to correct the page numbering for landscape pages
\newcolumntype{Y}{>{\centering\arraybackslash}X} %to center the columns for tabularx environment
\newcolumntype{Z}{>{\centering\arraybackslash}p{0.75in}} %to center the columns for tabularx environment
\newcolumntype{K}{>{\centering\arraybackslash}p{0.3in}} %to center the columns for tabularx environment
\newcommand{\gmc}[3]{\multicolumn{#1}{#{}#2#{}}{#3}} %short form for multicolumn
\doublespacing %make lines double spaced
\begin{document}
\setcounter{page}{-1} %start numbering at page 3 (2 - n where n = -1)
\thispagestyle{empty} %suppress page number
\begingroup % keep any font size changes local to group
\captionof{table}{\textbf{Descriptive Statistics}}
\singlespacing
\footnotesize
\centering
\setlength\tabcolsep{3pt} %default
\renewcommand{\arraystretch}{1}
\begin{tabularx}{\textwidth}{#{\extracolsep{\fill}}l*{2}{c}}
\gmc{3}{l}{\textbf{Panel A: Sample Representation across Economic Sectors}} \\\midrule
\textbf{Sector} & \textbf{N} & \textbf{\% Frequency} \\\midrule
Energy & 524 & 1.65\% \\
Materials & 2,648 & 8.34\% \\
Industrials & 5,905 & 18.60\% \\
Consumer Discretionary & 5,549 & 17.48\% \\
Consumer Staples & 2,174 & 6.85\% \\
Health Care & 5,167 & 16.28\% \\
Financials & 0 & 0.00\% \\
Information Technology & 9,774 & 30.79\% \\
Telecommunication Services & 0 & 0.00\% \\
Utilities & 0 & 0.00\% \\\midrule
Total & 31,741 & 100.00\% \\\midrule
\end{tabularx}
\endgroup
\end{document}
If you just want it to have no space for the last column you can
replace
\begin{tabularx}{\textwidth}{#{\extracolsep{\fill}}l*{2}{c}}
with:
\begin{tabularx}{\textwidth}{l Y r}

Resources