Re: Eliminare testatina (solo in una pagina!) [Risolto]

#38766
Up
0
Down
::


Sì, sono io il farabutto 🙂
Ma a parte qualche lacuna non è male per fare le cose veloci…poi per le personalizzazioni, inserisco del codice TeX.

Eccoti il mio preambolo:

`%% LyX 1.6.4 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,a4paper,italian]{book}
\usepackage{mathpazo}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{listings}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{babel}

\usepackage{float}
\usepackage{wrapfig}
\usepackage{booktabs}
\usepackage{textcomp}
\usepackage{amstext}
\usepackage{graphicx}
\usepackage[unicode=true,
bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
breaklinks=true,pdfborder={0 0 0},backref=false,colorlinks=false]
{hyperref}
\hypersetup{pdftitle={Algoritmo Lattice-Boltzmann: confronto tra diverse implementazioni},
pdfauthor={Alessandro Candini},
pdfkeywords={lattice boltzmann lattice-boltzmann fluidodinamica parallelismo MPI cell CBE x86 algoritmo bulk timestep reticolo}}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
%% Frontespizio tesi di Enrico Gregorio
\usepackage{frontespizio}
% – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

%% Grafica di capitoli e testatine
% Cambio la visualizzazione di Capitolo 1, Capitolo 2,…
\usepackage[Bjornstrup]{fncychap}
% – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

%% Gestione dei listati di codice
\usepackage{color}
\definecolor{grayback}{rgb}{0.9,0.9,0.9}
\definecolor{grayrows}{rgb}{0.45,0.45,0.45}
\definecolor{RossoScuro_d40000}{rgb}{0.831,0,0}
\definecolor{VerdeScuro_008000}{rgb}{0,0.501,0}
\definecolor{BluScuro_000080}{rgb}{0,0,0.501}
\lstdefinestyle{num_righe}
{numbers=left,
stepnumber=1,
numberstyle=\footnotesize\color{grayrows},
numbersep=5pt}

\lstset
{
backgroundcolor={\color{grayback}},
basicstyle={\fontfamily{pcr}\footnotesize},
emph={3},
keywordstyle={\color{blue}\bfseries\footnotesize},
language=C,
sensitive=false,
showspaces=false,
showstringspaces=false,
showtabs=false,
frame=single,
framerule=0pt,
style={num_righe},
breaklines=true
}
% – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

%%% Per gestione note
\usepackage[bottom]{footmisc}
% Per non spezzare le note a piè di pagina su più pagine
\interfootnotelinepenalty=10000
% – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

%% Definizione margini sinistro e destro
\addtolength{\evensidemargin}{-15mm}
\addtolength{\oddsidemargin}{15mm}
% – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

%% Per evitare spazi diversi verticali tra le righe
\raggedbottom
% – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

%% Per la Bibliografia
\addto\captionsitalian{\renewcommand{\refname}{Riferimenti bibliografici}%
\renewcommand{\bibname}{Riferimenti bibliografici}}
% – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

%% Indentazione a inizio capitolo e ad ogni sezione
\usepackage{indentfirst}
% – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

%% Per modificare le testatine
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{%
\markright{\thesection\ #1}}
\fancyhf{} % elimina header e footer correnti
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt} % spazio per la riga
\fancypagestyle{plain}{%
\fancyhead{} % elimina le intestazioni dalle pagine vuote
\renewcommand{\headrulewidth}{0pt} % e la riga
}
% Setto l'altezza della testatina
\setlength{\headheight}{15pt}
% Per personalizzare le didascalie
\usepackage[font={small,sl}, labelfont=bf, justification= RaggedRight]{caption}[2004/07/16]
% – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

%% Personalizzazione tabelle
% Per le tabelle
\usepackage{tabularx}
\usepackage{booktabs}

% Sillabazione di alcune parole
\hyphenation{col-li-de}
% Per sillabare il testo in formato \texttt (per dividere a caso le parole)
%\usepackage[htt]{hyphenat} % Dannosissimo: fa le cesure a caso!
\usepackage{breakurl}

% Testatine

\makeatother

\begin{document}
….
`

Spero che questo basti…il problema sorge nell’appendice: siccome Lyx non gestisce \backmatter, ho inserito io a mano:`\backmatter
\appendix
\chapter{Script per l'esecuzione del codice}\label{cap:run}
% Per eliminare i numeri delle sezioni
\setcounter{secnumdepth}{0}
% Per eliminare i numeri delle sezioni dalle testatine
\renewcommand{\sectionmark}[1]{\markright{#1}}
\section{\textsf{RUN.sh}}
\label{code:RUN.sh}
\lstset{language=bash}
\begin{lstlisting}
#!/bin/bash -x
…codice noioso…
\end{lstlisting}

\newpage

\section{\textsf{medie.pl}}
\label{code:medie.pl}
\lstset{language=perl}
\begin{lstlisting}
#!/usr/bin/perl -w
…altro codice noioso…
\end{lstlisting}`

Il problema è che nella pagina di medie.pl, sulla testatina in alto a sinistra compare “.0 medie.pl”.
Io voglio o “medie.pl” oppure niente, che va bene lo stesso perchè 1 cm sotto appare grande il titolo della sezione (sempre medie.pl).

EDIT: ho tolto il fastidioso “.0”. Accadeva perchè Lyx mi faceva vedere questa stringa:`\renewcommand{\sectionmark}[1]{\markright{#1}} `su una riga nuova, ma in realtà è sempre stata sulla stessa riga della linea precedente (un commento). E’ sempre stata commentata, insomma. Adesso funziona e posso mettere il tag risolto anche a quest’altro topic.

Grazie lo stesso!

Go to top