Includegraphics maximum width

With includegraphics I can give the width of the resulting image (which would be scaled).

How can I give a maximum width of the image? That is, if the original is smaller than X, I’d like to keep the smaller image, if the image is larger than X, then the image width should be X.

Using pdflatex/graphicx.

Vim : key map hard to remove – plugin LaTeX/spf13

I use Vim (and gVim) with the spf13' bundle, plus I added vim-latexsuite (running on an Archlinux conf). Only when I work on a .tex file, the ‘é’ (french e-acute key) is inaccessible, mapped to “Tex_InsertItemOnThisLine”.

Removing the vim-latexsuite plugin didn’t remove the hotkey, plus it didn’t remove the Tex_InsertItemOnThisLine function. (Furthermore, I couldn’t find the plugin in the spf13 adapted arborescence). Same thing with another vim-latex-box plugin, (I try it these days).

Anyway, I try to unmap it the regular way (with or without the plugin):

:map → no 'é' mapping
:map! → i é @<Plug>Tex_InsertItemOnThisLine (so, found in Insert mode)

So I do:

:unmap! é → E31: No such mapping (baffled...)

It is where I am stuck. Any idea ?

document class ws-ijqi

I need your comments on how to fix the following warning:I used the package provided by ws-ijqi.

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
 restricted write18 enabled.
entering extended mode
(./ws-ijqi.tex
LaTeX2e <2011/06/27>
Babel <3.9f> and hyphenation patterns for 78 languages loaded.
(./ws-ijqi.cls
Document Class: ws-ijqi 1994/07/13 v1.2u Standard LaTeX document class

Warning: psfig.sty could be be found.

epsfsafe.tex inputed...ok
(./epsfsafe.tex)

epsfig.sty inputed...ok
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/epsfig.sty

LaTeX Warning: You have requested document class `ws-ijqi',
               but the document class provides `epsfig'.

How to get information about remaining free space?

following scenario: I want to automatically generate a newsletter with some small articles, which is working fine. (I am generating LaTeX-code with data from a small database). But now I want to include some images to fill the space left (I want to have entirely filled pages), but I don’t want to get more pages than needed for the articles.

So: is there a way to check with LaTeX, if there is space left on the last page and how much?

I hope you can understand what I mean.

Custumize TOC only for the appendix part

I am currently writing in article class and I would like to do something really specific in my toc. Currently it looks like this: enter image description here

I got the phrase “Appendices” in there by using

    phantomsectionaddcontentsline{toc}{section}{Appendices}appendix

This is almoast what I was going for but not quite. Since “Appendices” is not really a section of its own, I would like to remove the page number that it gets. Also I would like the white space between the last (real) section and the word “Appendices” to be slightly yet noticeably larger than it is between the other entries.

It is probably clear to you that I’m trying to implement something to my toc that makes a clear visual distiction between the main part and the rest of the document. If someone knows a better/easier way to do this, than by the means I’m trying; please do let me know.

Here’s a MWE:

    documentclass[12pt,a4paper]{article}
    usepackage[dutch]{babel}
    usepackage{amsfonts,amsmath,amstext,amsthm,amssymb,graphicx,mathtools,scrextend,xcolor}
    usepackage{babelbib}
    usepackage[hidelinks]{hyperref}
    begin{document}
    tableofcontents
    section{Centrale...}
    subsection{De stelling...}
    section{De Brauer}
    section{Quasi-...}

    newpagephantomsectionaddcontentsline{toc}{section}{protectrule{0pt}{5ex}Appendices color{white}}appendix
    section{Nulpunten...}
    section{Formele...}
    end{document}

Edit: The answer provided by Steven B. Segletes works almost perfectly, except that it doesn’t seem to work in combination whith the hyperref package. Excluding the hyperref package is not an option, so I’m adding compatibility with hyperref to my question.

How to use `thanks` with mutiple beamer presentations

I have previously created some beamer presentations. Now, due to my thesis presentation, I need to create one complete presentation (one big presentation that successively contains all smaller presentations). So, I am using input{<filename>.tex}. Right now, I am with two presentations only.

Now, the problem is with the titlepage of the second presentation – it contains footnotes (thanks) from the first presentation. Please refer to the image.

MWE

c1.tex

documentclass{beamer}

begin{document}
input{c2}
input{c3}
end{document}

c2.tex

author{athanks{a}, bthanks{b}}

section{start}
maketitle

begin{frame}
Frame 1/1
end{frame}
begin{frame}
Frame 2/1
end{frame}

c3.tex

author{cthanks{c}, dthanks{d}}

section{start-2}
maketitle

begin{frame}
Frame 1/2
end{frame}
begin{frame}
Frame 2/2
end{frame}

How to resolve it?

How to draw a left right harpoon up?

I’m familiar with leftharpoonup and rightharpoonup. These complement leftarrow and rightarrow. There is also leftrightarrow, but strangely, no leftrightharpoonup.

I implemented a very ugly hack that works well, but I’m interested in better approaches. Criticisms of my current approach: 1) seems “improper” due to hacks 2) the symbol appears too thick in the middle. In the picture, you can see, ever so slightly, that it is too thick is clearly a pasting of two symbols.

harpoons

Code:

documentclass{article}
usepackage{mathtools}
pagestyle{empty}
% Usage:  phantomword[c]{hiddenmath}{shownmath}
%
% The hidden text defines the box size.
% The shown text is placed inside the box.
% The optional argument is the alignment: l,c,r
MHInternalSyntaxOn
% Using mathpalette requires more shuffling of arguments
providecommand*phantomword[3][c]{%
  mathchoice
  {MT_phantom_word:NNnn #1displaystyle {#2}{#3}}%
  {MT_phantom_word:NNnn #1textstyle {#2}{#3}}%
  {MT_phantom_word:NNnn #1scriptstyle {#2}{#3}}%
  {MT_phantom_word:NNnn #1scriptscriptstyle {#2}{#3}}%
}
defMT_phantom_word:NNnn #1#2#3#4{%
  @begin@tempboxahbox{$m@th#2#4$}%
% can't use settowidth as that also uses @tempboxa...
    setlength@tempdima{widthof{$m@th#2#3$}}%
    hbox{hb@xt@@tempdima{csname bm@#1endcsname}}%
  @end@tempboxa}
MHInternalSyntaxOff

newcommand{leftrightharpoonup}{%
    mathrlap{leftharpoonup}%
    phantomword[l]{,leftharpoonup}{,rightharpoonup}%
}

begin{document}
$$
begin{matrix}
    leftharpoonup & leftrightharpoonup & rightharpoonup \
    leftarrow  & leftrightarrow & rightarrow
end{matrix}
$$
end{document}

Labels not referencing correct number figure

I have a report where it’s required to have sections from another report both in the main body as well as in an appendix, and I’m including them by using the input{some_section} command.

I’m referring to figures in text by using:

Figure~ref{fig:something}

Which works fine, but I’m getting warnings because the labels are multiply defined, since they occur in two parts of the report.

Is it possible for me to still reference the same image (essentially) without hard-labeling (i.e. typing Figure 1 in stead of Figure~ref{fig:something}) ?

How to calculate unique number of events, one event per user in Google Analytics?

We have an event which fires every time user initiates a download. How is it possible to calculate number of downloads occurred let’s say this month & calculate only 1 download per 1 user?

If to use #of events occurred: user can download multiple times, so it doesn’t show what I want.

If to use #of unique events occurred: same user can download multiple times over different sessions and Google Analytics will count more than 1 download for the same user. So it doesn’t work as well for me.