Hot answers tagged

15

This is in fact (much, much, much) easier with tcolorbox \documentclass[paper=letterpaper,fontsize=10pt]{article} \usepackage{amsmath,amsfonts,amsthm} \usepackage{graphicx} \usepackage[svgnames]{xcolor} \usepackage[most]{tcolorbox} \usepackage{geometry} \usepackage{url} \usepackage{wrapfig} \frenchspacing \pagestyle{empty} \usepackage{sectsty} \sectionfont{ ...


11

This is another tcolorbox solution which uses the skins and xparse libraries. xparse is used to define a new command \namebox{<first names>}{<last name>}{<content of right hand box e.g. list>} The width of the left hand box is adapted to fit the content of the top and bottom parts. The overall structure consists of a sidebyside box ...


8

\documentclass{article} \usepackage{color} \begin{document} \colorbox{black}{\textcolor{white}{\Large\bfseries\sffamily \begin{tabular}{@{}l@{}} FirstName\\ lastName \end{tabular}}} \end{document}


7

A simple solution with a tabular environment and colortbl: \documentclass[paper=letterpaper,fontsize=10pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{geometry} \usepackage{cabin} \usepackage{fontawesome} \usepackage{amsmath} \usepackage{graphicx, array, multirow, makecell,} \usepackage[svgnames, table]{xcolor} \usepackage{url} ...


5

Some more testing with actual text and the desired pagination parameters would be needed, but this should be a starting point. \documentclass{article} \newenvironment{originalbreaks}[1] {\par\addvspace{\topsep}% \begingroup\lccode`~=`\^^M \lowercase{\endgroup\def~}{\mbox{}\linebreak}% \hbadness10000 % turn off warnings \catcode`\^^M=\active#1} ...


5

Perhaps I am mistaken that you are interested in multiple multiline coloured boxes placed adjacently. If that is not the case you can simply do it using parbox like this: \documentclass{article} \usepackage{color} \begin{document} \colorbox{black}{\parbox[c]{6cm}{\centering \color{white}\Huge\bfseries First Name Last Name }} \end{document} If you ...


4

It's quite strange that every beginner's guide to LaTeX tells as soon as possible that paragraphs should be separated from each other by a blank line but several people use \\ to finish up a paragraph. It's possible that the influence of word processors governs the choice of those who use \\. The path seems to be like If I hit Return in the editor ...


4

You have the color macro improperly grouped. That is, you close the group (with a right brace }) immediately after changing the color, rather than after painting the \rule. \documentclass[a4paper, 10 pt, oneside, final]{scrartcl} \usepackage[left=4.6cm, right=0.75cm, top=0.5cm, bottom=0.5cm]{geometry} \usepackage{soul} \usepackage{scrpage2} ...


3

Something like this? \documentclass[twocolumn]{article} \usepackage{amsmath} % for '\text' macro \newcommand\mcr[1]{\multicolumn{1}{@{}r@{}}{#1}} % handy shortcut macro \begin{document} \begin{equation} \medmuskip=2mu % reduce spacing around binary operators \thickmuskip=3mu % reduce spacing around relational operators \renewcommand\arraystretch{1.5} ...


3

If you use \url from the url package it just enables line breaking without any links.


2

The German LaTeX Wikibook contains a chapter about hyphenation -- here's the link. babel Package First of all make sure that you use the babel package. It loads hyphenation rules for the language you use. hyphsubst Package If you write in German maybe the hyphsubst package is a good option. Manually Help LaTeX with the Hyphenation (Globally) As stated ...


2

Please always provide an example document, here are two possibilities first showing a breakable subscript that wraps at word spaces second showing a paragraph with overfull lines in the margin, with \sloppy and with \raggedright \documentclass{article} \def\xsubscript#1{{\scriptsize \xxsubscript#1 ^ }} \def\xxsubscript#1 {% \ifx^#1\else ...


2

Ok, I found the answer here: How to linebreak when using \rotatebox inside a tikz node? You have to define a \parbox as title, which has the desired width: \parbox[c]{1.5cm}{\centering Line Break} alternatively is is possible to use the command \shortstack{}, where \\-linebreaks will work. \shortstack{Line\\ Break} which would look as follows in the ...


2

Don't reinvent the wheel: the makecell package is done for that, and a common formatting of such cells, with its \thead and \makecell (and some others). Another solution, to have the multiline cells in the second column centred (while the lines in each cell are left-aligned) is to use the \eqparbox command from the homonymous package. It uses a system of ...


2

I'd have expected your bibtex style to stop that, but \mbox{\cite{is}} will stop line breaking (but may also affect the size of word spaces, so isn't ideal).


2

Issuing \color{white} inside a group doesn't really do anything. I'd suggest defining a section rule colour (say) secrulecolor which you can adjust to suit your needs: \documentclass{scrartcl} \usepackage{titlesec} \usepackage{xcolor} \definecolor{myblue}{RGB}{0,25,102} % Title format \colorlet{secrulecolor}{black}% Default rule colour ...


2

Update Here is another suggestion without package titlesec. Now there are no rules below the headings. \documentclass[a4paper,12pt,oneside]{scrbook}[2015/10/03] \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[bitstream-charter]{mathdesign} \usepackage[scaled]{berasans} \usepackage[scaled]{beramono} \usepackage[english]{babel} ...


1

Using the p-column type for the first column: \documentclass{article} \usepackage[a5paper]{geometry} \usepackage{ltablex} \usepackage{lipsum} % only for this example \begin{document} \lipsum[2] \medskip \noindent \begin{tabularx}{\linewidth}{@{}>{\bfseries}p{2.5cm}@{\hspace{.5em}}X@{}} 2009--present & very long text 1, very long text 2, very ...


1

The \newline work fine, your units come on the next line, however TeX does not hyphenate the first word of a paragraph (and as in the example english patters are used it probably would break incorrect;y anyway) I added \- in some places. \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage{longtable} \def\zz{ N & N & N & N ...


1

Rather than allow hyphenation I would just allow things to break after _ most easily using url package. Also beware your definitions added a lot of spurious white space from ends of lines in the definitions. \documentclass[draft,11pt]{article} \usepackage{url} \begin{document} \newcommand{\isnormalized}[1]{% \path{is_normalized}($#1$)% } ...


1

You haven't given enough code to be sure but \vspace{2\baselineskip}\\ would I expect give the "no line here to end" error if preceded by a blank line, and the underfull box 10000 warning if not. It is always an error to use \\ in vertical mode or at the end of a paragraph, so just delete it. (Possibly replace by \par before the \vspace) Note that the ...



Only top voted, non community-wiki answers of a minimum length are eligible