Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 3 years ago.
Improve this question
I want to describe a number of variables in an equation and format it in a certain way. I don't know how to do that.
I have tried using the \begin{table} environment together with \begin{flushleft} and \begin{tabular}.
Also, I tried using \begin{align*} and \begin{flalign*}.
\begin{flalign*}
&C_R&\text{CO\textsubscript{2}-Masse pro Luftvolumen im Büro}&[\frac{g}{m^3}]\\
&C_{Amb}&\text{CO\textsubscript{2}-Masse pro Luftvolumen in der Umgebung}&[\frac{g}{m^3}]\\
&C_{Corr}&\text{CO\textsubscript{2}-Masse pro Luftvolumen im Flur}&[\frac{g}{m^3}]\\
&C_{ProdPP}&\text{CO\textsubscript{2}-Masse-Produktion pro Luftvolumen pro Person}&[\frac{g}{min}]\\
&\dot{m}_{airx}&\text{Luftmassenstrom vom Büro in die Umgebung und benachbarte Räume}&[\frac{kg}{min}]\\
&\dot{m}_{Amb}&\text{Luftmassenstrom von der Umgebung in das Büro}&[\frac{kg}{min}]\\
&\dot{m}_{Corr}&\text{Luftmassenstrom vom Flur in das Büro}&[\frac{kg}{min}]\\
&\rho_{air}&\text{Dichte der Luft}&[\frac{kg}{m^3}]\\
&V_{office}&\text{Volumen des Büros}&[m^3]\\
&\Delta t&\text{Zeitschritt}&[min]\\
&n_{OCC,i}&\text{Anzahl der anwesenden Personen}&[-]\\
\end{flalign*}
\begin{table}
\begin{flushleft}
\begin{tabular}{c c c}
$C_R$&\text{CO\textsubscript{2}-Masse pro Luftvolumen im Büro}&[$\frac{g}{m^3}$]\\
$C_{Amb}$&\text{CO\textsubscript{2}-Masse pro Luftvolumen in der Umgebung}&[$\frac{g}{m^3}$]\\
$C_{Corr}$&\text{CO\textsubscript{2}-Masse pro Luftvolumen im Flur}&[$\frac{g}{m^3}$]\\
$C_{ProdPP}$&\text{CO\textsubscript{2}-Masse-Produktion pro Luftvolumen pro Person}&[$\frac{g}{min}$]\\
$\dot{m}_{airx}$&\text{Luftmassenstrom vom Büro in die Umgebung und benachbarte Räume}&[$\frac{kg}{min}$]\\
$\dot{m}_{Amb}$&\text{Luftmassenstrom von der Umgebung in das Büro}&[$\frac{kg}{min}$]\\
$\dot{m}_{Corr}$&\text{Luftmassenstrom vom Flur in das Büro}&[$\frac{kg}{min}$]\\
$\rho_{air}$&\text{Dichte der Luft}&[$\frac{kg}{m^3}$]\\
$V_{office}$&\text{Volumen des Büros}&[$m^3$]\\
$\Delta t$&\text{Zeitschritt}&[$min$]\\
% $n_{OCC,i}$&\text{Anzahl der anwesenden Personen}&[$-$]\\
\end{tabular}
\end{flushleft}
\end{table}
This is the current result I get:
Here, the middle column is right-aligned.
But I want each column to be aligned to the left.
If the columns should be left aligned, I suggest to simply use l columns instead of c columns:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{table}
%\begin{flushleft}
\begin{tabular}{lll}
$C_R$&\text{CO\textsubscript{2}-Masse pro Luftvolumen im Büro}&[$\frac{g}{m^3}$]\\
$C_{Amb}$&\text{CO\textsubscript{2}-Masse pro Luftvolumen in der Umgebung}&[$\frac{g}{m^3}$]\\
$C_{Corr}$&\text{CO\textsubscript{2}-Masse pro Luftvolumen im Flur}&[$\frac{g}{m^3}$]\\
$C_{ProdPP}$&\text{CO\textsubscript{2}-Masse-Produktion pro Luftvolumen pro Person}&[$\frac{g}{min}$]\\
$\dot{m}_{airx}$&\text{Luftmassenstrom vom Büro in die Umgebung und benachbarte Räume}&[$\frac{kg}{min}$]\\
$\dot{m}_{Amb}$&\text{Luftmassenstrom von der Umgebung in das Büro}&[$\frac{kg}{min}$]\\
$\dot{m}_{Corr}$&\text{Luftmassenstrom vom Flur in das Büro}&[$\frac{kg}{min}$]\\
$\rho_{air}$&\text{Dichte der Luft}&[$\frac{kg}{m^3}$]\\
$V_{office}$&\text{Volumen des Büros}&[$m^3$]\\
$\Delta t$&\text{Zeitschritt}&[$min$]\\
% $n_{OCC,i}$&\text{Anzahl der anwesenden Personen}&[$-$]\\
\end{tabular}
%\end{flushleft}
\end{table}
\end{document}
(unrelated to the problem: units should be set upright and math mode should not be used for multi-letter words like min, office etc. It might be a good idea to have look at the siunitx package to make it easier to typeset units correctly)
Related
I want to add a paragraph section to the Summary section in this Latex template.
I've tried using \paragraph, but I am not able to get the results I want. I'm very new to Latex so my understanding of \newcommand is a little confusing to me.
Here is the template src:
\documentclass[letterpaper,11pt]{article}
\usepackage{latexsym}
\usepackage[empty]{fullpage}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage[usenames,dvipsnames]{color}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage[hidelinks]{hyperref}
\usepackage{fancyhdr}
\usepackage[english]{babel}
\usepackage{tabularx}
\input{glyphtounicode}
%----------FONT OPTIONS----------
% sans-serif
% \usepackage[sfdefault]{FiraSans}
% \usepackage[sfdefault]{roboto}
% \usepackage[sfdefault]{noto-sans}
% \usepackage[default]{sourcesanspro}
% serif
% \usepackage{CormorantGaramond}
% \usepackage{charter}
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Adjust margins
\addtolength{\oddsidemargin}{-0.5in}
\addtolength{\evensidemargin}{-0.5in}
\addtolength{\textwidth}{1in}
\addtolength{\topmargin}{-.5in}
\addtolength{\textheight}{1.0in}
\urlstyle{same}
\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}
% Sections formatting
\titleformat{\section}{
\vspace{-4pt}\scshape\raggedright\large
}{}{0em}{}[\color{black}\titlerule \vspace{-5pt}]
% Ensure that generate pdf is machine readable/ATS parsable
\pdfgentounicode=1
%-------------------------
% Custom commands
\newcommand{\resumeItem}[1]{
\item\small{
{#1 \vspace{-2pt}}
}
}
\newcommand{\resumeSubheading}[4]{
\vspace{-2pt}\item
\begin{tabular*}{0.97\textwidth}[t]{l#{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{\small#3} & \textit{\small #4} \\
\end{tabular*}\vspace{-7pt}
}
\newcommand{\resumeSubSubheading}[2]{
\item
\begin{tabular*}{0.97\textwidth}{l#{\extracolsep{\fill}}r}
\textit{\small#1} & \textit{\small #2} \\
\end{tabular*}\vspace{-7pt}
}
\newcommand{\resumeProjectHeading}[2]{
\item
\begin{tabular*}{0.97\textwidth}{l#{\extracolsep{\fill}}r}
\small#1 & #2 \\
\end{tabular*}\vspace{-7pt}
}
\newcommand{\resumeSubItem}[1]{\resumeItem{#1}\vspace{-4pt}}
\renewcommand\labelitemii{$\vcenter{\hbox{\tiny$\bullet$}}$}
\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=0.15in, label={}]}
\newcommand{\resumeSubHeadingListEnd}{\end{itemize}}
\newcommand{\resumeItemListStart}{\begin{itemize}}
\newcommand{\resumeItemListEnd}{\end{itemize}\vspace{-5pt}}
%-------------------------------------------
%%%%%% RESUME STARTS HERE %%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%----------HEADING----------
% \begin{tabular*}{\textwidth}{l#{\extracolsep{\fill}}r}
% \textbf{\href{http://sourabhbajaj.com/}{\Large Sourabh Bajaj}} & Email : \ href{mailto:sourabh#sourabhbajaj.com}{sourabh#sourabhbajaj.com}\\
% \href{http://sourabhbajaj.com/}{http://www.sourabhbajaj.com} & Mobile : +1-123-456-7890 \\
% \end{tabular*}
\begin{center}
\textbf{\Huge \scshape Name} \\ \vspace{1pt}
\small 734-548-4835 $|$ \href{email}{\underline{email}} $|$
\href{}{\underline{linkedin}} $|$
\href{}{\underline{github}}
\end{center}
%-----------EDUCATION-----------
\section{Summary}
\resumeSubHeadingListStart
\resumeSubheading
\resumeSubheading
\resumeSubHeadingListEnd
%-----------EXPERIENCE-----------
\section{Experience}
\resumeSubHeadingListStart
\resumeSubheading
{Undergraduate Research Assistant}{June 2020 -- Present}
{Texas A\&M University}{College Station, TX}
\resumeItemListStart
\resumeItem{Developed a REST API using FastAPI and PostgreSQL to store data from learning management systems}
\resumeItem{Developed a full-stack web application using Flask, React, PostgreSQL and Docker to analyze GitHub data}
\resumeItem{Explored ways to visualize GitHub collaboration in a classroom setting}
\resumeItemListEnd
% -----------Multiple Positions Heading-----------
% \resumeSubSubheading
% {Software Engineer I}{Oct 2014 - Sep 2016}
% \resumeItemListStart
% \resumeItem{Apache Beam}
% {Apache Beam is a unified model for defining both batch and streaming data-parallel processing pipelines}
% \resumeItemListEnd
% \resumeSubHeadingListEnd
%-------------------------------------------
\resumeSubheading
{Information Technology Support Specialist}{Sep. 2018 -- Present}
{Southwestern University}{Georgetown, TX}
\resumeItemListStart
\resumeItem{Communicate with managers to set up campus computers used on campus}
\resumeItem{Assess and troubleshoot computer problems brought by students, faculty and staff}
\resumeItem{Maintain upkeep of computers, classroom equipment, and 200 printers across campus}
\resumeItemListEnd
\resumeSubheading
{Artificial Intelligence Research Assistant}{May 2019 -- July 2019}
{Southwestern University}{Georgetown, TX}
\resumeItemListStart
\resumeItem{Explored methods to generate video game dungeons based off of \emph{The Legend of Zelda}}
\resumeItem{Developed a game in Java to test the generated dungeons}
\resumeItem{Contributed 50K+ lines of code to an established codebase via Git}
\resumeItem{Conducted a human subject study to determine which video game dungeon generation technique is enjoyable}
\resumeItem{Wrote an 8-page paper and gave multiple presentations on-campus}
\resumeItem{Presented virtually to the World Conference on Computational Intelligence}
\resumeItemListEnd
\resumeSubHeadingListEnd
%-----------PROJECTS-----------
\section{Projects}
\resumeSubHeadingListStart
\resumeProjectHeading
{\textbf{Gitlytics} $|$ \emph{Python, Flask, React, PostgreSQL, Docker}}{June 2020 -- Present}
\resumeItemListStart
\resumeItem{Developed a full-stack web application using with Flask serving a REST API with React as the frontend}
\resumeItem{Implemented GitHub OAuth to get data from user’s repositories}
\resumeItem{Visualized GitHub data to show collaboration}
\resumeItem{Used Celery and Redis for asynchronous tasks}
\resumeItemListEnd
\resumeProjectHeading
{\textbf{Simple Paintball} $|$ \emph{Spigot API, Java, Maven, TravisCI, Git}}{May 2018 -- May 2020}
\resumeItemListStart
\resumeItem{Developed a Minecraft server plugin to entertain kids during free time for a previous job}
\resumeItem{Published plugin to websites gaining 2K+ downloads and an average 4.5/5-star review}
\resumeItem{Implemented continuous delivery using TravisCI to build the plugin upon new a release}
\resumeItem{Collaborated with Minecraft server administrators to suggest features and get feedback about the plugin}
\resumeItemListEnd
\resumeSubHeadingListEnd
%
%-----------PROGRAMMING SKILLS-----------
\section{Technical Skills}
\begin{itemize}[leftmargin=0.15in, label={}]
\small{\item{
\textbf{Languages}{: Java, Python, C/C++, SQL (Postgres), JavaScript, HTML/CSS, R} \\
\textbf{Frameworks}{: React, Node.js, Flask, JUnit, WordPress, Material-UI, FastAPI} \\
\textbf{Developer Tools}{: Git, Docker, TravisCI, Google Cloud Platform, VS Code, Visual Studio, PyCharm, IntelliJ, Eclipse} \\
\textbf{Libraries}{: pandas, NumPy, Matplotlib}
}}
\end{itemize}
%-------------------------------------------
\end{document}
I am working on my resume and am using LaTex in Overleaf. I am having issue with spacing everything properly. Here is my LaTex.
%-------------------------
% Resume in Latex
% Author : Sidratul Muntaha Ahmed
% License : MIT
%------------------------
\documentclass[letterpaper,12pt]{article}
\usepackage{latexsym}
\usepackage[empty]{fullpage}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage[usenames,dvipsnames]{color}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage[hidelinks]{hyperref}
\usepackage{fancyhdr}
\usepackage[english]{babel}
\usepackage{tabularx}
\input{glyphtounicode}
%----------FONT OPTIONS----------
% sans-serif
% \usepackage[sfdefault]{FiraSans}
% \usepackage[sfdefault]{roboto}
% \usepackage[sfdefault]{noto-sans}
% \usepackage[default]{sourcesanspro}
% serif
% \usepackage{CormorantGaramond}
% \usepackage{charter}
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Adjust margins
\addtolength{\oddsidemargin}{-0.5in}
\addtolength{\evensidemargin}{-0.5in}
\addtolength{\textwidth}{1in}
\addtolength{\topmargin}{-.5in}
\addtolength{\textheight}{1.0in}
\urlstyle{same}
\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}
% Sections formatting
\titleformat{\section}{
\vspace{-4pt}\scshape\raggedright\large
}{}{0em}{}[\color{black}\titlerule \vspace{1pt}]
% Ensure that generate pdf is machine readable/ATS parsable
\pdfgentounicode=1
%-------------------------
% Custom commands
\newcommand{\resumeItem}[1]{
\item\small{
{#1 \vspace{-6pt}}
}
}
\newcommand{\resumeSubheading}[4]{
\vspace{-9.5pt}\item
\begin{tabular*}{0.97\textwidth}[t]{l#{\extracolsep{\fill}}r}
\textbf{#1} & #2 \\
\textit{\small#3} & \textit{\small #4} \\
\end{tabular*}\vspace{-10pt}
}
\newcommand{\resumeSubSubheading}[2]{
\item
\begin{tabular*}{0.97\textwidth}{l#{\extracolsep{\fill}}r}
\textit{\small#1} & \textit{\small #2} \\
\end{tabular*}\vspace{-10pt}
}
\newcommand{\resumeProjectHeading}[2]{
\item
\begin{tabular*}{0.97\textwidth}{l#{\extracolsep{\fill}}r}
\small#1 & #2 \\
\end{tabular*}\vspace{-10pt}
}
\newcommand{\resumeSubItem}[1]{\resumeItem{#1}\vspace{-5pt}}
\renewcommand\labelitemii{$\vcenter{\hbox{\tiny$\bullet$}}$}
\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=0.15in, label={}]}
\newcommand{\resumeSubHeadingListEnd}{\end{itemize}}
\newcommand{\resumeItemListStart}{\begin{itemize}}
\newcommand{\resumeItemListEnd}{\end{itemize}\vspace{-5pt}}
%-------------------------------------------
%%%%%% RESUME STARTS HERE %%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%----------HEADING----------
\begin{center}
\textbf{\Huge \scshape Brad Bieselin} \\ \vspace{1pt}
\textbf{\small \scshape 516-557-8407 $|$ Wantagh, NY} \\ \vspace{1pt}
\href{https://bradbieselin.com/}{\underline{bradbieselin.com}} $|$ \href{mailto:brad#bradbieselin.com}{\underline{brad#bradbieselin.com}} $|$
\href{https://linkedin.com/in/bradbieselin}{\underline{linkedin.com/in/bradbieselin}} $|$
\href{https://github.com/bradbieselin}{\underline{github.com/bradbieselin}}
\end{center}
%-----------Experience-----------
\section{Experience}
\resumeSubHeadingListStart
\resumeSubheading
{Witbe Inc}{New York, NY}
{Project Manager/Customer Success Manager}{June 2021-Present}
\resumeItemListStart
\resumeItem{Led and managed 9 projects for customers including Verizon, ViacomCBS, and Peacock by automating VoD asset testing, Channel Change testing, and video/audio quality analysis using Witbe robots}
\resumeItem{Prepared and facilitated 8+ hour interactive training sessions for all customers, including 10+ senior executives on delivery of new products and software}
\resumeItem{Planned, scheduled and executed all software, hardware, and system integration with over 100 Witbe robots and customer devices to ensure the best Quality of Experience monitoring}
\resumeItem{Established growth and generated improvements to customer business by over 40\% by managing automated scripting and monitoring projects, and finding opportunities for improvement}
\resumeItem{Stimulated progress of each project to meet deadlines and standards with 10+ check-ins per week and constant improvemenets to automation scripts}
\resumeItemListEnd
\resumeSubHeadingListEnd
\resumeSubHeadingListStart
\resumeSubheading
{Apple Inc}{Remote}
{Software Quality Engineer}{February 2021-June 2021}
\resumeItemListStart
\resumeItem{Developed projects in Java using Jackson, Jenkins, TestNG and Gradle which analyzed and validated Apple.com product prices when adding products to the cart, testing over 3000 scenarios}
\resumeItem{Engineered a Full-Stack project which allows the upload and download of files, built with a React.js and Spring Boot backend, and using Amazon S3 cloud storage to store files}
\resumeItem{Gained fluency in AWS with 40+ hours of training and obtained AWS Cloud Practitioner Certification}
\resumeItem{Collaborated with development engineers for code review regularly to propose improvements}
\resumeItem{Collected data, devised Confluence reports, and presented reports during weekly team meetings which highlighted progress of software quality testing projects}
\resumeItemListEnd
\resumeSubHeadingListEnd
\resumeSubHeadingListStart
\resumeSubheading
{Frontend Web Developer}{}
{Freelance}{January 2021-Present}
\resumeItemListStart
\resumeItem{Coding web applications and integrating CMS driven data, such as Contentful}
\resumeItem{Designing and creating user interfaces with modern frameworks including React.js and Next.js}
\resumeItem{Completed FrontendMasters Bootcamp and 40+ hours of additional courses including Functional Javascript, Advanced CSS, Computer Science, and Website Accessibility}
\resumeItemListEnd
\resumeSubHeadingListEnd
%-----------Education-----------
\section{Projects}
\resumeSubHeadingListStart
\resumeProjectHeading
{\href{https://studentprofiles.bradbieselin.com/}{\underline{Student Profiles}} $|$ \emph{React.js/Firebase}}{}
\resumeItemListStart
\resumeItem{Developed a website which lets users filter student profiles by name or tag and see test scores driven by an API, using React.js for the frontend}
\resumeItemListEnd
\resumeSubHeadingListEnd
\resumeSubHeadingListStart
\resumeProjectHeading
{\href{https://bitcointracker.bradbieselin.com/}{\underline{Bitcoin Tracker}} $|$ \emph{Javascript/Firebase}}{}
\resumeItemListStart
\resumeItem{An animated sunset built with Javascript, CSS, and HTML that tracks the live price of Bitcoin using the Binance.com websocket}
\resumeItemListEnd
\resumeSubHeadingListEnd
%
%-----------Education-----------
\section{Education}
\resumeSubHeadingListStart
\resumeProjectHeading
{\textbf{University at Albany, SUNY} \emph{}}{May 2015-December 2019}
\resumeItemListStart
\resumeItem{Bachelor of Science in Computer Science}
\resumeItem{Awarded from the College of Engineering and Applied Science}
\resumeItemListEnd
\resumeSubHeadingListEnd
%
%-----------SKILLS-----------
\section{Skills}
\begin{itemize}[leftmargin=0.15in, label={}]
\small{\item{
\textbf{Languages}{: Javascript, TypeScript, CSS, HTML, Java, Python, C, LaTex, PowerShell, Bash} \\
\textbf{Web Skills}{: WebPack, Babel, Tailwind, Styled Components, SEO, Contentful CMS, Amazon Web Services} \\
\textbf{React Skills}{: Next, Gatsby, Material/Semantic UI} \\
\textbf{Technologies}{: Git, WSL 2, VS Code/Studio, IntelliJ, Node.js, Express, Spring Boot} \\
}}
\end{itemize}
%-------------------------------------------
\end{document}
I can't get the spacing to work properly. For my projects, education and skills section there is a lot of empty space and I want everything to be much closer together. Does anyone have any suggestions? Thank you!
Here is an example of the spacing I am looking to achieve:
Here is what the section I am having trouble with looks like:
How I can only translate one section title(abstract) in english in a german document?
\documentclass{article}
% \usepackage[utf8]{inputenc} is no longer required (since 2018)
%Set the font (output) encoding
%--------------------------------------
\usepackage[T1]{fontenc} %Not needed by LuaLaTeX or XeLaTeX
%--------------------------------------
%German-specific commands
%--------------------------------------
\usepackage[ngerman]{babel}
%Hyphenation rules
%--------------------------------------
\usepackage{hyphenat}
\hyphenation{Mathe-matik wieder-gewinnen}
%--------------------------------------
\begin{document}
\tableofcontents
\vspace{2cm} %Add a 2cm space
\begin{abstract}
Dies ist eine kurze Zusammenfassung der Inhalte des in deutscher Sprache
verfassten Dokuments.
\end{abstract}
\section{Einleitendes Kapitel}
Dies ist der erste Abschnitt. Hier können wir einige zusätzliche Elemente
hinzufügen und alles wird korrekt geschrieben und umgebrochen werden. Falls ein
Wort für eine Zeile zu lang ist, wird \texttt{babel} versuchen je nach Sprache
richtig zu trennen.
\section{Eingabe mit mathematischer Notation}
In diesem Abschnitt ist zu sehen, was mit Macros, die definiert worden,
geschieht.
\[ \lim x = \theta + 152383.52 \]
\end{document}
So that Zusammenfassung is translatet to Abstract and all other should stay so far
\documentclass{article}
% \usepackage[utf8]{inputenc} is no longer required (since 2018)
%Set the font (output) encoding
%--------------------------------------
\usepackage[T1]{fontenc} %Not needed by LuaLaTeX or XeLaTeX
%--------------------------------------
%German-specific commands
%--------------------------------------
\usepackage[ngerman]{babel}
\addto\captionsngerman{%
\def\abstractname{Abstract}%
}
%Hyphenation rules
%--------------------------------------
\usepackage{hyphenat}
\hyphenation{Mathe-matik wieder-gewinnen}
%--------------------------------------
\begin{document}
\tableofcontents
\vspace{2cm} %Add a 2cm space
\begin{abstract}
Dies ist eine kurze Zusammenfassung der Inhalte des in deutscher Sprache
verfassten Dokuments.
\end{abstract}
\section{Einleitendes Kapitel}
Dies ist der erste Abschnitt. Hier können wir einige zusätzliche Elemente
hinzufügen und alles wird korrekt geschrieben und umgebrochen werden. Falls ein
Wort für eine Zeile zu lang ist, wird \texttt{babel} versuchen je nach Sprache
richtig zu trennen.
\section{Eingabe mit mathematischer Notation}
In diesem Abschnitt ist zu sehen, was mit Macros, die definiert worden,
geschieht.
\[ \lim x = \theta + 152383.52 \]
\end{document}
I am new to LaTeX and I want to create a quite simple table (in german). As you can see in my code, it has to contain 5 rows and 5 columns. My problem is that the table is too large for my page and it overflows on the right side of the page. I don't want to rotate the table, so it should use hyphenation to use the given space better.
\documentclass[12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage[a4paper,lmargin={3cm},rmargin={2cm},
tmargin={2cm},bmargin = {2cm}]{geometry}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{csquotes}
\usepackage{mathptmx}
\usepackage{booktabs}
\MakeOuterQuote{"}
\linespread{1.5}
\begin{document}
\end{document}
\begin{table}[h]
\centering
\caption{Übersicht aller Umfragen zur Landtagswahl in Sachsen-Anhalt im April/Mai 2021.}
\begin{tabular}{l l l l l}
\toprule
Durchgeführt von:
& Erhebungszeitraum
& Datum der Veröffentlichung
& Erhebungsmethode(n)
& Veröffentlicht von:\\
\midrule
infratest dimap
& 16. – 21.April 2021
& 23.April 2021
& zufallsbasierte Telefon- und Onlineinterviews
& mrd.de \\
Forsa
& 20. – 27.April 2021
& 29.April 2021
& k.A.
& welt.de \\
Insa
& 17. – 23.Mai 2021
& 26.Mai 2021
& k.A.
& bild.de \\
infratest dimap
& 25. – 26.Mai 2021
& 27. Mai 2021
& zufallsbasierte Telefon- und Onlineinterviews
& tagesschau.de \\
Mannheimer Forschungsgruppe Wahlen
& 25. – 27.Mai 2021
& 28.Mai 2021
& zufallsbasierte Telefoninterviews
& zdf.de \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
I think a similar problem is described here, but to be honest; my table is much simpler (no multicolumns and no math-symbols), so I have some problems to find the right code to solve my problem.
Thank you very much for reading my question! :)
To get line breaks you'll need a column type of fixed with, e.g. p{<some width>} or you can use the tabularx package to automatically determine the width of the columns.
However even with line breaks, the table will still look awfully crowded. You can safe a bit more space by giving the months as numbers instead of words and adding #{} before/after the first/last column.
\documentclass[12pt]{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage[a4paper,lmargin={3cm},rmargin={2cm},
tmargin={2cm},bmargin = {2cm}]{geometry}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{csquotes}
\usepackage{mathptmx}
\usepackage{booktabs}
\usepackage{tabularx}
\MakeOuterQuote{"}
\linespread{1.5}
\begin{document}
\begin{table}[h]
\centering
\caption{Übersicht aller Umfragen zur Landtagswahl in Sachsen-Anhalt im April/Mai 2021.}
\begin{tabularx}{\linewidth}{#{} *5{>{\raggedright\arraybackslash}X} #{}}
\toprule
Durchgeführt von:
& Erhebungs\-zeitraum
& Datum der Veröffentlichung
& Erhebungs\-methode(n)
& Veröffentlicht von:\\
\midrule
infratest dimap
& 16. – 21.4.2021
& 23.4.2021
& zufallsbasierte Telefon- und Onlineinterviews
& mrd.de \\
Forsa
& 20.–27.4.2021
& 29.4.2021
& k.A.
& welt.de \\
Insa
& 17.–23.5.2021
& 26.5.2021
& k.A.
& bild.de \\
infratest dimap
& 25.–26.5.2021
& 27.5.2021
& zufallsbasierte Telefon- und Onlineinterviews
& tagesschau.de \\
Mannheimer Forschungsgruppe Wahlen
& 25.–27.5.2021
& 28.5.2021
& zufallsbasierte Telefoninterviews
& zdf.de \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 3 years ago.
Improve this question
\begin{tabularx}{\textwidth}{|c|X|X|c|}
\hline
S.no & \multicolumn{1}{|c|}{\textbf{headline}} & \multicolumn{1}{|c|}{\textbf{article\_link}} & \bf\Centering is\_sarcastic \\ \hline
1 &
man who said 'yes' to life found with mountain bike at bottom of gorge &
{https://local.theonion.com/man-who-said-yes-to-life-found-with-mountain-bike-at-bo-1819573183} &
1\\
\hline
2 &
tina fey is worried about what the internet is doing to society &
{https://www.huffingtonpost.com/entry/tina-fey-internet\_us\_5848252ce4b08c82e888ff80} &
0 \\
\hline
3 &
why a woman refuses to leave her husband who threatened to kill her &
{https://www.huffingtonpost.com/entry/pro-fighter-allegedly-abuses-wife\_n\_6072618.html} &
0 \\ \hline
\end{tabularx}
Don't write urls as text. There are packages like url or hyperref that provide a dedicated \url{} macro for them. This also saves you from manually escaping all special letters.
to enable more possible breaking points to squeeze them into your way to narrow column, try the xurl package
Never use two-letter font commands like \bf, they are deprecated
Have a look at https://inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf for some suggestions about professional looking tables. Main point: don't use vertical lines
\documentclass{article}
\usepackage{tabularx}
\usepackage{xurl}
\begin{document}
\begin{tabularx}{\textwidth}{|c|X|X|c|}
\hline
S.no & \textbf{headline} & \textbf{article\_link} & \textbf{is\_sarcastic} \\ \hline
1 &
man who said 'yes' to life found with mountain bike at bottom of gorge &
\url{https://local.theonion.com/man-who-said-yes-to-life-found-with-mountain-bike-at-bo-1819573183} &
1\\
\hline
2 &
tina fey is worried about what the internet is doing to society &
\url{https://www.huffingtonpost.com/entry/tina-fey-internet_us_5848252ce4b08c82e888ff80} &
0 \\
\hline
3 &
why a woman refuses to leave her husband who threatened to kill her &
\url{https://www.huffingtonpost.com/entry/pro-fighter-allegedly-abuses-wife_n_6072618.html} &
0 \\ \hline
\end{tabularx}
\end{document}