4

I want to first make a black (or other colour) cover photo and then want to use zeros, Feynman Diagram etc. distributed randomly on the page with green colour fonts. The font must be light so that I can use it as a background for my cover page. Is it possible to do such thing in Latex?

  • 2
    People tend to be happier here if you demonstrate that you have already tried to work out an answer for yourself. It is not because they want to see people suffer or fail. There are pragmatic reasons for this, too: it can be frustrating for someone to write an answer only to have the OP say, 'well, not like that because I'm using such-and-such a package or engine or <whatever>'. – jon Feb 15 '16 at 23:23
  • 2
    Curiously enough, the same question has recently been asked, and answered, on the Italian TUG’s forum, see guitex.org/home/en/forum/5-tex-e-latex/…. – GuM Feb 15 '16 at 23:43
  • @GustavoMezzetti I upvoted your comment because it seems very useful in theory. Unfortunately, the link does not work for me. Firefox says that the page does not redirect correctly (rough translation). – cfr Feb 15 '16 at 23:47
  • @cfr: I don’t know what is happening to you, but I use Firefox too and the link works correctly. Here it is again, between backticks: http://www.guitex.org/home/en/forum/5-tex-e-latex/104890-effetto-matrix-in-latex. – GuM Feb 15 '16 at 23:51
  • @GustavoMezzetti OK. Got it. The site is just very badly behaved. It will not allow you to view a particular forum or post at all unless you allow cookies and it does not redirect to a page telling you this. Not even if you try to navigate to the forum from the main list of forums (i.e. from within the site itself). It'll let you view the list but then it just fails to complete the redirection or to trigger a meaningful warning. – cfr Feb 16 '16 at 0:06
10

I am a little confused with your question, therefore I am not sure whether this is an answer to your problem or not. If you want zeros randomly distributed in your page, yet positioned in a sort of "grid" mocking a Matrix code, you may find this approach useful:

\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{backgrounds,calc}
\definecolor{mybackground}{rgb}{0,0,0}
\definecolor{mygreen}{RGB}{21,138,12}
\def\myopacity{0.7} %From 0 to 1 
\def\ncol{40}
\def\nrow{40}
\begin{document}
\begin{tikzpicture}[remember picture,overlay,show background rectangle, 
background rectangle/.style={fill=mybackground},color=mygreen,align=center]
\pgfmathsetseed{1} %for reproducibility
\pgfmathsetmacro{\ncolEND}{\ncol-1}
\pgfmathsetmacro{\nrowEND}{\nrow-1}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfmathdeclarerandomlist{letters}{%
{0}{}
}% End of List
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\foreach \i in {1,...,\ncolEND}{
 \foreach \j in {1,...,\nrowEND}{
 \pgfmathrandomitem{\letter}{letters}
 \node at ($(current page.south west)+(\paperwidth/\ncol*\i,\paperheight/\nrow*\j)$) {\letter};
 }}
\fill [draw=none, fill=white, fill opacity=\myopacity] (current page.south west)--(current page.north west)--(current page.north east)--(current page.south east)--cycle;
\end{tikzpicture}
\thispagestyle{empty}
\begin{center}
\Huge\texttt{\textcolor{mygreen}{The Matrix has you}}
\end{center}

\newpage
Another page
\end{document}

that gives this output:Sequences of zeros

I use TikZ to generate the background with the key remember picture and overlay plus some options available from the library backgrounds. The library calc serves to calculate the position of each character with respect to the origin (in this case the lower left corner of the page) and the number of columns \ncol and rows \nrow to be printed. The function \pgfmathsetseed{1} defines the seed of the Linear Congruential Generator of random sequences implemented in TikZ. Long story short, if you copy and paste the above's code you will get exactly the same output as the one attached. The next step is to store a list that contains zero and 'void', hence the function \pgfmathdeclarerandomlist{{0}{}}. The first \foreach means 'for each column' while the second iterates each element of a column and prints the symbol that has been randomly selected by \pgfmathrandomitem{\letter}{letters}. Finally, the command \fill adds the opacity to the image so that it can be used as background.


If you want to add other symbols, such as Japanese characters and reflected numbers, you can simply add them to the list like this:

\pgfmathdeclarerandomlist{letters}{%
{\begin{CJK}{UTF8}{min} リ \end{CJK}}
{\begin{CJK}{UTF8}{min} ス \end{CJK}}
{\begin{CJK}{UTF8}{min} ト \end{CJK}}
{\begin{CJK}{UTF8}{min} は \end{CJK}}
{\begin{CJK}{UTF8}{min} 集 \end{CJK}}
{\begin{CJK}{UTF8}{min} よ \end{CJK}}
{\begin{CJK}{UTF8}{min} く \end{CJK}}
{\begin{CJK}{UTF8}{min} あ \end{CJK}}
{\begin{CJK}{UTF8}{min} る \end{CJK}}
{\begin{CJK}{UTF8}{min} 質 \end{CJK}}
{\begin{CJK}{UTF8}{min} 問 \end{CJK}}
{\begin{CJK}{UTF8}{min} と \end{CJK}}
{\begin{CJK}{UTF8}{min} そ \end{CJK}}
{\begin{CJK}{UTF8}{min} の \end{CJK}}
{\begin{CJK}{UTF8}{min} 答 \end{CJK}}
{\begin{CJK}{UTF8}{min} を \end{CJK}}
{\begin{CJK}{UTF8}{min} 集 \end{CJK}}
{\begin{CJK}{UTF8}{min} め \end{CJK}}
{\begin{CJK}{UTF8}{min} 役 \end{CJK}}
{\begin{CJK}{UTF8}{min} に \end{CJK}}
{\begin{CJK}{UTF8}{min} 立 \end{CJK}}
{\begin{CJK}{UTF8}{min} つ \end{CJK}}
{\begin{CJK}{UTF8}{min} よ \end{CJK}}
{\begin{CJK}{UTF8}{min} う \end{CJK}}
{\begin{CJK}{UTF8}{min} し \end{CJK}}
{\begin{CJK}{UTF8}{min} た \end{CJK}}
{\begin{CJK}{UTF8}{min} も \end{CJK}}
{\begin{CJK}{UTF8}{min} も \end{CJK}}
{\begin{CJK}{UTF8}{min} の \end{CJK}}
{\begin{CJK}{UTF8}{min} で \end{CJK}}
{\begin{CJK}{UTF8}{min} す \end{CJK}}
{\begin{CJK}{UTF8}{min} 大 \end{CJK}}
{\begin{CJK}{UTF8}{min} こ \end{CJK}}
%Some voids to get sparse sequences
{}{}{}{}{}{}{}{}{}{}{}{}{}{}
%Mirrored numbers 
{\reflectbox{\textsf{2}}}
{\reflectbox{\textsf{7}}}
{\reflectbox{\textsf{4}}}
{\reflectbox{\textsf{3}}}
{\reflectbox{\textsf{5}}}
{\reflectbox{\textsf{6}}}
{\reflectbox{\textsf{8}}}
{\reflectbox{\textsf{9}}}
}%

You'll need the package CJKutf8 to print Japanese symbols


Finally, if you want to print something closer to a Matrix code, things get more complicated. I use the package ifthen to perform a test on a random integer (called \FLAG) that is generated within a specific range. Depending on the value of \FLAG, a sequence of symbols would be aligned either at the top or at the bottom of the image. This is the result: Matrix Code

and the complete code is:

\documentclass[11pt]{article}
\usepackage{CJKutf8}
\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{backgrounds,calc}
\definecolor{mybackground}{rgb}{0,0,0}
\definecolor{mygreen}{RGB}{21,138,12}
\def\myopacity{0.7} %From 0 to 1 
\def\ncol{40}
\def\nrow{80}
\begin{document}
\begin{tikzpicture}[remember picture,overlay,show background rectangle, 
  background rectangle/.style={fill=mybackground},color=mygreen,align=center]

\pgfmathsetseed{1}
\pgfmathsetmacro{\ncolEND}{\ncol-1}
\pgfmathsetmacro{\nrowEND}{\nrow-1}
\pgfmathdeclarerandomlist{letters}{%
{\begin{CJK}{UTF8}{min} リ \end{CJK}}
{\begin{CJK}{UTF8}{min} ス \end{CJK}}
{\begin{CJK}{UTF8}{min} ト \end{CJK}}
{\begin{CJK}{UTF8}{min} は \end{CJK}}
{\begin{CJK}{UTF8}{min} 集 \end{CJK}}
{\begin{CJK}{UTF8}{min} よ \end{CJK}}
{\begin{CJK}{UTF8}{min} く \end{CJK}}
{\begin{CJK}{UTF8}{min} あ \end{CJK}}
{\begin{CJK}{UTF8}{min} る \end{CJK}}
{\begin{CJK}{UTF8}{min} 質 \end{CJK}}
{\begin{CJK}{UTF8}{min} 問 \end{CJK}}
{\begin{CJK}{UTF8}{min} と \end{CJK}}
{\begin{CJK}{UTF8}{min} そ \end{CJK}}
{\begin{CJK}{UTF8}{min} の \end{CJK}}
{\begin{CJK}{UTF8}{min} 答 \end{CJK}}
{\begin{CJK}{UTF8}{min} を \end{CJK}}
{\begin{CJK}{UTF8}{min} 集 \end{CJK}}
{\begin{CJK}{UTF8}{min} め \end{CJK}}
{\begin{CJK}{UTF8}{min} 役 \end{CJK}}
{\begin{CJK}{UTF8}{min} に \end{CJK}}
{\begin{CJK}{UTF8}{min} 立 \end{CJK}}
{\begin{CJK}{UTF8}{min} つ \end{CJK}}
{\begin{CJK}{UTF8}{min} よ \end{CJK}}
{\begin{CJK}{UTF8}{min} う \end{CJK}}
{\begin{CJK}{UTF8}{min} し \end{CJK}}
{\begin{CJK}{UTF8}{min} た \end{CJK}}
{\begin{CJK}{UTF8}{min} も \end{CJK}}
{\begin{CJK}{UTF8}{min} も \end{CJK}}
{\begin{CJK}{UTF8}{min} の \end{CJK}}
{\begin{CJK}{UTF8}{min} で \end{CJK}}
{\begin{CJK}{UTF8}{min} す \end{CJK}}
{\begin{CJK}{UTF8}{min} 大 \end{CJK}}
{\begin{CJK}{UTF8}{min} こ \end{CJK}}
%Some voids to get sparse sequences
{}{}{}{}{}{}{}{}{}{}{}{}{}{}
%Mirrored numbers 
{\reflectbox{\textsf{2}}}
{\reflectbox{\textsf{7}}}
{\reflectbox{\textsf{4}}}
{\reflectbox{\textsf{3}}}
{\reflectbox{\textsf{5}}}
{\reflectbox{\textsf{6}}}
{\reflectbox{\textsf{8}}}
{\reflectbox{\textsf{9}}}
}%
\pgfmathsetmacro{\maxcodelength}{\nrow-15}
\foreach \col in {1,...,\ncolEND}{
\pgfmathrandominteger{\codelength}{2}{\maxcodelength} 
\pgfmathrandominteger{\FLAG}{1}{20}
\pgfmathrandominteger{\Highlight}{1}{20} 
\ifthenelse{\FLAG<11}{%
    \pgfmathrandomitem{\letter}{letters}
    %the next 3 lines are to highlight the bottom symbol of the sequence
    \ifthenelse{\Highlight<17}{%
    \node [mygreen!60!white] at ($(current page.south west)+({\paperwidth/\ncol*\col},{\paperheight/\nrow*(\codelength-1)})$) {\letter};}{%
    \node at ($(current page.south west)+({\paperwidth/\ncol*\col},{\paperheight/\nrow*(\codelength-1)})$) {\letter};}
\foreach \i in {\codelength,...,\nrowEND}{%else
    \pgfmathrandomitem{\letter}{letters}
    \node at ($(current page.south west)+(\paperwidth/\ncol*\col,\paperheight/\nrow*\i)$) {\letter};}}{%
\foreach  \i in {1,...,\codelength}{%
    \pgfmathrandomitem{\letter}{letters}
    \node at ($(current page.south west)+(\paperwidth/\ncol*\col,\paperheight/\nrow*\i)$) {\letter};}}
}
\fill [draw=none, fill=white, fill opacity=\myopacity] (current page.south west)--(current page.north west)--(current page.north east)--(current page.south east)--cycle;
\end{tikzpicture}
\thispagestyle{empty}
\begin{center}
\Huge\texttt{\textcolor{mygreen}{The Matrix has you}}
\end{center}

\newpage
Another page
\end{document}

Talking about Feynman diagrams, to include them in a nice way you'd need someone with artistic skill, which I don't. However, I can propose a way to include them in the page. In order to get the typical sinusoidal segment I've used the solution available here:TikZ: Decorated paths without straight segment which creates a new decoration called complete sines. Then I define a new command called \FeynmanDiagramCoverinspired by this post Dimensioning of a technical drawing in TikZ in this way:

\makeatletter
\newcommand{\FeynmanDiagramCover}[1]{%
{\tikzset{>=stealth}
\coordinate (@0) at #1;
\coordinate (@1) at ($(@0)+(180:{2+2*rnd})$);
\coordinate (@2) at ($(@1)+(120+30*rnd:3+2*rnd)$);
\coordinate (@3) at ($(@1)+(210+30*rnd:3+2*rnd)$);
\coordinate (@4) at ($(@0)+(0:2+2*rnd)$);
\coordinate (@5) at ($(@4)+(30+30*rnd:3+2*rnd)$);
\coordinate (@6) at ($(@4)+(-30-30*rnd:3+2*rnd)$);
\draw [->-] (@1)--(@2);
\draw [->-] (@3)--(@1);
\draw decorate [decoration={complete sines,segment length=0.5cm,amplitude=0.5cm,mirror,start up,end up}] {(@1)--(@4)};
\draw [->-] (@4)--(@5);
\draw [->-] (@6)--(@4);
}}
\makeatother

The line style ->- is copied from Tikz: Arrowheads in the center. In the definition of the coordinates I've added rnd several times. It affects the length of the sinusoidal segment (dashed line), the angle and lengths between straight lines (dotted area) as graphically shown here: Feynman Diagrams using the command \FeynmanDiagramCover

To include the diagrams in the cover page, one can simply issue the command \FeynmanDiagramCover{(coordinate)} where (coordinate) should be related to one of the current page nodes available in TikZ plus a distance in terms of either \paperwidth or \paperheight (for example something like \FeynmanDiagramCover{($(current page.south west)+(.3*\paperwidth,.2*\paperheight)$)} works). Using the setting proposed by the OP regarding the appearance of the Matrix code, the final result would be: Final cover page with matrix code and Feynman diagrams

where the command \FeynmanDiagramCover is issued 4 times and within a scope environment that modifies the scale of the diagram (0.4) and the rotation. This is the code for the final output:

\documentclass[11pt]{article}
\usepackage{CJKutf8}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{ifthen}
\usetikzlibrary{backgrounds,calc}
\usetikzlibrary{decorations.markings}
\definecolor{mybackground}{rgb}{0,0,0}
\definecolor{mygreen}{RGB}{21,138,12}
\definecolor{diagramgreen}{rgb}{0,1,0}


\tikzset{->-/.style={decoration={
  markings,
  mark=at position 0.5 with {\arrow{>}}},postaction={decorate}}}

%Nice waves
\newif\ifstartcompletesineup
\newif\ifendcompletesineup
\pgfkeys{
    /pgf/decoration/.cd,
    start up/.is if=startcompletesineup,
    start up=true,
    start up/.default=true,
    start down/.style={/pgf/decoration/start up=false},
    end up/.is if=endcompletesineup,
    end up=true,
    end up/.default=true,
    end down/.style={/pgf/decoration/end up=false}
}
\pgfdeclaredecoration{complete sines}{initial}
{
    \state{initial}[
        width=+0pt,
        next state=upsine,
        persistent precomputation={
            \ifstartcompletesineup
                \pgfkeys{/pgf/decoration automaton/next state=upsine}
                \ifendcompletesineup
                    \pgfmathsetmacro\matchinglength{
                        0.5*\pgfdecoratedinputsegmentlength / (ceil(0.5* \pgfdecoratedinputsegmentlength / \pgfdecorationsegmentlength) )
                    }
                \else
                    \pgfmathsetmacro\matchinglength{
                        0.5 * \pgfdecoratedinputsegmentlength / (ceil(0.5 * \pgfdecoratedinputsegmentlength / \pgfdecorationsegmentlength ) - 0.499)
                    }
                \fi
            \else
                \pgfkeys{/pgf/decoration automaton/next state=downsine}
                \ifendcompletesineup
                    \pgfmathsetmacro\matchinglength{
                        0.5* \pgfdecoratedinputsegmentlength / (ceil(0.5 * \pgfdecoratedinputsegmentlength / \pgfdecorationsegmentlength ) - 0.4999)
                    }
                \else
                    \pgfmathsetmacro\matchinglength{
                        0.5 * \pgfdecoratedinputsegmentlength / (ceil(0.5 * \pgfdecoratedinputsegmentlength / \pgfdecorationsegmentlength ) )
                    }
                \fi
            \fi
            \setlength{\pgfdecorationsegmentlength}{\matchinglength pt}
        }] {}
    \state{downsine}[width=\pgfdecorationsegmentlength,next state=upsine]{
        \pgfpathsine{\pgfpoint{0.5\pgfdecorationsegmentlength}    {0.5\pgfdecorationsegmentamplitude}}
        \pgfpathcosine{\pgfpoint{0.5\pgfdecorationsegmentlength}{-0.5\pgfdecorationsegmentamplitude}}
    }
    \state{upsine}[width=\pgfdecorationsegmentlength,next state=downsine]{
        \pgfpathsine{\pgfpoint{0.5\pgfdecorationsegmentlength}{-0.5\pgfdecorationsegmentamplitude}}
        \pgfpathcosine{\pgfpoint{0.5\pgfdecorationsegmentlength}{0.5\pgfdecorationsegmentamplitude}}
}
    \state{final}{}
}
%%%%%%%%%%%%%%%%%%

\makeatletter
\newcommand{\FeynmanDiagramCover}[1]{%
{\tikzset{>=stealth}
\coordinate (@0) at #1;
\coordinate (@1) at ($(@0)+(180:{2+2*rnd})$);
\coordinate (@2) at ($(@1)+(120+30*rnd:3+2*rnd)$);
\coordinate (@3) at ($(@1)+(210+30*rnd:3+2*rnd)$);
\coordinate (@4) at ($(@0)+(0:2+2*rnd)$);
\coordinate (@5) at ($(@4)+(30+30*rnd:3+2*rnd)$);
\coordinate (@6) at ($(@4)+(-30-30*rnd:3+2*rnd)$);
\draw [->-] (@1)--(@2);
\draw [->-] (@3)--(@1);
\draw decorate [decoration={complete sines,segment length=0.5cm,amplitude=0.5cm,mirror,start up,end up}] {(@1)--(@4)};
\draw [->-] (@4)--(@5);
\draw [->-] (@6)--(@4);
}}


\makeatother


%\definecolor{white}{RGB}{255,255,255}
\def\myopacity{0} %From 0 to 1 
\def\ncol{40}
\def\nrow{80}
\begin{document}
\begin{tikzpicture}[remember picture,overlay,show background rectangle, 
  background rectangle/.style={fill=mybackground},color=mygreen,align=center]

\pgfmathsetseed{1}
\pgfmathsetmacro{\ncolEND}{\ncol-1}
\pgfmathsetmacro{\nrowEND}{\nrow-1}
\pgfmathdeclarerandomlist{letters}{%
{\begin{CJK}{UTF8}{min} リ \end{CJK}}
{\begin{CJK}{UTF8}{min} ス \end{CJK}}
{\begin{CJK}{UTF8}{min} ト \end{CJK}}
{\begin{CJK}{UTF8}{min} は \end{CJK}}
{\begin{CJK}{UTF8}{min} 集 \end{CJK}}
{\begin{CJK}{UTF8}{min} よ \end{CJK}}
{\begin{CJK}{UTF8}{min} く \end{CJK}}
{\begin{CJK}{UTF8}{min} あ \end{CJK}}
{\begin{CJK}{UTF8}{min} る \end{CJK}}
{\begin{CJK}{UTF8}{min} 質 \end{CJK}}
{\begin{CJK}{UTF8}{min} 問 \end{CJK}}
{\begin{CJK}{UTF8}{min} と \end{CJK}}
{\begin{CJK}{UTF8}{min} そ \end{CJK}}
{\begin{CJK}{UTF8}{min} の \end{CJK}}
{\begin{CJK}{UTF8}{min} 答 \end{CJK}}
{\begin{CJK}{UTF8}{min} を \end{CJK}}
{\begin{CJK}{UTF8}{min} 集 \end{CJK}}
{\begin{CJK}{UTF8}{min} め \end{CJK}}
{\begin{CJK}{UTF8}{min} 役 \end{CJK}}
{\begin{CJK}{UTF8}{min} に \end{CJK}}
{\begin{CJK}{UTF8}{min} 立 \end{CJK}}
{\begin{CJK}{UTF8}{min} つ \end{CJK}}
{\begin{CJK}{UTF8}{min} よ \end{CJK}}
{\begin{CJK}{UTF8}{min} う \end{CJK}}
{\begin{CJK}{UTF8}{min} し \end{CJK}}
{\begin{CJK}{UTF8}{min} た \end{CJK}}
{\begin{CJK}{UTF8}{min} も \end{CJK}}
{\begin{CJK}{UTF8}{min} も \end{CJK}}
{\begin{CJK}{UTF8}{min} の \end{CJK}}
{\begin{CJK}{UTF8}{min} で \end{CJK}}
{\begin{CJK}{UTF8}{min} す \end{CJK}}
{\begin{CJK}{UTF8}{min} 大 \end{CJK}}
{\begin{CJK}{UTF8}{min} こ \end{CJK}}
%Some voids to get sparse sequences
{}{}{}{}{}{}{}{}{}{}{}{}{}{}
%Mirrored numbers 
{\reflectbox{\textsf{2}}}
{\reflectbox{\textsf{7}}}
{\reflectbox{\textsf{4}}}
{\reflectbox{\textsf{3}}}
{\reflectbox{\textsf{5}}}
{\reflectbox{\textsf{6}}}
{\reflectbox{\textsf{8}}}
{\reflectbox{\textsf{9}}}
}%
\pgfmathsetmacro{\maxcodelength}{\nrow-15}
\foreach \col in {1,...,\ncolEND}{
\pgfmathrandominteger{\codelength}{2}{\maxcodelength} 
\pgfmathrandominteger{\FLAG}{1}{20}
\pgfmathrandominteger{\Highlight}{1}{20} 
\ifthenelse{\FLAG<11}{%
    \pgfmathrandomitem{\letter}{letters}
    %the next 3 lines are to highlight the bottom symbol of the sequence
    \ifthenelse{\Highlight<17}{%
    \node [mygreen!60!white] at ($(current page.south west)+({\paperwidth/\ncol*\col},{\paperheight/\nrow*(\codelength-1)})$) {\letter};}{%
    \node at ($(current page.south west)+({\paperwidth/\ncol*\col},{\paperheight/\nrow*(\codelength-1)})$) {\letter};}
\foreach \i in {\codelength,...,\nrowEND}{%else
    \pgfmathrandomitem{\letter}{letters}
    \node at ($(current page.south west)+(\paperwidth/\ncol*\col,\paperheight/\nrow*\i)$) {\letter};}}{%
\foreach  \i in {1,...,\codelength}{%
    \pgfmathrandomitem{\letter}{letters}
    \node at ($(current page.south west)+(\paperwidth/\ncol*\col,\paperheight/\nrow*\i)$) {\letter};}}
}
\fill [draw=none, fill=white, fill opacity=\myopacity] (current page.south west)--(current page.north west)--(current page.north east)--(current page.south east)--cycle;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Feynman Diagrams
\begin{scope}[ultra thick,color=diagramgreen]
\pgfmathsetmacro{\DELTAcentroid}{50}
\foreach \x in {2/8,6/8}{%
%\node at (current page.center) {\paperheight};
\coordinate (centroid) at ($(current page.south west)+(\x*\paperwidth+\DELTAcentroid*rand,\paperheight*3/16+\DELTAcentroid*rand)$);
\pgfmathsetmacro{\rotANGLE}{180*rand}
\begin{scope}[rotate=\rotANGLE,transform shape,scale=.4]
\FeynmanDiagramCover{(centroid)}
\end{scope}
}
\foreach \x in {2/8,6/8}{%
\coordinate (centroid) at ($(current page.south west)+(\x*\paperwidth+\DELTAcentroid*rand,\paperheight*9/16+\DELTAcentroid*rand)$);
\pgfmathsetmacro{\rotANGLE}{180*rand}
\begin{scope}[rotate=\rotANGLE,transform shape,scale=.4]
\FeynmanDiagramCover{(centroid)}
\end{scope}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{scope}
\end{tikzpicture}
\thispagestyle{empty}
\begin{center}
\Huge\texttt{\textcolor{white}{Majorana Mass}}
\end{center}
\newpage
Another page
\end{document}
  • I worked out something on your code and got something which I posted as answer. – Love Grover Feb 16 '16 at 15:16
0

Thanks @mirkom

This following is what I wanted, and this is modified version of yours, but I still don't know how to add feynman diagram to cover.

enter image description here

If it had some feynman diagram then it would have bewn awesome.

Here is a code for this page:

\documentclass[11pt]{article}
\usepackage{CJKutf8}
\usepackage{tikz}
\usepackage{ifthen}
\usetikzlibrary{backgrounds,calc}
\definecolor{mybackground}{rgb}{0,0,0}
\definecolor{mygreen}{RGB}{21,138,12}
\definecolor{white}{RGB}{255,255,255}
\def\myopacity{0} %From 0 to 1 
\def\ncol{40}
\def\nrow{80}
\begin{document}
\begin{tikzpicture}[remember picture,overlay,show background rectangle, 
  background rectangle/.style={fill=mybackground},color=mygreen,align=center]

\pgfmathsetseed{1}
\pgfmathsetmacro{\ncolEND}{\ncol-1}
\pgfmathsetmacro{\nrowEND}{\nrow-1}
\pgfmathdeclarerandomlist{letters}{%
{\begin{CJK}{UTF8}{min} リ \end{CJK}}
{\begin{CJK}{UTF8}{min} ス \end{CJK}}
{\begin{CJK}{UTF8}{min} ト \end{CJK}}
{\begin{CJK}{UTF8}{min} は \end{CJK}}
{\begin{CJK}{UTF8}{min} 集 \end{CJK}}
{\begin{CJK}{UTF8}{min} よ \end{CJK}}
{\begin{CJK}{UTF8}{min} く \end{CJK}}
{\begin{CJK}{UTF8}{min} あ \end{CJK}}
{\begin{CJK}{UTF8}{min} る \end{CJK}}
{\begin{CJK}{UTF8}{min} 質 \end{CJK}}
{\begin{CJK}{UTF8}{min} 問 \end{CJK}}
{\begin{CJK}{UTF8}{min} と \end{CJK}}
{\begin{CJK}{UTF8}{min} そ \end{CJK}}
{\begin{CJK}{UTF8}{min} の \end{CJK}}
{\begin{CJK}{UTF8}{min} 答 \end{CJK}}
{\begin{CJK}{UTF8}{min} を \end{CJK}}
{\begin{CJK}{UTF8}{min} 集 \end{CJK}}
{\begin{CJK}{UTF8}{min} め \end{CJK}}
{\begin{CJK}{UTF8}{min} 役 \end{CJK}}
{\begin{CJK}{UTF8}{min} に \end{CJK}}
{\begin{CJK}{UTF8}{min} 立 \end{CJK}}
{\begin{CJK}{UTF8}{min} つ \end{CJK}}
{\begin{CJK}{UTF8}{min} よ \end{CJK}}
{\begin{CJK}{UTF8}{min} う \end{CJK}}
{\begin{CJK}{UTF8}{min} し \end{CJK}}
{\begin{CJK}{UTF8}{min} た \end{CJK}}
{\begin{CJK}{UTF8}{min} も \end{CJK}}
{\begin{CJK}{UTF8}{min} も \end{CJK}}
{\begin{CJK}{UTF8}{min} の \end{CJK}}
{\begin{CJK}{UTF8}{min} で \end{CJK}}
{\begin{CJK}{UTF8}{min} す \end{CJK}}
{\begin{CJK}{UTF8}{min} 大 \end{CJK}}
{\begin{CJK}{UTF8}{min} こ \end{CJK}}
%Some voids to get sparse sequences
{}{}{}{}{}{}{}{}{}{}{}{}{}{}
%Mirrored numbers 
{\reflectbox{\textsf{2}}}
{\reflectbox{\textsf{7}}}
{\reflectbox{\textsf{4}}}
{\reflectbox{\textsf{3}}}
{\reflectbox{\textsf{5}}}
{\reflectbox{\textsf{6}}}
{\reflectbox{\textsf{8}}}
{\reflectbox{\textsf{9}}}
}%
\pgfmathsetmacro{\maxcodelength}{\nrow-15}
\foreach \col in {1,...,\ncolEND}{
\pgfmathrandominteger{\codelength}{2}{\maxcodelength} 
\pgfmathrandominteger{\FLAG}{1}{20}
\pgfmathrandominteger{\Highlight}{1}{20} 
\ifthenelse{\FLAG<11}{%
    \pgfmathrandomitem{\letter}{letters}
    %the next 3 lines are to highlight the bottom symbol of the sequence
    \ifthenelse{\Highlight<17}{%
    \node [mygreen!60!white] at ($(current page.south west)+({\paperwidth/\ncol*\col},{\paperheight/\nrow*(\codelength-1)})$) {\letter};}{%
    \node at ($(current page.south west)+({\paperwidth/\ncol*\col},{\paperheight/\nrow*(\codelength-1)})$) {\letter};}
\foreach \i in {\codelength,...,\nrowEND}{%else
    \pgfmathrandomitem{\letter}{letters}
    \node at ($(current page.south west)+(\paperwidth/\ncol*\col,\paperheight/\nrow*\i)$) {\letter};}}{%
\foreach  \i in {1,...,\codelength}{%
    \pgfmathrandomitem{\letter}{letters}
    \node at ($(current page.south west)+(\paperwidth/\ncol*\col,\paperheight/\nrow*\i)$) {\letter};}}
}
\fill [draw=none, fill=white, fill opacity=\myopacity] (current page.south west)--(current page.north west)--(current page.north east)--(current page.south east)--cycle;
\end{tikzpicture}
\thispagestyle{empty}
\begin{center}
\Huge\texttt{\textcolor{white}{Majorana Mass}}
\end{center}

\newpage
Another page
\end{document}
  • Can you show an example of diagram you'd like in the cover? I still don't get which kind of effect you're after. Where do you want the diagrams to appear? – mirkom Feb 16 '16 at 15:29
  • @mirkom this is an example with only one diagram. I want small 2-3 (maybe more) diagram with green pen on our black cover. ecx.images-amazon.com/images/I/… – Love Grover Feb 16 '16 at 15:52
  • I've edited my answer including the Feynman diagrams. Hope it leads to what you were looking for. – mirkom Feb 18 '16 at 8:13
  • @mirkom This looks awesome! Thanks for help! :) – Love Grover Feb 19 '16 at 2:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.