I'm seeking to layout paragraphs as follows:
1. In the introduction, I'd have the paragraphs across all columns.
2. Then follow two columns with opposing opinions in parallel. It differs than a two-columns layout that the two columns will be parallel and that the content on the left will always remain on the left, the right always on the right across multiple pages. Even if the amount of argument of the left column is shorter, the argument of the right column should not float into the left column.
Here is an example in HTML:
https://www.biblegateway.com/passage/?search=1+Corinthians+15&version=CCB;KJ21
Used to compare different translations.
Below is my attempt to achieve the effect.
\documentclass{report}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\section{Introduction}
Here are the normal paragraph crossing colmuns.
\blindtext
\begin{minipage}[t]{0.5\textwidth}
\section{Argument on the Left}
Because I am on the left, so must I be not right?
\end{minipage}\begin{minipage}[t]{0.5\textwidth}
\section{Argument on the Right}
Because I am on the right, so I must be right!
\blindtext
\end{minipage}
\end{document}
It almost achieved the effect, except that there is no gap between the two columns.
Here is a screenshot of the result:
What would be a better solution?
How could I achieve the same in org-mode with export to PDF (via LaTex)?
To have separated columns, it is sufficient to use smaller minipages and to add a space between them. Minipages are boxes, and you can either use a fixed space (with ~~~ or \hspace{}), but the better is rubber space \hfill.
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\section{Introduction}
Here are the normal paragraph crossing colmuns.
\blindtext
\noindent\begin{minipage}[t]{0.48\textwidth}
\section{Argument on the Left}
Because I am on the left, so must I be not right?
\end{minipage}%
\hfill%
\begin{minipage}[t]{0.48\textwidth}
\section{Argument on the Right}
Because I am on the right, so I must be right!
\blindtext
\end{minipage}
\end{document}
\noindent avoids the normal paragraph spacing and \hfill "pushes minipage towrads left and right margin.
But it is not the best solution. You will have problems to manage properly page breaks and there is a specific package to does exactly what you want.
The package paracol defines a parallel environment with 2 (or more) columns and provides a way to "synchronize" them by switching between cols. It takes care of page breaks and is definitely what you want.
Here is an example with paracol
\documentclass{report}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{paracol}
\begin{document}
\section{Introduction}
Here are the normal paragraph crossing colmuns.
\blindtext
\begin{paracol}{2}
\section{Argument on the\\ Left}
Because I am on the left, so must I be not right?
\switchcolumn
\section{Argument on the\\ Right}
Because I am on the right, so I must be right!
\blindtext
\end{paracol}
\end{document}
As you can see, section numbering is coherent between columns, but there are many ways to customize the package if you prefer not. Look at the documentation
Also note that I had to add a manual line break to have section titles properly formatted, but it is a minor drawback.
Concerning, org-mode, I use it, but I have no experience with export and cannot really help you. But with the flexibility of paracol, you can find some way to define macros that do what you need. Maybe if you provide a org-mode export, people can try to find a solution.
Related
I was looking for ways to have a side-by-side minipages on a Latex beamer.
I will be clear, this is not two columns or mult-column or whatever. I specifically need minipages.
To do so, I created a nice command/function which does it nicely, but I am trying to make the two miniapges always be equal in height as well.
Any suggestions on how to force them to be equal in size?
Also general improvement suggestions and tips are welcomed.
\def \MinSideBySideGap {0.02} % minimal Gap between left/right sides
\newcommand{\SideBySide}[3][0.5]
{
%
\ifthenelse{\isempty{#1}}%
{\FPeval{\leftwidth}{0.5-\MinSideBySideGap/2}%
\FPeval{\rightwidth}{\leftwidth}%
}% if #1 is empty
{\FPeval{\leftwidth}{min(#1-\MinSideBySideGap/2,1.0)}%
\FPeval{\rightwidth}{max(1.0-\leftwidth-\MinSideBySideGap,0.0)}
}% if #1 is not empty
%
% Left Part
\begin{minipage}{\leftwidth\textwidth}
#2
\end{minipage}%
\hfill%
% Right Part
\begin{minipage}{\rightwidth\textwidth}
#3
\end{minipage}%
}
Towards #samcarter_is_at_topanswers.xyz questions, this was the very old origin of this:
\newcommand{\SideBySide}[2]
{
\begin{columns}[T] % align columns
\begin{column}{.48\textwidth}
#1
\end{column}%
\hfill%
\begin{column}{.48\textwidth}
#2
\end{column}%
\end{columns}
}
I still don't see a reason why you would need minipages of the same height, but just as a proof of concept, you could use tcoloboxes instead of minipages. They have the ability to form "equal height groups":
\documentclass{beamer}
\usepackage[most]{tcolorbox}
\tcbset{width=(\linewidth-4mm)/2,before=,after={},enhanced,interior empty,equal height group=\insertframenumber,frame hidden}
\begin{document}
\begin{frame}
\begin{tcolorbox}%
test
\end{tcolorbox}%
\hfill%
\begin{tcolorbox}%
test
test
\end{tcolorbox}%
\end{frame}
\end{document}
(for the image, I removed the interior empty option so one can see the height of the box)
I'm new to LaTex and I wanted to know how I can change the Margins of my scrreport so that the chapter title, text and basically everythin starts a bit higher and ends a bit lower. In my opinion there is too much empty space before anything starts.
If I use this simple example:
\documentclass[12pt,a4paper,twoside]{scrreport}
\usepackage{blindtext}
\begin{document}
\chapter{First Chapter}
\blindtext
\end{document}
I think the margins from top and bottom are too big. So i want everything to move up a little bit.
Thanks!
Method 1:
Choose one of the predefined layouts. You'll find a list of available options in the koma script documentation.
\documentclass[12pt,a4paper,twoside,DIV=15]{scrreport}
\usepackage{blindtext}
\begin{document}
\chapter{First Chapter}
\blinddocument
\end{document}
Method 2:
Setting up the text area manually. You should be really sure that you know what you are doing to get an aesthetically pleasant result.
\documentclass[12pt,a4paper,twoside]{scrreport}
\areaset[current]{168.00mm}{250mm}
\usepackage{blindtext}
\begin{document}
\chapter{First Chapter}
\blinddocument
\end{document}
I'm trying to write a resume using latex and want to divide the page up in smaller sections(education, experience, skills, etc). However, I'm not really sure how to achieve this. A lot of the templates that i have found basically looks like a list, sometimes with a sidebar, but I want to be able to have a header and sections next to each other. Think CSS grids. The only tool I have found is Flowfram, but it feels overly complicated. Is there an easier way to achieve this layout?
Even though this isn't my type of resume, it gives a good idea of the type of layout I want to achieve:
The alignment of the content seems to be independent between the two columns, so one could use a very simple layout and just place two minipages besides each other:
\documentclass{article}
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{lipsum}
\begin{document}
\noindent%
\begin{minipage}{.2\textwidth}
\includegraphics[width=\linewidth]{example-image-duck}
\end{minipage}%
\hfill
\begin{minipage}{.7\textwidth}
\Huge\centering
Quack McDucky
\rule{\linewidth}{1pt}
\Large Duckxpert
\end{minipage}%
\vspace{2cm}
\noindent%
\begin{minipage}[t]{.55\textwidth}
\section*{Work Experience}
\lipsum[2]
\begin{itemize}
\item test
\item test
\end{itemize}
\end{minipage}%
\hfill
\raisebox{-.425\textheight}{\rule{1pt}{.45\textheight}}
\hfill
\begin{minipage}[t]{.35\textwidth}
\section*{Education}
\lipsum[2]
\end{minipage}%
\end{document}
I'm trying to make alignment points in a list environment. The following code gives me an error, but it almost compiles to what I want, just missing the bullet points. I must be misunderstanding something about align and/or tabular and how they work with linebreaks. Guidance appreciated!
\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Title}
\begin{itemize}
\begin{tabular}{ll}
\item Topic Apple: &Something to say about it \\
\item Topic Watermelons: &Something different
\end{tabular}
\end{itemize}
\end{frame}
\end{document}
How about this?
\documentclass{beamer}
\begin{document}
\begin{frame}
\frametitle{Title}
\begin{tabular}{p{0.4\textwidth}p{0.5\textwidth}}
\begin{itemize}
\item Topic Apple:
\item Topic Watermelon:
\end{itemize} &
\begin{itemize}
\item[] Something to say about it
\item[] Something to say about it
\end{itemize} \\
\end{tabular}
\end{frame}
\end{document}
Yours will actually work if you change {ll} to {p{width}l} or {p{width}p{width}} but I found that if you don't have itemize in the second column, your text ends up vertically top aligned while the itemized text in the left column is center (or maybe even slightly bottom) aligned vertically so it doesn't look good.
I tried using the array package and m{width} which provides a vertical center alignment but that was still different than whatever itemize is using. I'd say just play with the width argument inside of p{} to get the spacing/width you want. If your right column spills on to another line, you may need a "dummy" item in the right column.
Anyway, based on all the jimmy rigging that might be necessary if things spill onto two lines, I'm assuming my solution is potentially hackish but it looks like it provides what you want for the most part.
the \item[] for the right column is to create the same itemize alignment with no bullet. If you want bullets on the right, just remove the empty square brackets and you'll have them.
Is there a way to have a table in LaTeX that spans multiple pages width-wise, rather than length-wise? As far as I can tell, both longtable and supertabular will break tables over multiple pages, but only by breaking between rows and I need to break between columns. Even better would be if it were possible to have a few columns repeated at on each page.
I am using this not so nice and manually configured code to split a too wide tabular:
\usepackage{tikz}
\newsavebox{\boxFinal}
\begin{lrbox}{\boxFinal}
\scalebox{0.6}{
\begin{tabular}{...}
...
\end{tabular}
}
\end{lrbox}
\begin{table}[htb]
\centering
\begin{tikzpicture}
\clip (0,-\dp\boxFinal) rectangle (0.5\wd\boxFinal,\ht\boxFinal);
\pgftext[left,base]{\usebox{\boxFinal}};
\end{tikzpicture}
\label{table_test1}\caption{Part 1 of 2.}
\end{table}
\begin{table}[htb]
\centering
\begin{tikzpicture}
\clip (0.5\wd\boxFinal,-\dp\boxFinal) rectangle
(\wd\boxFinal,\ht\boxFinal); \pgftext[left,base]{\usebox{\boxFinal}};
\end{tikzpicture}
\label{table_test2}\caption{Part 2 of 2.}
\end{table}
There is usually a need to manually correct split offsets. You can do this by adding or subtracting from 0.5\wd\boxFinal value.
The idea was taken from http://www.latex-community.org/forum/viewtopic.php?f=5&t=2867
I've been yanking my hair out with this same problem off and on for a week. I think that this may not be entirely possible in a non-hacky sort of way.
One possible hackly solution is to use the dpfloat package: http://www.ctan.org/tex-archive/help/Catalogue/entries/dpfloat.html
Unfortunately, you'd be creating multiple tables and breaking them manually, but at least the end result should look okay. Also, this will look much better if you ditch vertical rules in your tables as per the sage guidance in the booktabs package (which you will have to google because apparently I, as a new user, don't have enough reputation to post a link to the booktabs pdf manual).
A good solution would be to rotate the whole table 90 degrees counterclockwise, thus having more room for it.
Preamble \usepackage{pdflscape}
\newpage
\thispagestyle{empty}
\begin{landscape}
\begin{table}
...
\end{table}
\end{landscape}