Compiling LaTeX via an on-line server - latex

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!

Related

LaTeX: Cite, but don't reference

I'm producing a set of documents in LaTeX, and I would like to provide a single, global bibliography page for the whole set. This is because each document is page-limited: I don't want to take up space with references at the bottom of each one.
This means in each case, I would like to cite in the text, but not produce a reference at the end. I am using bibtex/natbib to handle the referencing.
Simplest example:
\documentclass[]{article}
\bibliographystyle{/usr/share/texmf/bibtex/bst/natbib/plainnat.bst}
\usepackage{natbib}
\begin{document}
In \citet*{MEF2010} I described the method.
\bibliography{bibliography.bib}
\end{document}
How can I do this? Essentially I just want it to cite correctly:
In Bloggs, Blagg and Blog (2010) I described the method.
But not add a references section at the end. Any ideas?
Thanks,
David
Instead of using \bibliography{bibliography.bib} you can try \nobibliography{bibliography.bib}.
You still need to enter the path so it can make the cross-references.
It happens due to missing packages. If you want to resolve the problem then enable the automatic installation packet. After that,First, you run the BibTeX file and generate the Pdf file (instead of pdfLatex file) and then pdfLatex to Pdf

Change "List of Listings" text

I tried to change the "List of Listings" text with the command
\renewcommand*{\lstlistlistingname}{List of XYZ}
before my \begin{document}. What's wrong with this?
By the way
\renewcommand*{\lstlistingname}{NewListing}
worked like a charm.
Edit: No error occurred, just no change in the text. It's still "List of Listings".
By the way this is how I included it:
\pagestyle{scrheadings}
\pagenumbering{Roman}
\pdfbookmark[0]{\contentsname}{Contents}
\tableofcontents
\listoftables
\listoffigures
\listoflistings
\pagestyle{scrheadings}
\pagenumbering{arabic}
I've seen that on the "List of Listings" page the numbering starts with "1" but it should be a "V". Some hints?
Thank you
Use \lstlistoflistings
\listoflistings is from the listing package. \lstlistoflistings is from listings package (Notice the plural). You should not use both at the same time.
If you are using the listing package, use
\renewcommand*{\listlistingname}{List of XYZ}
to change the heading.
EDIT: From the fact that \lstlistingname works I conclude that you use the listings package. I suggest to remove the line \usepackage{listing} from your tex file. If you use both packages: Just use the right commands. Listings from both package appear in both put the entries into the same lol file.
Just tried to change it myself. There is a separate command that provides the name. E.g.:
\renewcommand{\lstlistlistingname}{My listungs}
so both \lstlistingname and \lstlistlistingname need to be changed.
For answering your page numbering question:
Insert a \cleardoublepage just before \pagenumbering{arabic}. That should fix the roman numbering on your List of listings.
Non of above answers worked for me. The commands that solved my issue were:
\renewcommand{\listingscaption}{Code}
\renewcommand{\listoflistingscaption}{List of source code examples}
Note: the commands above are for the Listing package, not for the Listings package!

linebreak in url with Bibtex and hyperref package

Why is this item not shown properly in my bibliography?
#misc{ann,
abstract = {ANN is an implbmentation of nearest neighbor search.},
author = {David M. Mount and Sunil Arya},
howpublished = {\url{http://www.cs.umd.edu/~mount/ANN/}},
keywords = {knn},
posted-at = {2010-04-08 00:05:04},
priority = {2},
title = {ANN.},
url = "http://www.cs.umd.edu/~mount/ANN/",
year = {2008}
}
#misc{Nilsson96introductionto,
author = {Nilsson, Nils J.},
citeulike-article-id = {6995464},
howpublished = {\url{http://robotics.stanford.edu/people/nilsson/mlbook.html}},
keywords = {*file-import-10-04-11},
posted-at = {2010-04-11 06:52:28},
priority = {2},
title = {Introduction to Machine Learning: An Early Draft of a Proposed Textbook.},
year = {1996}
}
EDIT:
I am using
\usepackage{hyperref}
not
\usepackage{url}
. It produces error when using url package together with it. So can the two not work together?
I would like to use hyper links inside pdf file, so I want to use hyperref package instead of url package. I googled a bit, and try
\usepackage[hyperindex,breaklinks]{hyperref}
but there is still no line break just as before. How can I do it?
EDIT:
When using url and hyperref together,
if it is just
\usepackage{hyperref}
\usepackage{url}
the compilation by latex is fine, but the link is still hyperlink and has still no linebreak. If I do not use hyperref package, the link has linebreak, but I lose hyper links. Since \url can be used in both hyperref and url packages, how can I specify which package's \url is being used?
If it is
\usepackage{hyperref}
\usepackage[hyphens]{url}
the compilation by latex command will report clash with url:
! LaTex Error: Option clash for package url.
So I wonder how I should do?
You should use them in this order:
\usepackage[hyphens]{url}
\usepackage{hyperref}
You get this error when you use them the other way around.
! LaTex Error: Option clash for package url.
since the hyperref package loads the url package somewhere internally without that hypens option, and then you want to load it with the option, so it clashes.
Turning the order around does what you want and does not give this error (since the package is already loaded hyperref won't load it again with different options)
edit: this was with pdftex, I did not test with other tools.
edit2:
or as mentioned by PatrickT in a comment: \PassOptionsToPackage{hyphens}{url} if you're using a class that already loads the package, e.g. beamer.
I just ran across almost the same problem and found it solved by putting
\PassOptionsToPackage{hyphens}{url}
before the
\usepackage[...]{hyperref}
If you mean the too-wide spacing, that's because the URLs seems to not allow line-breaks. Why this happens is another question, and the answer depends on your preamble (the packages you use etc.). In principle, if properly used, the url package should allow line breaks.
EDIT
This problem (and its solution) is described here (sending you to a Google cache since the site is offline at the moment). Bottom line: either use the breakurl package, or PDFLaTeX, or both.
Weird, I load the url package (with no option) and hyphenation is done at the slashes / if needed.
Anyway, simple workaround:
howpublished = {\url{http://www.cs.umd.edu/}\url{~mount/ANN/}},
Manual job, but it splits up the URL yes or yes.
for me only this worked:
\usepackage[hyphens]{url}
\usepackage{hyperref}
...
\usepackage{biblatex}
\setcounter{biburlnumpenalty}{100}
\setcounter{biburlucpenalty}{100}
\setcounter{biburllcpenalty}{100}
Taken from: https://tex.stackexchange.com/questions/22854/url-line-breaks-with-biblatex
Normally URLs are hyphenated, but in your bibliography they seem not to be. When the URLs don't fit on one line, they are moved to the next line, and the text before them is stretched to fill out the preceding lines. Since there is only one place to break the line, it's not very likely that the preceding text will fit nicely into a whole number of lines, and so you get all the extra space.
EDIT: When you changed your bib entry, you happened to change it in such a way that the text did fit nicely. This is just a coincidence, you didn't fix your problem.
I suspect that putting
\usepackage{url}
in your preamble will solve it.
If url package doesn't help, try:
\usepackage{xurl}
\usepackage{hyperref}
Package xurl is an expanded version of url, which allows line breaking at every point in the url. Call xurl before hyperref.
Source: Does the hyperref breaklinks option have any effect?
I add this package:
\usepackage[hyphens]{url}
and in the bibtex I used:
howpublished = {**\url{**http://www.......**}**}
and it works out.
This simple solution worked for me:
\usepackage{hyperref}
\usepackage{breakurl}
The URLs are now perfect.
At the preamble, just put \usepackage{breaker} somewhere after \usepackage{hyper ref}. The \burl command is defined and, by default, the package also turns the \url command into a synonym of \burl.

How can I centre the title of the table of contents in LaTeX?

I'm trying to centre the title of the table of contents in LaTeX with the following command
\usepackage{tocloft}
\renewcommand{\contentsname}{\centering Table of Contents}
As I'm asking I'm sure you've all realised that this didn't work, any suggestions on what I can try?
Edit: I got it working with
\renewcommand{\cfttoctitlefont}{\hfill\Huge}
This works (without the usepackage):
\renewcommand{\contentsname}{\centering Contents}
Make sure it's in the preamble, perhaps, and try killing the .aux file.
This works in \documentclass{book}, without needing the usepackage:
\renewcommand*\contentsname{\hfill Contents \hfill}
\tableofcontents
It should even work if the \renewcommand is immediately before the \tableofcontents command.
Renewing contentsname may fail because of how \begin{document} rewrites components from babel, such that the commands must be added to \captionsenglish. This post goes into more detail.
\usepackage{tocloft}
\addto\captionsenglish{\renewcommand{\contentsname}{Table of Contents}}
\renewcommand{\cfttoctitlefont}{\hfill\normalsize}
\renewcommand{\cftaftertoctitle}{\hfill}

LaTeX help with href

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.

Resources