Tag Info

New answers tagged

1

\documentclass{article} \usepackage{showframe} \usepackage{graphicx} \begin{document} \noindent\makebox[0pt][l]{\raisebox{-0.5\height}{\includegraphics[width = 35 mm, height = 35 mm]{example-image-a}}}% \hfil CERTIFICATE \noindent\dotfill X\dotfill \end{document} Or, with adjustbox \documentclass{article} \usepackage{showframe} ...


0

Are you looking for something like this: \documentclass[10pt]{article} \begin{document} \noindent\_\ \rule{35mm}{35mm}\hfil \fbox{% \begin{minipage}[b][35mm][c]{35mm}\centering CERTIFICATE \end{minipage}} \ \_ \end{document}


2

Here is an attempt with rasters. Not fully automatic as you have to specify the heights and the second and third boxed are engulfed in to a separate tcolobox. There is scope for improvement but this should serve as a starting point. \documentclass{article} \usepackage[most]{tcolorbox} \begin{document} \begin{tcbraster}[raster equal height,raster ...


2

You can use a tabular with [t]op alignment. \documentclass{article} \usepackage{fontspec} \usepackage{lipsum} \begin{document} I was yet young in life, which I had begun early; but my intimacy with him was of a recent date: we had been educated at the same schools and university; but his progress through these had preceded mine, and he had been deeply ...


2

The simplest solution is to put a \strut both at the end of the preceding text and inside the \hbox: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{lipsum} \begin{document} I was yet young in life, which I had begun early; but my intimacy with him was of a recent date: we had been educated at the same schools and university; but his ...


1

I suggest you delete the manual [5pt] spacing directives and, instead, specify \setlength\extrarowheight{5pt} I'd also switch to from the m to the p column type to assure that the material in the first column is set on the same baseline as in the other 8 columns. Furthermore, I'd like to encourage you switching to a table design that uses no vertical ...


1

Non-centring comes from the \\[5pt] used before \hlines. I replace this with loading the cellspace package, which ensures minimal vertical spacing above and below cels in columns with a specifier prefixed with the letter S (or C if you use siunitx). I also load the caption package to ensure a correct vertical spacing between caption and table: ...


1

Use \makecell from the equally named package (i.e. makecell) However, this command has to specified for each cell individually. The default setup is to center it vertically. There is some issue with the \\[5pt] commands, which results in some upshift of the fractions in the last column. I added a second version in which this does not occur ...


3

I wouldn't use the m column type for this table. In its place, I would use a centered form of the X column provide (provided by the tabularx package), in part to let LaTeX handle the chores of determining column widths. Separately, I'd use the line-drawing macros of the booktabs package to get well-spaced horizontal lines; plus, I'd omit all vertical lines. ...


3

David is referring to the m-specifier in \newcolumntype{M}{>{\centering\arraybackslash}m{\dimexpr.096\linewidth-2\tabcolsep}} How about a layout like this: \documentclass[a4paper,10pt]{article} \usepackage{tabularx,booktabs,geometry} \geometry{textwidth=15cm} \begin{document} \noindent \footnotesize ...


3

As long as you are always grouping things on the right, you can make this work by making the right-hand side right-aligned (using an alignat environment), and then adding an appropriate amount of space on the right to get the alignment under the brace. This technique also works equally well for grouping on the left. \documentclass[a4paper]{article} ...


3

Here is an alternative view on the grouping, which might be of interest: \documentclass{article} \usepackage{mathtools,calc} \begin{document} \[ %\setlength{\jot}{.5\jot} Adjust to bring the equations closer vertically \begin{aligned} 1 + 1 + 1 &= 1 + \underbrace{1 + 1} \\ &= ...


2

As long as we add not too many one-cipher numbers, we can use the effect, that all ciphers have the same width. It gives a little bit more general solution, then the one of the predecessor. \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} \[ \begin{array}{r@{{}={}}c} 1 + 1 + 1 +1& 1 + 1+ \underbrace{1 + 1} \\ ...


2

You can use array instead of aligned if this this what you require: \documentclass[a4paper]{article} \usepackage{amsmath} \begin{document} $$\begin{array}{rcc} 1 + 1 + 1 &= &1 + 1 + 1 \\ &= &\underbrace{1 + 2}\\ &=&3 \end{array}$$ \end{document}


1

Your images are wider then width of minipages. If you accommodate the width of images to width of minipages, than images are not overlapped anymore. See: \documentclass[10pt,a4paper]{memoir} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \newsubfloat{figure} \begin{document} ...


1

It depends a bit on what you want to achieve. One way is to use \framed[location=lohi]. For example \defineframed [vcentered] [ location=lohi, frame=off, ] \starttext \dontleavehmode \vcentered[foregroundstyle={\switchtobodyfont[palatino,8pt]}]{small} \vcentered[foregroundstyle={\switchtobodyfont[palatino,12pt]}]{normal} ...


0

A possiblity using floatrow package based on this thread: \documentclass[a4paper,10pt]{scrreprt} \usepackage[T1]{fontenc} % \usepackage[utf8]{inputenc} \usepackage[latin1]{inputenc} \usepackage{floatrow} \usepackage{geometry} \geometry{a4paper,left=25mm,right=25mm, top=25mm, bottom=25mm} \usepackage{subcaption} \usepackage{tikz} \begin{document} ...


7

TeX inserts no interline glue before and after \hrule, so you have to teach it that you want to respect distances independently of ascenders and descenders. The simplest way is to use struts: \documentclass{article} \usepackage{enumitem} \newenvironment{category}[1] {\par\noindent\textbf{\strut#1\strut} \medskip % <-------- adjust here \hrule % ...


8

The \hrule in the vertical material breaks the baselineskip-grid because it resets the internal \prevdepth register. But you can save the value of the register to a variable, print \hrule and restore this register. Then the baselineskip-grid can be kept. Normal behavior: Previous line \hrule % this rule is printed immediately below the line without ...


5

You can remove the descender-depth by using \raisebox. The following definition of \raisebox is contained in source2e.pdf: \raisebox{⟨distance⟩}[⟨height⟩][⟨depth⟩]{⟨box⟩} Raises ⟨box⟩ up by ⟨distance⟩ length (down if ⟨distance⟩ negative). Makes TeX think that the new box extends ⟨height⟩ above the line and ⟨depth⟩ below, for a total vertical length ...


3

The rule is drawn at the baseline of text. Hence the lower line is at the baseline of the next line of text. So you have to lift the lower line by suitable amount. This may be done by \vspace or adding the depth to the \rule. \documentclass[12pt]{report} \begin{document} \rule{6cm}{0.4pt}Some\par \textbf{\large TITLE}\par%\vspace{-0.66\baselineskip} ...


2

You can following the same type of precedures discussed in Subcaption vertical alignment and Vertically align different size images in a figure* environment. That is, capture the size of the larger image, and use its height to adjust the vertical position of the smaller image. \documentclass{article} \usepackage{geometry,graphicx} ...


3

With this, there is no space. But this is not the way to define a wrapper box. But since I don't know exactly what you want, I can't make it better. \documentclass[a4paper,twocolumn,12pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[turkish]{babel} \usepackage[listings,skins,breakable]{tcolorbox} \usepackage[color]{changebar} ...


2

Here is a solution with some vertical padding. The cellspace package is done for that: it defines a minimal vertical spacing at the top and the bottom of cells in columns with a specifier prefixed with S. With the makecell package, you can have line breaks in cells, thus allowing for several aimges in a single cell: \documentclass{article} ...


3

You can use adjustbox package with export option. With this, you will get valin= as a key to \includegraphics. valign=c will do what you want. \documentclass{article} \usepackage[export]{adjustbox} \usepackage{array} \begin{document} \begin{table}[h] \centering \setlength{\extrarowheight}{1em} \begin{tabular}{c|l} \textbf{Verb} & \textbf{Example} ...


4

I am not sure if you are searching really for long side captions, but otherwise, this is a way using minipages for the main text and adjustbox package to have top aligned images: \documentclass[a4paper]{article} \usepackage[export]{adjustbox}% \usepackage{lipsum,graphicx} \parskip1em \def\capR#1#2{\includegraphics[width=.3\linewidth,valign=t]{#1}% ...


2

Normally the figure is lower than the start of the text, although obviously the start of the document is an exception. So to align the top of the figure to the top of the text you will need to either raise the figure or lower the text by \baselineskip. One can force the wrapfigure to terminate using \WFclear, but you sill need to space down far enough to ...


4

It works if you add baseline=(current bounding box.north) to both tikzpicture environments. \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \usepackage{booktabs} \begin{document} \tikzset{align at top/.style={baseline=(current bounding box.north)}} \begin{figure} \centering \begin{tikzpicture}[baseline = (current bounding box.north)] ...


1

Do that with the titling package: it defines a \droptitle length which you can choose at will. Example of use: \documentclass[a4paper,oneside,12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} % \usepackage{lmodern} % \usepackage[top=33mm, bottom=38mm, left=26mm, right=20mm, showframe]{geometry} % \usepackage[x11names]{xcolor} ...


2

The caption package -- at least if it's loaded with no other options than justification=centering (which is the default anyway) -- seems to be causing the penetration of the top margin by the first caption of the table* environment. A workable fix would appear to consist of loading the package with options skip=5pt and position=bottom as well (even though ...


1

I interpret the objective of your posting as wishing to modify (specifically, increase) the math subscript offset for all subscripts in the entire document. If this interpretation is correct, the following LuaLaTeX-based solution may be of interest to you. It works by modifying the "primitive" length parameter \Umathsubshiftdown. For a document set in 10pt ...


0

I had the same problem, yet using subfloatrow. After lots of experiments and random code changes, I learned the following: This problem only shows up, when the third(!) image has the larges height. The only solution I found was manually setting the height of all(!) three ffigbox. Unfortunately the hight is not automatically detected. It might be possible to ...


0

This can't be done when including image files with \includegraphics: graphicx has no interface to whatever the code was that originally produced the figure. However, it can be done if you integrate your graphics drawing with the TeX code itself. I don't know much MP, but here is an example with another drawing package. This shows a TikZ/pgf solution, using ...


2

Use ,baseline=(current bounding box.center) in the options of circuitikz \documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage{graphicx} \usepackage[english]{babel} \usepackage{circuitikz} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows} \begin{document} \begin{center} \begin{circuitikz}[american ...


3

Use adjustbox to get the right vertical alignment: \documentclass[12pt,a4paper]{article} \usepackage{amsmath,adjustbox} \newenvironment{Pbmatrix}[1][c] {\begin{adjustbox}{valign=#1}$\begin{bmatrix}} {\end{bmatrix}$\end{adjustbox}} \newcommand{\matt}[5]{ \begin{bmatrix} \begin{Pbmatrix}[b] 2+r & -1 \\ -1 & 2+r & -1 \\ & ...


3

In this code I define a solutions environment, based on enumerate, but with the \item command patched with the help of the etoolbox package. I also changed some of the computation results, expressed in theinteger part fractionary part style with smaller fractions, either in the form, say, \tfrac{3}{4} or in the form \sfrac{3}{4} from the xfrac package: ...


1

A shorter, if sneakier, solution: \documentclass{article} \usepackage{multicol} \AtBeginDocument{\addtocontents{toc}{\protect\begin{multicols}{2}}} \AtEndDocument{\addtocontents{toc}{\protect\end{multicols}}} \begin{document} \tableofcontents \section{fee} \subsection{foo} \subsection{bar} \section{fie} \section{fo} \section{fum} \end{document}


4

\documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} %%%%%% additional packages \usepackage{multicol,etoolbox} %%%%%% \setcounter{tocdepth}{2} %set depth of printed table of contets. \makeatletter \patchcmd{\l@section} {\hfil} {\leaders\hbox{\normalfont$\m@th\mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu$}\hfill} {}{} ...


2

Here are two solutions, if I've well understood what you want. They're both based on tabularx. The first consists in adding a second tabularx environment for the captions; the second uses a multicols environment. The makecell package is used for a common formatting of column heads and some vertical padding of rows: \documentclass{article} ...


3

Here's an approach using tabularx to get the full width table, which also shows how to combine several \multicolumns within a row. This addresses questions (1) and (3). \documentclass{article} \usepackage{array,booktabs,tabularx} \begin{document} \begin{table}[htp] \centering \footnotesize\setlength{\tabcolsep}{2.5pt} ...


1

You can use m column type. \documentclass{article} \usepackage{array} \begin{document} \begin{table}[htb] \centering \begin{tabular}{ | m{10cm} | c | c |} \hline Scenario & A & B \\ \hline Subscenario & A.1 & B.1 \\ \hline Number of registered individuals/impostors & 25/65 & 23/14 \\ \hline Number of face images ...


2

I think you need to make two adjustments to the code: First, as already noted by David Carlisle, you need to add the [t] position specifier to the inner tabular environment. Second, you need to remove the extra whitespace that's surrounding the inner tabular -- remember that the c column type of the outer tabularx environment already provides whitespace ...


4

You can do that with a simpler syntax if you use the makecellpackage, which allows for a common formatting, vertical/horizontal alignment and line breaks in cells introduced by the \makecell command. A small patch allows to have the vertical and horizontal alignment of the cell as an optional argument (default is cc – vertically and horizontally centred). In ...


4

You are aligning the top line of the paragraph with the centre of the tabular. Use \begin{tabular}[t] so that the top line of the tabular is taken as the alignment point, which will then align with the top line of the paragraph in the first column.


2

Is this what you are trying to accomplish? \documentclass[11pt,a4paper]{scrartcl} \usepackage[T1]{fontenc}% unused, not needed \usepackage[utf8]{inputenc} \usepackage{tgheros} \renewcommand{\familydefault}{\sfdefault} \usepackage{tikzpagenodes} \begin{document} \begin{flushleft} \rule{\textwidth}{1pt}\newline% check alignment ...


1

try this code may be it help \documentclass[ 11pt, a4paper ] {scrartcl} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{tgheros} \renewcommand{\familydefault}{\sfdefault} \usepackage{ tikz, } \begin{document} \noindent {\Large Hellow} \hrulefill%\hfill \parbox[c][1cm][t]{1cm}{% \begin{tikzpicture} \draw (0,0) coordinate (A) (1,0) ...


1

Here I introduce \threerows{} which takes a \displaystyle math argument and will place it in a stack that is three normal row heights tall. The only proviso is that the argument not be so large vertically that it extends out below or above the spare lines. Of course, if it is too large vertically, one could create the comparable \fiverows: ...


3

I would simply go the grid.sty way. Currently, It has three limitations (as per the package documentation): Enunciations (theorem, lemma etc) were not added in the package. Optional argument of floats (positioning of floats) are not currently supported. Footnotes are not aligned correctly But it still can give you much. Here is your example implemented ...


3

You can make sure each display is in a box that is a multiple of \normalbaselineskp in vertical size, and ensure Tex doesn't add additional space around the box. \documentclass[12pt]{article} \usepackage[margin=0.25in]{geometry} \usepackage{array} \usepackage{calc} \usepackage{amsfonts,braket} \begin{document} \def\[#1\]{\endgraf {% ...


1

I have found de solution: \newcommand{\LineasBlancas}[1]{% \ifinmdframed \else \vspace{#1\baselineskip} \fi% } \newif\ifinmdframed \AtBeginEnvironment{mdframed}{\inmdframedtrue}



Top 50 recent answers are included