mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-19 11:38:05 +02:00
added time conversion example (to help people who are abroad)
This commit is contained in:
parent
3a3a78599e
commit
0b3386b410
4 changed files with 77 additions and 0 deletions
27
documents/time-conversion/Makefile
Normal file
27
documents/time-conversion/Makefile
Normal file
|
@ -0,0 +1,27 @@
|
|||
SOURCE = time-conversion
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux *.out
|
||||
|
||||
gif:
|
||||
pdfcrop $(SOURCE).pdf
|
||||
convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
|
||||
make clean
|
||||
|
||||
png:
|
||||
make
|
||||
make svg
|
||||
inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
|
||||
|
||||
transparentGif:
|
||||
convert $(SOURCE).pdf -transparent white result.gif
|
||||
make clean
|
||||
|
||||
svg:
|
||||
#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
|
||||
pdf2svg $(SOURCE).pdf $(SOURCE).svg
|
||||
# Necessary, as pdf2svg does not always create valid svgs:
|
||||
inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg
|
3
documents/time-conversion/README.md
Normal file
3
documents/time-conversion/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
documents/time-conversion/time-conversion.png
Normal file
BIN
documents/time-conversion/time-conversion.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.2 KiB |
47
documents/time-conversion/time-conversion.tex
Normal file
47
documents/time-conversion/time-conversion.tex
Normal file
|
@ -0,0 +1,47 @@
|
|||
\documentclass[a4paper]{scrartcl}
|
||||
\usepackage{amssymb, amsmath} % needed for math
|
||||
\usepackage[utf8]{inputenc} % this is needed for umlauts
|
||||
\usepackage[ngerman]{babel} % this is needed for umlauts
|
||||
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
|
||||
\usepackage[margin=2.5cm]{geometry} %layout
|
||||
\usepackage{hyperref} % links im text
|
||||
\usepackage{parskip}
|
||||
\usepackage{csquotes}
|
||||
|
||||
\usepackage[table]{xcolor}% http://ctan.org/pkg/xcolor
|
||||
\usepackage{wasysym} % für die benutzten Symbole
|
||||
|
||||
\title{Time conversion}
|
||||
\author{Martin Thoma}
|
||||
|
||||
\hypersetup{
|
||||
pdfauthor = {Martin Thoma},
|
||||
pdfkeywords = {},
|
||||
pdftitle = {}
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Begin document %
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\begin{document}
|
||||
Germany (+1 + 1)\\
|
||||
Pittsburg, PA (-5 + 1)\\
|
||||
\begin{table}[htp]
|
||||
\begin{tabular}{ll||ll}
|
||||
Germany & Pittsburg & Germany & Pittsburgh \\ \hline
|
||||
\cellcolor{red!25} 01:00 & \cellcolor{green!25} 19:00 & \cellcolor{green!25} 13:00 & \cellcolor{yellow!25} 07:00 \\
|
||||
\cellcolor{red!25} 02:00 & \cellcolor{green!25} 20:00 & \cellcolor{green!25} 14:00 & \cellcolor{yellow!25} 08:00 \\
|
||||
\cellcolor{red!25} 03:00 & \cellcolor{green!25} 21:00 & \cellcolor{green!25} 15:00 & \cellcolor{green!25} 09:00 \\
|
||||
\cellcolor{red!25} 04:00 & \cellcolor{green!25} 22:00 & \cellcolor{green!25} 16:00 & \cellcolor{green!25} 10:00 \\
|
||||
\cellcolor{red!25} 05:00 & \cellcolor{yellow!25} 23:00 & \cellcolor{green!25} 17:00 & \cellcolor{green!25} 11:00 \\
|
||||
\cellcolor{yellow!25} 06:00 & \cellcolor{yellow!25} 00:00 & \cellcolor{green!25} 18:00 & \cellcolor{green!25} 12:00 \\
|
||||
\cellcolor{yellow!25} 07:00 & \cellcolor{red!25} 01:00 & \cellcolor{green!25} 19:00 & \cellcolor{green!25} 13:00 \\
|
||||
\cellcolor{yellow!25} 08:00 & \cellcolor{red!25} 02:00 & \cellcolor{green!25} 20:00 & \cellcolor{green!25} 14:00 \\
|
||||
\cellcolor{green!25} 09:00 & \cellcolor{red!25} 03:00 & \cellcolor{green!25} 21:00 & \cellcolor{green!25} 15:00 \\
|
||||
\cellcolor{green!25} 10:00 & \cellcolor{red!25} 04:00 & \cellcolor{green!25} 22:00 & \cellcolor{green!25} 16:00 \\
|
||||
\cellcolor{green!25} 11:00 & \cellcolor{red!25} 05:00 & \cellcolor{yellow!25} 23:00 & \cellcolor{green!25} 17:00 \\
|
||||
\cellcolor{green!25} 12:00 & \cellcolor{yellow!25} 06:00 & \cellcolor{yellow!25} 00:00 & \cellcolor{green!25} 18:00 \\
|
||||
\end{tabular}
|
||||
\end{table}
|
||||
|
||||
\end{document}
|
Loading…
Add table
Add a link
Reference in a new issue