Skype symbol in cover letter made with moderncv latex - symbols

I want to include the skype symbol in the cover letter made with modern cv.
I cannot find anything that suites me. I found several cases where the symbol of skype was included after the command \begin{document}. I want to include the skype symbol before.
Here below a working example:
\documentclass[11pt,a4paper,roman]{moderncv}
\usepackage[UKenglish]{babel}
\makeatletter
\definecolor{ashgrey}{rgb}{0.7, 0.75, 0.71}
\moderncvstyle{classic}
\newcommand\subject[1]{\def\#subject{#1}} % style options are 'casual'
\moderncvcolor{green} % color options 'blue' (default), 'orange', the
\usepackage[utf8]{inputenc} % if you are not using xelatex ou lualatex, replace
\usepackage[scale=0.75]{geometry}
\name{XXXX}{XXXX}
\address{XXXX
}{XXXX}
\phone[mobile]{XXXX} % optional, remove / comment the line if not wanted
\email{XXXX} % optional, remove / comment the line if not wanted
\usepackage{ragged2e}
\usepackage{xcolor}
\makeatother
\begin{document}
\justify
\sloppy
\recipient{\mdseries To XXXX}{Phone: XXXX\\ XXXX \\ XXXX \\ XXXX}
\date{\today}
\title{Some fancy title}
\opening{ \textbf{:XXXXX}
\end{document}

Related

Latex: fail to show line breaks in formula with ```\\```

I'm using rmarkdown to knit to pdf. However, line break \\ doesn't take effect. I suspect something is wrong with my package amsmath, because running the tex file also shows the same problem. But I don't know how to fix it.
(I installed R and Rstudio with tinytex, then installed tex live 2021. I don't know whether this can be the cause.)
The code is shown below:
---
title: "test"
date: '2022-04-07'
output:
word_document: default
pdf_document:
keep_tex: yes
---
$$
a = b \\
c = d
$$
Also, when I try knit to word, there are warning messages
[WARNING] Could not convert TeX math
a = b \
c = d
, rendering as TeX:
a = b \
^
unexpected control sequence \
expecting "%", "\label", "\tag", "\nonumber" or whitespace
Building the tex file, I still cannot see the expected linebreak in the output pdf. The tex file is shown below.
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
\ifPDFTeX
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\#ifundefined{KOMAClassName}{% if non-KOMA class
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
\KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
pdftitle={test},
hidelinks,
pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\makeatletter
\def\maxwidth{\ifdim\Gin#nat#width>\linewidth\linewidth\else\Gin#nat#width\fi}
\def\maxheight{\ifdim\Gin#nat#height>\textheight\textheight\else\Gin#nat#height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Set default figure placement to htbp
\makeatletter
\def\fps#figure{htbp}
\makeatother
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
\fi
\title{test}
\author{}
\date{\vspace{-2.5em}2022-04-07}
\begin{document}
\maketitle
\[
a = b \\
c = d
\]
\end{document}
I think this should perfectly answer your question:
https://tex.stackexchange.com/questions/46189/how-do-i-add-a-line-break-in-display-math-mode
In short: \[ \] is made for one equation/one line of math. To add a line-break, you should use an environment like gather or align. The code for align would look like this in your tex-code:
\begin{align}
a &= b \\
c &= d
\end{align}
If you don't need numbering of your equations, you would use the starred version of the respective environment (gather*, align*. Like this:
\begin{align*}
a &= b \\
c &= d
\end{align*}
If the link I provided does not fit your problem, please explain why. I am happy to correct this answer.

Why is hyperref package causing an issue with \footnotemark?

I had recently posted a question seeking help for linking a glossary in a specific way and it was resolved, thanks to #samcarter_is_at_topanswers.xyz for helping me out. url to the post
Now, going ahead with the suggestions, I make use of \hyperref package in my project and that is causing an issue with the use of \footnotemark[]. I have attached the screenshots below along with a MWE.
Screenshots :
With the hyperref package I get the error :
Without the hyperref package I get the output with no errors :
MWE :
\documentclass{article}
\usepackage[utf8]{inputenc} % Input encoding (this file): 8 bit unicode. Default by most text editors
\usepackage[T1]{fontenc} % Output encoding (pdf file)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages used in the example
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx} % Included graphics and some resizable boxes
\usepackage{url} % nice urls with line breaks
\usepackage{lipsum} % nonsense text blocks
\usepackage{float}
\usepackage{subcaption}
\usepackage{multicol}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{biblatex}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage[nonumberlist,acronym,
entrycounter=true
]{glossaries}
\makeglossaries
\newglossaryentry{vp}
{
name= Verification Plan,
description={A verification plan is a list of the procedures and methods to be used for verification}
}
\newacronym{ml}{ML}{Machine Learning}
%%UNCOMMENT THIS AND THERE IS AN ERROR WITH GLOSSARY
%\usepackage{hyperref}
%\hypersetup{
% citecolor=black,
% colorlinks=false, %set true if you want colored links
% linktoc=all, %set to all if you want both sections and subsections linked
% linkcolor=black, %choose some color if you want links to stand out
%}
\begin{document}
%\glsaddall
\setglossarystyle{altlist}
\printglossary
\printglossary[type=\acronymtype]
------
\textbf{Develop}: The develop phase includes \gls{vp}\footnotemark[\glsrefentry{vp}], creating verification environment, testbench and test case development. \acrfull{ml}
\end{document}
So in short, I want to have my glossary hyperlinked along with referencing it by using \footnotemark[\glsrefentry....].
Any solution/advice would be greatly appreciated! Thanks in advance!
With hyperref, the \glsrefentry{...} macro is a link to your list of acronyms, which conflicts with using it as a footnotemark. You can use e.g. \textsuperscript{...} as a workaround:
\documentclass{article}
\usepackage[utf8]{inputenc} % Input encoding (this file): 8 bit unicode. Default by most text editors
\usepackage[T1]{fontenc} % Output encoding (pdf file)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages used in the example
\usepackage[dvipsnames]{xcolor}
\usepackage{graphicx} % Included graphics and some resizable boxes
\usepackage{url} % nice urls with line breaks
\usepackage{lipsum} % nonsense text blocks
\usepackage{float}
\usepackage{subcaption}
\usepackage{multicol}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{biblatex}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage[nonumberlist,acronym,
entrycounter=true
]{glossaries}
\makeglossaries
\newglossaryentry{vp}
{
name= Verification Plan,
description={A verification plan is a list of the procedures and methods to be used for verification}
}
\newacronym{ml}{ML}{Machine Learning}
%UNCOMMENT THIS AND THERE IS AN ERROR WITH GLOSSARY
\usepackage{hyperref}
\hypersetup{
citecolor=black,
colorlinks=false, %set true if you want colored links
linktoc=all, %set to all if you want both sections and subsections linked
linkcolor=black, %choose some color if you want links to stand out
}
\begin{document}
\glsaddall
\setglossarystyle{altlist}
\printglossary
\printglossary[type=\acronymtype]
------
\textbf{Develop}: The develop phase includes \gls{vp}\textsuperscript{\glsrefentry{vp}}, creating verification environment, testbench and test case development. \acrfull{ml}
\end{document}

How it is possible to convert LaTeX document to Word (docx file) with all cross-references and labels for images and equations, tables by Pandoc?

I have a tex-file obtained originally from RStudio with bookdown. The original set of Rmd-files were deleted by accident.
So I need to convert below minimized correct tex-file to Word (docx file extension):
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
]{article}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
\ifPDFTeX
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\#ifundefined{KOMAClassName}{% if non-KOMA class
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
\KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
pdftitle={Simple document},
hidelinks,
pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\usepackage[margin=1in]{geometry}
\usepackage{longtable,booktabs,array}
\usepackage{calc} % for calculating minipage widths
% Correct order of tables after \paragraph or \subparagraph
\usepackage{etoolbox}
\makeatletter
\patchcmd\longtable{\par}{\if#noskipsec\mbox{}\fi\par}{}{}
\makeatother
% Allow footnotes in longtable head/foot
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
\makesavenoteenv{longtable}
\usepackage{graphicx}
\makeatletter
\def\maxwidth{\ifdim\Gin#nat#width>\linewidth\linewidth\else\Gin#nat#width\fi}
\def\maxheight{\ifdim\Gin#nat#height>\textheight\textheight\else\Gin#nat#height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Set default figure placement to htbp
\makeatletter
\def\fps#figure{htbp}
\makeatother
\usepackage[normalem]{ulem}
% Avoid problems with \sout in headers with hyperref
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{5}
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
\fi
\usepackage[]{biblatex}
\addbibresource{bibliography.bib}
\title{Simple document}
\author{}
\date{\vspace{-2.5em}}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{corollary}{Corollary}[section]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{conjecture}{Conjecture}[section]
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\theoremstyle{definition}
\newtheorem{example}{Example}[section]
\theoremstyle{definition}
\newtheorem{exercise}{Exercise}[section]
\theoremstyle{remark}
\newtheorem*{remark}{Remark}
\newtheorem*{solution}{Solution}
\begin{document}
\maketitle
{
\setcounter{tocdepth}{2}
\tableofcontents
}
\hypertarget{format}{%
\section{Format}\label{format}}
Read \ref{format} for details.
Or read \protect\hyperlink{format}{format}.
Formatting:
\begin{itemize}
\tightlist
\item
sup-script or power - x\textsuperscript{2} ;
\item
sub-script - y\textsubscript{3} ;
\item
strike through - \sout{strike through} ;
\item
term -- definition ;
\item
long term --- long definition .
\end{itemize}
Here comes \textbf{footnote} \footnote{Footnote text} with its contents.
Image with caption, see \ref{fig:image}.
\begin{figure}
\centering
\includegraphics{image.png}
\caption{\label{fig:image} Image}
\end{figure}
Labeled table is below, see table \ref{tab:table}.
\begin{longtable}[]{#{}ll#{}}
\caption{\label{tab:table}\\
My table}\tabularnewline
\toprule
\textbf{Col 1 header} & \textbf{Col 2 header} \\
\midrule
\endfirsthead
\endhead
r1c1 & r1c2 \\
r2c1 & r2c2 \\
\bottomrule
\end{longtable}
Inline: \(a^2 + b^2 = c^2\).
Block:
\[ E = \frac{mc^2}{\sqrt{1-\frac{v^2}{c^2}}} \]
Labeled, see \eqref{eq:eq}:
\begin{equation}
f\left(k\right) =\binom{n}{k} p^k\left(1-p\right)^{n k}
\label{eq:eq}
\end{equation}
See LaTeX \autocite{latex} site for details.
Code is below, see \ref{exm:code}:
\begin{example}
\protect\hypertarget{exm:code}{}{\label{exm:code} }Hello world
\end{example}
\begin{verbatim}
int main(){
return 0;
}
\end{verbatim}
\hypertarget{references}{%
\section*{References}\label{references}}
\addcontentsline{toc}{section}{References}
\printbibliography
\end{document}
When I try to convert it to docx using pandoc (2.16.1 version) command below:
pandoc simple.tex --to docx+native_numbering --output simple.docx --table-of-contents --toc-depth 5 --number-sections --citeproc --verbose --csl ieee.csl
(In the above command ieee.csl was downloaded from Zotero).
I get
and I see many strange things:
[fig:image] along with Figure with number;
[tab:table] along with Table with number;
[eq:eq] instead of equation number;
[exm:code] instead of example number.
Is it possible to replace (or suppress them for Figure and Table) above strange […] fields by correct numbers and links using Pandoc to get correct docx output?
This is currently not supported by plain pandoc, but you can use filters to get the numbering back. E.g., the resolve-references.lua filter in the OpenJournals "Inara" project does something comparable. You may have to adjust and extend it to fully suit your requirements.

How to prefix a refence in LaTex?

so I have figures like this:
\begin{figure}[h]{}
\includegraphics[width=\textwidth]{./assets/demo/identify-usecases/DomainSplitt-1.jpg}
\caption{Identifying Domains: Match History with Filter}
\centering
\label{fig:domainsplitt-one}
\end{figure}
and I reference them like this: \ref{fig:domainsplitt-one}.
In the generated PFD, the images have the caption like this Figure 4.13: Identifying Domains: Match History with Filter. But the reference in the text only has the number 4.13.
I have something similar for code:
\begin{code}
\captionof{listing}{Custom Element listening to global custom events}
\label{code:listening-custom-event}
\begin{minted}{JavaScript}
Here, the code has the prefix Source Code but in the reference is only the number. The rule I use for this is
\usepackage[newfloat]{minted}
\usepackage{caption}
\newenvironment{code}{\captionsetup{type=listing}}{}
\SetupFloatingEnvironment{listing}{name=Source Code}
So what I need is, that the reference also have this prefix in the text. Since I'm really new to latex may question is: How do I do this?
edit: here is a link with a replica:
https://github.com/adrian-goe/latex-replica
The cleveref package will do all the work for you:
% !TeX program = txs:///arara
% arara: pdflatex: {synctex: on, interaction: nonstopmode, shell: yes}
% Preamble
%\documentclass[11pt]{article}
% Packages
\documentclass[12pt,DIV12,BCOR0mm,twoside,openright,headings=normal, numbers=noenddot,headsepline,headinclude]{scrreprt}
\usepackage[automark,headsepline]{scrlayer-scrpage}
\usepackage{scrhack} % to avoid KOMA-Script warning
\usepackage[utf8]{inputenc} % UTF8 encoding
\usepackage[T1]{fontenc}
\usepackage{txfonts} % Postscript fonts
\usepackage[ngerman,english]{babel}
\usepackage[style=numeric-comp,giveninits=true,maxnames=10,sorting=none]{biblatex}
\usepackage{graphicx}
\usepackage[usenames]{xcolor}
\usepackage[pdftex]{hyperref}
\usepackage{wallpaper}
\usepackage[newfloat]{minted}
\usepackage{caption}
\newenvironment{code}{\captionsetup{type=listing}}{}
\SetupFloatingEnvironment{listing}{name=Code}
\usemintedstyle{manni}
\usepackage[noabbrev]{cleveref}
\crefname{listing}{code}{code}
\Crefname{listing}{Code}{Code}
% Document
\begin{document}
this is my sample text and i want to reference \cref{code:update-a-attribute} and the \cref{fig:image}
\begin{figure}[h]{}
\includegraphics[width=\textwidth]{./img.png}
\caption{some image}
\centering
\label{fig:image}
\end{figure}
\begin{code}
\captionof{listing}{Update a Attribute}
\label{code:update-a-attribute}
\begin{minted}{JavaScript}
const fragment = document.querySelector(".fragment");
fragment.setAttribute("data", 2)
\end{minted}
\end{code}
\end{document}
(please note that you can only have one single documentclass)

! LaTeX Error: Something's wrong--perhaps a missing \item

\documentclass[11pt,a4paper]{report}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphics}
\usepackage {epsfig}
\usepackage{fancyhdr}
\linespread{1.4}
\setlength{\topmargin}{-0.4in}
\setlength{\topskip}{0.3in} % between header and text
\setlength{\textheight}{9.5in} % height of main text
\setlength{\textwidth}{6in} % width of text
%\setlength{\leftmargin}{-0.6in}
%\setlength{\oddsidemargin}{0.75in} % odd page left margin
%\setlength{\evensidemargin}{0.75in} % even page left margin
\addtolength{\evensidemargin}{-0.4in}
\addtolength{\oddsidemargin}{-0.4in}
\addtolength{\textwidth}{0.4in}
\begin{document}
\renewcommand\bibname{References}
\begin{titlepage}
\input{TitlePage}
\end{titlepage}
\pagenumbering{gobble}
\newpage
\pagenumbering{roman}
%\tableofcontents
\chapter*{
\begin{center}
{Abstract}
\end{center}
}
\begin{quotation}
\paragraph{}
Bank are providing mobile application to their customer. We are developing
banking application using Location Based Encryption. As compare to current
banking application which are location independent,
\\
\textbf{Keywords:}
Enter Keyword here.......
\end{quotation}
\newpage
\pagenumbering{arabic}
\pagestyle{fancy}
\fancyhead{} % clear all fields
\fancyhead[RO,LE]{}
\renewcommand\headrule{}
\rhead{PROJECT NAME}
\renewcommand{\footrulewidth}{0.4pt}
\fancyfoot[RE,LO]{P.E.O COLLEGE}
\input{intro}
%\input{Literature_Survey}
\input{table}
%\input{problmstmt}
\input{scope}
%\input{future}
\input{conclusion}
\input{ref}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I have this latex code. But when I try to compile it it gives me an error saying :
! LaTeX Error: Something's wrong--perhaps a missing \item.See the
LaTeX manual or LaTeX Companion for explanation.Type H for
immediate help....
This error is on line:
\end{quotation}
Why am I getting this error? I haven't added any \item on the line where I'm getting the error.
The \paragraph and \\ instructions in the quotation do not make much sense. I guess that you meant something like this:
\begin{quotation}
\noindent
Banks are providing mobile applications to their customer. We are developing a
banking application using \emph{Location Based Encryption}. Compared to current
banking applications, which are location independent, \ldots
\paragraph{Keywords:} bank, application, encryption, location, mobile.
\end{quotation}

Resources