Tag Info

Hot answers tagged

7

The \vbox is typeset with a zero height, but it goes above the minipage and its reference point is at the baseline. You could add the information inside the minipage: \documentclass{article} \usepackage{enumitem} \newcommand{\OF}[1]{% \makebox[0pt][l]{\hspace{10cm}\fbox{#1}}% \ignorespaces } \begin{document} ...


5

You had the order wrong: \NeedsTeXFormat{LaTeX2e} \ProvidesClass{resume}[2015/02/08 Class for scientist's resumes in industy] \LoadClass{article} \RequirePackage[left=0.5 in,right=0.5 in,top=4in,bottom=1in]{geometry}


4

You should use geometry instead of vmargin. But stiil, to answer why it happens, the macro \setmarginsrb has these arguments \setmarginsrb{left margin}{top margin}{right margin}{bottom margin}{head height}{head sep}{foot height}{foot skip} When you say \setmarginsrb{3cm}{2.5cm}{2cm}{2cm}{11pt}{1.8cm}{11pt}{10mm} You are specifying a top margin of ...


3

I'd suggest you to use a customized list defined with the help of enumitem and some \parboxes to include the information for every work: \documentclass[draft]{article} \usepackage[T1]{fontenc} \usepackage{enumitem} \usepackage{calc} \newcommand\WorkFont{\bfseries\raggedright} \newcommand\WorkNameStyle{\upshape} \newcommand\numberstyle{\scshape} ...


3

I would replace the \setmarginsrb{} with the \usepackage{geometry}, see more here. Something like this in the preamble: \usepackage{geometry} \geometry{% letterpaper, % a4paper left= 40 mm, right= 40 mm, top= 15 mm, bottom= 20 mm, } You can also specify inner and outer margins with package geometry Assuming I am interpreting your university's ...


3

The fleqn option causes displayed math expressions to be placed at a fixed indent from the left margin; this fixed indent is controlled by \mathindent, so you need a verbatim environment with this same indentation from the left margin. Below I show two options. Using the fancyvrb package all you have to do is to set \fvset{xleftmargin=\mathindent} A ...


3

There's the tikzpagenodes package which offers current page text area anchors: \documentclass{amsart} \usepackage{tikzpagenodes} \usepackage{showframe} \usetikzlibrary{tikzmark} \newcounter{tmp} \newcommand\status[1]{% \stepcounter{tmp}% \tikzmark{start-\thetmp}% \tikz[remember picture,overlay,baseline=(sta.base)] {\node[anchor=east] at (current ...


2

If you need it automatically done for every \caption, you can add the following to your preamble: \let\oldcaption\caption \renewcommand{\caption}[2][\empty]{% \ifx#1\empty% \oldcaption{#2}% \else% \oldcaption[#1]{\marginnote{#1}#2}% \fi} If no short caption is given, nothing will happen. If a short caption is given, it will ...


2

This is a quick-and-dirty tabularx approach, with automatic - at the first column. The widths of the columns etc. are just guesses, as well as the font commands. \documentclass{article} \usepackage{tabularx} \newcommand{\WorkFont}{\bfseries} \newcommand{\WorkNameStyle}{\upshape} \newcommand{\numberstyle}{\scshape} \newcommand{\worklistfont}{\itshape} ...


2

A better hack might be to use \makeatletter \renewcommand*{\m@mscapopboxes}{% \m@mcalcscapraise% \usebox{\m@mscap@fbox}%\m@mscapcheckside \ifscapmargleft% \rlap{\kern-\m@mscaplkern% \raisebox{\m@mscapraise}{\smash[b]{\usebox{\m@mscap@capbox}}}% }% \else% \rlap{\kern\sidecapsep% ...


2

\documentclass[11pt,fleqn]{article} \usepackage{amsmath} \newenvironment{mindent} {\list{}{\rightmargin0pt \leftmargin\mathindent}% \item\relax} {\endlist} \begin{document} Lorem ipsum \begin{equation*} e^{iπ}=-1 \end{equation*} \begin{mindent} \begin{verbatim} \\ Can I have margin ? \end{verbatim} ...


2

\documentclass[11pt,fleqn]{article} \usepackage{amsmath,verbatim,showframe} \newenvironment{myverbatim}% {\par\hspace*{\dimexpr-\parindent+\mathindent\relax}% \minipage{\dimexpr\linewidth-\mathindent\relax}\verbatim}% {\endverbatim\endminipage} \begin{document} Lorem ipsum \begin{equation*} e^{iπ}=-1 \end{equation*} \begin{myverbatim} \\ Can I have ...


2

My answer uses tcolorbox. A macro \mybox is contructed which takes the picture file name and the text content as parameters. Also, tcolorbox options may be given. I commented the following source code to help you to adapt the settings for your application: \documentclass{article} \usepackage{lipsum} \usepackage[skins,xparse]{tcolorbox} ...


1

Quick and dirty trick, add the following to your preamble: \makeatletter \renewcommand{\endsidecaption}{\m@mscapend@fbox\refstepcounter\@captype\m@mscaplabel% \begin{lrbox}{\m@mscap@capbox}% \raisebox{0pt}[\height][0pt]{% This line is added, to remove the depth of the box \begin{minipage}[c]{\sidecapwidth}% ...


1

Here I just used a stack. \documentclass[12pt]{article} \usepackage[usestackEOL]{stackengine} \def\stacktype{L}\def\stackalignment{l} \usepackage{xcolor,graphicx, lipsum} \begin{document} \sffamily \lipsum[1] \noindent\addstackgap{\stackon[0pt]{% \makebox[\textwidth]{\textcolor{blue!10}{\rule{1.01\paperwidth}{6\baselineskip}}}% }{% ...


1

Finally I found the answer. As Nicola highlighted in the comment. The easier way is to use pdflatex but it can be done for latex as well by using the breaklinks option in the hyperref package \usepackage[breaklinks]{hyperref} It works for me now. Thanks.


1

I guess, this can be solved by applying appropriate printing properties. For example in Adobe Reader select the Fit option and it prints nicely. EDIT: For Okular, try the Trim Margins option.


1

Something like that? Your problem with margins is not very clear to me. Margins can easily be set by the geometry package. I defined a layout for numberless chapters with \titleformat: \documentclass{book} \usepackage{graphics} \usepackage{geometry} \geometry{hmargin={3cm, 6cm}} \usepackage{xcolor} \usepackage[pagestyles, explicit]{titlesec} ...


1

you can try something like this \newenvironment{work}[3]{% #1\hfill #2\\*#3 \begin{list}{-}{% \settowidth{\rightmargin}{#2}}}{% \end{list}}



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