Is it possibile in latex to import a package like IEEEtran which I don't have installed but I have inside a directory named IEEETran_dir?
For instance I would like to do something like
\usepackage{./IEEEtran_dir/IEEEtran}
\documentclass[10pt, conference, letterpaper]{IEEEtran}
\begin{document}
\end{document}
Basically like it was suggested in the comment the proper way to do so was to import the relative path of the package directly in the \documentclass statement.
\documentclass[10pt, conference, letterpaper]{./IEEEtran_dir/IEEEtran}
\begin{document}
\end{document}
Of course it's just a workaround for those cases where you cannot install it, but the correct way should be to install the package.
Related
I'm trying to generate png pictures of charts using knitr and latex standalone package. The following minimal code compiles but the output is pdf:
\documentclass[convert=true]{standalone}
\begin{document}
<<test-plot, echo=FALSE>>=
plot(rnorm(10))
#
\end{document}
Now if I want to pass some options to standalone I must use curly brackets after convert=, but simply putting something like convert={true} will produce an error:
! Argument of \#fileswith#pti#ns has an extra }.
...
Something like convert={true, ghostscript, gsexe=gswin64c, density=1200} works fine with tikz charts.
Am I overlooking something or maybe a knitr shortcoming? Any ideas on how to go around?
How to declare a different directory than the working folder with the natbib package using Tex Studio (Windows)? There is a directory for all my bibliographies (BiblioX.bib), and I use multiple per document. The bibliography path is : C:\Users\User\Dropbox\PDF\Bib ,and the working folder is : C:\Users\User\Dropbox\R&D\Project\Article\Work_Article .
The following code works:
\documentclass[12pt, a4paper]{article}
%Bibliography
\usepackage{natbib}
\bibliographystyle{newapa}
\begin{document}
\bibliography{../../../../../PDF/Bib/Biblio1,../../../../../PDF/Bib/Biblio2}
\end{document}
The goal would be to be able to use instead:
\bibliography{Biblio1,Biblio2}
Therefore declare a directory that Natbib would recognize : C:\Users\User\Dropbox\PDF\Bib
I thought about using a variable (or a new command):
\def \BibPath {C:/Users/User/Dropbox/PDF/Bib}
\bibliography{\BibPath/Biblio1,\BibPath/Biblio2}
But it does not work with the Natbib drop menu allowing to select the reference when writing \cite{ in Tex Studio. Is there a way to change the default of where Natbib/Tex Studio looks for bibliography?
Thanks!
We used Docutils to produce reST document, and then make a TeX file via rst2latex.
In the rst file, we have added a lot of LaTeX code like:
.. raw:: latex
~\\
\rule{\textwidth}{1pt}
~\\
But I do not know where to add packages like \usepackage{tabulary}.
If I add it in the rst file like I've shown above, even in the very beginning, this \usepackage line is automatically added after \begin{document} in the tex output file. This obviously generates an error.
Any idea where can I add \usepackage commands in reST?
You can use the LaTeX preamble (after Docutils 0.7) by
rst2latex foo.rst foo.tex --latex-preamble="\usepackage{tabulary}"
which will generate the following in foo.html
%%% Custom LaTeX preamble
\usepackage{tabulary}
Alternatively, a custom stylesheet can be provided by
rst2latex foo.rst foo.tex --stylesheet=preamble.tex
which will generate
%%% User specified packages and stylesheets
\input{preamble.tex}
in the right place.
I have a LaTeX text document that compiles fine with the current version of pdflatex on my home computer. I've made minor edits to the body of the document. I'm trying to recompile it, using either http://sciencesoft.at/latex/?lang=en or the first google result for the words "latex to pdf online." (I can't post the hyperlink due to spam prevention.) The former site is running pdfTeXt; the latter, MikTeX. I've pasted my headers below. Does anyone know how I might change them to make either one work?
Thanks,
-- Mark
\documentclass{article}
\usepackage{setspace}
\pdfpageheight 11in
\pdfpagewidth 8.5in
\doublespacing
\usepackage[top=1in,bottom=1in,left=1in,right=1in]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\headheight{15pt}
\fancyhead[R]{My name}
\fancyfoot[C]{\thepage}
\begin{document}
\section*{Finite Simple Groups}
...text...
\end{document}
Looking at the output, I saw the problem was with the \headheight command. Googling for that suggests you should change it to \setlength\headheight{15pt}. This makes it work with the sciencesoft tool!
I am trying to create a hyperlink using LaTeX. When I use the command pdflatex to compile the file, I get an error.
The relevant lines of the document are:
\documentclass[12pt]{article}
\usepackage{hyperref}
\begin{document}
...
\href{http://www.cs.utah.edu/dept/old/texinfo/as/gprof_toc.html}{gprof}
pdflatex created a file called missfont.log, which contains this:
mktextfm pzdr
What am I doing wrong?
Do you have the pzdr font installed? If you're on Debian or Ubuntu, try installing the texlive-fonts-recommended package.
Does the hyperref package purport to make hyperlinks to arbitrary web pages? I thought it was just for intra-document links (which it does automatically). I would do
\usepackage{url}
and
\url{http://foo.com}
to format a URL in your document.
ADDED: Thanks Will, I didn't know that about href. But if you're creating a document that's mainly targeting paper as the intended medium, I think the url package for formatting URLs is the way to go. But if you think the href package subsumes the url package, I'd love to be set straight on that.