Search Results

Search found 18 results on 1 pages for 'renewcommand'.

Page 1/1 | 1 

  • Latex renewcommand not working properly

    - by Nazgulled
    Why is this not working: \documentclass[a4paper,10pt]{article} \usepackage{a4wide} \usepackage[T1]{fontenc} \usepackage[portuguese]{babel} \usepackage[latin1]{inputenc} \usepackage{indentfirst} \usepackage{listings} \usepackage{fancyhdr} \usepackage{url} \usepackage[compat2,a4paper,left=25mm,right=25mm,bottom=15mm,top=20mm]{geometry} \usepackage{color} \usepackage[colorlinks]{hyperref} \usepackage[pdftex]{graphicx} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt} \pagestyle{fancy} \fancyhead[L]{\small Laboratórios de Informática III} \fancyhead[R]{\small Projecto 1 (Linguagem \textsf{C})} \lstset{ basicstyle=\ttfamily\footnotesize, showstringspaces=false, frame=single, tabsize=4, breaklines=true, } \definecolor{Section1}{rgb}{0.09,0.21,0.36} \definecolor{Section2}{rgb}{0.21,0.37,0.56} \definecolor{Section3}{rgb}{0.30,0.50,0.74} \hypersetup{ bookmarks=false, linkcolor=red, urlcolor=cyan, } \renewcommand{\section}[1]{\texorpdfstring{\color{green}#1}{#1}} \parskip=6pt \begin{document} \begin{titlepage} \begin{center} \includegraphics[width=5cm]{./logo.jpg}\\[1cm] \textsc{\LARGE Universidade do Minho}\\[1cm] \textsc{\large Licenciatura em Engenharia Informática\\Laboratórios de Informática III}\\[1.5cm] \rule{\linewidth}{0.5mm}\\[0.4cm] \huge{\textbf{\textsc{Relatório do Projecto 1 (Linguagem C)}}} \rule{\linewidth}{0.5mm} \vfill \begin{tabular}{c c} \includegraphics[width=3.5cm]{./nuno.jpg} & \includegraphics[width=3.5cm]{./ricardo.jpg} \\ \textsc{\large{Nuno Mendes (51161)}} & \textsc{\large{Ricardo Amaral (48404)}} \\ \end{tabular} \vfill \large{\today} \end{center} \end{titlepage} \tableofcontents \newpage \section{Introdução} Lorem ipsum... \newpage \appendix \section{\color{Section1}Diagrama das Estruturas de Dados} \begin{center} \includegraphics[width=16cm]{./Diagrama.pdf} \end{center} \end{document} ! LaTeX Error: Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.2 ...rline {1}\color {green}Teste}{3}{section.1} How can I make it work properly?

    Read the article

  • In LaTeX, how can one add a header/footer in the document class Letter?

    - by Brian M. Hunt
    In LaTeX, how can one create a document using the Letter documentclass, but with customized headers and footers? Typically I would use: \usepackage{fancyhdr} \pagestyle{fancy} \lhead{\footnotesize \parbox{11cm}{Custom left-head-note} } \lfoot{\footnotesize \parbox{11cm}{\textit{#2}}} \rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}} \renewcommand\headheight{24pt} \renewcommand\footrulewidth{0.4pt} However, with \documentclass{letter}, this doesn't work at all. Suggestions are duly appreciated. EDIT: Here is sample code that doesn't work (for any apparent reason): \documentclass[12pt]{letter} \usepackage{fontspec}% font selecting commands \usepackage{xunicode}% unicode character macros \usepackage{xltxtra} % some fixes/extras % page counting, header/footer \usepackage{fancyhdr} \usepackage{lastpage} \pagestyle{fancy} \lhead{\footnotesize \parbox{11cm}{Draft 1} } \lfoot{\footnotesize \parbox{11cm}{\textit{2}}} \cfoot{} \rhead{\footnotesize 3} \rfoot{\footnotesize Page \thepage\ of \pageref{LastPage}} \renewcommand{\headheight}{24pt} \renewcommand{\footrulewidth}{0.4pt} \begin{document} \name{ Joe Laroo } \signature{ Joe Laroo } \begin{letter}{ To-Address } \renewcommand{\today}{ February 16, 2009 } \opening{ Opening } Content of the letter. \closing{ Yours truly, } \end{letter} \end{document}

    Read the article

  • Frustration with fancyhdr

    - by Flavius
    Hi I have the following tex document: \documentclass[a4paper,11pt,oneside]{book} \usepackage[usenames,dvipsnames]{color} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} \usepackage{lipsum} \usepackage[left=2cm,top=3cm,right=1.5cm,bottom=2cm]{geometry} \renewcommand{\chaptermark}[1]{\markboth{#1}{}} \renewcommand{\sectionmark}[1]{\markright{#1}{}} \renewcommand{\subsectionmark}[1]{\markright{\thesubsection}{}} \usepackage[Lenny]{fncychap} \usepackage{thumbpdf} \usepackage[colorlinks]{hyperref} \setlength\marginparwidth{1cm} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhead[LO,L]{Book template} \fancyhead[RO,R]{\rightmark} \fancyfoot[CO,C] {\thepage} \begin{document} \chapter{Chapter Intro} \lipsum \chapter{Chapter with subsections} \section{section foo} \lipsum \subsection{subsection bar} \lipsum \end{document} A sample can be viewed at http://www.mediafire.com/?0m5mnka32kj On the top right: How to make it show the chapter title if there is no section, as on page 2? How to make it show the section title and nothing but the section title (no numbers, no subsections, subsubsections, etc) if there is an active section, as it's the case on page 4? Thanks

    Read the article

  • Need hekp with font in latex

    - by laspal
    Hi, Mine tex file looks like \documentclass[a4paper,twoside]{article}` \usepackage{graphics} \usepackage{color} \usepackage{hyperref} \usepackage{multirow} \usepackage{longtable} \usepackage{fullpage} \usepackage[pdftex]{graphicx} \usepackage{fancyhdr} \oddsidemargin 0cm \evensidemargin 0cm \pagestyle{fancy} \renewcommand{\headrulewidth}{0.0pt} \rfoot{Raval, Ketan R -13223} \textwidth 15.5cm \topmargin -1cm \parindent 0cm \textheight 26.5cm \parskip 1mm \begin{document} \fontencoding{\encodingdefault} \renewcommand{\familydefault}{\sfdefault} \fontshape{\shapedefault} \selectfont So how can I improve my overall look and feel of the pdf. Right now all fonts are coming too dim. Is there any thing I can do to try out differnt look and feel of the pdfs. Thanks

    Read the article

  • How do I fix problem with layout of tables and text in LaTeX?

    - by laspal
    Hi, my problem is that my full tables and text are coming about 15 cm away from left side, so my text has very little space on right side, about 3 cm. How can I change my text and tables to start from 5 cm away from left and 5 cm before right side? \documentclass[a4paper]{article} \usepackage{graphics} \usepackage{color} \usepackage{hyperref} \usepackage{multirow} \usepackage{longtable} \usepackage{fullpage} \usepackage[pdftex]{graphicx} \usepackage{fancyhdr} \oddsidemargin 0cm \evensidemargin 0cm \pagestyle{fancy} \renewcommand{\headrulewidth}{0.0pt} \lfoot{%(full_name)s/%(emp_id)s/\thepage} \cfoot{} \topmargin -2.5cm \parindent 0cm \textheight 27.5cm \parskip 3mm \begin{document} \fontencoding{\encodingdefault} \renewcommand{\familydefault}{\sfdefault} \fontshape{\shapedefault} \selectfont Thanks

    Read the article

  • [LaTeX] Change "List of Listings" text

    - by tur1ng
    I tried to change the "List of Listings" text with the command \renewcommand*{\lstlistlistingname}{List of XYZ} before my \begin{document}. What's wrong with this? By the way \renewcommand*{\lstlistingname}{NewListing} worked like a charm. Thank you

    Read the article

  • Wrong chapter number on page headers except first page

    - by okhalid
    Hi, I am writing up my thesis in Latex and have a template. It works nicely for every thing else except one. Chapter numbers are correctly incremented on the first page of each chapter but for consecutive pages of each chapter, the header saying "Chapter x - This is a chapter title" have 1 always as chapter number. Following is the code sample from the CLS file which i think is relevant to the headers: \newcommand\btypeout[1]{\bhrule\typeout{\space #1}\bhrule} \def\today{\ifcase\month\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi \space \number\year} \usepackage{setspace} \onehalfspacing \setlength{\parindent}{0pt} \setlength{\parskip}{2.0ex plus0.5ex minus0.2ex} \usepackage{vmargin} \setmarginsrb { 1.5in} % left margin { 0.6in} % top margin { 1.0in} % right margin { 0.8in} % bottom margin { 20pt} % head height {0.25in} % head sep { 9pt} % foot height { 0.3in} % foot sep \raggedbottom \setlength{\topskip}{1\topskip \@plus 5\p@} \doublehyphendemerits=10000 % No consecutive line hyphens. \brokenpenalty=10000 % No broken words across columns/pages. \widowpenalty=9999 % Almost no widows at bottom of page. \clubpenalty=9999 % Almost no orphans at top of page. \interfootnotelinepenalty=9999 % Almost never break footnotes. \usepackage{fancyhdr} \lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}} \rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage} \chead{}\lfoot{}\rfoot{}\cfoot{} \pagestyle{fancy} %% Chapter Heading --------------- \renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\ \thechapter\ #1}{\@chapapp\ \thechapter\ #1}} %%-------------------------------------------------- \renewcommand{\sectionmark}[1]{} \renewcommand{\subsectionmark}[1]{} \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else \hbox{} \thispagestyle{empty} \newpage \if@twocolumn\hbox{}\newpage\fi\fi\fi} Thanks, Omer

    Read the article

  • Need help with fonts in latex: output too dim

    - by laspal
    I have a problem where all fonts come out too dim. Is there any thing I can do to get a different look and feel from the pdfs? My tex file looks like \documentclass[a4paper,twoside]{article}` \usepackage{graphics} \usepackage{color} \usepackage{hyperref} \usepackage{multirow} \usepackage{longtable} \usepackage{fullpage} \usepackage[pdftex]{graphicx} \usepackage{fancyhdr} \oddsidemargin 0cm \evensidemargin 0cm \pagestyle{fancy} \renewcommand{\headrulewidth}{0.0pt} \rfoot{Raval, Ketan R -13223} \textwidth 15.5cm \topmargin -1cm \parindent 0cm \textheight 26.5cm \parskip 1mm \begin{document} \fontencoding{\encodingdefault} \renewcommand{\familydefault}{\sfdefault} \fontshape{\shapedefault} \selectfont So how can I improve my overall look and feel of the pdf? Thanks

    Read the article

  • document class problem in latex

    - by laspal
    Hi, My problem is my full tables and text are coming some says 15 cm away from left side, so my text has very less space on right side says 3cm. How can I change my text and tables to start from 5 cm awayfrom left and 5 cm before right side. What all \documentclass[] {} can I try to change this format. \documentclass[a4paper]{article} \usepackage{graphics} \usepackage{color} \usepackage{hyperref} \usepackage{multirow} \usepackage{longtable} \usepackage{fullpage} \usepackage[pdftex]{graphicx} \usepackage{fancyhdr} \oddsidemargin 0cm \evensidemargin 0cm \pagestyle{fancy} \renewcommand{\headrulewidth}{0.0pt} \lfoot{%(full_name)s/%(emp_id)s/\thepage} \cfoot{} \topmargin -2.5cm \parindent 0cm \textheight 27.5cm \parskip 3mm \begin{document} \fontencoding{\encodingdefault} \renewcommand{\familydefault}{\sfdefault} \fontshape{\shapedefault} \selectfont Thanks

    Read the article

  • Add space after the Exercise environment

    - by Flavius
    Hi I can't figure out how to add a space (say 3em) after the Exercise environment . I don't want to do it manually for every exercise, but automatically, by using \addtolength or redefining the environment or something. For leaving some space in front of it I managed to come up with this: \renewcommand{\ExerciseHeader}{\vskip 3em\centerline{\textbf{\large\smallpencil \ExerciseHeaderNB\ExerciseHeaderTitle% \ExerciseHeaderDifficulty\ExerciseHeaderOrigin\medskip}}} Thanks.

    Read the article

  • latex page number position

    - by anton
    I am working on a long document in latex with documentclass book. I need the page number to always be in the upper right corner of each page, even if that page is the first page of a chapter (right now on 1st pages of chatpers, the page number is bottom-centered, on all other pages it's top-right). I control the position of the page number with fancyheader: \usepackage{fancyhdr} \pagestyle{fancy} \lhead{} \chead{} \rhead{\thepage} \lfoot{} \cfoot{} \rfoot{} \renewcommand{\headrulewidth}{0pt} Also, I don;t know if the problem is realted but my chapters do not start from the top of the page. There is a white area, then comes chapter X, then a newline with the chapter line. What I also want is the chapter to start from the top of the page. The main question here is how I can get the page number to always appear in the upper right corner, I mention the thing with the chapter title position only in case that might be related. Thanks.

    Read the article

  • Source code of books made with TeX/LaTeX to learn

    - by Diego Sevilla
    Some time ago, reading this entry I found a nice image and a pointer to a better book entitled "Thinking Forth". To my surprise, the LaTeX sources of the book were ready to download, with pearls like: %% There's no bold typewriter in Computer Modern. %% Emulate with printing several times, slightly moving \newdimen\poormove \poormove0.0666pt \newcommand{\poorbf}[1]{% \llap{\hbox to \poormove{#1\hss}}% \raise\poormove\rlap{#1\hss}% \lower\poormove\rlap{#1\hss}% \rlap{\hbox to \poormove{\hss}\hbox{#1}}% #1} %\let\poorbf=\textbf \renewcommand{\poorbf}[1]{{\fontencoding{OT1}\fontfamily{cmtt}\fontseries{b}\selectfont#1}} in which it can simulate the bold stroking of a font that doesn't have it. Since reading that, I was unaware of \llap and such, but now I can use them to define boxes, etc. So, my question is twofold: Do you know of sites that show that relatively advanced use of TeX/LaTeX in terms of useful recipes, and Do you know any books that offer their TeX/LaTeX source to inspect and learn (and that are worth doing so.)?

    Read the article

  • Bibtex with no references title

    - by Bryan Ward
    I am working on writing a scientific poster in LaTeX, and I want to include a few references for my work. Because this is a poster, I have my own customized headers for different sections, and don't want my related works to have a separate title. Essentially I have something like this: \begin{textblock}{5.5}(19.5,11) \CHead{Related Work} %a newcommand header I wrote \bibliographystyle{acm} \bibliography{mybib} \end{textblock} And it comes out with a header called "Related Work" like I want, but it also under that says "References", which I don't want. I found a few websites that said that I could override this with something like \renewcommand\refname{} But all this does is take the word "References" out, but the space allotted for the title is still there. Is there a way to completely eliminate the title and any space it may take up?

    Read the article

  • How is includegraphic interfering with tabular?

    - by Charles Stewart
    I'm editing a text provided by my client as a LyX file that includes graphics and other files that I don't have. I've "commented out" the graphics by putting in a custom preamble that substitutes the file-loading definitions with macros that just quote their arguments. However, the \includegraphic macro throws up an error in the two tabular environments where it is used, complaining that \endfirsthead was never defined. What is this macro, and why is it interfering with mine? The preamble: \usepackage{natbib} \def\fileloc{/some/path/stylefile} \newif\iftextproof \IfFileExists\alifefileloc\textproofalse\textprooftrue \iftextproof \usepackage{./stylefile} %natbib subst: \renewcommand\cite[1]{{\tt #1}} %suppress graphics includes: \def\quotearg#1{\expandafter\string\csname #1\endcsname} \newcommand\gobbleIG[2][*void*]{{\footnotesize \quotearg{#2}}} \newcommand\gobbleSF[2][*unnamed*]{{\bf #1}} \let\includegraphics=\gobbleIG \let\subfigure=\gobbleSF \else \usepackage\fileloc \fi

    Read the article

  • Not indent the first paragraph of a LaTeX document

    - by Andrew
    In the standard LaTeX article class (and probably others as well), paragraph indentation follows standard American publishing norms of not indenting the first paragraph after a section{} or subsection{}. I've redefined \maketitle in a LaTeX document and put the actual title left-aligned as the last line, fairly close to the actual text (kind of like this) Author Date Title Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Section title Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Since the title is left-aligned and so close to the text, I'd like the first paragraph of the document to not be indented, just like with the headings ... Title Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor... ... I've attempted to use @afterindentfalse, which is what the section commands use, inside my renewed commands, but it doesn't work. \makeatletter \def\noindentation{\let\@afterindentfalse} \newcommand{\mytitle}[1]{% \vskip 2em {\bf\sffamily\LARGE #1} \noindentation} \renewcommand{\@maketitle}{ \begin{flushleft}{ % Author \@author \par % Date \@date \par % Title \mytitle{\@title} } \end{flushleft} } \makeatother By default the first paragraph in the article class is indented, so this question is applicable whether or not I renew \maketitle. So, what's the best way to automatically not indent the first paragraph of the document? Thanks!

    Read the article

  • [LaTeX] breaking an environment across pages - the smart way

    - by Flavius
    Hi I am using the exercise package to display exercises in a book. I have redefined some commands like this, which basically adds some space, a pencil, and two hrule's before and after the exercise: \renewcommand{\ExerciseHeader}{\vskip 1em\hrule\vskip 1em\centerline{\textbf{\large\smallpencil \ExerciseHeaderNB\ExerciseHeaderTitle% \ExerciseHeaderDifficulty\ExerciseHeaderOrigin\medskip}}} \makeatletter\def\endExerciseEnv{\termineliste{1}\@EndExeBox\vskip .5em\hrule\vskip 1em}\makeatother Now this works, but there's a small problem: There are situations where only the \hrule ends up being at the bottom of a page, and the rest of the exercise goes on the next page. There is also the opposite behavior: the entire exercise is on one page, except the \hrule in "endExerciseEnv", which is flushed to the next page. My question is: How to force the top hrule come either together with the header of the exercise (caption, title, whatever not) and at least the first two paragraphs (or \ExePath and a paragraph, or anything like that, but there must be at last "two things", so it doesn't look ugly), OR be flushed altogether, with the entire exercise? Similar question for the bottom hrule: How to force it have at least two items in front of it on the visible page where the hrule itself goes to? Any LaTeX guru who knows that? Addendum I have asked in the past LaTeX questions like this and I've got answers which required me to do stuff manually, like "insert a \vskip here and there" or such. Let me be clear: This is a book, there's lot of exercises, and I NEED it be done "automatically", by going the proper way of redeclaring commands & co.

    Read the article

  • ! Extra }, or forgotten \endgroup. latex

    - by gzou
    hey, I met these latex format problem, anyone can offer some help? the .tex file: \begin{table}{} \renewcommand{\arraystretch}{1.1} \caption{Cambridge Flow feature definition and description} \label{cambridge-feature}} \centering \begin{tabular}{|c|c|} \hline\bfseries Abbreviation &\bfseries Description\\ \hline serv-port & Server port\\ \hline clnt-port & Client port\\ \hline push-pkts-serv & count of all packets with\\ & push bit set in TCP header (server to client)\\ \hline init-win-bytes-clnt & the total number of bytes \\ & sent in initial window (client to server)\\ \hline init-win-bytes-serv & the total number of bytes sent\\ & in initial window (server to client)\\ \hline avg-seg-size-clnt & average segment size: \\ & data bytes devided by number of packets\\ \hline IP-bytes-med-clnt & median of total bytes in IP packet\\ \hline act-data-pkt-serv & count of packet with at least one byte \\ & of TCP data playload (server to client)\\ \hline data-bytes-var-clnt & variance of total \\ & bytes in packets (client to server)\\ \hline min-seg-size-serv & minimum segment size \\ & observed (server to client)\\ \hline RTT-samples-serv & total number of RTT samples\\ & found (server to client),\\ & {\bf see also \cite{Moore05discriminators}}\\ \hline push-pkts-clnt & count of all packets with push bit set \\ & in TCP header (server to client)\\ \hline \end{tabular} \end{table} and the error message: ! Extra }, or forgotten \endgroup. \@endfloatbox ...pagefalse \outer@nobreak \egroup \color@endbox l.892 \end{table} I've deleted a group-closing symbol because it seems to be spurious, as in $x}$'. But perhaps the } is legitimate and you forgot something else, as in\hbox{$x}'. In such cases the way to recover is to insert both the forgotten and the deleted material, e.g., by typing `I$}'. there is no $ in my table, also this { are matching with the }, and also after I comment the citation, the error remains. anyone can offer help? really appreciate all the comments! ! Extra }, or forgotten \endgroup.

    Read the article

1