Como citar um PDF no formato MLA: guia passo a passo
Índice

Citar um PDF em MLA exige mais do que simplesmente adicionar "PDF" a uma referência. O formato da citação depende do que o PDF contém, como um livro, artigo de periódico ou relatório, e de onde você o acessou. Uma vez preparada, a citação deve ser formatada corretamente na lista de Obras Citadas (Works Cited).
Este guia explica como citar um PDF em MLA, como formatar a citação no Microsoft Word e como automatizar a formatação de múltiplas entradas com Python.
- Requisitos de citação MLA para documentos PDF
- Formatar rapidamente uma citação PDF em MLA com o Microsoft Word
- Formatar múltiplas citações PDF em MLA com Python
- Obter informações de citação MLA com o Google Scholar ou MyBib
- Perguntas frequentes
Requisitos de citação MLA para documentos PDF
O MLA não utiliza um formato de citação fixo para todos os PDFs. Em vez disso, cite a obra de acordo com seu tipo e inclua as informações relevantes de publicação e acesso.
Dependendo da fonte, uma citação MLA pode incluir:
- Autor
- Título
- Contêiner, como um periódico, site ou banco de dados
- Editora
- Data de publicação
- Intervalo de páginas, quando aplicável
- DOI ou URL, quando aplicável
A nona edição do Manual MLA, publicado em 2021, fornece as diretrizes atuais de documentação MLA.
Exemplos de citação de PDF em MLA
- Para um livro independente disponível como PDF, a citação pode seguir o formato padrão de livro:
Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.
- Para um artigo de periódico disponível como PDF:
Rawls, John. “Kantian Constructivism in Moral Theory.” The Journal of Philosophy, vol. 77, no. 9, 1980, pp. 515–572.
Um PDF baixado de um site pode exigir informações adicionais sobre o site ou a versão do PDF. O MLA permite a descrição download de PDF quando isso ajuda a esclarecer o formato da fonte.
Portanto, a citação exata deve ser verificada com a fonte original antes de formatar a entrada final na lista de Obras Citadas.
Como formatar rapidamente uma citação PDF em MLA com o Microsoft Word
Após preparar sua citação, você pode usar o Microsoft Word para aplicar a formatação exigida para uma lista de Obras Citadas. O MLA recomenda um recuo deslocado (hanging indent) de 0,5 polegada (aprox. 1,27 cm) e espaçamento duplo.
Siga estes passos:
- Passo 1: Selecione as entradas de citação na sua lista de Obras Citadas.
- Passo 2: Clique com o botão direito na seleção e escolha Parágrafo.

- Passo 3: Em Recuo, defina Especial como Deslocado e Por como 1,27 cm (ou 0,5 polegada). Em Espaçamento, defina Antes e Depois como 0 pt, defina Espaçamento entre linhas como Duplo e clique em OK.

Você também pode pressionar Ctrl + T no Windows ou Command + T no Mac para aplicar um recuo deslocado rapidamente.
Evite usar espaços, tabulações ou quebras de linha manuais para criar o recuo. A formatação de parágrafo mantém as entradas alinhadas quando você edita o texto da citação.
Nota: Se você também precisar colocar o PDF original em um documento do Word, consulte Como inserir um PDF no Word para métodos de inserir conteúdo PDF preservando seu layout e editabilidade.
Como formatar múltiplas citações PDF em MLA com Python
O Microsoft Word é conveniente quando você só precisa formatar algumas citações. Para aplicações que geram relatórios, processam documentos enviados por usuários ou criam grandes listas de Obras Citadas, formatar entradas de citação programaticamente pode ser mais eficiente.
Free Spire.Doc for Python é uma biblioteca Python independente para criar, editar, formatar e converter documentos Word sem a necessidade do Microsoft Word. Ela fornece propriedades de formatação de parágrafo que podem ser usadas para criar o recuo deslocado exigido para citações MLA.
Você pode combinar LeftIndent com um FirstLineIndent negativo. Para um recuo deslocado de 0,5 polegada, defina ambos os valores como 36 pontos em direções opostas.
O exemplo a seguir cria múltiplas entradas de citação MLA e aplica a formatação necessária automaticamente:
from spire.doc import *
from spire.doc.common import *
# Criar um documento e uma seção
doc = Document()
section = doc.AddSection()
# Exemplos de entradas de citação MLA
citations = [
"Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.",
'Rawls, John. "Kantian Constructivism in Moral Theory." The Journal of Philosophy, vol. 77, no. 9, 1980, pp. 515–572.'
]
# Adicionar e formatar cada citação
for citation in citations:
paragraph = section.AddParagraph()
paragraph.AppendText(citation)
# Aplicar um recuo deslocado de 0,5 polegada
paragraph.Format.LeftIndent = 36.0
paragraph.Format.FirstLineIndent = -36.0
# Aplicar espaçamento duplo e remover espaçamento entre parágrafos
paragraph.Format.LineSpacingRule = LineSpacingRule.Multiple
paragraph.Format.LineSpacing = 24.0
paragraph.Format.BeforeSpacing = 0.0
paragraph.Format.AfterSpacing = 0.0
# Salvar o documento
doc.SaveToFile("MLA_PDF_Citations.docx", FileFormat.Docx2013)
doc.Close()

No exemplo, LeftIndent = 36.0 move o conteúdo do parágrafo 0,5 polegada para a direita, enquanto FirstLineIndent = -36.0 move a primeira linha de volta para a margem esquerda. Juntos, eles criam um recuo deslocado.
O código também define BeforeSpacing e AfterSpacing como 0.0 e usa LineSpacingRule.Multiple com LineSpacing = 24.0 para produzir espaçamento duplo nesta configuração do Free Spire.Doc.
Esta abordagem é útil quando você já possui strings de citação e precisa gerar um documento Word formatado de forma consistente a partir de muitas entradas.
Obter informações de citação MLA com o Google Scholar ou MyBib
Se você precisar de ajuda para coletar informações de citação, ferramentas como o Google Scholar e o MyBib podem fornecer um ponto de partida útil.
O Google Scholar oferece uma opção Citar para muitos resultados de pesquisa, enquanto o MyBib pode gerar citações no estilo MLA a partir de informações de fonte disponíveis.
No entanto, as citações geradas ainda devem ser verificadas com a fonte original. Uma ferramenta de citação nem sempre pode identificar corretamente o tipo de fonte, detalhes de publicação ou método de acesso ao PDF.
Um fluxo de trabalho prático é:
- Identificar o tipo de obra contida no PDF.
- Coletar as informações de publicação necessárias.
- Gerar ou preparar a citação MLA.
- Verificar a citação com a fonte original.
- Formatar as entradas concluídas manualmente no Word ou automaticamente com Python.
Perguntas frequentes
Preciso adicionar "download de PDF" a todas as citações MLA?
Não. Download de PDF não é necessário para todas as citações de PDF. Pode ser usado como uma descrição quando você deseja esclarecer que consultou uma versão em PDF da fonte.
O MLA usa o mesmo formato para todos os PDFs?
Não. A citação depende do tipo de obra e de como você a acessou. Um livro, um artigo de periódico e um relatório baixados de um site podem exigir informações de citação diferentes.
Como formato uma citação de PDF em uma lista de Obras Citadas MLA?
Use um recuo deslocado de 0,5 polegada e espaçamento duplo para as entradas de citação. No Microsoft Word, você pode aplicar a formatação através das configurações de Parágrafo ou usar Ctrl + T no Windows.
Posso formatar múltiplas citações de PDF em MLA com Python?
Sim. Se o texto da citação já estiver preparado, o Free Spire.Doc for Python pode criar documentos Word e aplicar formatação de parágrafo consistente a múltiplas entradas de citação. Propriedades como LeftIndent e FirstLineIndent podem ser combinadas para criar um recuo deslocado.
Conclusão
Citar um PDF em MLA torna-se mais fácil quando você separa o processo em duas partes: preparar a citação com base na fonte e formatar a entrada final corretamente. Para algumas citações, o Microsoft Word oferece uma maneira rápida de aplicar o recuo deslocado e o espaçamento duplo necessários. Quando você precisa formatar muitas entradas de forma consistente, o Free Spire.Doc for Python pode automatizar o processo e gerar um documento Word pronto para uso.
Leia também:
MLA 형식으로 PDF 인용하는 방법: 단계별 가이드

MLA 형식으로 PDF를 인용할 때는 단순히 참조에 “PDF”라는 단어를 추가하는 것 이상의 작업이 필요합니다. 인용 형식은 해당 PDF에 무엇이 포함되어 있는지(예: 도서, 저널 기사, 보고서 등)와 어디에서 액세스했는지에 따라 달라집니다. 인용문이 준비되면 '인용 문헌(Works Cited)' 목록에 올바르게 서식을 지정해야 합니다.
이 가이드에서는 MLA 형식으로 PDF를 인용하는 방법, Microsoft Word에서 인용 서식을 지정하는 방법, 그리고 Python을 사용하여 여러 항목의 서식 지정을 자동화하는 방법을 설명합니다.
- PDF 문서에 대한 MLA 인용 요구 사항
- Microsoft Word를 사용하여 MLA PDF 인용 서식 빠르게 지정하기
- Python으로 여러 MLA PDF 인용 서식 지정하기
- Google Scholar 또는 MyBib을 사용하여 MLA 인용 정보 가져오기
- 자주 묻는 질문(FAQs)
PDF 문서에 대한 MLA 인용 요구 사항
MLA는 모든 PDF에 대해 하나의 고정된 인용 형식을 사용하지 않습니다. 대신, 자료의 유형에 따라 인용하고 관련 출판 및 액세스 정보를 포함해야 합니다.
출처에 따라 MLA 인용에는 다음이 포함될 수 있습니다:
- 저자
- 제목
- 컨테이너(저널, 웹사이트, 데이터베이스 등)
- 출판사
- 출판 날짜
- 페이지 범위(해당되는 경우)
- DOI 또는 URL(해당되는 경우)
2021년에 출판된 MLA 핸드북(MLA Handbook) 제9판은 현재의 MLA 문서 작성 지침을 제공합니다.
MLA PDF 인용 예시
- PDF로 제공되는 단행본의 경우, 표준 도서 형식을 따를 수 있습니다:
Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.
- PDF로 제공되는 저널 기사의 경우:
Rawls, John. “Kantian Constructivism in Moral Theory.” The Journal of Philosophy, vol. 77, no. 9, 1980, pp. 515–572.
웹사이트에서 다운로드한 PDF는 웹사이트나 PDF 버전에 대한 추가 정보가 필요할 수 있습니다. MLA는 출처의 형식을 명확히 하는 데 도움이 되는 경우 PDF download라는 설명을 허용합니다.
따라서 최종 '인용 문헌' 항목의 서식을 지정하기 전에 정확한 인용 내용을 원본 출처와 대조하여 확인해야 합니다.
Microsoft Word를 사용하여 MLA PDF 인용 서식 빠르게 지정하기
인용문을 준비한 후 Microsoft Word를 사용하여 '인용 문헌' 목록에 필요한 서식을 적용할 수 있습니다. MLA는 0.5인치 내어쓰기(hanging indent)와 줄 간격 2줄(double spacing)을 권장합니다.
다음 단계를 따르세요:
- 1단계: '인용 문헌' 목록에서 인용 항목을 선택합니다.
- 2단계: 선택 영역을 마우스 오른쪽 버튼으로 클릭하고 단락(Paragraph)을 선택합니다.

- 3단계: 들여쓰기(Indentation) 아래의 특수(Special)를 내어쓰기(Hanging)로 설정하고 크기(By)를 0.5인치로 설정합니다. 또한 간격(Spacing) 아래에서 단락 앞(Before)과 단락 뒤(After)를 0 pt로, 줄 간격(Line spacing)을 2줄(Double)로 설정한 후 확인을 클릭합니다.

Windows에서는 Ctrl + T를, Mac에서는 Command + T를 눌러 내어쓰기를 빠르게 적용할 수도 있습니다.
스페이스바, 탭, 또는 수동 줄 바꿈을 사용하여 들여쓰기를 만들지 마십시오. 단락 서식을 사용해야 인용 텍스트를 편집할 때 항목이 정렬된 상태로 유지됩니다.
참고: 원본 PDF를 Word 문서에 배치해야 하는 경우, 레이아웃과 편집 가능성을 유지하면서 PDF 콘텐츠를 삽입하는 방법은 Word에 PDF를 삽입하는 방법을 참조하십시오.
Python으로 여러 MLA PDF 인용 서식 지정하기
Microsoft Word는 몇 개의 인용문만 서식을 지정할 때 편리합니다. 보고서를 생성하거나, 사용자가 제출한 문서를 처리하거나, 긴 '인용 문헌' 목록을 작성하는 애플리케이션의 경우, 프로그래밍 방식으로 인용 항목의 서식을 지정하는 것이 더 효율적일 수 있습니다.
Free Spire.Doc for Python은 Microsoft Word 없이도 Word 문서를 생성, 편집, 서식 지정 및 변환할 수 있는 독립형 Python 라이브러리입니다. 이 라이브러리는 MLA 인용에 필요한 내어쓰기를 생성하는 데 사용할 수 있는 단락 서식 속성을 제공합니다.
LeftIndent(왼쪽 들여쓰기)와 음수 값의 FirstLineIndent(첫 줄 들여쓰기)를 결합할 수 있습니다. 0.5인치 내어쓰기를 하려면 두 값을 반대 방향으로 36포인트로 설정하십시오.
다음 예제는 여러 MLA 인용 항목을 생성하고 필요한 서식을 자동으로 적용합니다:
from spire.doc import *
from spire.doc.common import *
# 문서 및 섹션 생성
doc = Document()
section = doc.AddSection()
# 샘플 MLA 인용 항목
citations = [
"Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.",
'Rawls, John. "Kantian Constructivism in Moral Theory." The Journal of Philosophy, vol. 77, no. 9, 1980, pp. 515–572.'
]
# 각 인용문 추가 및 서식 지정
for citation in citations:
paragraph = section.AddParagraph()
paragraph.AppendText(citation)
# 0.5인치 내어쓰기 적용
paragraph.Format.LeftIndent = 36.0
paragraph.Format.FirstLineIndent = -36.0
# 줄 간격 2줄 적용 및 단락 간격 제거
paragraph.Format.LineSpacingRule = LineSpacingRule.Multiple
paragraph.Format.LineSpacing = 24.0
paragraph.Format.BeforeSpacing = 0.0
paragraph.Format.AfterSpacing = 0.0
# 문서 저장
doc.SaveToFile("MLA_PDF_Citations.docx", FileFormat.Docx2013)
doc.Close()

예제에서 LeftIndent = 36.0은 단락 내용을 오른쪽으로 0.5인치 이동시키고, FirstLineIndent = -36.0은 첫 번째 줄을 왼쪽 여백으로 다시 이동시킵니다. 이 둘을 결합하여 내어쓰기가 생성됩니다.
또한 이 코드는 BeforeSpacing과 AfterSpacing을 0.0으로 설정하고, Free Spire.Doc 구성에서 줄 간격 2줄을 만들기 위해 LineSpacingRule.Multiple과 LineSpacing = 24.0을 사용합니다.
이 접근 방식은 이미 인용문 문자열을 가지고 있고 많은 항목으로부터 일관된 서식의 Word 문서를 생성해야 할 때 유용합니다.
Google Scholar 또는 MyBib을 사용하여 MLA 인용 정보 가져오기
인용 정보를 수집하는 데 도움이 필요하다면 Google Scholar나 MyBib과 같은 도구가 유용한 출발점이 될 수 있습니다.
Google Scholar는 많은 검색 결과에 대해 인용(Cite) 옵션을 제공하며, MyBib은 사용 가능한 출처 정보를 바탕으로 MLA 스타일 인용문을 생성할 수 있습니다.
단, 생성된 인용문은 반드시 원본 출처와 대조하여 확인해야 합니다. 인용 도구가 항상 출처 유형, 출판 세부 정보 또는 PDF 액세스 방식을 정확하게 식별하지 못할 수도 있기 때문입니다.
실용적인 워크플로우는 다음과 같습니다:
- PDF에 포함된 자료의 유형을 식별합니다.
- 필요한 출판 정보를 수집합니다.
- MLA 인용문을 생성하거나 준비합니다.
- 원본 출처와 인용문을 대조하여 확인합니다.
- Word에서 수동으로 또는 Python을 사용하여 자동으로 완성된 항목의 서식을 지정합니다.
자주 묻는 질문(FAQs)
모든 MLA 인용에 “PDF download”를 추가해야 하나요?
아니요. 모든 PDF 인용에 PDF download가 필요한 것은 아닙니다. 출처의 PDF 버전을 참조했음을 명확히 하고 싶을 때 설명으로 사용할 수 있습니다.
MLA는 모든 PDF에 대해 동일한 형식을 사용하나요?
아니요. 인용 형식은 자료의 유형과 액세스 방식에 따라 달라집니다. 웹사이트에서 다운로드한 도서, 저널 기사, 보고서는 각각 다른 인용 정보가 필요할 수 있습니다.
MLA '인용 문헌' 목록에서 PDF 인용 서식은 어떻게 지정하나요?
인용 항목에 0.5인치 내어쓰기와 줄 간격 2줄을 사용하십시오. Microsoft Word에서는 단락 설정을 통해 서식을 적용하거나 Windows에서 Ctrl + T를 사용할 수 있습니다.
Python으로 여러 MLA PDF 인용 서식을 지정할 수 있나요?
네. 인용 텍스트가 이미 준비되어 있다면, Free Spire.Doc for Python을 사용하여 Word 문서를 생성하고 여러 인용 항목에 일관된 단락 서식을 적용할 수 있습니다. LeftIndent와 FirstLineIndent와 같은 속성을 결합하여 내어쓰기를 만들 수 있습니다.
결론
MLA 형식으로 PDF를 인용하는 것은 출처를 바탕으로 인용문을 준비하는 과정과 완성된 항목의 서식을 올바르게 지정하는 과정으로 나누면 더 쉬워집니다. 인용문이 몇 개 안 될 때는 Microsoft Word가 필요한 내어쓰기와 줄 간격 2줄을 빠르게 적용할 수 있는 방법을 제공합니다. 많은 항목의 서식을 일관되게 지정해야 할 때는 Free Spire.Doc for Python을 사용하여 과정을 자동화하고 바로 사용할 수 있는 Word 문서를 생성할 수 있습니다.
추천 읽기:
Come citare un PDF in formato MLA: guida passo dopo passo
Indice

Citare un PDF in formato MLA richiede qualcosa di più della semplice aggiunta della dicitura "PDF" a un riferimento. Il formato della citazione dipende dal contenuto del PDF, come un libro, un articolo di rivista o un rapporto, e da dove è stato consultato. Una volta preparata la citazione, questa deve essere formattata correttamente nell'elenco delle opere citate (Works Cited).
Questa guida spiega come citare un PDF in formato MLA, come formattare la citazione in Microsoft Word e come automatizzare la formattazione di più voci con Python.
- Requisiti di citazione MLA per documenti PDF
- Formattare rapidamente una citazione PDF in MLA con Microsoft Word
- Formattare più citazioni PDF MLA con Python
- Ottenere informazioni di citazione MLA con Google Scholar o MyBib
- Domande frequenti (FAQ)
Requisiti di citazione MLA per documenti PDF
MLA non utilizza un formato di citazione fisso per ogni PDF. Al contrario, cita l'opera in base al suo tipo e includi le informazioni pertinenti sulla pubblicazione e sull'accesso.
A seconda della fonte, una citazione MLA può includere:
- Autore
- Titolo
- Contenitore, come una rivista, un sito web o un database
- Editore
- Data di pubblicazione
- Intervallo di pagine, ove applicabile
- DOI o URL, ove applicabile
La nona edizione del Manuale MLA, pubblicato nel 2021, fornisce le attuali linee guida per la documentazione MLA.
Esempi di citazione PDF MLA
- Per un libro autonomo disponibile come PDF, la citazione può seguire il formato standard del libro:
Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.
- Per un articolo di rivista disponibile come PDF:
Rawls, John. “Kantian Constructivism in Moral Theory.” The Journal of Philosophy, vol. 77, no. 9, 1980, pp. 515–572.
Un PDF scaricato da un sito web potrebbe richiedere informazioni aggiuntive sul sito o sulla versione del PDF. MLA consente la descrizione PDF download quando aiuta a chiarire il formato della fonte.
La citazione esatta dovrebbe quindi essere verificata rispetto alla fonte originale prima di formattare la voce finale nell'elenco delle opere citate.
Come formattare rapidamente una citazione PDF in MLA con Microsoft Word
Dopo aver preparato la citazione, puoi utilizzare Microsoft Word per applicare la formattazione richiesta per l'elenco delle opere citate. MLA raccomanda un rientro sporgente di 0,5 pollici (circa 1,27 cm) e un'interlinea doppia.
Segui questi passaggi:
- Passaggio 1: Seleziona le voci della citazione nell'elenco delle opere citate.
- Passaggio 2: Fai clic con il tasto destro sulla selezione e scegli Paragrafo.

- Passaggio 3: Sotto Rientro, imposta Speciale su Sporgente e Di su 1,27 cm (o 0,5 pollici). Sotto Spaziatura, imposta Prima e Dopo su 0 pt, imposta Interlinea su Doppia e fai clic su OK.

Puoi anche premere Ctrl + T su Windows o Command + T su Mac per applicare rapidamente un rientro sporgente.
Evita di usare spazi, tabulazioni o interruzioni di riga manuali per creare il rientro. La formattazione del paragrafo mantiene le voci allineate quando modifichi il testo della citazione.
Nota: Se hai anche bisogno di inserire il PDF originale in un documento Word, consulta Come inserire un PDF in Word per i metodi di inserimento del contenuto PDF preservandone layout e modificabilità.
Come formattare più citazioni PDF MLA con Python
Microsoft Word è comodo quando devi formattare solo poche citazioni. Per applicazioni che generano report, elaborano documenti inviati dagli utenti o creano lunghi elenchi di opere citate, formattare le voci di citazione a livello di programmazione può essere più efficiente.
Free Spire.Doc for Python è una libreria Python indipendente per creare, modificare, formattare e convertire documenti Word senza richiedere Microsoft Word. Fornisce proprietà di formattazione del paragrafo che possono essere utilizzate per creare il rientro sporgente richiesto per le citazioni MLA.
Puoi combinare LeftIndent con un FirstLineIndent negativo. Per un rientro sporgente di 0,5 pollici, imposta entrambi i valori a 36 punti in direzioni opposte.
L'esempio seguente crea più voci di citazione MLA e applica automaticamente la formattazione richiesta:
from spire.doc import *
from spire.doc.common import *
# Crea un documento e una sezione
doc = Document()
section = doc.AddSection()
# Esempi di voci di citazione MLA
citations = [
"Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.",
'Rawls, John. "Kantian Constructivism in Moral Theory." The Journal of Philosophy, vol. 77, no. 9, 1980, pp. 515–572.'
]
# Aggiungi e formatta ogni citazione
for citation in citations:
paragraph = section.AddParagraph()
paragraph.AppendText(citation)
# Applica un rientro sporgente di 0,5 pollici (36 punti)
paragraph.Format.LeftIndent = 36.0
paragraph.Format.FirstLineIndent = -36.0
# Applica interlinea doppia e rimuovi la spaziatura tra paragrafi
paragraph.Format.LineSpacingRule = LineSpacingRule.Multiple
paragraph.Format.LineSpacing = 24.0
paragraph.Format.BeforeSpacing = 0.0
paragraph.Format.AfterSpacing = 0.0
# Salva il documento
doc.SaveToFile("MLA_PDF_Citations.docx", FileFormat.Docx2013)
doc.Close()

Nell'esempio, LeftIndent = 36.0 sposta il contenuto del paragrafo di 0,5 pollici verso destra, mentre FirstLineIndent = -36.0 sposta la prima riga indietro verso il margine sinistro. Insieme, creano un rientro sporgente.
Il codice imposta anche BeforeSpacing e AfterSpacing su 0.0 e utilizza LineSpacingRule.Multiple con LineSpacing = 24.0 per produrre un'interlinea doppia in questa configurazione di Free Spire.Doc.
Questo approccio è utile quando hai già le stringhe di citazione e devi generare un documento Word formattato in modo coerente a partire da molte voci.
Ottenere informazioni di citazione MLA con Google Scholar o MyBib
Se hai bisogno di aiuto per raccogliere informazioni sulle citazioni, strumenti come Google Scholar e MyBib possono fornire un utile punto di partenza.
Google Scholar fornisce un'opzione Cita per molti risultati di ricerca, mentre MyBib può generare citazioni in stile MLA dalle informazioni sulla fonte disponibili.
Tuttavia, le citazioni generate dovrebbero sempre essere verificate rispetto alla fonte originale. Uno strumento di citazione potrebbe non identificare sempre correttamente il tipo di fonte, i dettagli di pubblicazione o il metodo di accesso al PDF.
Un flusso di lavoro pratico è:
- Identificare il tipo di opera contenuta nel PDF.
- Raccogliere le informazioni di pubblicazione richieste.
- Generare o preparare la citazione MLA.
- Verificare la citazione rispetto alla fonte originale.
- Formattare le voci completate manualmente in Word o automaticamente con Python.
Domande frequenti (FAQ)
Devo aggiungere "PDF download" a ogni citazione MLA?
No. PDF download non è richiesto per ogni citazione di un PDF. Può essere usato come descrizione quando vuoi chiarire che hai consultato una versione PDF della fonte.
MLA usa lo stesso formato per ogni PDF?
No. La citazione dipende dal tipo di opera e da come l'hai consultata. Un libro, un articolo di rivista e un rapporto scaricati da un sito web possono richiedere informazioni di citazione diverse.
Come formatto una citazione PDF in un elenco di opere citate MLA?
Usa un rientro sporgente di 0,5 pollici e un'interlinea doppia per le voci di citazione. In Microsoft Word, puoi applicare la formattazione tramite le impostazioni di Paragrafo o usare Ctrl + T su Windows.
Posso formattare più citazioni PDF MLA con Python?
Sì. Se il testo della citazione è già pronto, Free Spire.Doc for Python può creare documenti Word e applicare una formattazione del paragrafo coerente a più voci di citazione. Proprietà come LeftIndent e FirstLineIndent possono essere combinate per creare un rientro sporgente.
Conclusione
Citare un PDF in formato MLA diventa più semplice quando separi il processo in due parti: preparare la citazione in base alla fonte e formattare correttamente la voce finale. Per poche citazioni, Microsoft Word fornisce un modo rapido per applicare il rientro sporgente e l'interlinea doppia richiesti. Quando devi formattare molte voci in modo coerente, Free Spire.Doc for Python può automatizzare il processo e generare un documento Word pronto all'uso.
Leggi anche:
Comment citer un PDF au format MLA : guide étape par étape
Table des matières

Citer un PDF en MLA ne se résume pas à ajouter « PDF » à une référence. Le format de citation dépend du contenu du PDF (livre, article de revue, rapport) et de la manière dont vous y avez accédé. Une fois la citation préparée, elle doit être correctement mise en forme dans la liste des ouvrages cités (Works Cited).
Ce guide explique comment citer un PDF en MLA, comment formater la citation dans Microsoft Word et comment automatiser la mise en forme de plusieurs entrées avec Python.
- Exigences de citation MLA pour les documents PDF
- Formater rapidement une citation PDF en MLA avec Microsoft Word
- Formater plusieurs citations PDF MLA avec Python
- Obtenir des informations de citation MLA avec Google Scholar ou MyBib
- FAQ
Exigences de citation MLA pour les documents PDF
Le format MLA n'utilise pas un format de citation unique pour tous les PDF. Citez plutôt l'ouvrage en fonction de son type et incluez les informations de publication et d'accès pertinentes.
Selon la source, une citation MLA peut inclure :
- Auteur
- Titre
- Conteneur, tel qu'une revue, un site web ou une base de données
- Éditeur
- Date de publication
- Plage de pages, le cas échéant
- DOI ou URL, le cas échéant
La neuvième édition du MLA Handbook, publiée en 2021, fournit les directives actuelles de documentation MLA.
Exemples de citation MLA pour PDF
- Pour un livre autonome disponible en PDF, la citation peut suivre le format standard du livre :
Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.
- Pour un article de revue disponible en PDF :
Rawls, John. « Kantian Constructivism in Moral Theory ». The Journal of Philosophy, vol. 77, n° 9, 1980, pp. 515–572.
Un PDF téléchargé depuis un site web peut nécessiter des informations supplémentaires sur le site ou la version du PDF. MLA autorise la mention téléchargement PDF lorsque cela aide à clarifier le format de la source.
La citation exacte doit donc être vérifiée par rapport à la source originale avant de formater l'entrée finale dans la liste des ouvrages cités.
Comment formater rapidement une citation PDF en MLA avec Microsoft Word
Après avoir préparé votre citation, vous pouvez utiliser Microsoft Word pour appliquer la mise en forme requise pour une liste d'ouvrages cités. MLA recommande un retrait négatif de 0,5 pouce (environ 1,27 cm) et un interligne double.
Suivez ces étapes :
- Étape 1 : Sélectionnez les entrées de citation dans votre liste d'ouvrages cités.
- Étape 2 : Faites un clic droit sur la sélection et choisissez Paragraphe.

- Étape 3 : Sous Retrait, réglez Spécial sur Suspendu et de sur 1,27 cm. Sous Espacement, réglez Avant et Après sur 0 pt, réglez l'Interligne sur Double, puis cliquez sur OK.

Vous pouvez également appuyer sur Ctrl + T sous Windows ou Command + T sur Mac pour appliquer rapidement un retrait négatif.
Évitez d'utiliser des espaces, des tabulations ou des sauts de ligne manuels pour créer le retrait. La mise en forme de paragraphe permet de garder les entrées alignées lorsque vous modifiez le texte de la citation.
Remarque : Si vous devez également placer le PDF original dans un document Word, consultez Comment insérer un PDF dans Word pour connaître les méthodes permettant d'insérer le contenu d'un PDF tout en préservant sa mise en page et sa modifiabilité.
Comment formater plusieurs citations PDF MLA avec Python
Microsoft Word est pratique lorsque vous n'avez que quelques citations à formater. Pour les applications qui génèrent des rapports, traitent des documents soumis par les utilisateurs ou créent de longues listes d'ouvrages cités, le formatage par programmation peut être plus efficace.
Free Spire.Doc for Python est une bibliothèque Python autonome permettant de créer, modifier, formater et convertir des documents Word sans nécessiter Microsoft Word. Elle fournit des propriétés de mise en forme de paragraphe qui peuvent être utilisées pour créer le retrait négatif requis pour les citations MLA.
Vous pouvez combiner LeftIndent avec un FirstLineIndent négatif. Pour un retrait négatif de 0,5 pouce, réglez les deux valeurs sur 36 points dans des directions opposées.
L'exemple suivant crée plusieurs entrées de citation MLA et applique automatiquement la mise en forme requise :
from spire.doc import *
from spire.doc.common import *
# Créer un document et une section
doc = Document()
section = doc.AddSection()
# Exemples d'entrées de citation MLA
citations = [
"Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.",
'Rawls, John. "Kantian Constructivism in Moral Theory." The Journal of Philosophy, vol. 77, no. 9, 1980, pp. 515–572.'
]
# Ajouter et formater chaque citation
for citation in citations:
paragraph = section.AddParagraph()
paragraph.AppendText(citation)
# Appliquer un retrait négatif de 0,5 pouce
paragraph.Format.LeftIndent = 36.0
paragraph.Format.FirstLineIndent = -36.0
# Appliquer un interligne double et supprimer l'espacement entre paragraphes
paragraph.Format.LineSpacingRule = LineSpacingRule.Multiple
paragraph.Format.LineSpacing = 24.0
paragraph.Format.BeforeSpacing = 0.0
paragraph.Format.AfterSpacing = 0.0
# Enregistrer le document
doc.SaveToFile("MLA_PDF_Citations.docx", FileFormat.Docx2013)
doc.Close()

Dans l'exemple, LeftIndent = 36.0 déplace le contenu du paragraphe de 0,5 pouce vers la droite, tandis que FirstLineIndent = -36.0 ramène la première ligne vers la marge gauche. Ensemble, ils créent un retrait négatif.
Le code définit également BeforeSpacing et AfterSpacing sur 0.0 et utilise LineSpacingRule.Multiple avec LineSpacing = 24.0 pour produire un interligne double dans cette configuration de Free Spire.Doc.
Cette approche est utile lorsque vous disposez déjà de chaînes de caractères de citation et que vous devez générer un document Word formaté de manière cohérente à partir de nombreuses entrées.
Obtenir des informations de citation MLA avec Google Scholar ou MyBib
Si vous avez besoin d'aide pour collecter des informations de citation, des outils tels que Google Scholar et MyBib peuvent constituer un point de départ utile.
Google Scholar propose une option Citer pour de nombreux résultats de recherche, tandis que MyBib peut générer des citations au style MLA à partir des informations de source disponibles.
Cependant, les citations générées doivent toujours être vérifiées par rapport à la source originale. Un outil de citation peut ne pas toujours identifier correctement le type de source, les détails de publication ou la méthode d'accès au PDF.
Un flux de travail pratique est :
- Identifier le type d'ouvrage contenu dans le PDF.
- Collecter les informations de publication requises.
- Générer ou préparer la citation MLA.
- Vérifier la citation par rapport à la source originale.
- Formater les entrées terminées manuellement dans Word ou automatiquement avec Python.
Foire aux questions
Dois-je ajouter « téléchargement PDF » à chaque citation MLA ?
Non. La mention téléchargement PDF n'est pas requise pour chaque citation de PDF. Elle peut être utilisée comme description lorsque vous souhaitez préciser que vous avez consulté une version PDF de la source.
MLA utilise-t-il le même format pour chaque PDF ?
Non. La citation dépend du type d'ouvrage et de la manière dont vous y avez accédé. Un livre, un article de revue et un rapport téléchargés depuis un site web peuvent nécessiter des informations de citation différentes.
Comment formater une citation PDF dans une liste d'ouvrages cités MLA ?
Utilisez un retrait négatif de 0,5 pouce et un interligne double pour les entrées de citation. Dans Microsoft Word, vous pouvez appliquer la mise en forme via les paramètres de Paragraphe ou utiliser Ctrl + T sous Windows.
Puis-je formater plusieurs citations PDF MLA avec Python ?
Oui. Si le texte de la citation est déjà préparé, Free Spire.Doc for Python peut créer des documents Word et appliquer une mise en forme de paragraphe cohérente à plusieurs entrées de citation. Des propriétés telles que LeftIndent et FirstLineIndent peuvent être combinées pour créer un retrait négatif.
Conclusion
Citer un PDF en MLA devient plus facile lorsque vous séparez le processus en deux parties : préparer la citation en fonction de la source et formater correctement l'entrée terminée. Pour quelques citations, Microsoft Word offre un moyen rapide d'appliquer le retrait négatif et l'interligne double requis. Lorsque vous devez formater de nombreuses entrées de manière cohérente, Free Spire.Doc for Python peut automatiser le processus et générer un document Word prêt à l'emploi.
À lire aussi :
Cómo citar un PDF en formato MLA: guía paso a paso
Tabla de contenidos

Citar un PDF en formato MLA requiere algo más que simplemente añadir "PDF" a una referencia. El formato de la cita depende de lo que contenga el PDF, como un libro, un artículo de revista o un informe, y de dónde se haya accedido a él. Una vez preparada la cita, también debe formatearse correctamente en la lista de Obras Citadas (Works Cited).
Esta guía explica cómo citar un PDF en MLA, cómo formatear la cita en Microsoft Word y cómo automatizar el formato de múltiples entradas con Python.
- Requisitos de citación MLA para documentos PDF
- Formatear una cita PDF en MLA rápidamente con Microsoft Word
- Formatear múltiples citas PDF MLA con Python
- Obtener información de citación MLA con Google Scholar o MyBib
- Preguntas frecuentes
Requisitos de citación MLA para documentos PDF
MLA no utiliza un formato de cita fijo para todos los PDF. En su lugar, cite la obra según su tipo e incluya la información pertinente de publicación y acceso.
Dependiendo de la fuente, una cita MLA puede incluir:
- Autor
- Título
- Contenedor, como una revista, sitio web o base de datos
- Editorial
- Fecha de publicación
- Rango de páginas, cuando corresponda
- DOI o URL, cuando corresponda
La novena edición del Manual MLA, publicado en 2021, proporciona las directrices actuales de documentación MLA.
Ejemplos de citación PDF en MLA
- Para un libro independiente disponible como PDF, la cita puede seguir el formato estándar de libro:
Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.
- Para un artículo de revista disponible como PDF:
Rawls, John. “Kantian Constructivism in Moral Theory.” The Journal of Philosophy, vol. 77, no. 9, 1980, pp. 515–572.
Un PDF descargado de un sitio web puede requerir información adicional sobre el sitio web o la versión del PDF. MLA permite la descripción descarga de PDF cuando ayuda a aclarar el formato de la fuente.
Por lo tanto, la cita exacta debe verificarse con la fuente original antes de formatear la entrada final de Obras Citadas.
Cómo formatear una cita PDF en MLA rápidamente con Microsoft Word
Después de preparar su cita, puede utilizar Microsoft Word para aplicar el formato requerido para una lista de Obras Citadas. MLA recomienda una sangría francesa de 0.5 pulgadas y un interlineado doble.
Siga estos pasos:
- Paso 1: Seleccione las entradas de la cita en su lista de Obras Citadas.
- Paso 2: Haga clic derecho en la selección y elija Párrafo.

- Paso 3: En Sangría, establezca Especial en Sangría francesa y En en 0.5 pulgadas. En Espaciado, establezca Anterior y Posterior en 0 pto, establezca Interlineado en Doble y haga clic en Aceptar.

También puede presionar Ctrl + T en Windows o Command + T en Mac para aplicar una sangría francesa rápidamente.
Evite usar espacios, tabulaciones o saltos de línea manuales para crear la sangría. El formato de párrafo mantiene las entradas alineadas cuando edita el texto de la cita.
Nota: Si también necesita colocar el PDF original en un documento de Word, consulte Cómo insertar un PDF en Word para conocer métodos para insertar contenido PDF conservando su diseño y editabilidad.
Cómo formatear múltiples citas PDF MLA con Python
Microsoft Word es conveniente cuando solo necesita formatear unas pocas citas. Para aplicaciones que generan informes, procesan documentos enviados por usuarios o crean listas extensas de Obras Citadas, formatear las entradas de citación mediante programación puede ser más eficiente.
Free Spire.Doc for Python es una biblioteca de Python independiente para crear, editar, formatear y convertir documentos de Word sin necesidad de Microsoft Word. Proporciona propiedades de formato de párrafo que se pueden utilizar para crear la sangría francesa requerida para las citas MLA.
Puede combinar LeftIndent con un FirstLineIndent negativo. Para una sangría francesa de 0.5 pulgadas, establezca ambos valores en 36 puntos en direcciones opuestas.
El siguiente ejemplo crea múltiples entradas de cita MLA y aplica el formato requerido automáticamente:
from spire.doc import *
from spire.doc.common import *
# Crear un documento y una sección
doc = Document()
section = doc.AddSection()
# Entradas de cita MLA de muestra
citations = [
"Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.",
'Rawls, John. "Kantian Constructivism in Moral Theory." The Journal of Philosophy, vol. 77, no. 9, 1980, pp. 515–572.'
]
# Añadir y formatear cada cita
for citation in citations:
paragraph = section.AddParagraph()
paragraph.AppendText(citation)
# Aplicar una sangría francesa de 0.5 pulgadas
paragraph.Format.LeftIndent = 36.0
paragraph.Format.FirstLineIndent = -36.0
# Aplicar interlineado doble y eliminar el espaciado entre párrafos
paragraph.Format.LineSpacingRule = LineSpacingRule.Multiple
paragraph.Format.LineSpacing = 24.0
paragraph.Format.BeforeSpacing = 0.0
paragraph.Format.AfterSpacing = 0.0
# Guardar el documento
doc.SaveToFile("MLA_PDF_Citations.docx", FileFormat.Docx2013)
doc.Close()

En el ejemplo, LeftIndent = 36.0 mueve el contenido del párrafo 0.5 pulgadas a la derecha, mientras que FirstLineIndent = -36.0 mueve la primera línea de vuelta al margen izquierdo. Juntos, crean una sangría francesa.
El código también establece BeforeSpacing y AfterSpacing en 0.0 y utiliza LineSpacingRule.Multiple con LineSpacing = 24.0 para producir un interlineado doble en esta configuración de Free Spire.Doc.
Este enfoque es útil cuando ya tiene cadenas de citas y necesita generar un documento de Word con formato consistente a partir de muchas entradas.
Obtener información de citación MLA con Google Scholar o MyBib
Si necesita ayuda para recopilar información de citación, herramientas como Google Scholar y MyBib pueden proporcionar un punto de partida útil.
Google Scholar ofrece una opción de Citar para muchos resultados de búsqueda, mientras que MyBib puede generar citas al estilo MLA a partir de la información de la fuente disponible.
Sin embargo, las citas generadas siempre deben verificarse con la fuente original. Es posible que una herramienta de citación no siempre identifique correctamente el tipo de fuente, los detalles de publicación o el método de acceso al PDF.
Un flujo de trabajo práctico es:
- Identificar el tipo de obra contenida en el PDF.
- Recopilar la información de publicación requerida.
- Generar o preparar la cita MLA.
- Verificar la cita con la fuente original.
- Formatear las entradas completadas manualmente en Word o automáticamente con Python.
Preguntas frecuentes
¿Necesito añadir "descarga de PDF" a cada cita MLA?
No. Descarga de PDF no es obligatorio para cada cita de PDF. Puede utilizarse como descripción cuando desee aclarar que consultó una versión en PDF de la fuente.
¿Utiliza MLA el mismo formato para cada PDF?
No. La cita depende del tipo de obra y de cómo haya accedido a ella. Un libro, un artículo de revista y un informe descargado de un sitio web pueden requerir información de citación diferente.
¿Cómo formateo una cita PDF en una lista de Obras Citadas de MLA?
Utilice una sangría francesa de 0.5 pulgadas y un interlineado doble para las entradas de la cita. En Microsoft Word, puede aplicar el formato a través de la configuración de Párrafo o usar Ctrl + T en Windows.
¿Puedo formatear múltiples citas PDF MLA con Python?
Sí. Si el texto de la cita ya está preparado, Free Spire.Doc for Python puede crear documentos de Word y aplicar un formato de párrafo consistente a múltiples entradas de cita. Propiedades como LeftIndent y FirstLineIndent pueden combinarse para crear una sangría francesa.
Conclusión
Citar un PDF en MLA se vuelve más fácil cuando se separa el proceso en dos partes: preparar la cita basada en la fuente y formatear correctamente la entrada terminada. Para unas pocas citas, Microsoft Word ofrece una forma rápida de aplicar la sangría francesa y el interlineado doble requeridos. Cuando necesite formatear muchas entradas de manera consistente, Free Spire.Doc for Python puede automatizar el proceso y generar un documento de Word listo para usar.
Lea también:
Wie man ein PDF im MLA-Format zitiert: Schritt-für-Schritt-Anleitung
Inhaltsverzeichnis

Das Zitieren eines PDFs im MLA-Stil erfordert mehr, als einfach nur „PDF“ zu einer Quellenangabe hinzuzufügen. Das Zitierformat hängt davon ab, was das PDF enthält (z. B. ein Buch, einen Fachartikel oder einen Bericht) und wo Sie darauf zugegriffen haben. Sobald das Zitat erstellt ist, muss es im Literaturverzeichnis („Works Cited“) korrekt formatiert werden.
Dieser Leitfaden erklärt, wie man ein PDF im MLA-Stil zitiert, wie man das Zitat in Microsoft Word formatiert und wie man die Formatierung mehrerer Einträge mit Python automatisiert.
- MLA-Zitieranforderungen für PDF-Dokumente
- Schnelle Formatierung eines PDF-Zitats im MLA-Stil mit Microsoft Word
- Formatierung mehrerer MLA-PDF-Zitate mit Python
- Abrufen von MLA-Zitierinformationen mit Google Scholar oder MyBib
- FAQs
MLA-Zitieranforderungen für PDF-Dokumente
MLA verwendet kein festes Zitierformat für jedes PDF. Zitieren Sie das Werk stattdessen entsprechend seiner Art und fügen Sie die relevanten Veröffentlichungs- und Zugriffsinformationen hinzu.
Je nach Quelle kann ein MLA-Zitat Folgendes enthalten:
- Autor
- Titel
- Behälter (Container), wie z. B. eine Fachzeitschrift, eine Website oder eine Datenbank
- Herausgeber
- Veröffentlichungsdatum
- Seitenzahlen, falls zutreffend
- DOI oder URL, falls zutreffend
Die neunte Ausgabe des MLA Handbook, veröffentlicht im Jahr 2021, enthält die aktuellen MLA-Dokumentationsrichtlinien.
Beispiele für MLA-PDF-Zitate
- Für ein eigenständiges Buch, das als PDF verfügbar ist, kann das Zitat dem Standard-Buchformat folgen:
Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.
- Für einen Fachartikel, der als PDF verfügbar ist:
Rawls, John. „Kantian Constructivism in Moral Theory.“ The Journal of Philosophy, Bd. 77, Nr. 9, 1980, S. 515–572.
Ein von einer Website heruntergeladenes PDF erfordert möglicherweise zusätzliche Informationen über die Website oder die PDF-Version. MLA erlaubt die Beschreibung PDF-Download, wenn dies zur Klärung des Formats der Quelle beiträgt.
Das genaue Zitat sollte daher vor der Formatierung des endgültigen Eintrags im Literaturverzeichnis mit der Originalquelle abgeglichen werden.
Schnelle Formatierung eines PDF-Zitats im MLA-Stil mit Microsoft Word
Nachdem Sie Ihr Zitat vorbereitet haben, können Sie Microsoft Word verwenden, um die für ein Literaturverzeichnis erforderliche Formatierung anzuwenden. MLA empfiehlt einen hängenden Einzug von 0,5 Zoll (ca. 1,27 cm) und einen doppelten Zeilenabstand.
Befolgen Sie diese Schritte:
- Schritt 1: Markieren Sie die Zitateinträge in Ihrem Literaturverzeichnis.
- Schritt 2: Klicken Sie mit der rechten Maustaste auf die Auswahl und wählen Sie Absatz.

- Schritt 3: Stellen Sie unter Einzug die Option Sondereinzug auf Hängend und den Wert auf 1,27 cm (bzw. 0,5 Zoll). Stellen Sie unter Abstand die Werte Vor und Nach auf 0 pt, setzen Sie den Zeilenabstand auf Doppelt und klicken Sie auf OK.

Sie können auch Strg + T unter Windows oder Command + T auf dem Mac drücken, um schnell einen hängenden Einzug anzuwenden.
Vermeiden Sie die Verwendung von Leerzeichen, Tabulatoren oder manuellen Zeilenumbrüchen, um den Einzug zu erstellen. Die Absatzformatierung sorgt dafür, dass die Einträge ausgerichtet bleiben, wenn Sie den Text des Zitats bearbeiten.
Hinweis: Wenn Sie das ursprüngliche PDF ebenfalls in ein Word-Dokument einfügen müssen, lesen Sie Wie man ein PDF in Word einfügt, um Methoden zum Einfügen von PDF-Inhalten unter Beibehaltung des Layouts und der Bearbeitbarkeit zu erfahren.
Formatierung mehrerer MLA-PDF-Zitate mit Python
Microsoft Word ist praktisch, wenn Sie nur wenige Zitate formatieren müssen. Für Anwendungen, die Berichte erstellen, benutzerdefinierte Dokumente verarbeiten oder umfangreiche Literaturverzeichnisse erstellen, kann die programmgesteuerte Formatierung von Zitaten effizienter sein.
Free Spire.Doc for Python ist eine eigenständige Python-Bibliothek zum Erstellen, Bearbeiten, Formatieren und Konvertieren von Word-Dokumenten, ohne dass Microsoft Word erforderlich ist. Sie bietet Absatzformatierungseigenschaften, die verwendet werden können, um den für MLA-Zitate erforderlichen hängenden Einzug zu erstellen.
Sie können LeftIndent mit einem negativen FirstLineIndent kombinieren. Für einen hängenden Einzug von 0,5 Zoll setzen Sie beide Werte auf 36 Punkte in entgegengesetzte Richtungen.
Das folgende Beispiel erstellt mehrere MLA-Zitateinträge und wendet die erforderliche Formatierung automatisch an:
from spire.doc import *
from spire.doc.common import *
# Erstellen eines Dokuments und eines Abschnitts
doc = Document()
section = doc.AddSection()
# Beispiel für MLA-Zitateinträge
citations = [
"Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.",
'Rawls, John. "Kantian Constructivism in Moral Theory." The Journal of Philosophy, vol. 77, no. 9, 1980, pp. 515–572.'
]
# Hinzufügen und Formatieren jedes Zitats
for citation in citations:
paragraph = section.AddParagraph()
paragraph.AppendText(citation)
# Anwenden eines hängenden Einzugs von 0,5 Zoll (36 Punkte)
paragraph.Format.LeftIndent = 36.0
paragraph.Format.FirstLineIndent = -36.0
# Anwenden von doppeltem Zeilenabstand und Entfernen von Absatzabständen
paragraph.Format.LineSpacingRule = LineSpacingRule.Multiple
paragraph.Format.LineSpacing = 24.0
paragraph.Format.BeforeSpacing = 0.0
paragraph.Format.AfterSpacing = 0.0
# Speichern des Dokuments
doc.SaveToFile("MLA_PDF_Zitate.docx", FileFormat.Docx2013)
doc.Close()

Im Beispiel verschiebt LeftIndent = 36.0 den Absatzinhalt um 0,5 Zoll nach rechts, während FirstLineIndent = -36.0 die erste Zeile zurück an den linken Rand bewegt. Zusammen erzeugen sie einen hängenden Einzug.
Der Code setzt außerdem BeforeSpacing und AfterSpacing auf 0.0 und verwendet LineSpacingRule.Multiple mit LineSpacing = 24.0, um in dieser Free Spire.Doc-Konfiguration einen doppelten Zeilenabstand zu erzeugen.
Dieser Ansatz ist nützlich, wenn Sie bereits Zitat-Strings haben und ein einheitlich formatiertes Word-Dokument aus vielen Einträgen generieren müssen.
Abrufen von MLA-Zitierinformationen mit Google Scholar oder MyBib
Wenn Sie Hilfe beim Sammeln von Zitierinformationen benötigen, können Tools wie Google Scholar und MyBib einen nützlichen Ausgangspunkt bieten.
Google Scholar bietet für viele Suchergebnisse eine Zitieren-Option, während MyBib MLA-konforme Zitate aus verfügbaren Quelleninformationen generieren kann.
Generierte Zitate sollten jedoch immer mit der Originalquelle abgeglichen werden. Ein Zitier-Tool erkennt möglicherweise nicht immer den Quellentyp, die Veröffentlichungsdetails oder die PDF-Zugriffsmethode korrekt.
Ein praktischer Arbeitsablauf ist:
- Identifizieren Sie die Art des Werks im PDF.
- Sammeln Sie die erforderlichen Veröffentlichungsinformationen.
- Generieren oder erstellen Sie das MLA-Zitat.
- Überprüfen Sie das Zitat anhand der Originalquelle.
- Formatieren Sie die fertigen Einträge manuell in Word oder automatisch mit Python.
Häufig gestellte Fragen (FAQs)
Muss ich zu jedem MLA-Zitat „PDF-Download“ hinzufügen?
Nein. PDF-Download ist nicht für jedes PDF-Zitat erforderlich. Es kann als Beschreibung verwendet werden, wenn Sie verdeutlichen möchten, dass Sie eine PDF-Version der Quelle konsultiert haben.
Verwendet MLA für jedes PDF das gleiche Format?
Nein. Das Zitat hängt von der Art des Werks und der Art des Zugriffs ab. Ein Buch, ein Fachartikel oder ein Bericht, der von einer Website heruntergeladen wurde, erfordert möglicherweise unterschiedliche Zitierinformationen.
Wie formatiere ich ein PDF-Zitat in einem MLA-Literaturverzeichnis?
Verwenden Sie einen hängenden Einzug von 0,5 Zoll und einen doppelten Zeilenabstand für die Zitateinträge. In Microsoft Word können Sie die Formatierung über die Absatz-Einstellungen vornehmen oder Strg + T unter Windows verwenden.
Kann ich mehrere MLA-PDF-Zitate mit Python formatieren?
Ja. Wenn der Zitattext bereits vorbereitet ist, kann Free Spire.Doc for Python Word-Dokumente erstellen und eine konsistente Absatzformatierung auf mehrere Zitateinträge anwenden. Eigenschaften wie LeftIndent und FirstLineIndent können kombiniert werden, um einen hängenden Einzug zu erzeugen.
Fazit
Das Zitieren eines PDFs im MLA-Stil wird einfacher, wenn Sie den Prozess in zwei Teile unterteilen: die Vorbereitung des Zitats basierend auf der Quelle und die korrekte Formatierung des fertigen Eintrags. Für einige wenige Zitate bietet Microsoft Word eine schnelle Möglichkeit, den erforderlichen hängenden Einzug und den doppelten Zeilenabstand anzuwenden. Wenn Sie viele Einträge konsistent formatieren müssen, kann Free Spire.Doc for Python den Prozess automatisieren und ein sofort einsatzbereites Word-Dokument generieren.
Ebenfalls lesen:
Как цитировать PDF в формате MLA: пошаговое руководство
Оглавление

Цитирование PDF-файла в формате MLA требует большего, чем просто добавление пометки «PDF» к источнику. Формат ссылки зависит от того, что содержит PDF-файл (книгу, статью из журнала или отчет), и от того, где вы получили к нему доступ. После подготовки ссылки её необходимо правильно оформить в списке использованных источников (Works Cited).
В этом руководстве объясняется, как оформить ссылку на PDF в стиле MLA, как отформатировать её в Microsoft Word и как автоматизировать форматирование нескольких записей с помощью Python.
- Требования MLA к оформлению ссылок на PDF-документы
- Быстрое форматирование ссылки на PDF в стиле MLA с помощью Microsoft Word
- Форматирование нескольких ссылок MLA на PDF с помощью Python
- Получение информации для цитирования в MLA через Google Scholar или MyBib
- Часто задаваемые вопросы
Требования MLA к оформлению ссылок на PDF-документы
В MLA не существует единого фиксированного формата для всех PDF-файлов. Ссылку следует оформлять в соответствии с типом работы, включая соответствующую информацию о публикации и доступе.
В зависимости от источника, ссылка в формате MLA может включать:
- Автора
- Название
- Контейнер (например, журнал, веб-сайт или база данных)
- Издателя
- Дату публикации
- Диапазон страниц (если применимо)
- DOI или URL (если применимо)
Девятое издание MLA Handbook, опубликованное в 2021 году, содержит актуальные рекомендации по оформлению документации в стиле MLA.
Примеры оформления ссылок на PDF в MLA
- Для отдельной книги, доступной в формате PDF, ссылка может следовать стандартному формату книги:
Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.
- Для статьи из журнала, доступной в формате PDF:
Rawls, John. “Kantian Constructivism in Moral Theory.” The Journal of Philosophy, vol. 77, no. 9, 1980, pp. 515–572.
PDF-файл, загруженный с веб-сайта, может потребовать дополнительной информации о самом сайте или версии PDF. MLA допускает использование описания PDF download, если это помогает уточнить формат источника.
Поэтому перед составлением финальной записи в списке использованных источников точную ссылку следует сверить с оригиналом.
Как быстро отформатировать ссылку на PDF в стиле MLA с помощью Microsoft Word
После подготовки текста ссылки вы можете использовать Microsoft Word для применения форматирования, требуемого для списка использованных источников. MLA рекомендует использовать выступающий отступ (hanging indent) размером 0,5 дюйма и двойной межстрочный интервал.
Выполните следующие действия:
- Шаг 1: Выделите записи в вашем списке использованных источников.
- Шаг 2: Нажмите правой кнопкой мыши на выделенный текст и выберите Абзац (Paragraph).

- Шаг 3: В разделе Отступ (Indentation) установите Первая строка (Special) на Выступ (Hanging), а значение на (By) — на 0,5 дюйма. В разделе Интервал (Spacing) установите значения Перед (Before) и После (After) на 0 пт, установите Межстрочный интервал (Line spacing) на Двойной (Double) и нажмите ОК.

Вы также можете нажать Ctrl + T в Windows или Command + T на Mac, чтобы быстро применить выступающий отступ.
Избегайте использования пробелов, табуляции или ручных разрывов строк для создания отступа. Форматирование абзаца позволяет записям оставаться выровненными при редактировании текста ссылки.
Примечание: Если вам также нужно разместить исходный PDF-файл в документе Word, см. статью Как вставить PDF в Word, где описаны методы вставки содержимого PDF с сохранением его макета и возможности редактирования.
Как отформатировать несколько ссылок MLA на PDF с помощью Python
Microsoft Word удобен, если вам нужно отформатировать всего несколько ссылок. Для приложений, которые генерируют отчеты, обрабатывают пользовательские документы или создают большие списки использованных источников, программное форматирование может быть более эффективным.
Free Spire.Doc for Python — это автономная библиотека Python для создания, редактирования, форматирования и конвертации документов Word без необходимости установки Microsoft Word. Она предоставляет свойства форматирования абзацев, которые можно использовать для создания выступающего отступа, требуемого в MLA.
Вы можете объединить LeftIndent с отрицательным значением FirstLineIndent. Для выступающего отступа в 0,5 дюйма установите оба значения на 36 пунктов в противоположных направлениях.
Следующий пример создает несколько записей ссылок MLA и автоматически применяет необходимое форматирование:
from spire.doc import *
from spire.doc.common import *
# Создание документа и раздела
doc = Document()
section = doc.AddSection()
# Примеры записей ссылок MLA
citations = [
"Chomsky, Noam. Media Control: The Spectacular Achievements of Propaganda. Seven Stories Press, 1997.",
'Rawls, John. "Kantian Constructivism in Moral Theory." The Journal of Philosophy, vol. 77, no. 9, 1980, pp. 515–572.'
]
# Добавление и форматирование каждой ссылки
for citation in citations:
paragraph = section.AddParagraph()
paragraph.AppendText(citation)
# Применение выступающего отступа 0,5 дюйма
paragraph.Format.LeftIndent = 36.0
paragraph.Format.FirstLineIndent = -36.0
# Применение двойного интервала и удаление интервалов между абзацами
paragraph.Format.LineSpacingRule = LineSpacingRule.Multiple
paragraph.Format.LineSpacing = 24.0
paragraph.Format.BeforeSpacing = 0.0
paragraph.Format.AfterSpacing = 0.0
# Сохранение документа
doc.SaveToFile("MLA_PDF_Citations.docx", FileFormat.Docx2013)
doc.Close()

В примере LeftIndent = 36.0 сдвигает содержимое абзаца на 0,5 дюйма вправо, а FirstLineIndent = -36.0 возвращает первую строку к левому полю. Вместе они создают выступающий отступ.
Код также устанавливает BeforeSpacing и AfterSpacing на 0.0 и использует LineSpacingRule.Multiple со значением LineSpacing = 24.0 для получения двойного интервала в конфигурации Free Spire.Doc.
Этот подход полезен, когда у вас уже есть строки ссылок и нужно сгенерировать единообразно отформатированный документ Word из множества записей.
Получение информации для цитирования в MLA через Google Scholar или MyBib
Если вам нужна помощь в сборе информации для цитирования, такие инструменты, как Google Scholar и MyBib, могут стать полезной отправной точкой.
Google Scholar предоставляет опцию Цитировать (Cite) для многих результатов поиска, а MyBib может генерировать ссылки в стиле MLA на основе доступной информации об источнике.
Однако сгенерированные ссылки всегда следует сверять с оригиналом. Инструмент цитирования не всегда может правильно определить тип источника, детали публикации или метод доступа к PDF.
Практический рабочий процесс выглядит так:
- Определите тип работы, содержащейся в PDF.
- Соберите необходимую информацию о публикации.
- Сгенерируйте или подготовьте ссылку в стиле MLA.
- Сверьте ссылку с оригинальным источником.
- Отформатируйте готовые записи вручную в Word или автоматически с помощью Python.
Часто задаваемые вопросы
Нужно ли добавлять «PDF download» к каждой ссылке в MLA?
Нет. PDF download не требуется для каждой ссылки на PDF. Это описание можно использовать, если вы хотите уточнить, что вы обращались к PDF-версии источника.
Использует ли MLA одинаковый формат для всех PDF?
Нет. Ссылка зависит от типа работы и способа доступа к ней. Книга, статья из журнала и отчет, загруженные с веб-сайта, могут требовать разной информации для цитирования.
Как отформатировать ссылку на PDF в списке использованных источников MLA?
Используйте выступающий отступ 0,5 дюйма и двойной межстрочный интервал. В Microsoft Word вы можете применить форматирование через настройки Абзаца или использовать Ctrl + T в Windows.
Можно ли отформатировать несколько ссылок MLA на PDF с помощью Python?
Да. Если текст ссылки уже готов, Free Spire.Doc for Python может создавать документы Word и применять единообразное форматирование абзацев к нескольким записям. Свойства, такие как LeftIndent и FirstLineIndent, можно комбинировать для создания выступающего отступа.
Заключение
Цитирование PDF в формате MLA становится проще, если разделить процесс на две части: подготовка ссылки на основе источника и правильное форматирование готовой записи. Для небольшого количества ссылок Microsoft Word предоставляет быстрый способ применения необходимого выступающего отступа и двойного интервала. Когда вам нужно единообразно отформатировать множество записей, Free Spire.Doc for Python может автоматизировать этот процесс и создать готовый к использованию документ Word.
Читайте также:
Set Excel Background Color and Background Image with JavaScript in React
When creating reports, setting background colors for cells highlights headers and key data, and setting a background image for the worksheet makes the whole report more recognizable. Spire.XLS for JavaScript performs both kinds of settings directly in the browser based on WebAssembly, and manages input/output files through a virtual file system (VFS), with no backend service required.
This article covers two core features:
For installation and project configuration, refer to Integrating Spire.XLS for JavaScript in a React Project. The examples below assume Spire.XLS is installed and the WebAssembly module is initialized.
Set Cell Background Color
Setting a background color for cells highlights headers, important data, or specific regions. Spire.XLS for JavaScript sets a background color for a cell or a cell range through the CellRange.Style.Color property, with rich built-in colors supported. The main steps are as follows:
- Create a
Workbookobject and use theLoadFromFile()method to load the Excel document. - Use the
Workbook.Worksheets.get()method to get a specific worksheet. - Use the
CellRange.Style.Colorproperty to set a background color for a specific cell range. - Use the
Workbook.SaveToFile()method to save the document to a specified path.
Here is a complete code example showing how to set background colors for cell ranges in React:
function App() {
const setBackgroundColor = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check whether the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Load the font and Excel file into the VFS
await window.spire.FetchFileToVFS('ARIAL.TTF', '/Library/Fonts/', `${process.env.PUBLIC_URL}/font/`);
const inputFileName = 'SetBackgroundColor.xlsx';
await window.spire.FetchFileToVFS(inputFileName, '', `${process.env.PUBLIC_URL}data/`);
// Load the workbook
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: inputFileName });
// Get the first worksheet
const sheet = workbook.Worksheets.get(0);
// Set the header row to a yellow background
sheet.Range.get("A1:E1").Style.Color = xlsModule.Color.get_Yellow();
// Set the first two data rows to a light sky blue background
sheet.Range.get("A2:E2").Style.Color = xlsModule.Color.get_LightSkyBlue();
sheet.Range.get("A3:E3").Style.Color = xlsModule.Color.get_LightSkyBlue();
// Save the document
const outputFileName = 'SetBackgroundColor_output.xlsx';
workbook.SaveToFile({ fileName: outputFileName, version: xlsModule.ExcelVersion.Version2010 });
// Release resources
workbook.Dispose();
// Read the converted file from the VFS and trigger a download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Set Cell Background Color</h1>
<button onClick={setBackgroundColor}>
Start
</button>
</div>
);
}
export default App;
After setting the background colors, the header row is displayed with a yellow background and the first two data rows with a light sky blue background, making it easy to distinguish cells in different regions.

Set Worksheet Background Image
In addition to setting background colors for cells, you can also set a background image for the whole worksheet to make the report more recognizable. Spire.XLS for JavaScript sets an image as the worksheet background through the Worksheet.PageSetup.BackgroundImage property. The main steps are as follows:
- Create a
Workbookobject and use theLoadFromFile()method to load the Excel document. - Use the
Workbook.Worksheets.get()method to get a specific worksheet. - Use a
Streamobject to read the image file to be used as the background. - Use the
Worksheet.PageSetup.BackgroundImageproperty to set the image as the worksheet background. - Use the
Workbook.SaveToFile()method to save the document to a specified path.
Here is a complete code example showing how to set a background image for a worksheet in React:
function App() {
const setBackgroundImage = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check whether the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Load the font, image, and Excel file into the VFS
await window.spire.FetchFileToVFS('ARIAL.TTF', '/Library/Fonts/', `${process.env.PUBLIC_URL}/font/`);
const backgroundImageName = 'Background.png';
await window.spire.FetchFileToVFS(backgroundImageName, '', `${process.env.PUBLIC_URL}data/`);
const inputFileName = 'SetBackgroundColor.xlsx';
await window.spire.FetchFileToVFS(inputFileName, '', `${process.env.PUBLIC_URL}data/`);
// Load the workbook
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: inputFileName });
// Get the first worksheet
const sheet = workbook.Worksheets.get(0);
// Open the image as a stream
const bm = new xlsModule.Stream(backgroundImageName);
// Set the image as the worksheet background
sheet.PageSetup.BackgroundImage = bm;
// Save the document
const outputFileName = 'SetBackgroundImage_output.xlsx';
workbook.SaveToFile({ fileName: outputFileName, version: xlsModule.ExcelVersion.Version2010 });
// Release resources
workbook.Dispose();
// Read the converted file from the VFS and trigger a download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Set Worksheet Background Image</h1>
<button onClick={setBackgroundImage}>
Start
</button>
</div>
);
}
export default App;
After setting the background image, the image fills the back of the worksheet as its background, while the cell contents and data remain clearly displayed on top of the image.

FAQ
The background color is lost after saving and reopening
Cause: The Style.Color property sets the background (fill) color of a cell, not the font color. If the color is overridden by other styles, or the fill pattern is not set correctly, the color may not display properly.
Solution: Set the color directly for the cell range, for example sheet.Range.get("A1:E1").Style.Color = xlsModule.Color.get_Yellow();. If you want to use a patterned fill, combine Style.Interior.FillPattern and Style.Interior.Gradient.
The background image does not appear above the data
Cause: A worksheet background image is always displayed behind the cell contents and only serves as background decoration. It neither covers the data nor is covered by it.
Solution: This is the normal display layering. If you need the image to appear on top of the data, use the Worksheet.Pictures.Add() method to insert a floating image in the worksheet instead of setting a worksheet background.
Obtain a Free License
Spire.XLS for JavaScript offers a 30-day full-featured free trial license with no functional limitations. Apply here to evaluate before purchasing.
Sort Data in Excel with JavaScript in React
In everyday Excel data processing, sorting is one of the most common operations — whether rearranging data by name, value, or date, it makes tables more organized and easier to search. Spire.XLS for JavaScript performs data sorting directly in the browser based on WebAssembly, and manages input/output files through a virtual file system (VFS), with no backend service required.
This article covers two core features:
For installation and project configuration, refer to Integrating Spire.XLS for JavaScript in a React Project. The examples below assume Spire.XLS is installed and the WebAssembly module is initialized.
Sort Data in a Cell Range in Ascending Order
Sorting a specified cell range in ascending order is the most common data arrangement requirement. Spire.XLS for JavaScript adds a sort field and specifies the sort order with the Workbook.DataSorter.SortColumns.Add() method, then sorts the specified range with the Workbook.DataSorter.Sort() method. The main steps are as follows:
- Create a
Workbookobject and use theLoadFromFile()method to load the Excel document. - Use the
Workbook.Worksheets.get()method to get a specific worksheet. - Use the
Workbook.DataSorter.SortColumns.Add()method to add a sort field, specifying the column and the sort order. - Use the
Workbook.DataSorter.Sort()method to sort the specified cell range. - Use the
Workbook.SaveToFile()method to save the document to a specified path.
Here is a complete code example showing how to sort a cell range in ascending order by a single column in React:
function App() {
const sortAscending = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check whether the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Load the font and Excel file into the VFS
await window.spire.FetchFileToVFS('ARIAL.TTF', '/Library/Fonts/', `${process.env.PUBLIC_URL}/font/`);
const inputFileName = 'DataSorting.xlsx';
await window.spire.FetchFileToVFS(inputFileName, '', `${process.env.PUBLIC_URL}data/`);
// Load the workbook
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: inputFileName });
// Get the first worksheet
const sheet = workbook.Worksheets.get(0);
// Add a sort field: sort by the 5th column (Population) in ascending order
workbook.DataSorter.SortColumns.Add({ key: 4, orderBy: xlsModule.OrderBy.Ascending });
// Sort the specified cell range A1:E19
workbook.DataSorter.Sort(sheet.Range.get("A1:E19"));
// Save the document
const outputFileName = 'SortDataAscending_output.xlsx';
workbook.SaveToFile({ fileName: outputFileName, version: xlsModule.ExcelVersion.Version2010 });
// Release resources
workbook.Dispose();
// Read the converted file from the VFS and trigger a download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Sort Data in Ascending Order</h1>
<button onClick={sortAscending}>
Start
</button>
</div>
);
}
export default App;
After sorting, the data is rearranged in ascending numerical order based on the 5th column (Population), from the smallest to the largest, and the other columns in the same row stay aligned with the Population column.

Sort Data by Multiple Columns
When a single-column sort is not enough, you can sort by multiple columns at the same time. Spire.XLS for JavaScript supports adding multiple sort fields by calling the SortColumns.Add() method several times. Data is sorted by the first field first, then by the subsequent fields. The main steps are as follows:
- Create a
Workbookobject and use theLoadFromFile()method to load the Excel document. - Use the
Workbook.Worksheets.get()method to get a specific worksheet. - Call the
Workbook.DataSorter.SortColumns.Add()method several times to add multiple sort fields. - Use the
Workbook.DataSorter.Sort()method to sort the specified cell range. - Use the
Workbook.SaveToFile()method to save the document to a specified path.
Here is a complete code example showing how to sort a cell range by multiple columns in React:
function App() {
const sortMultipleColumns = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check whether the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Load the font and Excel file into the VFS
await window.spire.FetchFileToVFS('ARIAL.TTF', '/Library/Fonts/', `${process.env.PUBLIC_URL}/font/`);
const inputFileName = 'DataSorting.xlsx';
await window.spire.FetchFileToVFS(inputFileName, '', `${process.env.PUBLIC_URL}data/`);
// Load the workbook
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: inputFileName });
// Get the first worksheet
const sheet = workbook.Worksheets.get(0);
// Add multiple sort fields: first by the 3rd column (Continent), then by the 4th column (Area), ascending
workbook.DataSorter.SortColumns.Add({ key: 2, orderBy: xlsModule.OrderBy.Ascending });
workbook.DataSorter.SortColumns.Add({ key: 3, orderBy: xlsModule.OrderBy.Ascending });
// Sort the specified cell range A1:E19
workbook.DataSorter.Sort(sheet.Range.get("A1:E19"));
// Save the document
const outputFileName = 'SortDataMultipleColumns_output.xlsx';
workbook.SaveToFile({ fileName: outputFileName, version: xlsModule.ExcelVersion.Version2010 });
// Release resources
workbook.Dispose();
// Read the converted file from the VFS and trigger a download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Sort Data by Multiple Columns</h1>
<button onClick={sortMultipleColumns}>
Start
</button>
</div>
);
}
export default App;
After sorting, the data is first arranged in ascending order by the 3rd column (Continent), grouping countries from the same continent together; when the continents are the same, it is then sorted in ascending order by the 4th column (Area).

FAQ
The header row is also included in the sorting
Cause: By default, the DataSorter.Sort() method treats the first row of the sort range as a title row and keeps it in place. If the header is moved into the data rows, it is usually because the starting row of the sort range is set incorrectly.
Solution: Make sure the range passed to the Sort() method includes the header row and that the header row is at the top of the range, for example sheet.Range.get("A1:E19"). You can also start the sort from the data rows, such as sheet.Range.get("A2:E19").
After a single-column sort, other columns do not change accordingly
Cause: The sort only takes effect on the cell range passed to the Sort() method. If you sort only a single column's range, the other columns will not be rearranged, causing data in the same row to become misaligned.
Solution: Make the sort range cover all related columns (for example, the complete range that includes name, capital, continent, area, and population, A1:E19), so that the entire row moves together.
Obtain a Free License
Spire.XLS for JavaScript offers a 30-day full-featured free trial license with no functional limitations. Apply here to evaluate before purchasing.
Find and Replace Data in Excel with JavaScript in React
Finding and replacing data is a common requirement when processing Excel files in web applications. Spire.XLS for JavaScript runs entirely in the browser via WebAssembly, using a virtual file system (VFS) to manage input and output files — no backend server required. It provides search methods such as FindAllString() and FindAllNumber() that let you locate target data across an entire worksheet or within a specified cell range, quickly replace it with new content, and optionally mark the replaced cells with a highlight color.
With Spire.XLS for JavaScript, you can batch-replace text across an entire worksheet or restrict the search to a specific cell range, giving you both efficiency and flexibility when updating partial data precisely.
This article covers two core features:
- Find and Replace Data in a Worksheet in Excel
- Find and Replace Data in a Specific Cell Range in Excel
For installation and project setup, refer to Integrating Spire.XLS for JavaScript in a React Project. The examples below assume Spire.XLS is installed and the WebAssembly module is initialized.
Find and Replace Data in a Worksheet in Excel
With Spire.XLS for JavaScript, you can find all cells containing a specified text in an entire worksheet and replace them with new content. The FindAllString() method returns all matching cell ranges. You can then replace the text by setting the range.Text property and highlight the replaced cells by setting the range.Style.Color property, making it easy to identify where modifications were made. The steps are as follows:
- Create a
Workbookobject and load an existing Excel file. - Get the worksheet to operate on via
workbook.Worksheets.get(). - Use
worksheet.FindAllString()to find all cell ranges containing the specified text in the worksheet. - Iterate through the search results, replacing the text via
range.Textand setting the highlight color viarange.Style.Color. - Save the workbook to an Excel file using
SaveToFile().
Below is a complete code example demonstrating how to find and replace data across an entire worksheet in React:
function App() {
const findAndReplace = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
let excelFileName = 'Sample.xlsx';
await window.spire.FetchFileToVFS(excelFileName, '', `${process.env.PUBLIC_URL}static/data/`);
// Create a new workbook and load an existing Excel file
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: excelFileName });
// Get the first worksheet
let worksheet = workbook.Worksheets.get(0);
// Find all cells containing the text "Total" in the worksheet
let ranges = worksheet.FindAllString("Total", false, false);
// Iterate through the search results, replace the text, and set the highlight color
for (let range of ranges) {
range.Text = "Total Expenses";
range.Style.Color = xlsModule.Color.get_Yellow();
}
// Save the workbook
const outputFileName = 'FindAndReplaceData.xlsx';
workbook.SaveToFile({ fileName: outputFileName, version: xlsModule.ExcelVersion.Version2010 });
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Find and Replace Data in a Worksheet</h1>
<button onClick={findAndReplace}>
Generate
</button>
</div>
);
}
export default App;
Find and replace data in a worksheet in Excel

Find and Replace Data in a Specific Cell Range in Excel
When you only need to update part of the data, you can restrict the search to a specific cell range. After specifying the target range with the sheet.Range.get() method, range.FindAllString() searches for cells containing the specified text only within that range, ensuring that data outside the range remains unaffected. The steps are as follows:
- Create a
Workbookobject and load an existing Excel file. - Get the worksheet to operate on via
workbook.Worksheets.get(). - Specify the cell range to search with
sheet.Range.get(). - Use
range.FindAllString()to find cells containing the target text within the specified range, then iterate through the results to replace the text and set the highlight color. - Save the workbook to an Excel file using
SaveToFile().
Below is a complete code example demonstrating how to find and replace data in a specific cell range in React:
function App() {
const findAndReplaceInRange = async () => {
// Get the Spire.XLS WASM module
const xlsModule = window.wasmModule?.spirexls;
// Check if the module is ready
if (!xlsModule) {
alert('Spire.Xls is not ready yet');
return;
}
// Load the sample file into the Virtual File System (VFS)
let excelFileName = 'FindCellsSample.xlsx';
await window.spire.FetchFileToVFS(excelFileName, '', `${process.env.PUBLIC_URL}static/data/`);
// Create a new workbook and load an existing Excel file
const workbook = new xlsModule.Workbook();
workbook.LoadFromFile({ fileName: excelFileName });
// Get the first worksheet
let worksheet = workbook.Worksheets.get(0);
// Specify the cell range to search
let range = worksheet.Range.get({
row: 1,
column: 1,
lastRow: 12,
lastColumn: 2,
});
// Find all cells containing the text "Total" within the specified range
let ranges = range.FindAllString("Total", false, false);
// Iterate through the search results, replace the text, and set the highlight color
for (let r of ranges) {
r.Text = "Total Expenses";
r.Style.Color = xlsModule.Color.get_Yellow();
}
// Save the workbook
const outputFileName = 'FindAndReplaceInRange.xlsx';
workbook.SaveToFile({ fileName: outputFileName, version: xlsModule.ExcelVersion.Version2010 });
workbook.Dispose();
// Read the file from VFS and trigger download
const fileArray = window.dotnetRuntime.Module.FS.readFile(outputFileName);
const blob = new Blob([fileArray], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = outputFileName;
a.click();
URL.revokeObjectURL(url);
};
return (
<div style={{ textAlign: 'center', height: '300px' }}>
<h1>Find and Replace Data in a Specific Cell Range</h1>
<button onClick={findAndReplaceInRange}>
Generate
</button>
</div>
);
}
export default App;
Find and replace data in a specific cell range in Excel

FAQ
How to control whether the search is case-sensitive or matches whole words
Cause: The last two boolean parameters of the FindAllString() method control whether the search is case-sensitive and whether it must match whole words. If these parameters are set incorrectly, you may find too many or too few matching results.
Solution: Adjust the parameters of FindAllString() according to your actual needs:
// Case-insensitive, whole-word matching not required
let ranges = worksheet.FindAllString("Area", false, false);
// Case-sensitive, whole-word matching required
let ranges = worksheet.FindAllString("Total", true, true);
How to find and replace numbers in a specific range
Cause: Find and replace works not only with text but also with numbers. If you only use FindAllString() to handle text, numeric cells cannot be matched.
Solution: Use the range.FindAllNumber() method to find numbers within the specified range, then replace the values by setting the Text property:
let numberRanges = range.FindAllNumber(100, true);
for (let r of numberRanges) {
r.Text = "200";
r.Style.Color = xlsModule.Color.get_Yellow();
}
Get a Free License
Spire.XLS for JavaScript offers a 30-day full-featured free trial license with no functional limitations. Apply here to evaluate before purchasing.