I have a cobol project and everything works and prints fine except I can't figure out how to skip a line between address.
Action code:
200-PROCESS-ONE-RECORD.
MOVE NAME-IN TO LEFT-LABEL-OUT
MOVE SPACES TO BLANK-OUT
MOVE NAME-IN TO RIGHT-LABEL-OUT
MOVE SPACES TO BLANK-A-OUT
WRITE LABEL-RECORD-OUT
MOVE ADDRESS-IN TO LEFT-LABEL-OUT
MOVE SPACES TO BLANK-OUT
MOVE ADDRESS-IN TO RIGHT-LABEL-OUT
MOVE SPACES TO BLANK-A-OUT
WRITE LABEL-RECORD-OUT
MOVE CITY-STATE-ZIP-IN TO LEFT-LABEL-OUT
MOVE SPACES TO BLANK-OUT
MOVE CITY-STATE-ZIP-IN TO RIGHT-LABEL-OUT
MOVE SPACES TO BLANK-A-OUT
WRITE LABEL-RECORD-OUT
It currently print like this:
IAN HENDERSON IAN HENDERSON
1309 SPRINGBANK ST. 1309 SPRINGBANK ST.
DETROIT MI 48024 DETROIT MI 48024
JANET LEASA JANET LEASA
12700 GRATIOT ST. 12700 GRATIOT ST.
WARREN MI 48077 WARREN MI 48077
I need a space/empty line between lines 3 and 4. In this case an empty line between DETROIT and Janet.
Either
MOVE SPACE TO LABEL-RECORD-OUT
WRITE LABEL-RECORD-OUT
Or
WRITE LABEL-RECORD-OUT FROM SPACE
Wherever a blank line is needed. This fits the pattern from the code you have shown.
One would need to see the record description entry for LABEL-RECORD-OUT to make it more clear that the above would answer the question.
Related
We are required to format our report in landscape orientation on A3 paper. We need to split that A3 paper into two A4 columns. In essence, as if you are reading a book/booklet. The code that I'm using below has an issue. The issue is the page numbering still counts per A3 page and not per column. If anyone could me a hand with this, would be much appreciated! Thanks.
\usepackage{multicol}
\setlength{\columnsep}{1cm}
\setlength{\columnseprule}{1pt}
\begin{document}
\begin{multicols}{2}
%Inserted test here
\end{multicols}
\end{document}
Instead of columns, it might be easier to just put two A4 pages on an A3 page:
\documentclass{article}
\usepackage{duckuments}% just to get some dummy content
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[a3paper,landscape]
\begin{document}
\duckument % just to get some dummy content
\end{document}
I would like to convert the following picture, which is a cross section of an engine, into a TikZ code:
How to start with this picture?
How to draw the walls and pipes in an easy way?
How to draw the oil (the hatched area)?
How to draw the oil (the hatched area)?
One way may be to use pattern=north east lines from patterns library described at page 730 of the PGF Manual:
\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
\fill [pattern=north east lines] (0,6) -- (0,0) -- (10,0) -- (10,6);
\draw (0,10) -- (0,0) -- (10,0) -- (10,10);
\end{tikzpicture}
\end{document}
How does one goes at trying to render such diagram with Latex.
Europe’s many alliances, reimagined as a Metro system European
countries are bound together in many ways
https://www.washingtonpost.com/graphics/world/how-european-countries-are-bound-together/?noredirect=on
Is there a package for such type of "Metro Line" diagrams ?
Maybe the following tikz code could be a starting point:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\coordinate (Norway) at (0,1);
\coordinate (Belgium) at (2,0);
\draw[ultra thick, red] (Norway) -- (1:0.9599) -- (Belgium);
\draw[ultra thick, blue] ($(Norway) + (0,-0.1)$) -- ($(1:0.9599) + (-0.03,-0.065)$) -- ($(Belgium) + (0,-0.065)$);
\node[rotate=45,anchor=west] at (Norway) {Norway};
\draw[fill=white] (Norway) circle (0.03);
\draw[fill=white] ($(Norway) + (0,-0.1)$) circle (0.03);
\node[rotate=45,anchor=west] at (Belgium) {Belgium};
\draw[fill=white] (Belgium) circle (0.03);
\draw[fill=white] ($(Belgium) + (0,-0.065)$) circle (0.03);
\end{tikzpicture}
\end{document}
I am new to Tikz and can not figure out why relarivly small tikzpictures expand thier width to the entire page ones.
Since I want my texts floating around such figures, it would be very usefull to know how to prevent them from expanding.
Here are code and pictures of my problem and as you can see it's not caused by to long captions, what was my first idea.
\section{demo}
\begin{figure}[h]
\tdplotsetmaincoords{60}{25}
\begin{tikzpicture}[tdplot_main_coords, scale=1]
\coordinate (o) at (0,0,0);
\coordinate (x) at (4,0,0);
\coordinate (y) at (0,0,4);
\coordinate (z) at (0,-4,0);
\node[above] at (x) {x};
\node[above] at (y) {y};
\node[above] at (z) {z};
\draw[red, -latex] (o) -- (x);
\draw[green, -latex] (o) -- (y);
\draw[blue, -latex] (o) -- (z);
\end{tikzpicture}
\caption{far to long caption for this kind of sensless figure created just for demonstrationg tikzpicture expand their width}
\end{figure}
\begin{figure}[h]
%[... same code as above ...]
\end{figure}
Do you guys have any suggestions to fit the tikzpicture bounds to the contents?
Thanks.
This is the default behavior. You can use the wrapfigure package to wrap text around a tikz figure:
\begin{wrapfigure}{r}{0.4\textwidth}
\tdplotsetmaincoords{60}{25}
\begin{tikzpicture}[tdplot_main_coords, scale=1]
...
\end{tikzpicture}
\caption{far to long caption for this kind of sensless figure created just for demonstrationg tikzpicture expand their width}
\end{wrapfigure}
In \begin{wrapfigure}{r}{0.4\textwidth}, the first argument is the position (r for right), the second argument is the size of the wrapfigure (here 40% of the page width fits the tikz figure).
I put two image.png in my latex documnet using \includegraphics. Now I want to joint two points of these images together by a line. I wonder if it is possible to do so in Latex?
First: no it is impossible: as Gyro Gearloose had said LaTeX has no idea about the content of your png.
Second: sure you can ;-) A little cheat with tikz. You can connect two arbitrary points with an arrow (or a line).
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{tikzmark} % arrows in tex
\usetikzlibrary{arrows} % arrows in tex
\usetikzlibrary{calc} % (node)+(3cm,2cm)
\tikzstyle{every picture}+=[remember picture]
\begin{document}
\lipsum[1]
\includegraphics[width=0.2\textwidth]{solidtex.png}
{\tikz\node[coordinate](start1){};}
\lipsum[2]
{\tikz\node[coordinate](end1){};}
\includegraphics[width=0.2\textwidth]{solidtex.png}
\lipsum[3]
\begin{tikzpicture}[overlay, remember picture, -latex, color=blue!15!red, yshift=1ex, shorten >=1pt, shorten <=1pt, line width=0.1cm]
\path[->] (start1) edge [out=150, in=240] (end1);
\end{tikzpicture}
\end{document}
But it still connects the corners of the images. To connect points inside the pictures, you have to modify the coordinates manually e.g.:
\path[->] (start1) edge [out=150, in=240] ($(end1)+(2cm,2cm)$);
or pt, ex, mm ect...
If you want line without arrow head, use:
\path[-] (start1) edge [out=150, in=240] (end1);
Note that like labeling and referring figures, you have to run latex (or pdflatex or ...) twice.