Risposte nei forum create
-
AutoreRisposte
-
::
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
::
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
::
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
::
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
::
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$ `
::
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
::
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.
14 Ottobre 2011 alle 9:55 in risposta a: Posizionamento elementi in frontespizio con linea verticale #64822 -
AutoreRisposte