Skip to content

Instantly share code, notes, and snippets.

@LSinev
LSinev / pdfa_pdfx_test.tex
Last active September 5, 2022 00:16
PDF/A-1b and PDF/X-1a testing template. With different options set at start. Seems like PDF/A-1b is still not working with xelatex (because of font info). Inserting RGB images inside CMYK files (and in reverse order too) also breaks compliance :(
% Úτƒ-8 encoded
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Variables initiating %%%
\newcounter{colourmode}
\newcounter{pdftype}
\newcounter{iccinsert}
%% Control of colour mode and pdf type
\setcounter{colourmode}{1} % 0 --- undefined; 1 --- cmyk (always for pdf/x); 2 --- rgb
\setcounter{pdftype}{2} % 0 --- undefined; 1 --- pdf/x; 2 --- pdf/a
@LSinev
LSinev / word_vs_latex_rus_tikz_pdfx.tex
Last active September 16, 2020 02:07
Word vs LaTeX image translated into russian, done by tikz code, compilable with pdflatex, xelatex and lualatex in PDF/X. Compilation in xelatex have to be done with commandline like (as PDF 1.3 required by PDF/X): "xelatex.exe -synctex=1 -interaction=nonstopmode -output-driver="xdvipdfmx -V 3 -z 0" --shell-escape %.tex"
% Úτƒ-8 encoded
% http://gist.github.com/LSinev/98c0a40e94f4507922a8
%%% Defining function to check compiler %%%
\RequirePackage{iftex}
\newif\ifxetexorluatex % new if operator (http://tex.stackexchange.com/a/47579/79756)
\ifXeTeX
\xetexorluatextrue
\else
\ifLuaTeX
\xetexorluatextrue