Search found 9 matches

by adkdk
Tue Jun 29, 2010 1:17 pm
Forum: Graphics, Figures & Tables
Topic: Detecting zero section
Replies: 1
Views: 1910

Detecting zero section

I solved the problem without using ifthen package.

Put this into preamble:
\makeatletter
\renewcommand{\thetable}{\ifnum \c@chapter>0
\ifnum \c@section>0
\thesection.\@arabic\c@table
\else
\thechapter.\@arabic\c@table
\fi
\else
\@arabic\c@table
\fi
}
\renewcommand{\thefigure}{\ifnum \c ...
by adkdk
Sat Jun 26, 2010 11:15 pm
Forum: Graphics, Figures & Tables
Topic: Detecting zero section
Replies: 1
Views: 1910

Detecting zero section

LaTeX, by default, uses two-part style of figure, table and equation numbers (like Figure 1.3). I used to have 3-part numbers (chapter.section.object number). To achieve this in LaTeX, I use the following code (example for table):
\renewcommand{\thetable}{\thesection.\arabic{table}}
However, when ...
by adkdk
Thu Jun 10, 2010 10:30 pm
Forum: Page Layout
Topic: Fancyhdr and \chapter{} page numbering
Replies: 3
Views: 19333

Fancyhdr and \chapter{} page numbering

The problem was with mwrep (a non-standard report) class. After doing some changes in mwrep.cls everything started to work.

I changed:

Code: Select all

 \let\ps@opening\hf@empty
 \let\ps@closing\hf@empty
to

Code: Select all

 \let\ps@opening\hf@plain
  let\ps@closing\hf@plain
and saved this with a custom class name.
by adkdk
Sat May 29, 2010 8:24 pm
Forum: Page Layout
Topic: Fancyhdr and \chapter{} page numbering
Replies: 3
Views: 19333

Fancyhdr and \chapter{} page numbering

To create fancy headers in my document, I'm using fancyhdr package and the following code:
\pagestyle{fancy}
\fancyhead[LE]{\nouppercase{\leftmark}}
\fancyhead[RO]{\nouppercase{\rightmark}}
\fancyhead[CE,RE,CO,LO]{\ }

This leaves footers (with centered page number) untouched. However, on the page ...
by adkdk
Thu Apr 22, 2010 5:15 pm
Forum: Fonts & Character Sets
Topic: Package times - no bold fonts
Replies: 8
Views: 19207

Re: Package times - no bold fonts

I found that it could be done without any command modifications. The problem is with font encoding. According to polski's documentation, type:

\usepackage[T1,plmath]{polski}

and everything works like a charm :-)
by adkdk
Sun Apr 18, 2010 8:36 pm
Forum: Fonts & Character Sets
Topic: Package times - no bold fonts
Replies: 8
Views: 19207

Package times - no bold fonts

OK. The culprit was package "polski". This is Polish internationalization package for LaTeX. With this package enabled, bold fonts work neither in times, nor in mathptmx. Only some font packages, like "helvet" are working.
Bold fonts are working properly when I'm using package [polish]{babel ...
by adkdk
Sun Apr 18, 2010 1:04 pm
Forum: Text Formatting
Topic: texttt{} inside an environment
Replies: 3
Views: 4934

Re: texttt{} inside an environment

Yes, I can simply use listings. However, I'm just curious, how to deal with texttt, textbf and other similar tags in environments.
by adkdk
Sun Apr 18, 2010 11:59 am
Forum: Fonts & Character Sets
Topic: Package times - no bold fonts
Replies: 8
Views: 19207

Package times - no bold fonts

To write my master's thesis, I have to use Times New Roman or Arial font. However, when adding

\usepackage{times}

to my document, I can see no bold fonts (e.g. in chapter titles). What's wrong?
I'm using MiKTeX 2.8 and report document class.
by adkdk
Sun Apr 18, 2010 11:49 am
Forum: Text Formatting
Topic: texttt{} inside an environment
Replies: 3
Views: 4934

texttt{} inside an environment

Hi everyone.

I'd like to create my own environment for custom source code formatting (monotype, verbatim, small font etc). The problem is: how to format text as monospace? When declaring an environment, I must tell LaTeX what to put before and after environment contents. So I wrote ...