Tag Info

New answers tagged

0

This answer provided by @egreg is to use \setcounter{secnumdepth}{0} so the complete test file is: \documentclass{scrbook} \addtokomafont{section}{\centering} \addtokomafont{subsection}{\centering} \setcounter{secnumdepth}{0} \begin{document} \mainmatter \chapter{Sample Chapter} \section{First Section} asdfasdfasdf \subsection{Subsection} asdfasdfasdf ...


3

You shouldn't call setspace with memoir (but it's innocuous, as the class doesn't load it to begin with). If you really want such a big interline space, then it should be the same in titles, in my opinion, but it's possible to do how you'd like. \documentclass[9pt,draft,twoside,openright,showtrims]{memoir} \usepackage{amsmath,amssymb,amsfonts} ...


2

The end of the ToC clears the page (two pages for two-sided). So the \addcontentsline is being executed when TeX is already on page 7. To avoid this, you can add the contents line first, manually clearing the pages to ensure that the ToC does not need to start a new page: \documentclass{book} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...


0

Ok, I think I got it; first, found like this that \part - or rather \@part - actually has an optional argument: $ texdef -t latex -c book part -f \part first defined in "book.cls". \part: \long macro:->\if@openright \cleardoublepage \else \clearpage \fi \thispagestyle {plain}\if@twocolumn \onecolumn \@tempswatrue \else \@tempswafalse \fi \null \vfil ...


2

This could be a possible solution, by providing a \enhancedpart command, having an 3rd argument containing the bookmark title. Since hyperref automatically adds the bookmarks via \addcontentsline, this has to be kicked out. The bookmark package provides some features, but the destination key has to be set then. This is automatically done using a ...


2

What you're asking is not quite clear. What is a space? A half quad? You didn't specify the vertical spacing above section heading and nothing about subsubsections. The following code is a possibility, with the titlesec package and its companion titleps (so don't load fancyhdr), that lets me redefine very simply the plain style. \documentclass[12pt, ...


3

You can't use marks like that: their value is trustable on only during the output routine. If your aim is to have the title of the current section available, I suggest \documentclass{article} \renewcommand{\sectionmark}[1]{\gdef\currentsection{#1}} \begin{document} \section{A section} This section is called \currentsection. \section{Another section} ...


3

marks should never be used within the page. Here you want: \documentclass[12pt,letterpaper]{article} \usepackage{fancyhdr,nameref} \begin{document} \section{random\label{zz}} This section is called \nameref{zz} it has number \ref{zz}. \end{document}


4

Please always post complete documents, not just fragments. If I complete your document to \documentclass{article} \begin{document} \section{9/17/2014} \subsection{Complex Numbers and Roots of Unity} \begin{itemize} \item Content 1 \end{itemize} \subsection{Dihedral Groups} \item Content 2 \end{itemize} \end{document} Then it produces ! LaTeX Error: ...


0

I can now fix my problem. I just need to remove website: from my \bibitem parameter in Référence web section. Something like : \bibitem[web1]{wikipedia-MVC} Wikipedia.org, {\it Architecture MVC}, \url{http://fr.wikipedia.org/wiki/Mod\%C3\%A8le-vue-contr\%C3\%B4leur}, consulté ce 13 août 2014. And I can refer simply to it, \cite{wikipedia-MVC} and see ...


2

You need to add \labels to your bibliographys that you can refer to. Putting \label{bib:mem} in this position \renewcommand\bibname{Mémoires} \begin{thebibliography}{9}\label{bib:mem} will enable you to reference that point via \hyperref[bib:web]{Références web} Here is the code in your complete document with missing packages added: ...


5

As @cfr mentioned in a comment, KOMA-script can do stuff pretty good on its own. Here an example using labeling. You can change the font of the labeling label using the addtokomafont mechanism. The indent is taken by the length of the argument of the labeling environment. Markus Kohm suggests some further improvements, like putting the \MakeUppercase to a ...


5

Using enumitem makes for easy adjustment within a regular list (description) environment: \documentclass{scrartcl} \usepackage{enumitem} \begin{document} \begin{description}[leftmargin=7em, labelwidth=7em, labelsep=0pt] \item[OBJECTIVE] A position in the field of computers with special interests in business applications programming, information ...


2

You can use the little package unnumberedtotoc which can be found on github at the moment. It just provides one option which will suit your needs; indentunnumbered. It also takes care or your marks. All this functionality is provided by the KOMA-classes by default. A switch might be worth it ;-) \documentclass{article} ...


2

You have to push that entry by \@pnumwidth which is the width reserved for typsetting the section numbers in toc. \documentclass{article} \newlength{\mylen} \makeatletter \setlength{\mylen}{\@pnumwidth} \makeatother \begin{document} \tableofcontents \section{section A} \section*{section B} \addcontentsline{toc}{section}{\hspace*{\mylen}section ...


1

You can add horizontal spacing equivalent to what would normally be added: Notes: The \addcontentsline should be immediately after the \section*{}, not before the \section{}. Code: \documentclass{article} \begin{document} \tableofcontents \section{section A} \section*{section B} ...


4

From the memoir basic user manual (section 6.2 SECTIONAL DIVISIONS, p 74): A \section command restarts the numbering of any \subsections from one. For most of the divisions the <title> is put on the page where the command was issued. The \book, \part and \chapter commands behave a little differently. The \book and \part commands are ...


8

The requirement is easy to fulfill: \documentclass{article} \usepackage[nopar]{lipsum} % just for the example \newcommand{\verset}[1][]{\stepcounter{verset}% \textbf{\theverset. \if\relax\detokenize{#1}\relax \else #1 \fi }% } \newcounter{verset} \begin{document} \lipsum[1] \verset \lipsum[2] \verset[Description] \lipsum[3] ...


4

I don´t know if it´s exactly what you want but you can use \titleformat{\part}{display} to set the label to another line. You can reproduce the formatting of part as chapter with the code below and change the formatting setting for the partname. The last parameter is the formatting for the title of the part. \documentclass{report} \usepackage{titlesec} ...


0

I cleaned up egreg's solution a bit, to extend it to cover subparagraphs and also take care of an annoyance in amsbook regarding incomplete support for the tocdepth counter. And I got rid of the voigtlevel counter since it was completely redundant with zarabic. \usepackage{chngcntr} % place subsubsection, paragraph, and subparagraph at distinct values of ...


2

I'm not sure this is good style. Better, I'm sure this is not good style. ;-) \documentclass{amsbook} \usepackage{etoolbox,chngcntr} \makeatletter % at \@startsection, set also the level we're at \pretocmd{\@startsection}{\setcounter{voigtlevel}{#2}}{}{} \makeatother \newcounter{voigtlevel} % keeps track of the current level % all counters should be ...


5

Please always post complete documents, as below, not just fragments. If I start with \documentclass{report} \begin{document} \newcommand{\met}{\cancel{\it{E}}_{T}} \chapter{\met} \end{document} I get ! Undefined control sequence. \met ->\cancel so change to \documentclass{report} \usepackage{cancel} \begin{document} ...


1

An alternative solution is to enclose each section in an \include, because \include does an automatic \clearpage before. No preamble necessary!


2

Following the suggestion in How to change the name of document elements like "Figure", "Contents", "Bibliography" etc.?, you need to add the new \chaptername to the greek captions using \addto\captionsgreek{\renewcommand*{\chaptername}{KEFALAIO}} Here is a minimal example showing the adjustment: \documentclass{memoir} ...


1

A simple way would be to just redefine the rSection environment: \renewenvironment{rSection}[1]{ \sectionskip \textcolor{lightgray}{\MakeUppercase{#1}} \sectionlineskip \hrule \begin{list}{}{ \setlength{\leftmargin}{1.5em} } \item[] }{ \end{list} } which yields: One downside of the above is that if the resume.cls file makes changes to the rSection ...


1

To solve this problem I had to create a new index on my own, closely following book's table of contents. We will name her table of levels and her basic functioning is the same as her mother. This works at least for class book so far: \documentclass{book} \makeatletter \newcommand{\levelsname}[1]{\def\@levelsname{#1}} \newcommand{\levelsorder}[1]{% ...


0

Since the OP has not provided the resume.cls I exchanged it by article and defined a 'dummy' environment rSection with one mandatory argument. Here I could have inserted the \color{lightgray} command directly, but perhaps the OP is reluctant to make a direct change in the resume.cls, so I applied the \xapptocmd for \rSection (the environment startup macro), ...


3

\multibib uses \section* commands (hidden in \thebibliography), but a redefinition of \section{} without providing the starred version is wrong (in general!), so this must be cured in the way that \section*{} is still available, by pushing it back to use the old definition, using the \let macro. If \section*{} is not available, the \section*{} will just ...


0

This turned out to be an easy and simple fix. Just add the following: \renewcommand\thesection{\arabic{section}} You can also then remove my earlier kludge to remove the section number from printing in the body of the text: \renewcommand\section{\@startsection {section}{1}{\z@}{0ex}{0ex}{\@gobble}} Results:


0

A combination of (a) using [h!] as the location specifier and (b) inserting \clearpage immediately before the second \subsection* instruction should do the job. Incidentally, since you have four tabular environments, you should provide four (not three) table environments. Better still, since the tables aren't supposed to float anyway, don't use any table ...


13

You can align on the bottom row of the title: \documentclass{report} \usepackage{color,lmodern,titlesec} \newcommand\chptitle[1]{\parbox[b]{\dimexpr\textwidth-87pt}{\raggedright#1}} \newcommand{\hsp}{\hspace{12pt}} \titleformat{\chapter}[hang]{\huge\bfseries}{{ \fontsize{4.1em}{4.1em}\selectfont\color{black}% ...


1

As Barbara mentioned in a comment, running headers aren't cleared automatically. You need to issue a \cleardoublepage and after that use \markboth{}{} You seem to be setting sectioning commands by hand, which is never a good idea. Using the KOMA-built in commands, you can achieve your goals in a much easier way. You can read more about it at Correct use of ...


2

Replace in you preamble: \titleformat{\paragraph}[hang]{\bfseries #1}{}{}{}[] with \titleformat{\paragraph}[hang]{\bfseries}{}{}{#1}. The explicit argument can be used in the last mandatory argument only. The first argument is for describing the common formatting of label+title, not title alone. Also you can delete the optional argment if it's empty…


6

This is the basics, adjust to suit. \documentclass[11pt, twoside=semi, titlepage]{scrreprt} \usepackage[top=2.5cm, bottom=2.5cm, left=6cm, right=2cm, heightrounded, marginparwidth=3.5cm, marginparsep=0.5cm]{geometry} \usepackage{xcolor} \renewcommand*{\othersectionlevelsformat}[1]{% \makebox[0pt][r]{% \fcolorbox{blue}{blue}{\color{white}\csname ...


4

\documentclass[12pt]{book} \makeatletter \renewcommand\section{\@ifstar\mystarsec\mynostarsec} \makeatother \newcommand\mystarsec[1]{% \ifhmode\unskip\fi\quad\textbf{#1}} \newcommand\mynostarsec[1]{% \ifhmode\unskip\fi\refsetepcounter{section}\quad\textbf{\thesection. #1}} \begin{document} Text before. \section*{Section heading} Text after ...


2

It would be best to just define a new macro to format column titles, separate from the sectioning commands: \documentclass[a4paper,fleqn,leqno]{article} \usepackage{titlesec} \usepackage{array} \pagestyle{empty} \newcolumntype{L}[2]{@{\hspace*{#1}}>{\raggedright\arraybackslash}p{#2}} \titleformat{\subparagraph}{\Large\scshape}{}{0pt}{}[] ...


3

Latex doesn't allow a page break immediately after a section head, it tries to make at least one line of the following paragraph stick to the heading. In your case the only thing on the first line is a table (which counts as a single unit) so latex has to take the section head over to keep it with the table (tabular environments never break) In this case it ...


2

After fixing the missing pair of braces on line 35, this example produces a single page for me. This really should be a comment, but I don't have enough rep.


3

You can redefine \partname to whatever you want, but probably what you want is \usepackage[afrikaans]{babel} which will redefine all the fixed strings to Afrikaans words, and to set up hyphenation for the language.


1

Something like this perhaps \documentclass{artikel3} \catcode`\_=11 % use \sb if you need a math subscript \setcounter{secnumdepth}{5} \usepackage[T1]{fontenc} \newcommand\reqpara[1]{% \def\thispara{#1}\paragraph{}} \newcommand\reqsubpara{\subparagraph{}} \renewcommand\theparagraph{\arabic{paragraph}} \newenvironment{deps}{% \par \textbf{Dependencies} ...


1

Here is a solution with titleps. I define a wideoddhead pagestyle that does what you want (if I understood well) without having to change margins. I had to modify the sectrion formatting. Also simplified your preamble: \documentclass[10pt, letterpaper, twoside]{article} \usepackage[vmargin=0.5in, left=1.25in, right=0.75in, headheight=0.75in, headsep=12pt, ...


2

You should use the features of titlesec for setting color and font of titles. \documentclass[twoside,a4paper]{article} \usepackage{fontspec} \usepackage[dvipsnames]{xcolor} \usepackage[compact]{titlesec} \usepackage{graphicx} \usepackage{blindtext} \setmainfont{TeX Gyre Heros}% I don't own Calibri \definecolor{verydarkblue}{HTML}{000052} ...


1

The section number is placed in the left margin, so it is not going to align with the header, unless you redefine one or both of them. I'm not sure what you mean when you say "it gets really messed up for two-sided documents." If you don't want the left and right margins to have different values, change the documentclass line option to oneside or reset the ...


1

As Barbara mentioned in her comments, you can use mechnaisms like \markboth or \markright. I just added the mark to your definitions. I also defined a command xchapter that takes an optional argument that will be typeset as the subtitle. The command in general patches the original \@makeschapterhead, makes the starting page empty and most important, clears ...



Top 50 recent answers are included