Tag Info

New answers tagged

1

It isn't directly related to tables other than that is a large unbreakable box. The extra white space on page 2 is not inter-line space but inter-paragraph space. In the book class that is 0 but slightly stretchy. book class defaults to \flushbottom so it tries to bring the last line to the bottom of the page, and on that page the only stretch glue is the ...


0

In case it may still be useful, and because it seems to me that it is not cited elsewhere on this network, Calc2LaTeX is a specific tool to import and convert tables from spreadsheet to LaTeX. Easily, you'll prepare the shape of your table (number of lines and columns, some formatting of cells) within the spreadsheet, convert, and then adjust LaTeX markup ...


3

This is sort of hack that I have stolen from this answer. Note that you might better to go with minutes package as @strpeter have suggested. \documentclass{article} \usepackage{lipsum} \usepackage{calc} \begin{document} \begin{center} \begin{tabular}{ |p{3cm}||p{2cm}||p{3cm}||p{6cm}| } \hline \hline ...


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\ ...


2

A most simple way to produce a latex looking doc in word is simplified into steps. Use Century font Refer an original latex document(e: if you are working on a project report, then collect a latex made project report)--- and then type the words exactly in same place as in latex doc... with almost same font size, orientation , position, margin etc. Save it ...


0

If there are not another text that must appear in one column in the same page, a simpler alternative to the minipages is the twocolumn option in the document class (see MWE). You can jump to the second column and from here to the next page with \newpage or \pagebreak. If you need some text in one column in different pages, simply insert \onecolumn and ...


1

You can use two minipages: \documentclass[10pt]{article} \textwidth = 520pt \textheight = 700pt \voffset = -90pt \oddsidemargin = -10pt \usepackage{listings} \usepackage{color} \usepackage{lmodern} \usepackage{scrextend} \changefontsizes[8pt]{8pt} \definecolor{dkgreen}{rgb}{0,0.6,0} \definecolor{gray}{rgb}{0.5,0.5,0.5} ...


4

I am not a top user but the first thing I thought was - just like Jonas suggests - something like: \newcommand{\myword}{MyWorD} or: \newcommand{\MWD}{MyWorD} or the acronym package. Beware that TeX will ignore spaces after \myword, so \myword{} would be the way for typing it in your document to avoid this problem.


8

According to Wikipedia, the Wolfram Mathematica Logo is typeset using the Minion typeface. Hence you need the Minion font to typeset the logo without including an image. Here is a version for pdflatex \documentclass{article} \pagestyle{empty} \usepackage{graphicx,xcolor} \definecolor{Mathematica}{HTML}{ed192d} \font\minionit=MinionPro-It-osf-t1 ...


2

We could extract portions/cells of the PDF file automatically (A4 pages out of the PDF file in this example), but this is not the case as blocks have different size. I was thinking if fancytooltips could be used as there is an extraction process written in Perl, but we would need to properly wrap the blocks. It wouldn't be easy as \nodes need its tikzpicture ...


6

sectsty is a quick way to achieve what you're after if you're using one of the standard document classes: \documentclass{article} \usepackage{sectsty}% http://ctan.org/pkg/sectsty \allsectionsfont{\normalfont\scshape} \begin{document} \tableofcontents \section{A section} \subsection{A subsection} \subsubsection{A subsubsection} \end{document} titlesec ...


1

There's not much to go on here, but you can use a tabularx: \documentclass{article} \usepackage{tabularx} \begin{document} \noindent \begin{tabularx}{\linewidth}{|cX|} \hline \textbf{Chapter 25: Capacitance} & \\[.5\normalbaselineskip] $U = \frac{q^2}{2C} = \frac{1}{2}CV^2$ & (Electric Potential Energy of a charged capacitor) \\ \hline ...


1

Here is the corrected code, thanks to all the comments above. \documentclass[11pt,A4]{book} \usepackage{titlesec} \titleformat{\chapter}[display] {\normalfont\huge\bfseries}{Title Above}{20pt}{\Huge}[\vspace{2ex}\titlerule\vspace{0.2ex}\titlerule] \begin{document} \frontmatter \chapter{Preface (after frontmatter)} \mainmatter ...


2

Perhaps this is what you're after? The noextraspace removes the additional .25in space between the title and the author. \documentclass[man,noextraspace]{apa6} \title{Test title \par another title} \shorttitle{test} \author{weirdesky} \affiliation{University} \begin{document} \maketitle \end{document}


0

\documentclass[man,apacite]{apa6} \usepackage{url} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{ rospa, year = {n.d.}, title = {Seat Belts: A short history}, journal = {The Royal Society for the Prevention of Accidents}, url = {http://www.rospa.com/roadsafety/adviceandinformation/vehiclesafety/ ...


4

Add the option backaddress=plain, as explained on page 172 of the current documentation: \documentclass[ standard, a4paper, pagesize, backaddress=plain, ]{scrlttr2} (this way of typing options is handier because it clearly shows all of them). The error is because you're missing a closing brace: \setkomavar{firstfoot}{ \centering ...


5

It was quite difficult to accomplish this task without a full MWE or a preview of index at hand. I tried that anyway and this is an example of an index with French words. I run these commands: lualatex mal-xindy-style.tex xindy -M texindy -C UTF8 -L french -M mal-makeindex-style mal-xindy-style.idx lualatex mal-xindy-style.tex If we change ...


4

You can define a new command based on \num, exploiting the fact that siunitx uses expl3 internally: \documentclass{article} \usepackage[group-separator={,},group-minimum-digits=4]{siunitx} % \usepackage{xparse} % already loaded by siunitx \ExplSyntaxOn \NewDocumentCommand{\numc}{ O{} m } { \num[#1]{ \fp_eval:n{ #2 } } } \ExplSyntaxOff \begin{document} ...


12

If you also want to print two zeroes after the number use this siunitx setup: \sisetup{group-separator={,},group-minimum-digits=4,round-integer-to-decimal,round-mode=places} MWE: \documentclass{article} \usepackage{siunitx} \begin{document} \newcommand{\MyNumberA}{40} \newcommand{\MyNumberB}{60} ...


11

You can use siunitx package to do this: \documentclass{article} \usepackage[group-separator={,},group-minimum-digits=4]{siunitx} \begin{document} \newcommand{\MyNumberA}{40} \newcommand{\MyNumberB}{60} \num{\the\numexpr(\MyNumberA*\MyNumberB)\relax} \end{document} which produces: You can define your own command to handle this too: ...


3

Please don't do any commercial transaction based on this code. And about getting compile time values, if you run with shell-escape enabled I guess you can run some external software which will pick up the info somewhere and then return it to TeX. But I don't know how one does these things, I am bad at getting money in my direction. this answer does not pay ...


0

Try this! I think it's what you wanted! \documentclass{IEEEtran} \usepackage{url} \usepackage{multirow} \usepackage{array} \begin{document} \title{Article Title} \author{ \begin{tabular}{*{2}{>{\centering}p{.5\textwidth}}} \large Nome1 & \large Nome2 \tabularnewline Department1 & Department2 \tabularnewline School1 & School2 ...


3

This is just a manual placement of the respective braces in a nested array: \documentclass{article} \usepackage{amsmath,amssymb,array,graphicx} \newcolumntype{C}[1]{>{\centering\arraybackslash$}p{#1}<{$}} \begin{document} \[ \begin{array}{@{}r@{}} \overbrace{\begin{array}{@{}*{5}{C{1.5em}}@{}} &&&& ...


4

Write in your preamble either: \usepackage{chngcntr} \counterwithin{section}{part} \renewcommand{\thepart}{\arabic{part}} or \makeatletter \@addtoreset{section}{part} \makeatother \renewcommand{\thepart}{\arabic{part}} \renewcommand*\thesection{\thepart.\arabic{section}} (By default, the partcounter is written in Roman numerals).


4

the usual method for numbering one level within another is \makeatletter \@addtoreset{section}{part} \makeatother


3

You can simplify the input syntax and also get centering (but the list can't be split across pages): \documentclass{article} \usepackage{xparse,lipsum,varwidth} \ExplSyntaxOn \NewDocumentCommand{\printbiglist}{m} { \[ \begin{varwidth}{.8\textwidth}\raggedright $\makebox[0pt][r]{$\lbrace$} % the opening brace hanging left \dan_print_biglist:n { #1 ...


3

\documentclass{article} \newcommand\z{,\linebreak[0]} \begin{document} \begin{raggedright} $\{7, 2, 6, 5\}\z \{7, 2, 6, 6\}\z \{7, 3, 1, 1\}\z \{7, 3, 1, 3\}\z \{7, 3, 1, 6\}\z \{7, 3, 2, 2\}\z \{7, 3, 2, 3\}\z \{7, 3, 2, 4\}\z \{7, 3, 3, 1\}\z \{7, 3, 3, 2\}\z \{7, 3, 3, 3\}\z \{7, 3, 3, 4\}\z \{7, 3, 3, 5\}\z \{7, 3, 3, 6\}\z \{7, 3, 4, 2\}\z \{7, 3, 4, ...


3

With only code fragments to go by, I can't be entirely confident that this will work. You could use a longtable environment instead of a tabular* environment, along the following lines: \usepackage{longtable} \newenvironment{entrylist}{% \setlength\LTleft{0pt} \setlength\LTright{0pt} \begin{longtable}{@{}l@{\extracolsep{\fill}}l@{}} % this tells ...


1

The idea is to overlay a thicker line over the two joined lines. \documentclass{standalone} \usepackage{mathtools} \newsavebox{\mybox} \newlength{\mywidth} \newlength{\myheight} \newlength{\myline} \newlength{\myoffset} \newcommand{\mysqrt}[1]% {\setlength{\myline}{.1ex}% \addtolength{\myline}{.06pt}% \setlength{\myoffset}{.9em} ...


3

Here's another solution based on mdframed: \documentclass{article} \usepackage{enumitem} \usepackage{lipsum} \usepackage[framemethod=tikz]{mdframed} \newlength{\defparindent} \setlength{\defparindent}{\parindent} % The leftrule environment \newmdenv[ linecolor=black,% topline=false, bottomline=false, rightline=false, rightmargin=0pt, skipabove=0pt, ...


3

It seems like you're interested in a parcolumns setting: \documentclass{article} \usepackage{lipsum,parcolumns} \newcommand{\heading}[1]{\colchunk[1]{\hspace*{-\parindent}\textbf{#1}}} \newcommand{\desc}[1]{\colchunk[2]{#1}\colplacechunks} \begin{document} \begin{parcolumns}[ colwidths = {1=3cm},% 2=\dimexpr\linewidth-3cm-2em\relax rulebetween = ...


5

You can use \fancyput* since \thisfancyput affects only the current page. The starred version adds to, rather than replaces, other things that have been inserted with \fancyput or \thisfancyput. \documentclass[margin]{res} \textwidth=5.2in \usepackage{fancybox} \begin{document} \fancyput*(3.25in,-4.5in){ \setlength{\unitlength}{1in}\fancyoval(7,9.8)} ...


4

Column mode changes of LaTeX (without packages) are limited: Mode switches \onecolumn, \twocolumn start a new page. \twocolumn allows one column material at the top in the optional argument at least. Maximal number of columns is two. Package multicol implements several improvements: Column mode switches in the same page. More than two columns. ...


1

A solution with automatic line breaking using minipages: Minipages need a width specification. Thus I defined a new command \chapmark containing most of the \chapterformat definition, whose length I can measure. For this I used two features of package calc: the command \widthof and the possibility to make computations of lengths. The baseline orientation is ...


0

You can define your own macros \compresson and \compressoff to control for which sections the compress option is used: \makeatletter \newcommand*{\compresson}{\addtocontents{nav}{\protect\headcommand{\protect\beamer@compresstrue}}} \newcommand*{\compressoff}{\addtocontents{nav}{\protect\headcommand{\protect\beamer@compressfalse}}} \makeatother With these ...


4

The \section command is defined in amsart.cls as: \def\section{\@startsection{section}{1}% \z@{.7\linespacing\@plus\linespacing}{.5\linespacing}% {\normalfont\scshape\centering}} So we can replace \normalfont with \normalfont\Large to increase the size of the font. \patchcmd works with the form ...


3

The \subsection is defined in amsart.cls as: \def\subsection{\@startsection{subsection}{2}% \z@{.5\linespacing\@plus.7\linespacing}{-.5em}% {\normalfont\bfseries}} This definition can be patched to redefine the font with etoolbox: \documentclass{amsart} \usepackage{etoolbox} \patchcmd{\subsection}{\bfseries}{\itshape}{}{} \begin{document} ...


5

That is the document default small caps font so \textsc{FooProc} Better would be to use the package defined command \textproc{Fooproc} which will do the same thing, but ensure that if you customise the fonts used in the psuedo-code, the reference will use the same font.


5

I'm usually against the third option (scaling) although it seems quite popular. Perhaps I'm biased against it though because (a) I implemented \resizebox and (b) at the time most text was using bitmap fonts and so scaling text made things unreadable. However I think if possible it is better to have consistent font sizes and so choosing to use a fixed size ...


3

There is technically no need to place what you're after in the page header. I would just set it as part of the text block - the first thing on the first page, flush right: \documentclass[12pt]{article} \usepackage[paper=a4paper,margin=1in]{geometry} \begin{document} \null\hfill\begin{tabular}[t]{l@{}} \textbf{My name} \\ \textit{My University} ...


6

This could be a job for the fitbox options of package tcolorbox. As commented, your first text needs hyphenations. But your second text can sized using the following code. I added a yellow background to show the 4.5in x 5.875in box. Note that I included a scalable font package (lmodern) to enable the font scaling mechanism. ...


3

You can use the array package and its advanced column specifications. The syntax is >{before-code} column-type <{after-code} where before-code and after-code get executed at the beginning and end (respectively) of each cell of the column in question. Here, you should use >{\ttfamily}l which results in a left-aligned column whose whose cells ...


1

\documentclass{article} % put your font commands here for the fonts \begin{document} \frenchspacing\raggedright ... your document here \end{document} ^^ this pretty much does the job. You might add \usepackage[small]{titlesec} if "small fonts" ought to apply to titles as well. Btw, in your example, there's a hyphenated word buff-er leaving only 2 letters ...


3

Here's a starter, built on MacTeX 2013 with the Charter font installed: % !TEX TS-program = XeLaTeX \documentclass[11pt]{article} \usepackage[lmargin=2in,rmargin=2in]{geometry} % wider margins \usepackage{setspace} \onehalfspacing % 130% spacing between lines: % http://texblog.org/2011/09/30/quick-note-on-line-spacing/ \usepackage{fontspec,lipsum} ...


4

Using a \Longstack will work for a two line chapter name, with breaks inserted manually. If you get to three lines, though, no method will prove suitable to look at. \documentclass{scrbook} \usepackage{mwe} \renewcommand*{\chapterformat}{\mbox{\chapappifchapterprefix{\nobreakspace}\scalebox{3}{\thechapter}\enskip}} \usepackage{lipsum} ...


9

Here's a solution that uses the directive \displaystyle in both the numerator and the denominator of the fraction. (The align structure is used purely to simplify the before/after comparison.) \documentclass{article} \usepackage{amsmath} % for \DeclareMathOperator macro \DeclareMathOperator{\kl}{kl} % what does "kl" stand for? ...


1

You didn't provide which packages are loaded. I assume minimal and have to change \text with \mathrm. You can find more information by searching here for large integral sign, such as in Big integral sign If you take out the {} before the exponents they'll be placed higher. I also assume you're looking for display math. \documentclass[11pt]{article} ...


4

I think this is best done with a dedicated name format. The idea is to redefine the macro \mkbibnamelast that prints the last name only for the first name, and then restore it. By default authoryear uses last-first/first-last, so we define last-first/first-last-bf. \DeclareNameFormat{last-first/first-last-bf}{% \ifnumequal{\value{listcount}}{1} ...


7

We redefine one bibmacro. The changes are actually very small: the insertion of a sprinking of \mkbibbold. \renewbibmacro*{name:last-first}[4]{% \ifuseprefix {\usebibmacro{name:delim}{#3#1}% \usebibmacro{name:hook}{#3#1}% \ifblank{#3}{}{% \ifcapital {\mkbibbold{\mkbibnameprefix{\MakeCapital{#3}}\isdot}} ...



Top 50 recent answers are included