wedding invitation, different layout
This commit is contained in:
2
wedding-invi-vi/.gitignore
vendored
Normal file
2
wedding-invi-vi/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.png
|
||||
*.xmp
|
||||
BIN
wedding-invi-vi/027-028.jpeg
Normal file
BIN
wedding-invi-vi/027-028.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 692 KiB |
23
wedding-invi-vi/Makefile
Normal file
23
wedding-invi-vi/Makefile
Normal file
@@ -0,0 +1,23 @@
|
||||
DOC=thiep1
|
||||
INPUT=$(DOC).tex
|
||||
TARGET_EN=thiep_en
|
||||
TARGET_VI=thiep_vi
|
||||
TARGET=$(TARGET_VI).pdf
|
||||
TEX=xelatex
|
||||
QR=qrEvent_vi.png qrEvent_en.png
|
||||
|
||||
default: $(TARGET)
|
||||
|
||||
$(TARGET_EN).pdf: $(INPUT) Makefile $(QR)
|
||||
$(TEX) --jobname=$(TARGET_EN) $< && $(TEX) --jobname=$(TARGET_EN) $<
|
||||
|
||||
$(TARGET_VI).pdf: $(INPUT) Makefile $(QR)
|
||||
$(TEX) --jobname=$(TARGET_VI) "\def\ViFlag{}\input{$<}" && \
|
||||
$(TEX) --jobname=$(TARGET_VI) "\def\ViFlag{}\input{$<}"
|
||||
|
||||
$(QR): qrEvent_vi.txt
|
||||
./qrGen.py
|
||||
|
||||
clean:
|
||||
rm -f $(DOC).{pdf,out,aux,log} $(QR)
|
||||
rm -f *.{pdf,out,aux,log,bbl,blg}
|
||||
11
wedding-invi-vi/qrEvent_en.txt
Normal file
11
wedding-invi-vi/qrEvent_en.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Nam's wedding
|
||||
DTSTART;TZID=Asia/Saigon:20200301T160000
|
||||
DTEND;TZID=Asia/Saigon:20200301T200000
|
||||
LOCATION:Auco Convention Center, 1A Nguyen Huu Cau Str., Ngoc Chau Ward, Hai Duong City, Hai Duong, Vietnam
|
||||
GEO:20.9351879;106.3433482,18
|
||||
URL:https://goo.gl/maps/eyfMhXgjFTQzAWB79
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
12
wedding-invi-vi/qrEvent_vi.txt
Normal file
12
wedding-invi-vi/qrEvent_vi.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
BEGIN:VEVENT
|
||||
SUMMARY:Đám cưới Nam-Hương
|
||||
DTSTART;TZID=Asia/Saigon:20200301T160000
|
||||
DTEND;TZID=Asia/Saigon:20200301T200000
|
||||
LOCATION:Nhà hàng Âu Cơ, 1A Nguyễn Hữu Cầu, P. Ngọc Châu, Thành phố Hải Dương, Hải Dương, Vietnam
|
||||
GEO:20.9351879;106.3433482,18
|
||||
URL:https://goo.gl/maps/eyfMhXgjFTQzAWB79
|
||||
DESCRIPTION:
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
15
wedding-invi-vi/qrGen.py
Executable file
15
wedding-invi-vi/qrGen.py
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
import qrcode
|
||||
|
||||
for fname in ["qrEvent_en", "qrEvent_vi"]:
|
||||
qr = qrcode.QRCode(
|
||||
version=2,
|
||||
error_correction=qrcode.constants.ERROR_CORRECT_Q,
|
||||
box_size=5,
|
||||
border=1)
|
||||
|
||||
with open(f"{fname}.txt") as fp:
|
||||
qr.add_data(fp.read())
|
||||
qr.make(fit=True)
|
||||
img = qr.make_image(fill_color="orangered", back_color="white")
|
||||
img.save(f"{fname}.png")
|
||||
118
wedding-invi-vi/thiep1.tex
Normal file
118
wedding-invi-vi/thiep1.tex
Normal file
@@ -0,0 +1,118 @@
|
||||
\documentclass{article}
|
||||
\pagestyle{empty}
|
||||
\usepackage{geometry,fontspec,tikz}
|
||||
\geometry{a6paper,landscape,hmargin={1cm,1cm},vmargin={1cm,0cm}}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage{ebgaramond}
|
||||
\usepackage{etoolbox}
|
||||
\usepackage{float}
|
||||
|
||||
\newtoggle{Vietnamese}
|
||||
|
||||
\ifdefined\ViFlag
|
||||
\toggletrue{Vietnamese}
|
||||
\else
|
||||
\togglefalse{Vietnamese}
|
||||
\fi
|
||||
|
||||
\usetikzlibrary{fadings}
|
||||
\pgfdeclarehorizontalshading{FOne}{100bp} {
|
||||
color(0bp)=(pgftransparent!0);
|
||||
color(25bp)=(pgftransparent!0);
|
||||
color(50bp)=(pgftransparent!80);
|
||||
color(100bp)=(pgftransparent!100)}
|
||||
|
||||
\pgfdeclarefading{myfading}{\pgfuseshading{FOne}}
|
||||
|
||||
\pgfdeclarehorizontalshading{FTwo}{100bp} {
|
||||
color(0bp)=(pgftransparent!100);
|
||||
color(25bp)=(pgftransparent!100);
|
||||
color(50bp)=(pgftransparent!100);
|
||||
color(100bp)=(pgftransparent!100)}
|
||||
|
||||
\pgfdeclarefading{nofading}{\pgfuseshading{FTwo}}
|
||||
\setlength\parindent{0pt}
|
||||
|
||||
\begin{document}
|
||||
\begin{tikzpicture}[overlay,remember picture]
|
||||
\node[anchor=east,inner sep=0pt] (pic) at (current page.east)
|
||||
{\includegraphics[height=\pdfpageheight]{027-028}};
|
||||
\fill[white,path fading=myfading] (pic.north west) rectangle (pic.south east);
|
||||
\end{tikzpicture}%
|
||||
|
||||
\obeylines%
|
||||
{\addfontfeatures{Scale=2.4,LetterSpace=7,Color=red}
|
||||
\iftoggle{Vietnamese}{ THIỆP MỜI }{ INVITATION }}
|
||||
|
||||
\textit{%
|
||||
\iftoggle{Vietnamese}{
|
||||
Trân trọng kính mời bạn dự tiệc cưới của chúng tôi,
|
||||
\smallbreak
|
||||
\hspace{4.5cm}Nam và Hương.
|
||||
}{
|
||||
Dear friend,
|
||||
|
||||
We'd love to invite you to our wedding reception.
|
||||
\smallbreak
|
||||
Sincerly,
|
||||
|
||||
Nam and Huong.
|
||||
}
|
||||
}
|
||||
|
||||
\medbreak
|
||||
\iftoggle{Vietnamese}{
|
||||
{\addfontfeatures{Scale=1.3,LetterSpace=5,Color=red}\scshape Bao giờ?}
|
||||
\textit{%
|
||||
Chủ Nhật, ngày 1, tháng 3, năm 2020
|
||||
4 \kern.5pt:\kern.5pt 00 chiều
|
||||
}
|
||||
\smallbreak
|
||||
{\addfontfeatures{Scale=1.3,LetterSpace=5,Color=red}\scshape Ở đâu?}
|
||||
\textit{%
|
||||
Trung tâm Tiệc cưới - Hội nghị Âu Cơ,
|
||||
|
||||
1A Nguyễn Hữu Cầu, Phường Ngọc Châu,
|
||||
|
||||
Thành phố Hải Dương, Hải Dương
|
||||
}
|
||||
\begin{figure}[H]
|
||||
\hspace*{1cm}\includegraphics[height=3.1cm]{qrEvent_vi}
|
||||
\end{figure}
|
||||
}{
|
||||
{\addfontfeatures{Scale=1.4,LetterSpace=5,Color=red}\scshape when?}
|
||||
\textit{%
|
||||
March 1\/\rlap{,}\textsuperscript{st} 2020
|
||||
4\kern.5pt:\kern.5pt00 pm
|
||||
}
|
||||
\smallbreak
|
||||
{\addfontfeatures{Scale=1.4,LetterSpace=5,Color=red}\scshape where?}
|
||||
\textit{%
|
||||
Auco Convention Center,
|
||||
|
||||
1A Nguyen Huu Cau Str, Ngoc Chau Ward
|
||||
|
||||
Hai Duong City, Hai Duong
|
||||
}
|
||||
}
|
||||
|
||||
% \newpage
|
||||
% {\addfontfeatures{Scale=1.4,LetterSpace=5,Color=red}\scshape
|
||||
% \iftoggle{Vietnamese}{Chỉ dẫn}{Direction}
|
||||
% }
|
||||
% \medbreak
|
||||
|
||||
% \begin{tikzpicture}[scale=1, transform shape]
|
||||
% \node[anchor=center,inner sep=0pt] (map) at (current page.east) {\includegraphics[width=\linewidth]{map}};
|
||||
% \fill[white,path fading=nofading] (map.north west) rectangle (map.south east);
|
||||
|
||||
% \iftoggle{Vietnamese}{
|
||||
% \node[anchor=south west, inner sep=0pt] (qrEvent_vi) at (map.south west) {\includegraphics[height=3.5cm]{qrEvent_vi}};
|
||||
% }{
|
||||
% \node[anchor=south west, inner sep=0pt] (qrEvent_en) at (map.south west) {\includegraphics[height=3.5cm]{qrEvent_en}};
|
||||
% }
|
||||
|
||||
% \end{tikzpicture}
|
||||
|
||||
\end{document}
|
||||
Reference in New Issue
Block a user