Latex_newbie” post=70418Salve a tutti,
sto scrivendo una tesina e vorrei sapere se qualcuno di voi ha mai incontrato il seguente problema con il comando \newcommand{}{}.
Dopo che compilo con pdfLaTex, nel pdf, quando il comando in questione è seguito da una congiunzione/preposizione monosillabica (e, con…), questa viene attaccata alla parola del \newcommand. Ad esempio se in tex scrivo “[…] \op e […] “, in pdf lo stampa “Opcodee” mentre dovrebbe essere “Opcode e “; altre volte viene bene. Si può sistemare?
Questo è il preambolo del report.`
\documentclass[a4paper, 11pt, titlepage, twoside, openright]{report} % use larger type; default would be 10pt; use twocolumn ifneeded\usepackage[utf8]{inputenc} % set input encoding (not needed with XeLaTeX)
\usepackage{textcomp}\usepackage{indentfirst}
\usepackage[sans]{frontespizio}\usepackage{geometry}
\geometry{margin=2cm} % for example, change the margins to 2 inches all round\usepackage{graphicx} % support the \includegraphics command and options
\graphicspath{{figure/}}%%% PACKAGES
\usepackage{amsmath}
\usepackage{booktabs} % for much better looking tables
\usepackage{array} % for better arrays (eg matrices) in maths
\usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)
\usepackage{verbatim} % adds environment for commenting out blocks of text & for better verbatim
\usepackage{subfig} % make it possible to include more than one captioned figure/table in a single float\usepackage{fancyhdr} % This should be set AFTER setting up the page geometry
\pagestyle{fancy} % options: empty , plain , fancy
\renewcommand{\headrulewidth}{0pt} % customise the layout…
\lhead{}\chead{}\rhead{}
\lfoot{}\cfoot{\thepage}\rfoot{}%%% SECTION TITLE APPEARANCE
\usepackage{sectsty}
\allsectionsfont{\sffamily\mdseries\upshape} % (See the fntguide.pdf for font help)
% (This matches ConTeXt defaults)%%% ToC (table of contents) APPEARANCE
\usepackage[nottoc,notlof,notlot]{tocbibind} % Put the bibliography in the ToC
\usepackage[titles,subfigure]{tocloft} % Alter the style of the Table of Contents
\renewcommand{\cftsecfont}{\rmfamily\mdseries\upshape}
\renewcommand{\cftsecpagefont}{\rmfamily\mdseries\upshape} % No bold!%LANGUAGE + Bibliography with BibTeX
\usepackage[english,italian]{babel}
\usepackage[babel]{csquotes}
\usepackage[style=numeric-comp]{biblatex}
\bibliography{bibliografia/bibliografia1}%HYPERLINK + REFERENCES
\usepackage{hyperref}
\hypersetup{pdfstartview=Fit}\newcommand{\mail}[1]{{\texttt{#1}}}
\newcommand{\server}{server~PCP}
\newcommand{\client}{client~{PCP} }
\newcommand{\four}{IPv4}
\newcommand{\six}{IPv6}
\newcommand{\pp}{PCP }
\newcommand{\nat}{{NAT} }
\newcommand{\upnp}{{UPnP}}
\newcommand{\oc}{Opcode}
\newcommand{\op}{Options}\begin{document}
\include{titolo}
:
:
\end{titolo}
`
Usa:
`\op{} e il resto del testo.`
Ciao
Claudio