Emacs: improved letter LaTeX template.

Shell: PDF reqize to A4 function.
master
Ambrevar 2012-12-09 13:36:43 +01:00
parent b36dc99f1b
commit 851872fa26
3 changed files with 25 additions and 15 deletions

View File

@ -140,6 +140,7 @@
)
)
;; TODO: for TeX/LaTeX only.
;; Replace tex-view
(define-key my-keys-minor-mode-map (kbd "C-c C-v") 'tex-pdf-view)
;; Save automatically before compiling.

View File

@ -108,7 +108,7 @@
\def\civility{%
\en{\male{M.}\female{Mrs.}}%
\fr{\male{Monsieur}\female{Madame}}%
\fr{\male{Monsieur}\female{Madame}\org{Madame, Monsieur}}%
}
%% Greetings toggle.
@ -204,7 +204,7 @@
\en{\hfill}
\begin{minipage}{\mpwidth}
\edef\fullname{\firstname{} \familyname{}}
\pinex{\fullname}{{\bfseries \fullname}
\pinex{\fullname}{\textbf{\fullname}}
\vspace{0.5em}\\\\
}
\small\itshape%
@ -226,12 +226,8 @@
\fr{\hfill}%
\begin{minipage}{\mpwidth}
\edef\recipientfullname{\recipientfirstname{} \recipientfamilyname}
\pinex{\fullname}{{\bfseries \recipientfullname}
\\\\[0.5\baselineskip]
}
\pinex{\recipientinstitute}{\recipientinstitute{}
\\\\[0.5\baselineskip]
}
\pinex{\recipientfullname}{\textbf{\recipientfullname}\\\\[0.5\baselineskip]}
\pinex{\recipientinstitute}{\recipientinstitute{}\\\\[0.5\baselineskip]}
\pinex{\recipientcity}{
{\small\itshape
\recipientstreet{} \\\\
@ -303,10 +299,11 @@ I thank you for your consideration; I am looking forward to hearing from you soo
\vfill
%% \noindent{\em
%% \fr{Ci-joint~: Curriculum Vitæ}
%% \en{Attachment: Curriculum Vit\ae}
%% }
\noindent{
\scriptsize
\emph{\fr{Pièce(s) joint(es)~:}\en{Attachment:}}
Curriculum Vitæ
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}

View File

@ -522,9 +522,9 @@ if [ ! -n "$(command -v atool)" ]; then
}
fi
# WARNING: use this function with caution. It may drastically improve
# compression of some PDF files, but in some case, the output filesize will be
# greater! You should not use it over PDF files embedding pictures as well.
## WARNING: use this function with caution. It may drastically improve
## compression of some PDF files, but in some case, the output filesize will be
## greater! You should not use it over PDF files embedding pictures as well.
pdfcompress ()
{
if [ $# -lt 1 -o $# -gt 2 ]; then
@ -547,6 +547,7 @@ pdfcompress ()
fi
}
## Extract a range of pages from a PDF.
pdfextract ()
{
if [ $# -ne 4 ]; then
@ -561,6 +562,17 @@ pdfextract ()
gs -sDEVICE=pdfwrite -dNOPAUSE -dSAFER -dSAFER -dFirstPage=$2 -dBATCH -dLastPage=$3 -sOutputFile=$4 $1
}
## Resize input PDF to an A4 output PDF.
pdfresize ()
{
if [ $# -ne 2 ]; then
echo "Usage: $0 <input> <output>"
return
fi
gs -q -o $2 -sDEVICE=pdfwrite -sPAPERSIZE=a4 -dFIXEDMEDIA -dPDFFitPage -dCompatibilityLevel=1.4 $1
}
## Create an archive from a single or multiples files/folders.
archive ()
{