- Questo topic ha 24 risposte, 5 partecipanti ed è stato aggiornato l'ultima volta 14 anni, 10 mesi fa da
ivan.
-
CreatoreTopic
-
12 Novembre 2011 alle 12:02 #66031::
Sto cercando di far “migrare” da classic-thesis a memoir un vecchio lavoro.
Nella compilazione ottengo l’errore:
`! Package xcolor Error: Undefined color `halfgray'.See the xcolor package documentation for explanation.
Type Hfor immediate help.
…l.48 \item i
l port completo a 64 bit
?`
Ora è vero che halfgray non è definito, ma perché io non ne faccio mai uso
e non esiste mel mio testo…. Devo postare altro per ottenere qualche responso?Grzie
M.
-
CreatoreTopic
-
AutoreRisposte
-
-
12 Novembre 2011 alle 12:26 #66032::
samiel” post=65073Sto cercando di far “migrare” da classic-thesis a memoir un vecchio lavoro.
Nella compilazione ottengo l’errore:
`! Package xcolor Error: Undefined color `halfgray'.See the xcolor package documentation for explanation.
Type Hfor immediate help.
…l.48 \item i
l port completo a 64 bit
?`
Ora è vero che halfgray non è definito, ma perché io non ne faccio mai uso
e non esiste mel mio testo…. Devo postare altro per ottenere qualche responso?Difficile che LaTeX vada in cerca di un colore se non lo chiedi mai. Ne deduco che da qualche parte è richiesto.
Ciao
Enrico
-
12 Novembre 2011 alle 12:33 #66033::
Il fatto che spezzi la riga proprio dopo la `i’ di `il’ lascia supporre tante cose, compresa quella che l’errore sia molte righe prima, non nel punto in cui TeX, o meglio il programma pdftex non riesce più ad andare avanti.Forse si può ottenere maggiore informazione se scrivessi subito dopo \begin{document}
`
\errorcontextlines=9
`
così, invece di mostrarti solo l’ultima riga dove si è bloccato, ti stampa in ordine inverso 9 righe della successione di macro il cui sviluppo ha portato all’errore.
-
12 Novembre 2011 alle 14:50 #66034::
Ahhhh, beati i ciechi poiché di essi…
In effetti la segnalazione più ampia ottenuta col comando
suggeritomi da OldClaudio mi ha fatto individuare l’errore.Visto che l’appetito vien mangiando…
Qui c’è una ridefinizione di alcuni comandi
per produrre delle schede numerate e ombreggiate:
`\newcommand{\changesections}{%
\titleformat{\subsection}
{\relax}
{\MakeTextLowercase{\thesubsection}}
{1em}
{\large\ttfamily\textbf}%
\titleformat{\subsubsection}
{\relax}
{\MakeTextLowercase{\thesubsubsection}}
{1em}
{\normalsize\ttfamily}%
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}`
e l’errore che spunta è:
`! Undefined control sequence.
\changesections ->\titleformat
{\subsection } {\relax } {\MakeTextLowercase …\card #1->\changesections
\begin {shaded}\stepcounter {card}\phantomsection …
l.29 \begin{card}{Condivisioni con BitTorrent}`
Ce cosa c’è qui di incompatibile con memoir?M.
-
12 Novembre 2011 alle 15:24 #66035::
samiel” post=65082Ahhhh, beati i ciechi poiché di essi…
In effetti la segnalazione più ampia ottenuta col comando
suggeritomi da OldClaudio mi ha fatto individuare l’errore.Visto che l’appetito vien mangiando…
Qui c’è una ridefinizione di alcuni comandi
per produrre delle schede numerate e ombreggiate:
`\newcommand{\changesections}{%
\titleformat{\subsection}
{\relax}
{\MakeTextLowercase{\thesubsection}}
{1em}
{\large\ttfamily\textbf}%
\titleformat{\subsubsection}
{\relax}
{\MakeTextLowercase{\thesubsubsection}}
{1em}
{\normalsize\ttfamily}%
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}`
e l’errore che spunta è:
`! Undefined control sequence.
\changesections ->\titleformat
{\subsection } {\relax } {\MakeTextLowercase …\card #1->\changesections
\begin {shaded}\stepcounter {card}\phantomsection …
l.29 \begin{card}{Condivisioni con BitTorrent}`
Ce cosa c’è qui di incompatibile con memoir?M.
\titleformat è un comando del pacchetto titlesec che è incompatibile con memoir. La classe ha i suoi metodi per modificare l’aspetto dei titoli.
Ciao
Enrico
-
12 Novembre 2011 alle 20:47 #66036
-
12 Novembre 2011 alle 23:38 #66037
-
13 Novembre 2011 alle 13:01 #66038
-
13 Novembre 2011 alle 14:38 #66039::
Hai ragione; per cercare in un indice analitico bisogna sapere cosa cercare e se i comandi di memoir sono diversi da quelli di titlesec è ovvio che l’indice analitico richiede uno sforzo immane per cercare di immaginare che cosa cercare.Comunque la personalizzazione dei titoli di sezionamento inferiori a quello di chapter sono descritte a partire dal paragrafo “6.6 Lower level headings”
Questo implica però che forse esiste un comando \titlefrmat anche im memoir che fa altre cose, per cui \changesections fa cose che non dovrebbe fare. Riprendi in mano il modo di personalizzare le subsection e riesporimi il tutto con i comandi del paragrafo 6.6, pag. 104, del manuale di memoir
-
13 Novembre 2011 alle 20:48 #66040::
Prima variante, che mi dà sempre errore:
`\newcommand{\changesections}{%
\setsubsecheadstyle{\subsection}
{\relax}
{\MakeLowercase{\thesubsection}}
{1em}
{\large\ttfamily\textbf}%
\setsubsubsecheadstyle{\subsubsection}
{\relax}
{\MakeLowercase{\thesubsubsection}}
{1em}
{\normalsize\ttfamily}%
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}`
Il testo è
`\begin{card}{Condivisioni con BitTorrent}
Fino a qualche anno fa, in Internet dominava una netta distinzione fra i
server e i client. I server fornivano contenuti che potevano essere scaricati
dai client. Ciò era dovuto anche ai limiti oggettivi della banda: chi stava
scaricando con un modem a 56KB non aveva banda sufficiente per condividere
file. Con l'avvento delle tecnologie broadband come la DSL si è resa
disponibile una banda notevolmente più ampia, che ha portato alla nascita dei
p2p, acronimo di «peer-to-peer», che letteralmente significa «da pari a pari»
(per sottolineare il fatto che tutti i nodi rivestono, indistintamente, lo
stesso ruolo). Fra questi, una soluzione particolarmente felice è costituita
da BitTorrent, creato da Bram Cohen e reperibile all'indirizzo:
\URL{http://www.bittorrent.com}.
\end{card}`
e l’errore
`! Argument of \textbf has an extra }.
\par
}
\changesections …em} {\large \ttfamily \textbf }
\setsubsubsecheadstyle {\s…\card #1->\changesections
\begin {shaded}\stepcounter {card}\phantomsection …
l.29 \begin{card}{Condivisioni con BitTorrent}? `
M
-
13 Novembre 2011 alle 20:55 #66041::
samiel” post=65158Prima variante, che mi dà sempre errore:
`\newcommand{\changesections}{%
\setsubsecheadstyle{\subsection}
{\relax}
{\MakeLowercase{\thesubsection}}
{1em}
{\large\ttfamily\textbf}%
\setsubsubsecheadstyle{\subsubsection}
{\relax}
{\MakeLowercase{\thesubsubsection}}
{1em}
{\normalsize\ttfamily}%
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}`
Il testo è
`\begin{card}{Condivisioni con BitTorrent}
Fino a qualche anno fa, in Internet dominava una netta distinzione fra i
server e i client. I server fornivano contenuti che potevano essere scaricati
dai client. Ciò era dovuto anche ai limiti oggettivi della banda: chi stava
scaricando con un modem a 56KB non aveva banda sufficiente per condividere
file. Con l'avvento delle tecnologie broadband come la DSL si è resa
disponibile una banda notevolmente più ampia, che ha portato alla nascita dei
p2p, acronimo di «peer-to-peer», che letteralmente significa «da pari a pari»
(per sottolineare il fatto che tutti i nodi rivestono, indistintamente, lo
stesso ruolo). Fra questi, una soluzione particolarmente felice è costituita
da BitTorrent, creato da Bram Cohen e reperibile all'indirizzo:
\URL{http://www.bittorrent.com}.
\end{card}`
e l’errore
`! Argument of \textbf has an extra }.
\par
}
\changesections …em} {\large \ttfamily \textbf }
\setsubsubsecheadstyle {\s…\card #1->\changesections
\begin {shaded}\stepcounter {card}\phantomsection …
l.29 \begin{card}{Condivisioni con BitTorrent}? `
M
Forse è meglio \bfseries.
Ciao
Enrico
-
13 Novembre 2011 alle 21:08 #66042::
Modificando solo quello, l’output che risulta è terrificante:
`Runaway argument?
{\@hangfrom {\hskip \subsecindent \relax \@svsec }\interlinepenalty \@M \ETC.
! TeX capacity exceeded, sorry [main memory size=3000000].
…alty \@M \Hy@SectionAnchorHref {sect
ion*.29}\Sectionformat {\@…\Sectionformat #1#2->#1
…{2}\@@par }{2}\@@par }{2}\@@par }{2}
\@@par
\Sectionformat #1#2->#1…{2}\@@par }{2}\@@par }{2}\@@par }{2}
\@@par
\Sectionformat #1#2->#1…{2}\@@par }{2}\@@par }{2}\@@par }{2}
\@@par
\Sectionformat #1#2->#1…{2}\@@par }{2}\@@par }{2}\@@par }{2}
\@@par
\Sectionformat #1#2->#1…
l.29 \begin{card}{Condivisioni con BitTorrent}! ==> Fatal error occurred, no output PDF file produced!
Transcript written on s4d.log.
samiel@debian:~/slack4dummies$ `
-
13 Novembre 2011 alle 21:32 #66043
-
13 Novembre 2011 alle 21:34 #66044::
Il codice è
`\newcommand{\changesections}{%
\setsubsecheadstyle{\subsection}
{\relax}
{\MakeLowercase{\thesubsection}}
{1em}
{\large\ttfamily\bfseries}%
\setsubsubsecheadstyle{\subsubsection}
{\relax}
{\MakeLowercase{\thesubsubsection}}
{1em}
{\normalsize\ttfamily}%
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}`
Il testo quello riportato nel messaggio sopraM
-
13 Novembre 2011 alle 21:39 #66045::
Naturalmente \setsubsecheadstyle non ha la stessa sintassi di \titleformat. È ovvio che scrivendo
`\setsubsecheadstyle{\subsection}`
andrai in loop.\setsubsecheadstyle prende come argomento gli attributi del font con cui viene composto il titolo. Per le spaziature eccetera ci sono altri comandi.
Ciao
Enrico
-
13 Novembre 2011 alle 22:02 #66046::
Hai ragione, ma la faccenda è oscura (ovviamente per me)
`\documentclass{memoir}
\usepackage[OT2,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[dvipsnames,table]{xcolor}
\usepackage{framed}
\definecolor{shadecolor}{gray}{0.92}
\setsecheadstyle{\scshape\raggedright}\newcommand{\changesections}{%
\setsubsecheadstyle{\subsection}
{\relax}
{\MakeLowercase{\thesubsection}}
{1em}
{\large\ttfamily\bfseries}%
\setsubsubsecheadstyle{\subsubsection}
{\relax}
{\MakeLowercase{\thesubsubsection}}
{1em}
{\normalsize\ttfamily}%
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}\begin{document}
Come quasi tutte le distribuzioni GNU Linux, anche Slackware si trova in
allegato a parecchie riviste. Se si intende utilizzarla stabilmente, non è
inopportuno acquistarla o abbonarsi (per ricevere gli aggiornamenti), così da
fornire un supporto economico anche se minimo agli sviluppatori. Il set consta
di sei CD o di un DVD perché contiene tutti i sorgenti.\begin{card}{Condivisioni con BitTorrent}
Fino a qualche anno fa, in Internet dominava una netta distinzione fra i
server e i client. I server fornivano contenuti che potevano essere scaricati
dai client. Ciò era dovuto anche ai limiti oggettivi della banda: chi stava
scaricando con un modem a 56KB non aveva banda sufficiente per condividere
file. Con l'avvento delle tecnologie broadband come la DSL si è resa
disponibile una banda notevolmente più ampia, che ha portato alla nascita dei
p2p, acronimo di «peer-to-peer», che letteralmente significa «da pari a pari»
(per sottolineare il fatto che tutti i nodi rivestono, indistintamente, lo
stesso ruolo). Fra questi, una soluzione particolarmente felice è costituita
da BitTorrent, creato da Bram Cohen e reperibile all'indirizzo:
\URL{http://www.bittorrent.com}.
\end{card}
\end{document}`
E con questo codice l’errore è
`! Undefined control sequence.
…ily \small Scheda n.\texorpdfstring
{\ }{ }\arabic {card} – Co…
l.43 \begin{card}{Condivisioni con BitTorrent}`M
-
13 Novembre 2011 alle 22:07 #66047::
samiel” post=65167Hai ragione, ma la faccenda è oscura (ovviamente per me)
`\documentclass{memoir}
\usepackage[OT2,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[dvipsnames,table]{xcolor}
\usepackage{framed}
\definecolor{shadecolor}{gray}{0.92}
\setsecheadstyle{\scshape\raggedright}\newcommand{\changesections}{%
\setsubsecheadstyle{\subsection}
{\relax}
{\MakeLowercase{\thesubsection}}
{1em}
{\large\ttfamily\bfseries}%
\setsubsubsecheadstyle{\subsubsection}
{\relax}
{\MakeLowercase{\thesubsubsection}}
{1em}
{\normalsize\ttfamily}%
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}\begin{document}
Come quasi tutte le distribuzioni GNU Linux, anche Slackware si trova in
allegato a parecchie riviste. Se si intende utilizzarla stabilmente, non è
inopportuno acquistarla o abbonarsi (per ricevere gli aggiornamenti), così da
fornire un supporto economico anche se minimo agli sviluppatori. Il set consta
di sei CD o di un DVD perché contiene tutti i sorgenti.\begin{card}{Condivisioni con BitTorrent}
Fino a qualche anno fa, in Internet dominava una netta distinzione fra i
server e i client. I server fornivano contenuti che potevano essere scaricati
dai client. Ciò era dovuto anche ai limiti oggettivi della banda: chi stava
scaricando con un modem a 56KB non aveva banda sufficiente per condividere
file. Con l'avvento delle tecnologie broadband come la DSL si è resa
disponibile una banda notevolmente più ampia, che ha portato alla nascita dei
p2p, acronimo di «peer-to-peer», che letteralmente significa «da pari a pari»
(per sottolineare il fatto che tutti i nodi rivestono, indistintamente, lo
stesso ruolo). Fra questi, una soluzione particolarmente felice è costituita
da BitTorrent, creato da Bram Cohen e reperibile all'indirizzo:
\URL{http://www.bittorrent.com}.
\end{card}
\end{document}
E con questo codice l'errore è
[code]! Undefined control sequence.
…ily \small Scheda n.\texorpdfstring
{\ }{ }\arabic {card} – Co…
l.43 \begin{card}{Condivisioni con BitTorrent}`M
Ripeto: i metodi di memoir per cambiare l’impostazione dei titoli di sezione sono completamente diversi da quelli di titlesec e il codice che hai scritto non ha alcun senso. Leggiti la sezione 6.6 della documentazione di memoir; per esempio \setsubsecheadstyle prende come argomento comandi di attributo per font, nel tuo caso saranno \Large\ttfamily\bfseries.
Il comando \texorpdfstring è definito da hyperref e non ha nulla a che fare con il tuo problema.
Ciao
Enrico
-
15 Novembre 2011 alle 18:30 #66048::
Ho provato la “traduzione” della formattazione per i titoli in questo modo
`\newcommand{\changesections}{%
\setsubsecheadstyle{\large\ttfamily\bfseries}
\setsubsubsecheadstyle{\ttfamily\bfseries}
{\normalsize\ttfamily}
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}`
ma \changesections dev’essere incompleto
perché in ogni caso ricevo:
`[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/local/texlive/2011/texmf-dist/tex/latex/base/t1cmtt.fd)
! Undefined control sequence.
…ily \small Scheda n.\texorpdfstring
{\ }{ }\arabic {card} – Co…
l.36 \begin{card}{Condivisioni con BitTorrent}? `
M
-
15 Novembre 2011 alle 20:57 #66049
-
16 Novembre 2011 alle 16:42 #66050::
Tutto funziona adesso con questo codice (eliminando \texorpdfstring):
`\newcommand{\changesections}{%
\setsubsecheadstyle{\large\ttfamily\bfseries}
\setsubsubsecheadstyle{\ttfamily\bfseries}
{\normalsize\ttfamily}
}
\newcommand{\cardsection}[1]{%
\phantomsection
\addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
\subsubsection*{#1}}
\newcounter{card}
\newenvironment{card}[1]
{\changesections\begin{shaded}\stepcounter{card}%
\phantomsection
\addcontentsline{toc}{subsection}
{\ttfamily\small Scheda n.~{ }%
\arabic{card} – #1}
\subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
{\end{shaded}}`
tranne che delle schede non c’è traccia nell’indice…M
-
16 Novembre 2011 alle 21:13 #66051
-
16 Novembre 2011 alle 21:22 #66052
-
16 Novembre 2011 alle 21:51 #66053
-
16 Novembre 2011 alle 21:55 #66054
-
16 Novembre 2011 alle 21:57 #66055
-
-
AutoreRisposte
- Devi essere connesso per rispondere a questo topic.