Copied project on overleaf does not display font awsome icons anymore - latex

I copied an existing project on overleaf but it doesn't display the icons, instead shows the code, for example, the main project is:
but the copied project is for LinkedIn icon:
here is a minimal reproducible example:
\documentclass[10pt,letterpaper,roman]{moderncv}
\usepackage{array}
\usepackage{url}
\usepackage{moderncvcompatibility}
\usepackage{tikz}
\usepackage[super]{nth}
\usepackage{ulem}
\usepackage{fontawesome5}
\usepackage{enumitem}
\usepackage{filecontents}
\usepackage[scale=0.89, top=0.3in, bottom=0.35in]{geometry}
\moderncvstyle{banking}
\moderncvcolor{blue}
\firstname{Shirin}
\familyname{JZ}
\email{...}
\mobile{...}
\extrainfo{\link[\faLinkedin \addvspace{1}]{...}}
\begin{document}
\makecvtitle
\end{document}

Two problems:
you can't use \addvspace{1} where you are using it. You'll get an error message because of this. Never ignore error messages...
\documentclass[10pt,letterpaper,roman]{moderncv}
\usepackage{array}
\usepackage{url}
\usepackage{moderncvcompatibility}
\usepackage{tikz}
\usepackage[super]{nth}
\usepackage{ulem}
\usepackage{fontawesome5}
\usepackage{enumitem}
\usepackage{filecontents}
\usepackage[scale=0.89, top=0.3in, bottom=0.35in]{geometry}
\moderncvstyle{banking}
\moderncvcolor{blue}
\firstname{Shirin}
\familyname{JZ}
\email{...}
\mobile{...}
\extrainfo{
\link[
\faLinkedin %\addvspace{1}
]{...}}
\begin{document}
\makecvtitle
\end{document}
the problem with the missing icon seems to be specific to the TL2021 version overleaf is using. It works fine with an updated TL2021 (as well as the TL2022 pretest) version. To avoid the problem, you can select TL2020 from the overleaf side bar:
https://www.overleaf.com/read/gdqshmnxcnvp

Related

No control sequence/no counter subfigure#save defined

I am new to overleaf. I am getting first 'No control sequence' on \subfloat. Then I included \usepackage{subfig} which is causing this new error 'no counter subfigure#save defined' on the same line. Along with that after including this package I am also getting 'Undefined control sequence' on \begin{document}. Any idea how can I tackle this? I want to insert multiple figures and I read that \subfigures is outdated and I should include subfloat instead. I would really really appreciate any possible help. Thank you
screenshoot of error
These are the packages that are included :
\documentclass[a4paper, 12pt, oneside]{Thesis} % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn
\usepackage{subfig}
\usepackage{graphicx}
%\usepackage[dvipsnames]{xcolor}
\graphicspath{ {images/} }
\usepackage{amsmath}
% Include any extra LaTeX packages required
\usepackage[square, numbers, comma, sort&compress]{natbib} % Use the "Natbib" style for the references in the Bibliography
\usepackage{verbatim} % Needed for the "comment" environment to make LaTeX comments
\usepackage{vector} % Allows "\bvec{}" and "\buvec{}" for "blackboard" style bold vectors in maths
\hypersetup{urlcolor=red, colorlinks=false} % Colours hyperlinks in blue, but this can be distracting if there are many links.
\usepackage{longtable}
\usepackage[table]{xcolor}
\usepackage[textsize=tiny]{todonotes}
\newcommand{\dara}{\textsf{da\textbar ra}}
\usepackage{csquotes}
\usepackage{ctable}
\usepackage{titlesec}
\usepackage[most]{tcolorbox}
\usepackage{tikz-er2}
\usepackage{url}
\usepackage{paralist}
\usepackage{pifont}
\usepackage{adjustbox}
\usepackage[T1]{fontenc}
\usepackage[scaled=0.85]{beramono}
\usepackage{listings}
\usepackage{tikz}
\usepackage{3dplot}
\usepackage{framed}
\usepackage{tabularx}
\usepackage{hyperref}
\usepackage{todonotes}
\usepackage{comment}
\usepackage{pifont}
\usepackage{amssymb}
\setcounter{tocdepth}{3}
\usepackage{multirow}
\usepackage{algorithm}% http://ctan.org/pkg/algorithms
\usepackage{algorithmic}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\usepackage{eurosym} %<-- For EURO symbol
\usepackage{filecontents}
\usepackage{minted}
\usemintedstyle{monokai}
\usepackage{array}
% \usepackage{forest}
\usepackage[table]{xcolor}

Overleaf/Latex. How do I add APA 6th edition citation style?

[EDIT]
I am having issues changing the citation style to my document. I am currently working with this preamble. There are a lot of packages, but I need them to organise the entire file. The current code works ok, but the citation style is not correct. I need to change it to apa 6th edition.
Preamble:
\documentclass[11pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{helvet}
\usepackage{xspace}
\usepackage{subcaption}
\usepackage{placeins}
\usepackage{wrapfig}
\usepackage{multirow}
\usepackage[table,xcdraw]{xcolor}
\usepackage{adjustbox}
\usepackage{booktabs,caption}
\usepackage[flushleft]{threeparttable}
\usepackage{ragged2e}
\usepackage{floatrow}
\usepackage{graphicx,wrapfig,lipsum}
\graphicspath{{../figs/}}
\usepackage{pdfcomment}
\usepackage{geometry}
\newgeometry{left=2.5cm,right=2.5cm,bottom=2.5cm}
\usepackage[english]{babel}
\usepackage{CJKutf8}
\pagestyle{headings}
\usepackage{blindtext}
\usepackage{csquotes}
\setcounter{secnumdepth}{4}
\usepackage{titlesec}
\usepackage[T1]{fontenc}
\usepackage{imakeidx}
\makeindex[columns=3, title=Alphabetical Index]
\usepackage{array}
\usepackage{tikzpagenodes}
\usepackage[format=plain, labelfont={bf,it}, textfont=it]{caption}
\usepackage{fancyhdr}
\usepackage[toc,nopostdot, nonumberlist,style=long,automake,acronym]{glossaries}
\usepackage{subfiles}
\usepackage{nicematrix}
\usepackage{amsmath,mathabx}
\usepackage{hyperref}
\usepackage{lscape}
\newcommand{\sectionbreak}{\phantomsection}
\hypersetup{
colorlinks=true,
linkcolor=black,
filecolor=black,
urlcolor=black,
citecolor=olive,
pdftitle={PhD Dissertation},
pdfpagemode=FullScreen,
}
\urlstyle{same}
%\bibliographystyle{abbrvnat}
%\usepackage[authoryear]{natbib}%/bibliography apa
%\setcitestyle{authoryear,open={(},close={)}} %Citation-related commands
The bibliography file called bib.bib
Example:
#article{henriquez_alternative_2017,
title = {An alternative objective microscopic method for the identification of linear enamel hypoplasia ({LEH}) in the absence of visible perikymata},
volume = {14},
doi = {10.1016/j.jasrep.2017.05.040},
journal = {Journal of Archaeological Science: Reports},
author = {Henriquez, Alejandra Cares and Oxenham, Marc F.},
year = {2017},
pages = {76--84},
file = {Full Text:C\:\\Users\\xello\\Zotero\\storage\\MV7QMSWQ\\Henriquez and Oxenham - 2017 - An alternative objective microscopic method for th.pdf:application/pdf},
}
Example of text citing something
\begin{document}
\begin{CJK*}{UTF8}{min}
\citep{henriquez_alternative_2017}, \citet{henriquez_alternative_2017}.
\end{CJK*}
\end{document}
I need to change the citation style to apa6: https://www.ctan.org/pkg/apa6. When Io tried to add this package. It entered into conflict with other packages like titlesec and amsmath, mathabx.
I get errors like
...ex/titlesec/titlesec.sty, 1642. Argument of \subparagraph has an
extra }. or Runaway argument?
or
eric/mathabx/mathabx.sty, 67. Latex Error: Too many symbol fonts
declared.
respectively.
I am not sure how to add this citation style to my current project. Maybe there is an alternative way? I need the packages I am using (like titlesec) to order my document.
Any help will be welcomed.
Thank you,
[EDIT] Solved it. I used Biblatex (https://ctan.org/pkg/biblatex-apa6?lang=en) which also has an apa6 option. Solved additional errors. Works well.

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}

Why Figure is not displayed in the latex file and text is shown instead of it

I am newbie in latex and trying to add figure into the latex file as follows:
\documentclass{bmcart}
%%% Load packages
\usepackage{amsthm,amsmath}
\usepackage[utf8]{inputenc} %unicode support
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{graphicx}
\def\includegraphic{}
\def\includegraphics{}
\startlocaldefs
\endlocaldefs
\begin{document}
\begin{figure}[h!]
\includegraphics{figures/GBMfigure3.jpg}
\caption{show the results of the different settings for the parameters of the penalty model for solving the problem \ref{q11}.}
\end{figure}
\end{document}
But, the figure is not displayed and the text itself is displayed instead of the figure, for example the resulted file is as below:
So, what's the solution of that issue please.
With \def\includegraphics{} you redefine the command to do nothing. If you want it to include your image, don't do such a redefinition.
\documentclass{bmcart}
%%% Load packages
\usepackage{amsthm,amsmath}
\usepackage[utf8]{inputenc} %unicode support
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{graphicx}
%\def\includegraphic{}
%\def\includegraphics{}
\startlocaldefs
\endlocaldefs
\begin{document}
\begin{figure}[h!]
\includegraphics{example-image-duck}
\caption{show the results of the different settings for the parameters of the penalty model for solving the problem \ref{q11}.}
\end{figure}
\end{document}

Getting error in latex while creating report

I am writing a report in latex but getting the following error. Following is my code......
\documentclass[a4paper,10pt]{report}
\usepackage{enumerate}
\usepackage{devanagari}
\usepackage{fancyhdr}
\usepackage{fancybox}
\usepackage{tipa}
\usepackage{enumerate}
\usepackage{fancyhdr}
\usepackage{fancybox}
\usepackage{tipa}
\usepackage{framed}
\usepackage[retainorgcmds]{IEEEtrantools}
\usepackage[utf8x]{inputenc}
\usepackage{graphicx}
\usepackage{graphics}
\usepackage{subscript}
\usepackage{epsfig}
\usepackage{anysize}
\usepackage{gensymb}
\usepackage{amssymb}
\usepackage[utf8x]{inputenc}
\usepackage{longtable}
\usepackage{url}
\usepackage{plain}
\usepackage{listings}
\usepackage[plainpages=false]{hyperref}
\lhead{}
% Title Page
\title{}
\author{}
\begin{document}
\maketitle
\begin{abstract}
\end{abstract}
\end{document}
But I am getting the following error
If anyone know the answer, please tell me.
The problem is caused by the interaction of the devanagari and hyperref packages. Leave one of them out and it works.
You need to update devangari to at least version 2.15. That should fix it.
BTW, you've included several packages two times in the code above. And you're using both graphics and graphicx; you should choose one. Probably graphicx, since you also want to use epsfig.
In general, questions like these are better suited for tex.stackexchange.com.

Resources