\newcommand

  • Creatore
    Topic
  • #116645
    Up
    0
    Down
    ::


    Hi

    can anybody explain me why this set of instructiions
    \documentclass[12pt]{article}
    \DeclareMathSizes{12}{15}{8}{10}
    \usepackage{graphicx}
    \usepackage[T1]{fontenc} % Dysplay “<" and ">” symbols correctely
    \usepackage{amsmath}
    \usepackage{amssymb}
    \usepackage{mathptmx}
    \usepackage{placeins}
    \usepackage{caption}
    \usepackage{graphicx}
    \usepackage{biblatex}
    which has been always worked for the \newcommand now it does’n work any more?
    For example \newcommand{\num}{\overline{\nu_m}} and similar commands always
    have been accepted by the latex compiler with these set of \usepackage and now are not accepted.
    I have installed
    again MiKTex and took all the updates

Visualizzazione 4 filoni di risposte
  • Autore
    Risposte
    • #116646
      Up
      0
      Down
      ::


      Hi, in order to help you you should explain better what the command you want to do.
      For example if you want the command /num overlines the argument of the command you’re wrong in the syntax, the correct one is the following:

      `\newcommand{\num}[1]{\overline{#1}} `

    • #116647
      Up
      0
      Down
      ::

      luca34″ post=117055Hi, in order to help you you should explain better what the command you want to do.
      For example if you want the command /num overlines the argument of the command you’re wrong in the syntax, the correct one is the following:

      `\newcommand{\num}[1]{\overline{1}} `

      Ti ringrazio per la risposta veloce però non ha funzionato. Ho ottenuto questa risposta
      ! Missing = inserted for \ifnum.

      D
      l.19 \newcommand
      {\num}[1]{\overline{1}}
      premetto che \newcommand{num}{\overline{\nu}}
      ha sempre funzionato e che se premo r quando il compilatore si arresta al primo \newcommand tutti i comandi \newcommand vengono presi , come per esempio
      \newcommand{\Dr}{\frac{d}{d r}}. Quindi forse posso tralasciare

    • #116648
      Up
      0
      Down
      ::


      `\documentclass[12pt]{article}
      \DeclareMathSizes{12}{15}{8}{10}
      \usepackage{graphicx}
      \usepackage[T1]{fontenc} % Dysplay “<" and ">” symbols correctely
      \usepackage{amsmath}
      \usepackage{amssymb}
      \usepackage{mathptmx}
      \usepackage{placeins}
      \usepackage{caption}
      \usepackage{graphicx}
      \usepackage{biblatex}

      \newcommand{\num}[1]{\overline{#1}}

      \begin{document}
      prova $\num{6}$
      \end{document}` questo funziona da me non so tu cos’abbia compilato…

    • #116649
      Up
      0
      Down
      ::


      Adesso ti spedisco l’inizio del file latex con cui lavoro.
      \documentclass[12pt]{article}
      \DeclareMathSizes{12}{15}{8}{10}
      \usepackage{graphicx}
      \usepackage[T1]{fontenc} % Dysplay “<" and ">” symbols correctely
      \usepackage{amsmath}
      \usepackage{amssymb}
      \usepackage{mathptmx}
      \usepackage{placeins}
      \usepackage{caption}
      \usepackage{biblatex}
      %\usepackage{xkeyval}
      %\makeatletter
      %\renewcommand{\theequation}{\thesection.\arabic{equation}}
      %\newtheorem{theorem}{Theorem}
      %\newtheorem{lemma}{Lemma}
      %\newtheorem{corollary}{Corollary}
      %\newtheorem{remark}{Remark}
      %\newtheorem{proposition}{Proposition}
      \newcommand{\num}[1]{\overline{1}}
      %\newcommand{\num}{\overline\nu_m}
      \newcommand{\muion}{\mu_{ion}}
      \newcommand{\sigmai}{\sigma_{ion}}
      \newcommand{\sigmaiN}{\sigma_{iN}}
      \newcommand{\muei}{\mu_{ei}}
      \newcommand{\muie}{\mu_{ie}}
      \newcommand{\muiN}{\mu_{iN}}
      \newcommand{\mueN}{\mu_{eN}}
      \newcommand{\viz}{V_{iz}}
      \newcommand{\vez}{V_{ez}}
      \newcommand{\vte}{V_{T_e}}
      \newcommand{\vgas}{V_{gas}}
      \newcommand{\bion}{b_{ion}}
      \newcommand{\biN}{b_{iN}}
      \newcommand{\beN}{b_{eN}}
      \newcommand{\etarr}{\eta_{rr}}
      \newcommand{\etartheta}{\eta_{r \theta}}
      \newcommand{\etathetar}{\eta_{\theta r}}
      \newcommand{\etathetatheta}{\eta_{\theta \theta}}
      \newcommand{\etazz}{\eta_{zz}}
      \newcommand{\pa}{\partial}
      \newcommand{\vx}{\overline{V_x}}
      \newcommand{\Dz}{\frac{d}{d z}}
      \newcommand{\Pz}{\frac{\pa^2}{\pa z^2}}
      \newcommand{\rr}{\frac{\pa^2}{\pa r^2}}
      \newcommand{\Px}{\frac{\pa^2}{\pa x^2}}
      \newcommand{\pz}{\frac{\pa}{\pa z}}
      \newcommand{\Dr}{\frac{d}{d r}}
      \newcommand{\pr}{\frac{\pa}{\pa r}}
      \newcommand{\Dx}{\frac{d}{d x}}
      \newcommand{\dz}{\frac{d^2}{d z^2}}
      \newcommand{\dr}{\frac{d^2}{d r^2}}
      \newcommand{\dx}{\frac{d^2}{d x^2}}
      \newcommand{\an}{\psi_{1n}}
      \newcommand{\bn}{\psi_{2n}}
      \newcommand{\dtheta}{\frac{d}{d \theta}}
      \newcommand{\nuion}{\nu_{\text{ion}}}
      \newcommand{\Viz}{V_{iz}}
      \newcommand{\Vir}{V_{ir}}

      \title{On the solutions of Grad-Shafranov equation for the protosphera}

      \author{ Paolo Buratti$^{1}$,Brunello Tirozzi$^{1,2}$, Franco Alladio$^1$, Paolo Micozzi$^1$\\
      $^1$ Enea Research Center, Frascati, Italy\\ $^2$ Department of Physics, University La Sapienza of Rome, Italy}

      \begin{document}

      \maketitle

      Let us start from the Grad-Shafranov equation

      \begin{equation}
      \Pz\psi+r \pr (\frac{1}{r}\pr \psi)=-r j_\phi
      \end{equation}

      where

      $$j_\phi= r \frac{d p}{d \psi}+\frac{I_A(\psi) I_(\psi)^{‘}}{r}$$

      where $I_A$ is an arbitrary flux function which takes the value $1$ outside the plasma region, \cite{Nucl.Fusion}, $p$ is the plasma pressure.

      $$ I_A(\psi) I_A(\psi)^{‘}=K \psi \rightarrow I_A= K^2 \psi$$

      The magnetic field is represented

      E’ chiaramente un testo matematico e \Pz è stato accettato come risulta dal pdf ( guarda le prime righe. \Pz è stato definito come derivata seconda rispetto a z nel newcommand relativo. Il problema è sapere perchè debbo premere r per fargli prendere il \newcommand. Ti allego anche il file latex. Quando compili ti dà errore perchè non ti allego le figure. Non serve per questa discussione

      Attachments:
      You must be logged in to view attached files.
    • #116650
      Up
      0
      Down
      ::


      Senti Brunello, dovresti innanzitutto leggerti come funziona il \newcommand e in secondo luogo precisare meglio i tuoi dubbi.
      Non hai per niente chiara la sintassi del newcommand per cui è abbastanza ovvio che non compili correttamente, ti consiglio di leggere bene sull’Arte il funzionamento di questo comando e questo chiarirà i tuoi dubbi.

Visualizzazione 4 filoni di risposte
  • Devi essere connesso per rispondere a questo topic.

Go to top