Tag Info

New answers tagged

0

We could use \hyphenchar\font as a global switcher; =1 turning on hyphenation, =-1 preventing hyphenation. \documentclass[a4paper]{article} \pagestyle{empty} \usepackage{tikz} \usepackage[english]{babel} \begin{document} \begin{tikzpicture} \node[align=left,text width=2cm,draw] {Contemplando a contemporaneidade}; \end{tikzpicture} \begin{tikzpicture} ...


1

Since the OP realized there is a known issue known as a "design comprimise" between lscape/pdflscape and the geometry packages (I know Zdeněk Wagner, the author of the zwpagelayout package, in person, I would use his package instead of geometry under normal circumstances), I tried to find another strategy even if I like shifting from the fixed position very ...


2

Thanks to Malipivo's comment, I thought that I might try using eso-pic directly. This is the package prelim2e uses but I wondered if the placement problems might be an artefact of prelim2e rather than a problem with the underlying framework provided by eso-pic itself. After playing with this for a little, things started to go better... This solution uses ...


2

If your contents is too wide, you can resize-to-fit using % In your document preamble \usepackage{graphicx}% http://ctan.org/pkg/graphicx % ... \begin{figure} \resizebox{\linewidth}{!}{$ \begin{array}{..} %... \end{array} $} \caption{...} \end{figure} This will resize everything, including making the font smaller. You can also centre ...


5

The comments above tell you what to do, the reason that what you did did not do anything is that you were centering the minipages but they were full width already so centering (or flush left or right) does nothing as a full width box is already "centred". Within the minipage the settings are restored closer to default page settings, so if you want to ...


2

This combines Werner's comment with a modified version of Ian Thompson's answer. Werner's suggestion Werner's suggestion resolves the problem mentioned in the question but reveals a further problem: \documentclass{book} \usepackage[a4paper, top=14mm, bottom=10mm, inner=15mm, outer=13mm, bindingoffset=10mm, includefoot, includehead, headsep=14mm, ...


0

I'm not sure why, but putting \centering in a group fixes the problem. \documentclass{book} \usepackage[a4paper, top=14mm, bottom=10mm, inner=15mm, outer=13mm, bindingoffset=10mm, includefoot, includehead, headsep=14mm, footskip=14mm]{geometry} \usepackage{titlesec} \titleformat{\chapter}[hang]{\normalfont\huge\bfseries}{\chaptertitlename\ ...


1

Here is a solution that uses the caption and the floatrow packages. Your commenttable command has to be put in the first argument of the ttabbox command, just after caption{…}. To have a correct vertical spacing, I had to modify it slighly. \documentclass[captions=tableheading]{scrbook} \usepackage{siunitx} \usepackage{booktabs} ...


1

This is tailor made for the boxhandler package, which sets captions in the style you asked, almost by default. The captioning is configurable. However, one must enter the table as a macro \bxtable{caption}{content}, not an environment, which some people will find bothersome. The only challenge was to align the comment with the table automagically. To do ...


2

I'm not sure it's one of these you expect, but you can have your tabular centred with respect to the (innermost) enumerate margin, or left aligned with the left margin of the innermost enumerate environment: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{float} \usepackage{caption} \usepackage{insbox} \begin{document} \noindent I can align ...


2

I am not sure if this is what you want to achieve: \documentclass{article} \usepackage[utf8]{inputenc} \begin{document} \noindent I can align a table to the left. \begin{enumerate} \item However, it stays as far left as the margin allows. \begin{enumerate} \item This looks pretty ugly. \begin{enumerate} \item The effect is compounded with indentations ...


6

Your question isn't very clear and lacks an example document, but this shows four different setting of teh text, standard justified, sloppy, ragged right and RaggedRight from the ragged2e package. As the text is so short it doesn't really show the differences well so I repeat the settings with a longer paragraph with the text repeated. It still doesn't ...


0

I have a workaround for you. Let the float object flow into one column, calculate number of lines it takes and add \enlargethispage with negative value to the second column when dealing with *[b] and \vspace* when dealing with *[t], the value is best when related to the \baselineskip dimension. It is not an automatic way, esp. when adding \vspace* inside the ...


5

You can define a new command \myitem \newcommand{\myitem}[1]{% \item\makebox[1.5em][l]{#1}% } and use it instead of \item in these particular itemizes MWE: \documentclass{article} \newcommand{\myitem}[1]{% \item\makebox[1.5em][l]{#1}% } \begin{document} \begin{itemize} \myitem{1.} First \myitem{2.} Second \myitem{3a.} Third \myitem{3b.} ...


3

I would recommend using an automated approach using an enumerate environment to add the numbering: Code: \documentclass{article} \usepackage{enumitem} \newcommand*{\MakeBox}[1]{\makebox[1.5em][r]{#1}}% \begin{document} \begin{enumerate}[label={\textbullet\protect\MakeBox{\theenumi.}}] \item First \item Second ...


3

It seems more appropriate to use an enumerate environment for numeral enumeration. However, there are a number of ways to achieve this: \documentclass{article} \usepackage{calc}% http://ctan.org/pkg/calc \begin{document} \begin{itemize} \item 1.\phantom{a}\ First \item \leavevmode\rlap{2.}\phantom{3a.} Second \item 3a.\ Third \item 3b.\ Third ...


1

If you want to "right bind" the last part ot an equation, you'll have to play with flalign and the \mathllap (and incidentally \mathrlap) command defined by the mathtools package: \documentclass[11pt, oneside,a4paper]{report} \usepackage{mathtools} \usepackage[showframe, nomarginpar]{geometry} \begin{document} \begin{flalign} & & a ...


6

There is no concept of “right bound”. You can use two strategies that differ for how the equation number is placed. multlined (from the mathtools package) \documentclass[oneside,a4paper]{hepthesis} \usepackage{mathtools,amssymb} \begin{document} \begin{align} a &= blabla \\ a &= \begin{multlined}[t] ...


2

Thanks for posting an MWE. I'm not sure how to interpret your observation that I'm getting everything but "Figure n:" justified, so the numbering labels are off justification. I assume you're trying to avoid "hanging indentation" of the caption material on the lines after the first one. If this interpretation is correct, you can achieve the desired ...


3

Insert the details inside a tabular, that you can the shove over to the right using \hfill: % Cover letter using letter.cls \documentclass{letter} % Uses 10pt \usepackage[utf8]{inputenc} \usepackage[colorlinks, linkcolor = black, citecolor = black, filecolor = black, urlcolor = blue]{hyperref} \usepackage[pdftex]{graphicx} %\usepackage{helvetica} % uses ...


2

Probably a previous \raggedright is still active. Example: \begin{document} \subsection*{Indenting and justification} \lipsum[2-3] \subsection*{Ragged right without indenting} \raggedright \lipsum[2-3] \end{document} Remarks: The amount of indenting at the start of a paragraph is controlled by the register \parindent. It can be changed, e.g. by ...


3

You want to center the tabular itself. Then you should put \centering outside that environment (but still inside table environment). By the way, you have an extra }. \begin{table}[!ht] \centering \begin{tabular}{|c||c|c|c|c|c|} \hline AE mode & 512 Byte & 1KB & 1 MB & 1 GB & 2048 PetaBytes ($2^{64}$) \\ \hline ...


0

The problem is that your images are not centered inside the subfigure environments and that the total length for both images will be greater than \textwidth. I used \centering inside each subfigure environment; I also reduced the subfigure width to half \textwidth and removed extra spaces between them: \documentclass{article} \usepackage{graphicx} ...


3

You can use the varwidth environment from the package with the same name. \documentclass{memoir} \usepackage{lipsum,varwidth} \newsubfloat{figure} \begin{document} \lipsum[1] \begin{figure} \centering \begin{varwidth}{\linewidth} \raggedleft \subbottom[]{\framebox{Narrow subfig}} \\ \subbottom[]{\framebox{Wide subfigure with lots of stuff}} ...


5

I took my answer at Looking for three images on top of each other with text underneath each, changed the figure (rule) widths to make them different, and added a [r] optional specifier to the \Shortstack for right alignment. The cited answer explains how the use of the \subcaptionbox variant in conjunction with a package like stackengine can allow great ...


1

The url's in the bibliography are typeset with \harvardurl which is defined as \newcommand\harvardurl[1]{\textbf{URL:} \textit{#1}} As far as I can tell these are always preceeded by a \newline too. So one redefinition would be to box this up as a raggedright paragraph. I prefer to use the \RaggedRight command from the ragged2e package for this: ...


2

You can use the \newgeometry and \restoregeometry commands from the geometry package with a code like this one: \newgeometry{centering,margin=1.5cm} \thispagestyle{empty} \mbox{}\vfill \begin{center} \Huge\bfseries My Lovely Title \end{center} \vfill \mbox{} \restoregeometry These commands start a new page:


0

Math in words can also be put in equation environments, e.g.: \documentclass{article} \usepackage{amstext}% % or \usepackage{amstext} that defines \text and is loaded by amsmath \usepackage{lipsum} \begin{document} \lipsum[47] \begin{equation} \text{Centered text with equation number.} \end{equation} \end{document}


9

You have apparently used the fleqn option and so all LaTeX environments shown in your image are flush left. $$ is not latex syntax and does its own thing, it is not deprecated it just doesn't work, the most obvious and well documented, aspect of that is that it does not obey fleqn option. If the class (or user) doesn't specify fleqn then the LaTeX ...


3

You know, you don't have to use \maketitle. Or you could \renewcommand{\maketitle}.... \documentclass[twoside]{article} \usepackage{graphics} \usepackage{mwe} \begin{document} \begin{minipage}{0.65\textwidth} {\fontsize{22pt}{10pt}\selectfont\textbf{Title}}\\ \Large \textsc{Name}\\[2mm] \large University \\ \normalsize e@mail.com \\ ...


2

I enclose a small Lua snippet which add spaces after letters except commas, colons and semicolons. It adds space after spaces. This is a small example. %! lualatex mal-words.tex \documentclass[11pt]{article} \pagestyle{empty} %\newcommand{\spreadletters}[2]{\makebox[#2][s]{#1}} % 1. approach %\usepackage{seqsplit} % 2. approach \usepackage{luatextra} ...


13

Using Paul Stanley's answer to your question Conditions for fancy chapter title, here's a way: \documentclass{book} \usepackage[explicit]{titlesec} \usepackage{lipsum} \usepackage[T1]{fontenc} \usepackage{lmodern} \newcommand{\chaptercolor}{blue} \usepackage{tikz} \usepackage{xparse} \titleformat{\chapter}[display] {\normalfont\filcenter} ...


0

with the package graphicx, you can use: \resizebox{3cm}{!}{\chaptertitlename}


2

To make them right aligned you need to modify the super glossary style. This is simple to do, but you need to look up the definition of the original style. From glossary-super.sty: \newglossarystyle{super}{% \renewenvironment{theglossary}% {\tablehead{}\tabletail{}% \begin{supertabular}{lp{\glsdescwidth}}}% {\end{supertabular}}% ...


3

Like this? \documentclass{article} \usepackage{array} \begin{document} \begin{tabular}{p{2cm}!{:}p{3in}} {Mail} & 1234 XXXX st,\\ {Email} &{gagagasgsdv@xxxx.com} \end{tabular} \end{document} Adjust the widths 2cm and 3in suitably. I have also removed the vertical line and added :, instead. With array package !{<content>} adds some ...


3

Do you want it like this? \documentclass{article} \usepackage{showframe} %% just for demo \usepackage[export]{adjustbox} \begin{document} \begin{figure}[htbp] \includegraphics[width=\dimexpr\linewidth+2cm\relax,right]{example-image} \end{figure} \end{document} Another show: \documentclass{book} \usepackage{showframe} %% just for demo ...


3

This update achieves right alignment, as explained in my added comment. The defect is that it will not work if \thepage is not the standard representation with digits. Also the placement of the page number is not so good in the case of multiline section titles. \documentclass[a4paper]{article} \usepackage{lipsum} \RequirePackage[titles]{tocloft} ...


2

Much of your machinations could be removed. The key was to modify the length \tabcolsep to narrow the columns. I now use simple c columns, no \vspaces nor separate \RotText versions, etc. REVISED to retain OP's desired column widths. I added 2\tabcolsep = 12pt to the G and U column widths, as defined by the OP, but then set \tabcolsep to 0pt. Hopefully, ...


6

Yes, it's possible; the section number is typeset by the macro \@seccntformat and it's just a matter of giving it a suitable redefinition: typeset the number in a fixed width box. \documentclass{article} \usepackage{indentfirst} \usepackage{lipsum} \makeatletter \renewcommand{\@seccntformat}[1]{% \protect\makebox[\parindent][l]{\csname the#1\endcsname}% ...


4

You don't need alignat, actually. Also, since you're typesetting in a two column format, you want to reduce the horizontal size, which can be obtained by merging the double and triple summations: \documentclass[twocolumn]{article} \usepackage{amsmath,amssymb} \usepackage{lipsum} % just for the example \begin{document} \lipsum*[2] \begin{align} \min & ...


7

lines 5 and 6 have no & after \text{}, so everything in those lines will be aligned to the left of the alignment point. that will have the effect of shifting all the other lines to the right. (really, a minimum example, starting with \documentclass and ending with \end{document}, and showing what packages you are using, would be more helpful. it ...


1

\documentclass{article} \usepackage{tabularx,booktabs} \begin{document} \begin{table}[htbp] \centering \caption{Add caption}\label{tab:addlabel} \begin{tabularx}{\textwidth}{*{2}{>{\centering\arraybackslash}X}} \toprule & Folhosas \\ \midrule Celulose & 5 \\ Hemicelulose & 2 \\ Extrac & 6 \\ ...


3

This is your matrix before adding long text node and with empty nodes drawn. As you can see empty nodes are empty, i.e. just nothing with some inner sep. And you can also see why fit=(m-1-2)(m-1-5) produces a shorter node than expected. But its size is the correct one, your expectation was wrong ;-) A possible solution consists in using nodes WordA and ...


5

The techniques explained at the linked answer work with subfigure package also. \documentclass{article} \usepackage{graphicx,showframe} %% remove showframe \usepackage[hang]{subfigure} \begin{document} \begin{figure*} \makebox[\linewidth][c]{% \centering \subfigure[Caption]{\label{fig:a}\includegraphics[width=0.35\textwidth]{example-image-a}}% ...


5

Using \usepackage[fleqn]{amsmath} will left align all equations. You can use flalign environment instead. \documentclass{article} \usepackage{amsmath} \usepackage{showframe} %% just for demo \begin{document} \begin{flalign} \Rightarrow d(\mathbf x',\mathbf 0) &\geq d(\mathbf x,\mathbf 0) - d(\mathbf x',\mathbf x) && \\ %% note two ...


2

Here is a possible solution: \documentclass{article} \usepackage[fleqn]{amsmath} \begin{document} \begin{align} \Rightarrow d(\mathbf{x}',\mathbf{0}) &\geq d(\mathbf{x},\mathbf{0}) - d(\mathbf{x}',\mathbf{x}) \\ &= \varepsilon + \delta - d(\mathbf{x}',\mathbf{x}) \end{align} \end{document} The best answer is definitely Harish ...


1

Use the optional argument: \usepackage[fleqn]{amsmath}


0

Do you want something like this? This was done by creating a new command \myframedtext with the following syntax: \myframedtext*[<width>]{<contents>} where the * is optional, <width> must specify the desired width if the second optional argument is used at all, and <contents> is the stuff to go in the frame. ...


5

With these lines in the preamble, all the headings you've mentioned will be centered (apart from paragraph which doesn't behave as a title) \renewcommand*{\printchapternum}{\centering\chapnumfont \thechapter} \renewcommand*{\chaptitlefont}{\Huge\bfseries\centering} \setsecheadstyle{\Large\bfseries\centering} \setsubsecheadstyle{\large\bfseries\centering} ...


6

Your caption is resized to 0.6\textwidth as it lies inside the minipage Same thing happens to tabular too but since it is tooo long we don't notice it. Put the caption outside the \resizebox and use font=small in the option of caption. You may also control the width by width=\textwidth. Code: \documentclass[english,a4paper,12pt]{report} ...



Top 50 recent answers are included